Make BUFFER allocation lockable on DG1
Related-To: NEO-5733 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
parent
e605efb88e
commit
ed31aaedb8
|
@ -108,3 +108,13 @@ DG1TEST_F(HwHelperTestDg1, givenDg1WhenGettingLocalMemoryAccessModeThenReturnCpu
|
||||||
|
|
||||||
EXPECT_EQ(LocalMemoryAccessMode::Default, hwHelper.getDefaultLocalMemoryAccessMode(*defaultHwInfo));
|
EXPECT_EQ(LocalMemoryAccessMode::Default, hwHelper.getDefaultLocalMemoryAccessMode(*defaultHwInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DG1TEST_F(HwHelperTestDg1, givenBufferAllocationTypeWhenSetExtraAllocationDataIsCalledThenIsLockableIsSet) {
|
||||||
|
auto &hwHelper = HwHelper::get(renderCoreFamily);
|
||||||
|
AllocationData allocData{};
|
||||||
|
allocData.flags.useSystemMemory = true;
|
||||||
|
AllocationProperties allocProperties(0, 1, GraphicsAllocation::AllocationType::BUFFER, {});
|
||||||
|
allocData.storageInfo.isLockable = false;
|
||||||
|
hwHelper.setExtraAllocationData(allocData, allocProperties, *defaultHwInfo);
|
||||||
|
EXPECT_TRUE(allocData.storageInfo.isLockable);
|
||||||
|
}
|
||||||
|
|
|
@ -291,6 +291,11 @@ void HwHelperHw<TGLLPFamily>::setExtraAllocationData(AllocationData &allocationD
|
||||||
allocationData.flags.useSystemMemory = true;
|
allocationData.flags.useSystemMemory = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (IGFX_DG1 == hwInfo.platform.eProductFamily) {
|
||||||
|
if (properties.allocationType == GraphicsAllocation::AllocationType::BUFFER) {
|
||||||
|
allocationData.storageInfo.isLockable = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template class HwHelperHw<Family>;
|
template class HwHelperHw<Family>;
|
||||||
|
|
|
@ -12,5 +12,6 @@ struct StorageInfo {
|
||||||
uint32_t getNumBanks() const;
|
uint32_t getNumBanks() const;
|
||||||
uint32_t getMemoryBanks() const { return 0u; }
|
uint32_t getMemoryBanks() const { return 0u; }
|
||||||
bool multiStorage = false;
|
bool multiStorage = false;
|
||||||
|
bool isLockable = false;
|
||||||
};
|
};
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|
Loading…
Reference in New Issue