Support Gmm::GetMipTailStartLodSurfaceState()

Change-Id: I804061066c1a5c46bd3366ada525511885b2586f
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2019-10-28 08:11:18 +01:00
parent 440520ffdc
commit 542da0ecf7
7 changed files with 60 additions and 4 deletions

View File

@@ -353,5 +353,8 @@ class ImageHw : public Image {
return inputShaderChannel;
}
typename RENDER_SURFACE_STATE::SURFACE_TYPE surfaceType;
protected:
void setMipTailStartLod(RENDER_SURFACE_STATE *surfaceState);
};
} // namespace NEO

View File

@@ -99,6 +99,7 @@ void ImageHw<GfxFamily>::setImageArg(void *memory, bool setAsMediaBlockImage, ui
surfaceState->setMinimumArrayElement(minimumArrayElement);
surfaceState->setSurfaceMinLod(this->baseMipLevel + mipLevel);
surfaceState->setMipCountLod((this->mipCount > 0) ? (this->mipCount - 1) : 0);
setMipTailStartLod(surfaceState);
// SurfaceQpitch is in rows but must be a multiple of VALIGN
surfaceState->setSurfaceQpitch(qPitch);
@@ -287,4 +288,13 @@ void ImageHw<GfxFamily>::setClearColorParams(RENDER_SURFACE_STATE *surfaceState,
template <typename GfxFamily>
void ImageHw<GfxFamily>::setAuxParamsForMCSCCS(RENDER_SURFACE_STATE *surfaceState, Gmm *gmm) {
}
template <typename GfxFamily>
void ImageHw<GfxFamily>::setMipTailStartLod(RENDER_SURFACE_STATE *surfaceState) {
surfaceState->setMipTailStartLod(0);
if (auto gmm = getGraphicsAllocation()->getDefaultGmm()) {
surfaceState->setMipTailStartLod(gmm->gmmResourceInfo->getMipTailStartLodSurfaceState());
}
}
} // namespace NEO