[PATCH 2/5] wined3d: Pass a wined3d_context_gl structure to wined3d_sampler_bind().
Henri Verbeet
hverbeet at codeweavers.com
Thu Jun 13 06:40:36 CDT 2019
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
dlls/wined3d/sampler.c | 5 ++---
dlls/wined3d/state.c | 2 +-
dlls/wined3d/view.c | 4 ++--
dlls/wined3d/wined3d_private.h | 2 +-
4 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/sampler.c b/dlls/wined3d/sampler.c
index 8c3a94766a5..bfc3aec38eb 100644
--- a/dlls/wined3d/sampler.c
+++ b/dlls/wined3d/sampler.c
@@ -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])
{
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index d87f6088ea6..06b30ba5e1e 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -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))
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
index 06e24fb8ebc..d74c36f36f3 100644
--- a/dlls/wined3d/view.c
+++ b/dlls/wined3d/view.c
@@ -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. */
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index ece1acae94a..31eb31a52f8 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -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
{
--
2.11.0
More information about the wine-devel
mailing list