Force Tile4 instead of Linear for flipchain resources (#229)

This commit is contained in:
John Machado 2025-03-12 12:16:01 +05:30 committed by GitHub
parent c6194729d1
commit 88c3ffec23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 3 deletions

View File

@ -45,7 +45,16 @@ bool GmmLib::GmmResourceInfoCommon::CopyClientParams(GMM_RESCREATE_PARAMS &Creat
return false; return false;
} }
{ {
// Promote tiling options if caller does not provide any. if ((GetGmmLibContext()->GetSkuTable().FtrXe2Compression) &&
(CreateParams.Type == RESOURCE_BUFFER) &&
(CreateParams.Flags.Info.Linear) &&
(CreateParams.Flags.Gpu.FlipChain))
{
CreateParams.Flags.Info.Linear = false;
CreateParams.Flags.Info.Tile4 = true;
}
// Promote tiling options if caller does not provide any.
// X/Y/W/L are tiling formats, and Yf/Ys are modifiers to the internal // X/Y/W/L are tiling formats, and Yf/Ys are modifiers to the internal
// ordering for Y and L macro-formats. // ordering for Y and L macro-formats.
if((CreateParams.Flags.Info.Linear + if((CreateParams.Flags.Info.Linear +
@ -59,7 +68,14 @@ bool GmmLib::GmmResourceInfoCommon::CopyClientParams(GMM_RESCREATE_PARAMS &Creat
CreateParams.Flags.Info.ExistingSysMem) CreateParams.Flags.Info.ExistingSysMem)
{ {
CreateParams.Flags.Info.Linear = true; CreateParams.Flags.Info.Linear = true;
}
if ((GetGmmLibContext()->GetSkuTable().FtrXe2Compression) &&
CreateParams.Flags.Gpu.FlipChain && (CreateParams.Type == RESOURCE_BUFFER))
{
CreateParams.Flags.Info.Linear = false;
CreateParams.Flags.Info.Tile4 = true;
}
}
if(GetGmmLibContext()->GetSkuTable().FtrTileY) if(GetGmmLibContext()->GetSkuTable().FtrTileY)
{ {

View File

@ -1329,7 +1329,6 @@ GMM_STATUS GmmLib::GmmTextureCalc::FillTexBlockMem(GMM_TEXTURE_INFO * pTexInfo,
__GMM_ASSERTPTR(pRestrictions, GMM_ERROR); __GMM_ASSERTPTR(pRestrictions, GMM_ERROR);
__GMM_ASSERT(pTexInfo->BitsPerPixel == GMM_BITS(8) || (pTexInfo->Flags.Info.AllowVirtualPadding)); __GMM_ASSERT(pTexInfo->BitsPerPixel == GMM_BITS(8) || (pTexInfo->Flags.Info.AllowVirtualPadding));
__GMM_ASSERT(pTexInfo->BaseHeight == 1); __GMM_ASSERT(pTexInfo->BaseHeight == 1);
__GMM_ASSERT(pTexInfo->Flags.Info.Linear == 1);
__GMM_ASSERT(pTexInfo->Flags.Info.TiledW == 0); __GMM_ASSERT(pTexInfo->Flags.Info.TiledW == 0);
__GMM_ASSERT(pTexInfo->Flags.Info.TiledX == 0); __GMM_ASSERT(pTexInfo->Flags.Info.TiledX == 0);
__GMM_ASSERT(pTexInfo->Flags.Info.TiledY == 0); __GMM_ASSERT(pTexInfo->Flags.Info.TiledY == 0);