mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
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:

committed by
Compute-Runtime-Automation

parent
f9a5f8a86e
commit
d18e89e439
@ -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));
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user