mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Fix an infinite loop in plDxPipeline.
H'Uru PR #719 commit log: commit 5f53b86494605c484c0b304e0a5ab15a07929106 Author: Adam Johnson <AdamJohnso@gmail.com> Date: Fri Sep 4 07:38:15 2020 -0400 Fix an infinite loop in plDXPipeline. This was observed in a 2x2 DXT1 mipmap produced by Korman. While Korman should probably force such a thing to be uncompressed, the pipeline should also not be able to enter such an obviously invalid state. M Sources/Plasma/PubUtilLib/plPipeline/DX/plDXPipeline.cpp
This commit is contained in:
@ -8663,10 +8663,9 @@ hsBool plDXPipeline::IProcessMipmapLevels( plMipmap *mipmap, UInt32 &numLevels,
|
||||
if( mipmap->IsCompressed() || !( fSettings.fD3DCaps & kCapsDoesSmallTextures ) )
|
||||
{
|
||||
mipmap->SetCurrLevel( maxLevel );
|
||||
while( ( mipmap->GetCurrWidth() | mipmap->GetCurrHeight() ) & sizeMask )
|
||||
while( maxLevel > 0 && (( mipmap->GetCurrWidth() | mipmap->GetCurrHeight() ) & sizeMask) )
|
||||
{
|
||||
maxLevel--;
|
||||
hsAssert( maxLevel >= 0, "How was this ever compressed?" );
|
||||
mipmap->SetCurrLevel( maxLevel );
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user