From d18e89e43917c1ba52c040b03d6d20afa882699c Mon Sep 17 00:00:00 2001 From: Krzysztof Gibala Date: Thu, 28 Apr 2022 12:51:31 +0000 Subject: [PATCH] Create getGmmHelper function in Gmm Add get function in order to provide access on GmmHelper object Related-To: NEO-6523 Signed-off-by: Krzysztof Gibala --- .../compression_params_tgllp_and_later.inl | 6 +++--- shared/source/gmm_helper/gmm.cpp | 4 ++++ shared/source/gmm_helper/gmm.h | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/shared/source/command_container/image_surface_state/compression_params_tgllp_and_later.inl b/shared/source/command_container/image_surface_state/compression_params_tgllp_and_later.inl index 60e6f4e6ba..5d09916b22 100644 --- a/shared/source/command_container/image_surface_state/compression_params_tgllp_and_later.inl +++ b/shared/source/command_container/image_surface_state/compression_params_tgllp_and_later.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,8 +16,8 @@ void EncodeSurfaceState::setClearColorParams(R_SURFACE_STATE *surfaceSta if (gmm->gmmResourceInfo->getResourceFlags()->Gpu.IndirectClearColor) { surfaceState->setClearValueAddressEnable(true); - uint64_t clearColorAddress = GmmHelper::decanonize(surfaceState->getSurfaceBaseAddress() + - gmm->gmmResourceInfo->getUnifiedAuxSurfaceOffset(GMM_UNIFIED_AUX_TYPE::GMM_AUX_CC)); + uint64_t clearColorAddress = gmm->getGmmHelper()->decanonize(surfaceState->getSurfaceBaseAddress() + + gmm->gmmResourceInfo->getUnifiedAuxSurfaceOffset(GMM_UNIFIED_AUX_TYPE::GMM_AUX_CC)); surfaceState->setClearColorAddress(static_cast(clearColorAddress & 0xFFFFFFFFULL)); surfaceState->setClearColorAddressHigh(static_cast(clearColorAddress >> 32)); } diff --git a/shared/source/gmm_helper/gmm.cpp b/shared/source/gmm_helper/gmm.cpp index fa5eaf8994..a0146405fa 100644 --- a/shared/source/gmm_helper/gmm.cpp +++ b/shared/source/gmm_helper/gmm.cpp @@ -324,6 +324,10 @@ bool Gmm::hasMultisampleControlSurface() const { return this->gmmResourceInfo->getResourceFlags()->Gpu.MCS; } +GmmHelper *Gmm::getGmmHelper() const { + return this->gmmHelper; +} + uint32_t Gmm::getUnifiedAuxPitchTiles() { return this->gmmResourceInfo->getRenderAuxPitchTiles(); } diff --git a/shared/source/gmm_helper/gmm.h b/shared/source/gmm_helper/gmm.h index 58062ec73c..d27bb53257 100644 --- a/shared/source/gmm_helper/gmm.h +++ b/shared/source/gmm_helper/gmm.h @@ -38,6 +38,8 @@ class Gmm { bool unifiedAuxTranslationCapable() const; bool hasMultisampleControlSurface() const; + GmmHelper *getGmmHelper() const; + uint32_t queryQPitch(GMM_RESOURCE_TYPE resType); void updateImgInfoAndDesc(ImageInfo &imgInfo, uint32_t arrayIndex); void updateOffsetsInImgInfo(ImageInfo &imgInfo, uint32_t arrayIndex);