diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 5f76a45d3b..b4c2a3b7d0 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -4398,7 +4398,7 @@ static inline void find_arb_ps_compile_args(IWineD3DPixelShaderImpl *shader, IWi const struct wined3d_gl_info *gl_info = &((IWineD3DDeviceImpl *)shader->baseShader.device)->adapter->gl_info; const struct wined3d_state *state = &stateblock->state; - find_ps_compile_args(shader, stateblock, &args->super); + find_ps_compile_args(state, shader, &args->super); /* This forces all local boolean constants to 1 to make them stateblock independent */ args->bools = shader->baseShader.reg_maps.local_bool_consts; diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index f640fa4ead..28a33507ab 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -4293,7 +4293,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context, struct vs_compile_args vs_compile_args; if (vshader) find_vs_compile_args(state, (IWineD3DVertexShaderImpl *)vshader, &vs_compile_args); - if (pshader) find_ps_compile_args((IWineD3DPixelShaderImpl *)pshader, device->stateBlock, &ps_compile_args); + if (pshader) find_ps_compile_args(state, (IWineD3DPixelShaderImpl *)pshader, &ps_compile_args); entry = get_glsl_program_entry(priv, vshader, pshader, &vs_compile_args, &ps_compile_args); if (entry) { diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 08c211e7fd..3bbf5edd0e 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -2067,12 +2067,11 @@ static const IWineD3DPixelShaderVtbl IWineD3DPixelShader_Vtbl = pixelshader_GetFunction }; -void find_ps_compile_args(IWineD3DPixelShaderImpl *shader, - IWineD3DStateBlockImpl *stateblock, struct ps_compile_args *args) +void find_ps_compile_args(const struct wined3d_state *state, + IWineD3DPixelShaderImpl *shader, struct ps_compile_args *args) { - const struct wined3d_state *state = &stateblock->state; + IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)shader->baseShader.device; IWineD3DBaseTextureImpl *texture; - IWineD3DDeviceImpl *device = stateblock->device; UINT i; memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 2ce1904f0b..1ab89c57e8 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2915,8 +2915,8 @@ HRESULT pixelshader_init(IWineD3DPixelShaderImpl *shader, IWineD3DDeviceImpl *de void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; void pixelshader_update_samplers(struct shader_reg_maps *reg_maps, IWineD3DBaseTexture * const *textures) DECLSPEC_HIDDEN; -void find_ps_compile_args(IWineD3DPixelShaderImpl *shader, IWineD3DStateBlockImpl *stateblock, - struct ps_compile_args *args) DECLSPEC_HIDDEN; +void find_ps_compile_args(const struct wined3d_state *state, + IWineD3DPixelShaderImpl *shader, struct ps_compile_args *args) DECLSPEC_HIDDEN; /* sRGB correction constants */ static const float srgb_cmp = 0.0031308f;