Commit e12f5ff0 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Pass a wined3d_state structure to find_ps_compile_args().

parent 8d5a25bb
......@@ -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;
......
......@@ -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) {
......
......@@ -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. */
......
......@@ -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;
......
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