performance: enable cmd buffer preallocate xehp+

For L0 immediate cmdlists try to use reusable allocations if available.

Related-To: NEO-10526

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2024-03-06 12:40:48 +00:00
committed by Compute-Runtime-Automation
parent f0281202bf
commit 033ff28609
8 changed files with 34 additions and 29 deletions

View File

@@ -480,10 +480,6 @@ void CommandContainer::setCmdBuffer(GraphicsAllocation *cmdBuffer) {
}
}
GraphicsAllocation *CommandContainer::allocateCommandBuffer() {
return this->allocateCommandBuffer(false);
}
GraphicsAllocation *CommandContainer::allocateCommandBuffer(bool forceHostMemory) {
size_t alignedSize = getAlignedCmdBufferSize();
AllocationProperties properties{device->getRootDeviceIndex(),
@@ -517,12 +513,12 @@ void CommandContainer::fillReusableAllocationLists() {
}
for (auto i = 0u; i < amountToFill; i++) {
auto allocToReuse = this->allocateCommandBuffer();
auto allocToReuse = obtainNextCommandBufferAllocation();
this->immediateReusableAllocationList->pushTailOne(*allocToReuse);
this->getResidencyContainer().push_back(allocToReuse);
if (this->useSecondaryCommandStream) {
auto hostAllocToReuse = this->allocateCommandBuffer(true);
auto hostAllocToReuse = obtainNextCommandBufferAllocation(true);
this->immediateReusableAllocationList->pushTailOne(*hostAllocToReuse);
this->getResidencyContainer().push_back(hostAllocToReuse);
}