Apply memory flag when creating Gmm with image info

Resolves: NEO-3294

Change-Id: I2702611c5b3b2ccd8d48219b90479a6fd3fbe1f7
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2019-06-11 16:03:05 +02:00
committed by sys_ocldev
parent cf78aab248
commit b04fc1121e
9 changed files with 14 additions and 13 deletions

View File

@ -56,9 +56,10 @@ Gmm::Gmm(GMM_RESOURCE_INFO *inputGmm) {
gmmResourceInfo.reset(GmmResourceInfo::create(inputGmm));
}
Gmm::Gmm(ImageInfo &inputOutputImgInfo) {
Gmm::Gmm(ImageInfo &inputOutputImgInfo, StorageInfo storageInfo) {
this->resourceParams = {};
setupImageResourceParams(inputOutputImgInfo);
applyMemoryFlags(!inputOutputImgInfo.useLocalMemory, storageInfo);
this->gmmResourceInfo.reset(GmmResourceInfo::create(&this->resourceParams));
UNRECOVERABLE_IF(this->gmmResourceInfo == nullptr);

View File

@ -25,7 +25,7 @@ class Gmm {
public:
virtual ~Gmm() = default;
Gmm() = delete;
Gmm(ImageInfo &inputOutputImgInfo);
Gmm(ImageInfo &inputOutputImgInfo, StorageInfo storageInfo);
Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable);
Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable, bool preferRenderCompressed, bool systemMemoryPool, StorageInfo storageInfo);
Gmm(GMM_RESOURCE_INFO *inputGmm);