Skip to content

Commit d7a0586

Browse files
committed
64k-alignment for UV plane only if compressed
Change-Id: I876f6ab67762394a5672585d73646240afa6a60a
1 parent 09324e1 commit d7a0586

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

Source/GmmLib/Texture/GmmGen11Texture.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,12 @@ void GmmLib::GmmGen11TextureCalc::FillPlanarOffsetAddress(GMM_TEXTURE_INFO *pTex
323323

324324
if(GFX_GET_CURRENT_RENDERCORE(pPlatform->Platform) > IGFX_GEN11LP_CORE)
325325
{
326-
//U/V must be aligned to AuxT granularity, for 16K AuxT- 4x pitchalign enforces it,
327-
//add extra padding for 64K AuxT
328-
TileHeight *= (!GMM_IS_64KB_TILE(pTexInfo->Flags) && !WA16K) ? 4 : 1;
326+
if(pTexInfo->Flags.Gpu.CCS)
327+
{
328+
//U/V must be aligned to AuxT granularity, for 16K AuxT- 4x pitchalign enforces it,
329+
//add extra padding for 64K AuxT
330+
TileHeight *= (!GMM_IS_64KB_TILE(pTexInfo->Flags) && !WA16K) ? 4 : 1;
331+
}
329332
}
330333

331334
*pUOffsetX = GFX_ALIGN(*pUOffsetX, TileWidth);

Source/GmmLib/Texture/GmmGen12Texture.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -836,9 +836,12 @@ GMM_STATUS GMM_STDCALL GmmLib::GmmGen12TextureCalc::FillTexPlanar(GMM_TEXTURE_IN
836836

837837
pTexInfo->OffsetInfo.Plane.IsTileAlignedPlanes = true;
838838

839-
//U/V must be aligned to AuxT granularity, 4x pitchalign enforces 16K-align,
840-
//add extra padding for 64K AuxT
841-
TileHeight *= (!GMM_IS_64KB_TILE(pTexInfo->Flags) && !WA16K) ? 4 : 1;
839+
if(pTexInfo->Flags.Gpu.CCS)
840+
{
841+
//U/V must be aligned to AuxT granularity, 4x pitchalign enforces 16K-align,
842+
//add extra padding for 64K AuxT
843+
TileHeight *= (!GMM_IS_64KB_TILE(pTexInfo->Flags) && !WA16K) ? 4 : 1;
844+
}
842845

843846
if(pTexInfo->Format == GMM_FORMAT_IMC2 || // IMC2, IMC4 needs even tile columns
844847
pTexInfo->Format == GMM_FORMAT_IMC4)

0 commit comments

Comments
 (0)