wined3d: Compile pixel shaders in drawprim.

This commit is contained in:
Stefan Dösinger 2006-08-24 23:55:23 +02:00 committed by Alexandre Julliard
parent 4e92e29ce9
commit 0b7a96e92b
2 changed files with 7 additions and 3 deletions

View file

@ -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) ||

View file

@ -949,9 +949,6 @@ static HRESULT WINAPI IWineD3DPixelShaderImpl_SetFunction(IWineD3DPixelShader *i
This->baseShader.function = NULL;
}
/* Compile the shader. */
IWineD3DPixelShader_CompileShader(iface);
return WINED3D_OK;
}