Henri Verbeet : wined3d: Pass a wined3d_context_gl structure to wined3d_sampler_bind().

Alexandre Julliard julliard at winehq.org
Thu Jun 13 15:40:39 CDT 2019


Module: wine
Branch: master
Commit: 90485cdcc723616d6ba1f56e1468498f422c2564
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=90485cdcc723616d6ba1f56e1468498f422c2564

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Jun 13 16:28:36 2019 +0430

wined3d: Pass a wined3d_context_gl structure to wined3d_sampler_bind().

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 8c3a947..bfc3aec 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 d87f608..06b30ba 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 06e24fb..d74c36f 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 ece1aca..31eb31a 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
 {




More information about the wine-cvs mailing list