Skip to content

Commit 416ee50

Browse files
authored
Assert if Tilemode exceeds maximum index
1 parent 39e4d2e commit 416ee50

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Source/GmmLib/Texture/GmmTexture.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,8 @@ void GmmLib::GmmTextureCalc::FindMipTailStartLod(GMM_TEXTURE_INFO *pTexInfo)
479479
MipHeight = GFX_CEIL_DIV(MipHeight, CompressHeight);
480480
MipDepth = GFX_CEIL_DIV(MipDepth, CompressDepth);
481481
}
482+
483+
__GMM_ASSERT(pTexInfo->TileMode < GMM_TILE_MODES);
482484

483485
while((Level < pTexInfo->MaxLod) &&
484486
(((pTexInfo->Type == RESOURCE_1D) &&

0 commit comments

Comments
 (0)