wined3d: Pass a wined3d_context_gl structure to wined3d_sampler_bind().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f3ee4d40ce
commit
90485cdcc7
|
@ -182,10 +182,9 @@ static void texture_gl_apply_base_level(struct wined3d_texture_gl *texture_gl,
|
|||
|
||||
/* This function relies on the correct texture being bound and loaded. */
|
||||
void wined3d_sampler_bind(struct wined3d_sampler *sampler, unsigned int unit,
|
||||
struct wined3d_texture_gl *texture_gl, const struct wined3d_context *context)
|
||||
struct wined3d_texture_gl *texture_gl, const struct wined3d_context_gl *context_gl)
|
||||
{
|
||||
const struct wined3d_context_gl *context_gl = wined3d_context_gl_const(context);
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
const struct wined3d_gl_info *gl_info = context_gl->c.gl_info;
|
||||
|
||||
if (gl_info->supported[ARB_SAMPLER_OBJECTS])
|
||||
{
|
||||
|
|
|
@ -3638,7 +3638,7 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state
|
|||
}
|
||||
}
|
||||
|
||||
wined3d_sampler_bind(sampler, mapped_stage, texture_gl, context);
|
||||
wined3d_sampler_bind(sampler, mapped_stage, texture_gl, context_gl);
|
||||
|
||||
/* Trigger shader constant reloading (for NP2 texcoord fixup) */
|
||||
if (!(texture_gl->t.flags & WINED3D_TEXTURE_POW2_MAT_IDENT))
|
||||
|
|
|
@ -839,7 +839,7 @@ void wined3d_shader_resource_view_gl_bind(struct wined3d_shader_resource_view_gl
|
|||
if (view_gl->gl_view.name)
|
||||
{
|
||||
wined3d_context_gl_bind_texture(context_gl, view_gl->gl_view.target, view_gl->gl_view.name);
|
||||
wined3d_sampler_bind(sampler, unit, NULL, context);
|
||||
wined3d_sampler_bind(sampler, unit, NULL, context_gl);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -851,7 +851,7 @@ void wined3d_shader_resource_view_gl_bind(struct wined3d_shader_resource_view_gl
|
|||
|
||||
texture_gl = wined3d_texture_gl(wined3d_texture_from_resource(view_gl->v.resource));
|
||||
wined3d_texture_gl_bind(texture_gl, context_gl, FALSE);
|
||||
wined3d_sampler_bind(sampler, unit, texture_gl, context);
|
||||
wined3d_sampler_bind(sampler, unit, texture_gl, context_gl);
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
|
|
|
@ -3685,7 +3685,7 @@ struct wined3d_sampler
|
|||
};
|
||||
|
||||
void wined3d_sampler_bind(struct wined3d_sampler *sampler, unsigned int unit,
|
||||
struct wined3d_texture_gl *texture_gl, const struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
struct wined3d_texture_gl *texture_gl, const struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN;
|
||||
|
||||
struct wined3d_vertex_declaration_element
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue