Skip to content

Commit c19706f

Browse files
authored
Fix mipmap generation condition for texture levels
1 parent 8c4b65f commit c19706f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

d3d9/IDirect3DDevice9Ex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ HRESULT m_IDirect3DDevice9Ex::CreateTexture(THIS_ UINT Width, UINT Height, UINT
579579
}
580580

581581
// Only safe for default/managed pool, non-render-target/non-depth-stencil textures
582-
if (Config.ForceMipMapAutoGen && !(Usage & D3DUSAGE_RENDERTARGET) && !(Usage & D3DUSAGE_DEPTHSTENCIL) && (Pool == D3DPOOL_DEFAULT || Pool == D3DPOOL_MANAGED) && Levels != 1)
582+
if (Config.ForceMipMapAutoGen && !(Usage & D3DUSAGE_RENDERTARGET) && !(Usage & D3DUSAGE_DEPTHSTENCIL) && (Pool == D3DPOOL_DEFAULT || Pool == D3DPOOL_MANAGED) && Levels <= 1)
583583
{
584584
Levels = 0;
585585
Usage |= D3DUSAGE_AUTOGENMIPMAP;

0 commit comments

Comments
 (0)