mirror of https://github.com/intel/gmmlib.git
Force Tile4 instead of Linear for flipchain resources (#229)
This commit is contained in:
parent
c6194729d1
commit
88c3ffec23
|
@ -45,7 +45,16 @@ bool GmmLib::GmmResourceInfoCommon::CopyClientParams(GMM_RESCREATE_PARAMS &Creat
|
|||
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
|
||||
// ordering for Y and L macro-formats.
|
||||
if((CreateParams.Flags.Info.Linear +
|
||||
|
@ -59,7 +68,14 @@ bool GmmLib::GmmResourceInfoCommon::CopyClientParams(GMM_RESCREATE_PARAMS &Creat
|
|||
CreateParams.Flags.Info.ExistingSysMem)
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -1329,7 +1329,6 @@ GMM_STATUS GmmLib::GmmTextureCalc::FillTexBlockMem(GMM_TEXTURE_INFO * pTexInfo,
|
|||
__GMM_ASSERTPTR(pRestrictions, GMM_ERROR);
|
||||
__GMM_ASSERT(pTexInfo->BitsPerPixel == GMM_BITS(8) || (pTexInfo->Flags.Info.AllowVirtualPadding));
|
||||
__GMM_ASSERT(pTexInfo->BaseHeight == 1);
|
||||
__GMM_ASSERT(pTexInfo->Flags.Info.Linear == 1);
|
||||
__GMM_ASSERT(pTexInfo->Flags.Info.TiledW == 0);
|
||||
__GMM_ASSERT(pTexInfo->Flags.Info.TiledX == 0);
|
||||
__GMM_ASSERT(pTexInfo->Flags.Info.TiledY == 0);
|
||||
|
|
Loading…
Reference in New Issue