fix: get gmm resource type using ResourceInfo interface
GMM_RESOURCE_INFO interface should be used only within ResourceInfo class Related-To: NEO-7951 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
parent
c4f36a6808
commit
b1543289d2
|
@ -16,7 +16,7 @@
|
|||
namespace NEO {
|
||||
|
||||
void *UnifiedImage::swapGmm(GraphicsAllocation *graphicsAllocation, Context *context, ImageInfo *imgInfo) {
|
||||
if (graphicsAllocation->getDefaultGmm()->gmmResourceInfo->peekGmmResourceInfo()->GetResourceType() == RESOURCE_BUFFER) {
|
||||
if (graphicsAllocation->getDefaultGmm()->gmmResourceInfo->getResourceType() == RESOURCE_BUFFER) {
|
||||
auto gmmHelper = context->getDevice(0)->getRootDeviceEnvironment().getGmmHelper();
|
||||
auto gmm = std::make_unique<Gmm>(gmmHelper, *imgInfo, StorageInfo{}, false);
|
||||
gmm->updateImgInfoAndDesc(*imgInfo, 0);
|
||||
|
|
|
@ -111,6 +111,7 @@ struct MemoryManagerReturningCompressedAllocations : UnifiedSharingMockMemoryMan
|
|||
|
||||
auto gmm = allocation->getDefaultGmm();
|
||||
auto mockGmmResourceInfo = std::make_unique<MockGmmResourceInfo>(gmm->gmmResourceInfo->peekGmmResourceInfo());
|
||||
mockGmmResourceInfo->mockResourceCreateParams.Type = RESOURCE_1D;
|
||||
mockGmmResourceInfo->setUnifiedAuxTranslationCapable();
|
||||
gmm->gmmResourceInfo = std::move(mockGmmResourceInfo);
|
||||
|
||||
|
|
Loading…
Reference in New Issue