Commit 6012475e authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Properly update last_was_pshader.

parent 7236452d
...@@ -3031,6 +3031,9 @@ static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, ...@@ -3031,6 +3031,9 @@ static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock,
state_texfactor_arbfp(STATE_RENDER(WINED3DRS_TEXTUREFACTOR), stateblock, context); state_texfactor_arbfp(STATE_RENDER(WINED3DRS_TEXTUREFACTOR), stateblock, context);
state_arb_specularenable(STATE_RENDER(WINED3DRS_SPECULARENABLE), stateblock, context); state_arb_specularenable(STATE_RENDER(WINED3DRS_SPECULARENABLE), stateblock, context);
} }
context->last_was_pshader = FALSE;
} else {
context->last_was_pshader = TRUE;
} }
/* Finally, select the shader. If a pixel shader is used, it will be set and enabled by the shader backend. /* Finally, select the shader. If a pixel shader is used, it will be set and enabled by the shader backend.
......
...@@ -885,6 +885,7 @@ static void atifs_apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *statebl ...@@ -885,6 +885,7 @@ static void atifs_apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *statebl
IWineD3DDeviceImpl *device = stateblock->wineD3DDevice; IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
BOOL use_vshader = use_vs(stateblock); BOOL use_vshader = use_vs(stateblock);
context->last_was_pshader = use_ps(stateblock);
/* The ATIFS code does not support pixel shaders currently, but we have to provide a state handler /* The ATIFS code does not support pixel shaders currently, but we have to provide a state handler
* to call shader_select to select a vertex shader if one is applied because the vertex shader state * to call shader_select to select a vertex shader if one is applied because the vertex shader state
* may defer calling the shader backend if the pshader state is dirty. * may defer calling the shader backend if the pshader state is dirty.
......
...@@ -3408,6 +3408,7 @@ void apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DC ...@@ -3408,6 +3408,7 @@ void apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DC
sampler(STATE_SAMPLER(i), stateblock, context); sampler(STATE_SAMPLER(i), stateblock, context);
} }
} }
context->last_was_pshader = TRUE;
} else { } else {
/* Otherwise all samplers were activated by the code above in earlier draws, or by sampler() /* Otherwise all samplers were activated by the code above in earlier draws, or by sampler()
* if a different texture was bound. I don't have to do anything. * if a different texture was bound. I don't have to do anything.
...@@ -3423,6 +3424,7 @@ void apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DC ...@@ -3423,6 +3424,7 @@ void apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DC
(STATE_TEXTURESTAGE(i, WINED3DTSS_COLOROP), stateblock, context); (STATE_TEXTURESTAGE(i, WINED3DTSS_COLOROP), stateblock, context);
} }
} }
context->last_was_pshader = FALSE;
} }
if(!isStateDirty(context, device->StateTable[STATE_VSHADER].representative)) { if(!isStateDirty(context, device->StateTable[STATE_VSHADER].representative)) {
......
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