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

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

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=
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=
 dlls/wined3d/arb_program_shader.c |    2 ++=0A=
 1 files changed, 2 insertions(+), 0 deletions(-)=0A=
diff --git a/dlls/wined3d/arb_program_shader.c =
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=
state_texfactor_arbfp(STATE_RENDER(WINED3DRS_TEXTUREFACTOR), stateblock, =
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=


More information about the wine-patches mailing list