mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
set islockable only for non shareable memory
-Fix gen12 helper to only set islockable on the storage if the allocation is not shareable. Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
593756bee0
commit
cbdf324a70
@ -61,6 +61,18 @@ DG1TEST_F(HwHelperTestDg1, givenBufferAllocationTypeWhenSetExtraAllocationDataIs
|
||||
allocData.flags.useSystemMemory = true;
|
||||
AllocationProperties allocProperties(0, 1, GraphicsAllocation::AllocationType::BUFFER, {});
|
||||
allocData.storageInfo.isLockable = false;
|
||||
allocProperties.flags.shareable = false;
|
||||
hwHelper.setExtraAllocationData(allocData, allocProperties, *defaultHwInfo);
|
||||
EXPECT_TRUE(allocData.storageInfo.isLockable);
|
||||
}
|
||||
|
||||
DG1TEST_F(HwHelperTestDg1, givenBufferAllocationTypeWhenSetExtraAllocationDataIsCalledWithShareableSetThenIsLockableIsFalse) {
|
||||
auto &hwHelper = HwHelper::get(renderCoreFamily);
|
||||
AllocationData allocData{};
|
||||
allocData.flags.useSystemMemory = true;
|
||||
AllocationProperties allocProperties(0, 1, GraphicsAllocation::AllocationType::BUFFER, {});
|
||||
allocData.storageInfo.isLockable = false;
|
||||
allocProperties.flags.shareable = true;
|
||||
hwHelper.setExtraAllocationData(allocData, allocProperties, *defaultHwInfo);
|
||||
EXPECT_FALSE(allocData.storageInfo.isLockable);
|
||||
}
|
||||
|
Reference in New Issue
Block a user