mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
refactor: move semaphore to smem when no acquire fence required
Related-To: NEO-14642 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1c42b26f41
commit
3d1ea7165c
@@ -223,7 +223,7 @@ void GfxCoreHelperHw<Family>::setExtraAllocationData(AllocationData &allocationD
|
||||
allocationData.flags.requiresCpuAccess = true;
|
||||
}
|
||||
|
||||
if (properties.allocationType == AllocationType::semaphoreBuffer) {
|
||||
if (properties.allocationType == AllocationType::semaphoreBuffer && !rootDeviceEnvironment.getProductHelper().isGlobalFenceInDirectSubmissionRequired(hwInfo)) {
|
||||
allocationData.flags.useSystemMemory = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,10 +216,15 @@ void GfxCoreHelperHw<Family>::setL1CachePolicy(bool useL1Cache, typename Family:
|
||||
template <>
|
||||
void GfxCoreHelperHw<Family>::setExtraAllocationData(AllocationData &allocationData, const AllocationProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment) const {
|
||||
auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo();
|
||||
if (hwInfo.featureTable.flags.ftrLocalMemory &&
|
||||
(properties.allocationType == AllocationType::timestampPacketTagBuffer ||
|
||||
properties.allocationType == AllocationType::commandBuffer)) {
|
||||
allocationData.flags.useSystemMemory = false;
|
||||
if (hwInfo.featureTable.flags.ftrLocalMemory) {
|
||||
if (properties.allocationType == AllocationType::timestampPacketTagBuffer ||
|
||||
properties.allocationType == AllocationType::commandBuffer) {
|
||||
allocationData.flags.useSystemMemory = false;
|
||||
}
|
||||
|
||||
if (properties.allocationType == AllocationType::semaphoreBuffer && !rootDeviceEnvironment.getProductHelper().isGlobalFenceInDirectSubmissionRequired(hwInfo)) {
|
||||
allocationData.flags.useSystemMemory = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user