64k-alignment for UV plane only if compressed
Change-Id: I876f6ab67762394a5672585d73646240afa6a60a
diff --git a/Source/GmmLib/Texture/GmmGen11Texture.cpp b/Source/GmmLib/Texture/GmmGen11Texture.cpp
index 7e6d60b..4c945d7 100644
--- a/Source/GmmLib/Texture/GmmGen11Texture.cpp
+++ b/Source/GmmLib/Texture/GmmGen11Texture.cpp
@@ -323,9 +323,12 @@
if(GFX_GET_CURRENT_RENDERCORE(pPlatform->Platform) > IGFX_GEN11LP_CORE)
{
- //U/V must be aligned to AuxT granularity, for 16K AuxT- 4x pitchalign enforces it,
- //add extra padding for 64K AuxT
- TileHeight *= (!GMM_IS_64KB_TILE(pTexInfo->Flags) && !WA16K) ? 4 : 1;
+ if(pTexInfo->Flags.Gpu.CCS)
+ {
+ //U/V must be aligned to AuxT granularity, for 16K AuxT- 4x pitchalign enforces it,
+ //add extra padding for 64K AuxT
+ TileHeight *= (!GMM_IS_64KB_TILE(pTexInfo->Flags) && !WA16K) ? 4 : 1;
+ }
}
*pUOffsetX = GFX_ALIGN(*pUOffsetX, TileWidth);
diff --git a/Source/GmmLib/Texture/GmmGen12Texture.cpp b/Source/GmmLib/Texture/GmmGen12Texture.cpp
index 450770a..6a37374 100644
--- a/Source/GmmLib/Texture/GmmGen12Texture.cpp
+++ b/Source/GmmLib/Texture/GmmGen12Texture.cpp
@@ -836,9 +836,12 @@
pTexInfo->OffsetInfo.Plane.IsTileAlignedPlanes = true;
- //U/V must be aligned to AuxT granularity, 4x pitchalign enforces 16K-align,
- //add extra padding for 64K AuxT
- TileHeight *= (!GMM_IS_64KB_TILE(pTexInfo->Flags) && !WA16K) ? 4 : 1;
+ if(pTexInfo->Flags.Gpu.CCS)
+ {
+ //U/V must be aligned to AuxT granularity, 4x pitchalign enforces 16K-align,
+ //add extra padding for 64K AuxT
+ TileHeight *= (!GMM_IS_64KB_TILE(pTexInfo->Flags) && !WA16K) ? 4 : 1;
+ }
if(pTexInfo->Format == GMM_FORMAT_IMC2 || // IMC2, IMC4 needs even tile columns
pTexInfo->Format == GMM_FORMAT_IMC4)