Module: wine Branch: master Commit: 0b7a96e92b78d08728c8f82a847108fc760f314e URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=0b7a96e92b78d08728c8f82a...
Author: Stefan Dösinger stefan@codeweavers.com Date: Thu Aug 24 23:55:23 2006 +0200
wined3d: Compile pixel shaders in drawprim.
---
dlls/wined3d/drawprim.c | 7 +++++++ dlls/wined3d/pixelshader.c | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index c2ed58c..aa022e2 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -1796,6 +1796,13 @@ #undef BUFFER_OR_DATA 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) || diff --git a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c index f5d6462..ab05dbb 100644 --- a/dlls/wined3d/pixelshader.c +++ b/dlls/wined3d/pixelshader.c @@ -949,9 +949,6 @@ static HRESULT WINAPI IWineD3DPixelShade This->baseShader.function = NULL; }
- /* Compile the shader. */ - IWineD3DPixelShader_CompileShader(iface); - return WINED3D_OK; }