Commit 8d8b7ffb authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

wined3d: Handle out of array bounds state.

parent cd2f10a6
......@@ -435,7 +435,7 @@ void WINAPI IWineD3DBaseTextureImpl_ApplyStateChanges(IWineD3DBaseTexture *iface
state = samplerStates[WINED3DSAMP_MAGFILTER];
if (state < WINED3DTEXF_NONE || state > WINED3DTEXF_ANISOTROPIC) {
FIXME("Unrecognized or unsupported MAGFILTER* value %d\n", state);
}
} else {
glValue = (*This->baseTexture.magLookup)[state - WINED3DTEXF_NONE];
TRACE("ValueMAG=%d setting MAGFILTER to %x\n", state, glValue);
glTexParameteri(textureDimensions, GL_TEXTURE_MAG_FILTER, glValue);
......@@ -446,6 +446,7 @@ void WINAPI IWineD3DBaseTextureImpl_ApplyStateChanges(IWineD3DBaseTexture *iface
}
This->baseTexture.states[WINED3DTEXSTA_MAGFILTER] = state;
}
}
if(textureDimensions != GL_TEXTURE_RECTANGLE_ARB &&
(samplerStates[WINED3DSAMP_MINFILTER] != This->baseTexture.states[WINED3DTEXSTA_MINFILTER] ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment