[PATCH] WineD3D: Set up the shaders when delaying fixed func =

Stefan Doesinger stefan at codeweavers.com
Thu Dec 11 14:16:25 CST 2008


applying=0A=
=0A=
This is yet another case where the in-code linking between the=0A=
fog setting and the fixed function pipeline replacement can cause=0A=
problems. If the arbfp pipeline replacement handler is called, it=0A=
exits early because the fog handler will call it again, then the=0A=
shader backend could attempt to load constants before compiling=0A=
the shader because the pixelshader state isn't dirty as its=0A=
supposed to be.=0A=
=0A=
I am working on getting rid of this ugly fog state handling in=0A=
the pipeline replacement, but that is trickier than expected, and=0A=
I want to fix this bug for now=0A=
---=0A=
 dlls/wined3d/arb_program_shader.c |    2 ++=0A=
 1 files changed, 2 insertions(+), 0 deletions(-)=0A=
=0A=
diff --git a/dlls/wined3d/arb_program_shader.c =
b/dlls/wined3d/arb_program_shader.c=0A=
index f03e23b..2732bae 100644=0A=
--- a/dlls/wined3d/arb_program_shader.c=0A=
+++ b/dlls/wined3d/arb_program_shader.c=0A=
@@ -2906,6 +2906,8 @@ static void fragment_prog_arbfp(DWORD state, =
IWineD3DStateBlockImpl *stateblock,=0A=
             }=0A=
             =
state_texfactor_arbfp(STATE_RENDER(WINED3DRS_TEXTUREFACTOR), stateblock, =
context);=0A=
             =
state_arb_specularenable(STATE_RENDER(WINED3DRS_SPECULARENABLE), =
stateblock, context);=0A=
+        } else if(use_pshader && !isStateDirty(context, =
device->StateTable[STATE_VSHADER].representative)) {=0A=
+            device->shader_backend->shader_select((IWineD3DDevice =
*)stateblock->wineD3DDevice, use_pshader, use_vshader);=0A=
         }=0A=
         return;=0A=
     }=0A=
-- =0A=
1.5.6.4=0A=
=0A=

------=_NextPart_000_0002_01C95B9C.138FB260--




More information about the wine-devel mailing list