wined3d: Make sure the pixel shader is compiled.
If we're heading out of the pixelshader handler early, and a pixel shader is in use, the pixel shader may not be compiled. The vertex shader handler then checks if the pixel shader is dirty, and calls the shader backend to apply the shader if it isn't. Thus, in the case of GLSL, the shader code could attempt to link an uncompiled shader into the program. This isn't much of a problem because when the fog is applied, the pixel shader is compiled and the program re-linked.
This commit is contained in:
parent
5b77a2f90b
commit
f0f32912a6
|
@ -2776,7 +2776,12 @@ static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock,
|
|||
struct arbfp_ffp_desc *desc;
|
||||
unsigned int i;
|
||||
|
||||
if(isStateDirty(context, STATE_RENDER(WINED3DRS_FOGENABLE))) return;
|
||||
if(isStateDirty(context, STATE_RENDER(WINED3DRS_FOGENABLE))) {
|
||||
if(use_pshader) {
|
||||
IWineD3DPixelShader_CompileShader(stateblock->pixelShader);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(use_pshader) {
|
||||
IWineD3DPixelShader_CompileShader(stateblock->pixelShader);
|
||||
|
|
Loading…
Reference in New Issue