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

Alexandre Julliard julliard at winehq.org
Wed May 15 16:18:27 CDT 2019


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed May 15 18:20:57 2019 +0430

wined3d: Pass a wined3d_context_gl structure to context_texture_update().

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

---

 dlls/wined3d/context.c         | 12 +++++++-----
 dlls/wined3d/texture.c         |  2 +-
 dlls/wined3d/wined3d_private.h |  4 ++--
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 75388e0..e225571 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1093,13 +1093,15 @@ void context_gl_resource_released(struct wined3d_device *device,
     context_enum_fbo_entries(device, name, rb_namespace, context_queue_fbo_entry_destruction);
 }
 
-void context_texture_update(struct wined3d_context *context, const struct wined3d_texture_gl *texture_gl)
+void wined3d_context_gl_texture_update(struct wined3d_context_gl *context_gl,
+        const struct wined3d_texture_gl *texture_gl)
 {
-    const struct wined3d_gl_info *gl_info = context->gl_info;
-    struct fbo_entry *entry = context->current_fbo;
+    const struct wined3d_gl_info *gl_info = context_gl->c.gl_info;
+    struct fbo_entry *entry = context_gl->c.current_fbo;
     unsigned int i;
 
-    if (!entry || context->rebind_fbo) return;
+    if (!entry || context_gl->c.rebind_fbo)
+        return;
 
     for (i = 0; i < gl_info->limits.buffers + 1; ++i)
     {
@@ -1107,7 +1109,7 @@ void context_texture_update(struct wined3d_context *context, const struct wined3
                 || texture_gl->texture_srgb.name == entry->key.objects[i].object)
         {
             TRACE("Updated texture %p is bound as attachment %u to the current FBO.\n", texture_gl, i);
-            context->rebind_fbo = TRUE;
+            context_gl->c.rebind_fbo = TRUE;
             return;
         }
     }
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 235b9f5..b865c9c 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -2127,7 +2127,7 @@ void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int s
 
         for (i = 0; i < device->context_count; ++i)
         {
-            context_texture_update(device->contexts[i], wined3d_texture_gl(texture));
+            wined3d_context_gl_texture_update(wined3d_context_gl(device->contexts[i]), wined3d_texture_gl(texture));
         }
     }
 }
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 2c0bdeb..2525fca 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2088,6 +2088,8 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl,
 void wined3d_context_gl_load_tex_coords(const struct wined3d_context_gl *context_gl,
         const struct wined3d_stream_info *si, GLuint *current_bo, const struct wined3d_state *state) DECLSPEC_HIDDEN;
 void wined3d_context_gl_set_draw_buffer(struct wined3d_context_gl *context_gl, GLenum buffer) DECLSPEC_HIDDEN;
+void wined3d_context_gl_texture_update(struct wined3d_context_gl *context_gl,
+        const struct wined3d_texture_gl *texture_gl) DECLSPEC_HIDDEN;
 void wined3d_context_gl_update_stream_sources(struct wined3d_context_gl *context_gl,
         const struct wined3d_state *state) DECLSPEC_HIDDEN;
 
@@ -2264,8 +2266,6 @@ void context_state_drawbuf(struct wined3d_context *context,
         const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN;
 void context_state_fb(struct wined3d_context *context,
         const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN;
-void context_texture_update(struct wined3d_context *context,
-        const struct wined3d_texture_gl *texture_gl) DECLSPEC_HIDDEN;
 void context_unload_tex_coords(const struct wined3d_context *context) DECLSPEC_HIDDEN;
 void context_unmap_bo_address(struct wined3d_context *context,
         const struct wined3d_bo_address *data, GLenum binding) DECLSPEC_HIDDEN;




More information about the wine-cvs mailing list