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 <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2022-04-28 12:51:31 +00:00
committed by Compute-Runtime-Automation
parent f9a5f8a86e
commit d18e89e439
3 changed files with 9 additions and 3 deletions

View File

@ -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<Family>::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<uint32_t>(clearColorAddress & 0xFFFFFFFFULL));
surfaceState->setClearColorAddressHigh(static_cast<uint32_t>(clearColorAddress >> 32));
}

View File

@ -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();
}

View File

@ -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);