Henri Verbeet : wined3d: Move the "blit_vbo" field from struct wined3d_context to struct wined3d_context_gl.

Alexandre Julliard julliard at winehq.org
Mon May 13 16:24:16 CDT 2019


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Fri May 10 21:19:06 2019 +0430

wined3d: Move the "blit_vbo" field from struct wined3d_context to struct wined3d_context_gl.

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/wined3d_private.h |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index c291c4c..443c6d5 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1444,9 +1444,6 @@ void wined3d_context_cleanup(struct wined3d_context *context)
             }
         }
 
-        if (context->blit_vbo)
-            GL_EXTCALL(glDeleteBuffers(1, &context->blit_vbo));
-
         checkGLcall("context cleanup");
     }
 
@@ -1494,6 +1491,9 @@ void wined3d_context_gl_cleanup(struct wined3d_context_gl *context_gl)
         if (context_gl->dummy_arbfp_prog)
             GL_EXTCALL(glDeleteProgramsARB(1, &context_gl->dummy_arbfp_prog));
 
+        if (context_gl->blit_vbo)
+            GL_EXTCALL(glDeleteBuffers(1, &context_gl->blit_vbo));
+
         checkGLcall("context cleanup");
     }
 
@@ -5630,9 +5630,9 @@ void context_draw_shaded_quad(struct wined3d_context *context, struct wined3d_te
     /* Draw a quad. */
     if (gl_info->supported[ARB_VERTEX_BUFFER_OBJECT])
     {
-        if (!context->blit_vbo)
-            GL_EXTCALL(glGenBuffers(1, &context->blit_vbo));
-        GL_EXTCALL(glBindBuffer(GL_ARRAY_BUFFER, context->blit_vbo));
+        if (!context_gl->blit_vbo)
+            GL_EXTCALL(glGenBuffers(1, &context_gl->blit_vbo));
+        GL_EXTCALL(glBindBuffer(GL_ARRAY_BUFFER, context_gl->blit_vbo));
 
         context_unload_vertex_data(context);
         context_unload_numbered_arrays(context);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 48b97d7..c308b31 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2013,8 +2013,6 @@ struct wined3d_context
     struct wined3d_fence *buffer_fences[MAX_ATTRIBS];
     unsigned int buffer_fence_count;
 
-    GLuint blit_vbo;
-
     unsigned int viewport_count;
     unsigned int scissor_rect_count;
 };
@@ -2033,6 +2031,8 @@ struct wined3d_context_gl
 
     GLenum *texture_type;
 
+    GLuint blit_vbo;
+
     unsigned int tex_unit_map[WINED3D_MAX_COMBINED_SAMPLERS];
     unsigned int rev_tex_unit_map[MAX_GL_FRAGMENT_SAMPLERS + WINED3D_MAX_VERTEX_SAMPLERS];
 




More information about the wine-cvs mailing list