Set compression format for AUX_MCS_LCE mode

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2021-09-20 11:52:08 +00:00
committed by Compute-Runtime-Automation
parent 26d2c29e27
commit 2bf08aaa67
2 changed files with 23 additions and 1 deletions

View File

@@ -13,7 +13,8 @@ namespace NEO {
template <typename Family>
void EncodeSurfaceState<Family>::appendImageCompressionParams(R_SURFACE_STATE *surfaceState, GraphicsAllocation *allocation, GmmHelper *gmmHelper, bool imageFromBuffer) {
const auto ccsMode = R_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_CCS_E;
if ((ccsMode == surfaceState->getAuxiliarySurfaceMode() || surfaceState->getMemoryCompressionEnable())) {
const auto mcsLceMode = R_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_MCS_LCE;
if ((ccsMode == surfaceState->getAuxiliarySurfaceMode() || mcsLceMode == surfaceState->getAuxiliarySurfaceMode() || surfaceState->getMemoryCompressionEnable())) {
uint8_t compressionFormat;
auto gmmResourceInfo = allocation->getDefaultGmm()->gmmResourceInfo.get();
if (gmmResourceInfo->getResourceFlags()->Info.MediaCompressed) {