From e28015a844a8c16b7a61625dcde33ddf3be19a30 Mon Sep 17 00:00:00 2001 From: Lukasz Jobczyk Date: Tue, 12 Jul 2022 10:19:15 +0000 Subject: [PATCH] Move ULLS resources to local memory on DG2 Signed-off-by: Lukasz Jobczyk --- .../source/helpers/extra_allocation_data_xehp_and_later.inl | 4 +++- .../unit_test/xe_hpg_core/hw_helper_tests_xe_hpg_core.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/shared/source/helpers/extra_allocation_data_xehp_and_later.inl b/shared/source/helpers/extra_allocation_data_xehp_and_later.inl index 5c9634d0b3..7445b3fc2c 100644 --- a/shared/source/helpers/extra_allocation_data_xehp_and_later.inl +++ b/shared/source/helpers/extra_allocation_data_xehp_and_later.inl @@ -29,7 +29,9 @@ void HwHelperHw::setExtraAllocationData(AllocationData &allocationData, allocationData.storageInfo.isLockable = false; } } else if (hwInfo.featureTable.flags.ftrLocalMemory && - properties.allocationType == AllocationType::COMMAND_BUFFER) { + (properties.allocationType == AllocationType::COMMAND_BUFFER || + properties.allocationType == AllocationType::RING_BUFFER || + properties.allocationType == AllocationType::SEMAPHORE_BUFFER)) { allocationData.flags.useSystemMemory = false; allocationData.flags.requiresCpuAccess = true; } diff --git a/shared/test/unit_test/xe_hpg_core/hw_helper_tests_xe_hpg_core.cpp b/shared/test/unit_test/xe_hpg_core/hw_helper_tests_xe_hpg_core.cpp index ecabeb0b40..4a95e66007 100644 --- a/shared/test/unit_test/xe_hpg_core/hw_helper_tests_xe_hpg_core.cpp +++ b/shared/test/unit_test/xe_hpg_core/hw_helper_tests_xe_hpg_core.cpp @@ -104,7 +104,9 @@ XE_HPG_CORETEST_F(HwHelperTestXeHpgCore, givenAllocDataWhenSetExtraAllocationDat hwHelper.setExtraAllocationData(allocData, allocProperties, *defaultHwInfo); if (defaultHwInfo->featureTable.flags.ftrLocalMemory && - allocProperties.allocationType == AllocationType::COMMAND_BUFFER) { + (allocProperties.allocationType == AllocationType::COMMAND_BUFFER || + allocProperties.allocationType == AllocationType::RING_BUFFER || + allocProperties.allocationType == AllocationType::SEMAPHORE_BUFFER)) { EXPECT_FALSE(allocData.flags.useSystemMemory); EXPECT_TRUE(allocData.flags.requiresCpuAccess); } else {