mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
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:
committed by
Compute-Runtime-Automation
parent
f0281202bf
commit
033ff28609
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user