[PATCH 3/7] wined3d: Access gl_info and adapter from the context in find_arb_*_compile_args
Stefan Dösinger
stefan at codeweavers.com
Fri Apr 19 04:20:53 CDT 2013
The remaining device reference in find_arb_vs_compile_args will go away
once the tex unit map is moved out of the device.
---
dlls/wined3d/arb_program_shader.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 83af0e1..d0c39db 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -4471,11 +4471,11 @@ static struct arb_vs_compiled_shader *find_arb_vshader(struct wined3d_shader *sh
}
static void find_arb_ps_compile_args(const struct wined3d_state *state,
- const struct wined3d_shader *shader, struct arb_ps_compile_args *args)
+ const struct wined3d_context *context, const struct wined3d_shader *shader,
+ struct arb_ps_compile_args *args)
{
- struct wined3d_device *device = shader->device;
- const struct wined3d_adapter *adapter = device->adapter;
- const struct wined3d_gl_info *gl_info = &adapter->gl_info;
+ const struct wined3d_adapter *adapter = context->adapter;
+ const struct wined3d_gl_info *gl_info = context->gl_info;
int i;
WORD int_skip;
@@ -4527,11 +4527,12 @@ static void find_arb_ps_compile_args(const struct wined3d_state *state,
}
static void find_arb_vs_compile_args(const struct wined3d_state *state,
- const struct wined3d_shader *shader, struct arb_vs_compile_args *args)
+ const struct wined3d_context *context, const struct wined3d_shader *shader,
+ struct arb_vs_compile_args *args)
{
struct wined3d_device *device = shader->device;
- const struct wined3d_adapter *adapter = device->adapter;
- const struct wined3d_gl_info *gl_info = &adapter->gl_info;
+ const struct wined3d_adapter *adapter = context->adapter;
+ const struct wined3d_gl_info *gl_info = context->gl_info;
int i;
WORD int_skip;
@@ -4621,7 +4622,7 @@ static void shader_arb_select(const struct wined3d_context *context, enum wined3
struct arb_ps_compiled_shader *compiled;
TRACE("Using pixel shader %p.\n", ps);
- find_arb_ps_compile_args(state, ps, &compile_args);
+ find_arb_ps_compile_args(state, context, ps, &compile_args);
compiled = find_arb_pshader(ps, &compile_args);
priv->current_fprogram_id = compiled->prgId;
priv->compiled_fprog = compiled;
@@ -4686,7 +4687,7 @@ static void shader_arb_select(const struct wined3d_context *context, enum wined3
struct arb_vs_compiled_shader *compiled;
TRACE("Using vertex shader %p\n", vs);
- find_arb_vs_compile_args(state, vs, &compile_args);
+ find_arb_vs_compile_args(state, context, vs, &compile_args);
compiled = find_arb_vshader(vs, &compile_args);
priv->current_vprogram_id = compiled->prgId;
priv->compiled_vprog = compiled;
--
1.8.1.5
More information about the wine-patches
mailing list