Skip to content

Commit

Permalink
Fix to align HAlign to 128bytes for Linear Packed YUV format
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmach authored Dec 5, 2023
1 parent 92d702f commit 5fb4180
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Source/GmmLib/Texture/GmmTexture.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,15 @@ GMM_INLINE GMM_STATUS __GmmTexFillHAlignVAlign(GMM_TEXTURE_INFO *pTexInfo,GMM_LI
UnitAlignHeight = pPlatform->TexAlign.YUV422.Height;

// For packed 8/16-bit formats alignment factor of 4 will give us < 16B so expand to 32B
SET_ALIGN_FACTOR(Width, 32);

if (pTexInfo->Flags.Info.Linear)
{
SET_ALIGN_FACTOR(Width, 128);
}
else
{
SET_ALIGN_FACTOR(Width, 32);
}
}
else if(GmmIsCompressed(pGmmLibContext, pTexInfo->Format)) /////////////////////////////
{
Expand Down

0 comments on commit 5fb4180

Please sign in to comment.