performance: prealloc cmdbuffer on mtl

Preallocate 2 command buffers allocations per command queue initialized
on MTL.

Related-To: NEO-8152

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2023-11-08 12:44:01 +00:00
committed by Compute-Runtime-Automation
parent 79fbd8fedf
commit 7a6fc209dd
16 changed files with 107 additions and 23 deletions

View File

@@ -266,8 +266,10 @@ void CommandStreamReceiver::preallocateCommandBuffer() {
const AllocationProperties commandStreamAllocationProperties{rootDeviceIndex, true, MemoryConstants::pageSize64k, AllocationType::COMMAND_BUFFER,
isMultiOsContextCapable(), false, deviceBitfield};
auto allocation = this->getMemoryManager()->allocateGraphicsMemoryWithProperties(commandStreamAllocationProperties);
getInternalAllocationStorage()->storeAllocation(std::unique_ptr<GraphicsAllocation>(allocation), REUSABLE_ALLOCATION);
this->makeResident(*allocation);
if (allocation) {
getInternalAllocationStorage()->storeAllocation(std::unique_ptr<GraphicsAllocation>(allocation), REUSABLE_ALLOCATION);
this->makeResident(*allocation);
}
}
void CommandStreamReceiver::fillReusableAllocationsList() {