fix: set properly resource params when setAllocationType

gmm params: usage, cachable and resource info
should be set properly when override allocation type

Resolves: HSD-22020344331
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
Katarzyna Cencelewska
2024-08-23 00:02:44 +00:00
committed by Compute-Runtime-Automation
parent 71c6731287
commit 2e0884a301
35 changed files with 201 additions and 129 deletions

View File

@@ -476,7 +476,7 @@ Buffer *Buffer::create(Context *context,
allocationInfo.allocationType = AllocationType::bufferHostMemory;
}
allocationInfo.memory->setAllocationType(allocationInfo.allocationType);
allocationInfo.memory->setAllocationType(allocationInfo.allocationType, defaultDevice->getProductHelper());
auto isWritable = !(memoryProperties.flags.readOnly || memoryProperties.flags.hostReadOnly || memoryProperties.flags.hostNoAccess);
allocationInfo.memory->setMemObjectsAllocationWithWritableFlags(isWritable);

View File

@@ -268,7 +268,7 @@ Image *Image::create(Context *context,
}
if (parentBuffer == nullptr) {
allocationInfo.memory->setAllocationType(AllocationType::image);
allocationInfo.memory->setAllocationType(AllocationType::image, defaultDevice->getProductHelper());
}
if (parentImage) {