mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Pass device bitfield to flattenBatchBuffer
Related-To: NEO-4722 Change-Id: I8ba971c1335689aefdee3ebe13270aa55e5424e9 Signed-off-by: Andrzej Swierczynski <andrzej.swierczynski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
b2719c447b
commit
97aa485048
@@ -29,7 +29,7 @@ class FlatBatchBufferHelper {
|
||||
MOCKABLE_VIRTUAL bool registerCommandChunk(CommandChunk &commandChunk);
|
||||
MOCKABLE_VIRTUAL bool registerCommandChunk(BatchBuffer &batchBuffer, size_t batchBufferStartCommandSize);
|
||||
MOCKABLE_VIRTUAL bool registerBatchBufferStartAddress(uint64_t commandAddress, uint64_t startAddress);
|
||||
virtual GraphicsAllocation *flattenBatchBuffer(uint32_t rootDeviceIndex, BatchBuffer &batchBuffer, size_t &sizeBatchBuffer, DispatchMode dispatchMode) = 0;
|
||||
virtual GraphicsAllocation *flattenBatchBuffer(uint32_t rootDeviceIndex, BatchBuffer &batchBuffer, size_t &sizeBatchBuffer, DispatchMode dispatchMode, DeviceBitfield deviceBitfield) = 0;
|
||||
virtual char *getIndirectPatchCommands(size_t &indirectPatchCommandsSize, std::vector<PatchInfoData> &indirectPatchInfo) = 0;
|
||||
virtual void removePipeControlData(size_t pipeControlLocationSize, void *pipeControlForNooping, const HardwareInfo &hwInfo) = 0;
|
||||
virtual void collectScratchSpacePatchInfo(uint64_t scratchAddress, uint64_t commandOffset, const LinearStream &csr) = 0;
|
||||
|
||||
@@ -15,7 +15,7 @@ template <typename GfxFamily>
|
||||
class FlatBatchBufferHelperHw : public FlatBatchBufferHelper {
|
||||
public:
|
||||
using FlatBatchBufferHelper::FlatBatchBufferHelper;
|
||||
GraphicsAllocation *flattenBatchBuffer(uint32_t rootDeviceIndex, BatchBuffer &batchBuffer, size_t &sizeBatchBuffer, DispatchMode dispatchMode) override;
|
||||
GraphicsAllocation *flattenBatchBuffer(uint32_t rootDeviceIndex, BatchBuffer &batchBuffer, size_t &sizeBatchBuffer, DispatchMode dispatchMode, DeviceBitfield deviceBitfield) override;
|
||||
char *getIndirectPatchCommands(size_t &indirectPatchCommandsSize, std::vector<PatchInfoData> &indirectPatchInfo) override;
|
||||
void removePipeControlData(size_t pipeControlLocationSize, void *pipeControlForNooping, const HardwareInfo &hwInfo) override;
|
||||
void collectScratchSpacePatchInfo(uint64_t scratchAddress, uint64_t commandOffset, const LinearStream &csr) override;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace NEO {
|
||||
|
||||
template <typename GfxFamily>
|
||||
GraphicsAllocation *FlatBatchBufferHelperHw<GfxFamily>::flattenBatchBuffer(uint32_t rootDeviceIndex, BatchBuffer &batchBuffer, size_t &sizeBatchBuffer,
|
||||
DispatchMode dispatchMode) {
|
||||
DispatchMode dispatchMode, DeviceBitfield deviceBitfield) {
|
||||
typedef typename GfxFamily::MI_BATCH_BUFFER_START MI_BATCH_BUFFER_START;
|
||||
typedef typename GfxFamily::MI_BATCH_BUFFER_END MI_BATCH_BUFFER_END;
|
||||
typedef typename GfxFamily::MI_USER_INTERRUPT MI_USER_INTERRUPT;
|
||||
@@ -32,7 +32,7 @@ GraphicsAllocation *FlatBatchBufferHelperHw<GfxFamily>::flattenBatchBuffer(uint3
|
||||
batchBuffer.chainedBatchBuffer->setAubWritable(false, GraphicsAllocation::defaultBank);
|
||||
auto sizeMainBatchBuffer = batchBuffer.chainedBatchBufferStartOffset - batchBuffer.startOffset;
|
||||
auto alignedMainBatchBufferSize = alignUp(sizeMainBatchBuffer + indirectPatchCommandsSize + batchBuffer.chainedBatchBuffer->getUnderlyingBufferSize(), MemoryConstants::pageSize);
|
||||
AllocationProperties flatBatchBufferProperties(rootDeviceIndex, alignedMainBatchBufferSize, GraphicsAllocation::AllocationType::INTERNAL_HOST_MEMORY);
|
||||
AllocationProperties flatBatchBufferProperties(rootDeviceIndex, alignedMainBatchBufferSize, GraphicsAllocation::AllocationType::INTERNAL_HOST_MEMORY, deviceBitfield);
|
||||
flatBatchBufferProperties.alignment = MemoryConstants::pageSize;
|
||||
flatBatchBuffer =
|
||||
getMemoryManager()->allocateGraphicsMemoryWithProperties(flatBatchBufferProperties);
|
||||
@@ -110,7 +110,7 @@ GraphicsAllocation *FlatBatchBufferHelperHw<GfxFamily>::flattenBatchBuffer(uint3
|
||||
|
||||
flatBatchBufferSize = alignUp(flatBatchBufferSize, MemoryConstants::pageSize);
|
||||
flatBatchBufferSize += CSRequirements::csOverfetchSize;
|
||||
AllocationProperties flatBatchBufferProperties(rootDeviceIndex, static_cast<size_t>(flatBatchBufferSize), GraphicsAllocation::AllocationType::INTERNAL_HOST_MEMORY);
|
||||
AllocationProperties flatBatchBufferProperties(rootDeviceIndex, static_cast<size_t>(flatBatchBufferSize), GraphicsAllocation::AllocationType::INTERNAL_HOST_MEMORY, deviceBitfield);
|
||||
flatBatchBufferProperties.alignment = MemoryConstants::pageSize;
|
||||
flatBatchBuffer = getMemoryManager()->allocateGraphicsMemoryWithProperties(flatBatchBufferProperties);
|
||||
UNRECOVERABLE_IF(flatBatchBuffer == nullptr);
|
||||
|
||||
Reference in New Issue
Block a user