Revert "Unify command/ring/semaphore buffers placement"

This reverts commit e035199de4.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2022-03-30 13:18:39 +02:00
committed by Compute-Runtime-Automation
parent 6023a5b58e
commit 91cfd3cd1a
12 changed files with 40 additions and 84 deletions

View File

@@ -235,10 +235,31 @@ void HwHelperHw<Family>::setL1CachePolicy(bool useL1Cache, typename Family::REND
template <>
void HwHelperHw<Family>::setExtraAllocationData(AllocationData &allocationData, const AllocationProperties &properties, const HardwareInfo &hwInfo) const {
if (properties.allocationType == AllocationType::TIMESTAMP_PACKET_TAG_BUFFER) {
if (properties.allocationType == AllocationType::TIMESTAMP_PACKET_TAG_BUFFER || properties.allocationType == AllocationType::COMMAND_BUFFER) {
allocationData.flags.useSystemMemory = false;
}
bool forceLocalMemoryForDirectSubmission = true;
switch (DebugManager.flags.DirectSubmissionForceLocalMemoryStorageMode.get()) {
case 0:
forceLocalMemoryForDirectSubmission = false;
break;
case 1:
forceLocalMemoryForDirectSubmission = properties.flags.multiOsContextCapable;
break;
default:
break;
}
if (forceLocalMemoryForDirectSubmission) {
if (properties.allocationType == AllocationType::COMMAND_BUFFER ||
properties.allocationType == AllocationType::RING_BUFFER ||
properties.allocationType == AllocationType::SEMAPHORE_BUFFER) {
allocationData.flags.useSystemMemory = false;
allocationData.flags.requiresCpuAccess = true;
}
}
allocationData.cacheRegion = properties.cacheRegion;
if (allocationData.flags.requiresCpuAccess && !allocationData.flags.useSystemMemory &&