Commit 612a74a9 authored by H. Verbeet's avatar H. Verbeet Committed by Alexandre Julliard

wined3d: Don't set Parm when isDiffuseSupplied is FALSE in state_colormat(), it isn't used anyway.

parent d4ca34dd
...@@ -812,7 +812,7 @@ static void state_fogdensity(DWORD state, IWineD3DStateBlockImpl *stateblock) { ...@@ -812,7 +812,7 @@ static void state_fogdensity(DWORD state, IWineD3DStateBlockImpl *stateblock) {
/* TODO: Merge with primitive type + init_materials()!! */ /* TODO: Merge with primitive type + init_materials()!! */
static void state_colormat(DWORD state, IWineD3DStateBlockImpl *stateblock) { static void state_colormat(DWORD state, IWineD3DStateBlockImpl *stateblock) {
GLenum Parm = -1; GLenum Parm = 0;
WineDirect3DStridedData *diffuse = &stateblock->wineD3DDevice->strided_streams.u.s.diffuse; WineDirect3DStridedData *diffuse = &stateblock->wineD3DDevice->strided_streams.u.s.diffuse;
BOOL isDiffuseSupplied; BOOL isDiffuseSupplied;
...@@ -825,7 +825,7 @@ static void state_colormat(DWORD state, IWineD3DStateBlockImpl *stateblock) { ...@@ -825,7 +825,7 @@ static void state_colormat(DWORD state, IWineD3DStateBlockImpl *stateblock) {
isDiffuseSupplied = diffuse->lpData || diffuse->VBO; isDiffuseSupplied = diffuse->lpData || diffuse->VBO;
if (stateblock->renderState[WINED3DRS_COLORVERTEX]) { if (isDiffuseSupplied && stateblock->renderState[WINED3DRS_COLORVERTEX]) {
TRACE("diff %d, amb %d, emis %d, spec %d\n", TRACE("diff %d, amb %d, emis %d, spec %d\n",
stateblock->renderState[WINED3DRS_DIFFUSEMATERIALSOURCE], stateblock->renderState[WINED3DRS_DIFFUSEMATERIALSOURCE],
stateblock->renderState[WINED3DRS_AMBIENTMATERIALSOURCE], stateblock->renderState[WINED3DRS_AMBIENTMATERIALSOURCE],
...@@ -847,7 +847,7 @@ static void state_colormat(DWORD state, IWineD3DStateBlockImpl *stateblock) { ...@@ -847,7 +847,7 @@ static void state_colormat(DWORD state, IWineD3DStateBlockImpl *stateblock) {
} }
} }
if(Parm == -1 || !isDiffuseSupplied) { if(!Parm) {
glDisable(GL_COLOR_MATERIAL); glDisable(GL_COLOR_MATERIAL);
checkGLcall("glDisable GL_COLOR_MATERIAL"); checkGLcall("glDisable GL_COLOR_MATERIAL");
} else { } else {
......
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