mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
fix: allocate in system memory when system memory bitfield is set in properties
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e47b88f6e4
commit
b24ad6a1b0
@@ -239,15 +239,8 @@ void RootDeviceEnvironment::initDummyAllocation() {
|
||||
}
|
||||
|
||||
void RootDeviceEnvironment::setDummyBlitProperties(uint32_t rootDeviceIndex) {
|
||||
size_t size = 4 * 4096u;
|
||||
this->dummyBlitProperties = std::make_unique<AllocationProperties>(
|
||||
rootDeviceIndex,
|
||||
true,
|
||||
size,
|
||||
NEO::AllocationType::buffer,
|
||||
false,
|
||||
false,
|
||||
systemMemoryBitfield);
|
||||
size_t size = 32 * MemoryConstants::kiloByte;
|
||||
this->dummyBlitProperties = std::make_unique<AllocationProperties>(rootDeviceIndex, size, NEO::AllocationType::buffer, systemMemoryBitfield);
|
||||
}
|
||||
|
||||
GraphicsAllocation *RootDeviceEnvironment::getDummyAllocation() const {
|
||||
|
||||
@@ -400,6 +400,10 @@ bool MemoryManager::getAllocationData(AllocationData &allocationData, const Allo
|
||||
auto &helper = rootDeviceEnvironment.getHelper<GfxCoreHelper>();
|
||||
auto &productHelper = rootDeviceEnvironment.getProductHelper();
|
||||
|
||||
if (storageInfo.getMemoryBanks() == 0) {
|
||||
allocationData.flags.useSystemMemory = true;
|
||||
}
|
||||
|
||||
bool allow64KbPages = false;
|
||||
bool allow32Bit = false;
|
||||
bool forcePin = properties.flags.forcePin;
|
||||
@@ -1054,7 +1058,7 @@ bool MemoryManager::isLocalMemoryUsedForIsa(uint32_t rootDeviceIndex) {
|
||||
std::call_once(checkIsaPlacementOnceFlags[rootDeviceIndex], [&] {
|
||||
AllocationProperties properties = {rootDeviceIndex, 0x1000, AllocationType::kernelIsa, 1};
|
||||
AllocationData data;
|
||||
getAllocationData(data, properties, nullptr, StorageInfo());
|
||||
getAllocationData(data, properties, nullptr, createStorageInfoFromProperties(properties));
|
||||
isaInLocalMemory[rootDeviceIndex] = !data.flags.useSystemMemory;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user