From 9c34b7ef5946d797c8cfe249ea426ef08021a226 Mon Sep 17 00:00:00 2001 From: Daria Hinz Date: Thu, 20 May 2021 13:49:04 +0000 Subject: [PATCH] Add applyAppResource function Signed-off-by: Daria Hinz --- shared/source/gmm_helper/gmm.cpp | 3 +++ shared/source/gmm_helper/gmm.h | 1 + shared/source/gmm_helper/gmm_utils.cpp | 1 + shared/source/gmm_helper/linux/CMakeLists.txt | 7 +++++++ shared/source/gmm_helper/windows/CMakeLists.txt | 7 +++++++ shared/test/unit_test/os_interface/linux/CMakeLists.txt | 3 ++- 6 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 shared/source/gmm_helper/linux/CMakeLists.txt create mode 100644 shared/source/gmm_helper/windows/CMakeLists.txt diff --git a/shared/source/gmm_helper/gmm.cpp b/shared/source/gmm_helper/gmm.cpp index ec4dd0758d..ef45d83742 100644 --- a/shared/source/gmm_helper/gmm.cpp +++ b/shared/source/gmm_helper/gmm.cpp @@ -50,6 +50,7 @@ Gmm::Gmm(GmmClientContext *clientContext, const void *alignedPtr, size_t aligned applyAuxFlagsForBuffer(preferRenderCompressed); applyMemoryFlags(systemMemoryPool, storageInfo); + applyAppResource(storageInfo); gmmResourceInfo.reset(GmmResourceInfo::create(clientContext, &resourceParams)); } @@ -64,6 +65,8 @@ Gmm::Gmm(GmmClientContext *clientContext, ImageInfo &inputOutputImgInfo, Storage this->resourceParams = {}; setupImageResourceParams(inputOutputImgInfo); applyMemoryFlags(!inputOutputImgInfo.useLocalMemory, storageInfo); + applyAppResource(storageInfo); + this->gmmResourceInfo.reset(GmmResourceInfo::create(clientContext, &this->resourceParams)); UNRECOVERABLE_IF(this->gmmResourceInfo == nullptr); diff --git a/shared/source/gmm_helper/gmm.h b/shared/source/gmm_helper/gmm.h index 8b28efb1cd..0f8ba6cb83 100644 --- a/shared/source/gmm_helper/gmm.h +++ b/shared/source/gmm_helper/gmm.h @@ -34,6 +34,7 @@ class Gmm { void applyAuxFlagsForBuffer(bool preferRenderCompression); void applyMemoryFlags(bool systemMemoryPool, StorageInfo &storageInfo); + void applyAppResource(StorageInfo &storageInfo); bool unifiedAuxTranslationCapable() const; bool hasMultisampleControlSurface() const; diff --git a/shared/source/gmm_helper/gmm_utils.cpp b/shared/source/gmm_helper/gmm_utils.cpp index 8a4f7b6a2d..18502e202c 100644 --- a/shared/source/gmm_helper/gmm_utils.cpp +++ b/shared/source/gmm_helper/gmm_utils.cpp @@ -11,5 +11,6 @@ using namespace NEO; +void Gmm::applyAppResource(StorageInfo &storageInfo) {} void Gmm::applyAuxFlagsForImage(ImageInfo &imgInfo) {} void Gmm::applyMemoryFlags(bool systemMemoryPool, StorageInfo &storageInfo) { this->useSystemMemoryPool = systemMemoryPool; } diff --git a/shared/source/gmm_helper/linux/CMakeLists.txt b/shared/source/gmm_helper/linux/CMakeLists.txt new file mode 100644 index 0000000000..cef68e2de8 --- /dev/null +++ b/shared/source/gmm_helper/linux/CMakeLists.txt @@ -0,0 +1,7 @@ +# +# Copyright (C) 2021 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +add_subdirectories() diff --git a/shared/source/gmm_helper/windows/CMakeLists.txt b/shared/source/gmm_helper/windows/CMakeLists.txt new file mode 100644 index 0000000000..cef68e2de8 --- /dev/null +++ b/shared/source/gmm_helper/windows/CMakeLists.txt @@ -0,0 +1,7 @@ +# +# Copyright (C) 2021 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +add_subdirectories() diff --git a/shared/test/unit_test/os_interface/linux/CMakeLists.txt b/shared/test/unit_test/os_interface/linux/CMakeLists.txt index 650a92fc1d..1bf9975bcb 100644 --- a/shared/test/unit_test/os_interface/linux/CMakeLists.txt +++ b/shared/test/unit_test/os_interface/linux/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (C) 2020 Intel Corporation +# Copyright (C) 2020-2021 Intel Corporation # # SPDX-License-Identifier: MIT # @@ -17,3 +17,4 @@ if(UNIX) ${NEO_CORE_OS_INTERFACE_TESTS_LINUX} ) endif() +add_subdirectories()