Commit 0b7a96e9 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Compile pixel shaders in drawprim.

parent 4e92e29c
......@@ -1796,6 +1796,13 @@ inline static void drawPrimitiveDrawStrided(
useDrawStridedSlow = TRUE;
}
if(usePixelShaderFunction) {
/* We compile the shader here because it depends on the texture stage state
* setup of the bound textures. If the shader is already compiled and the texture stage
* state setup matches the program this function will do nothing
*/
IWineD3DPixelShader_CompileShader(This->stateBlock->pixelShader);
}
/* If GLSL is used for either pixel or vertex shaders, make a GLSL program
* Otherwise set NULL, to restore fixed function */
if ((wined3d_settings.vs_selected_mode == SHADER_GLSL && useVertexShaderFunction) ||
......
......@@ -949,9 +949,6 @@ static HRESULT WINAPI IWineD3DPixelShaderImpl_SetFunction(IWineD3DPixelShader *i
This->baseShader.function = NULL;
}
/* Compile the shader. */
IWineD3DPixelShader_CompileShader(iface);
return WINED3D_OK;
}
......
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