Henri Verbeet : wined3d: Reference the constant buffer bo in context_gl_load_shader_resources().

Alexandre Julliard julliard at winehq.org
Wed Dec 2 15:21:07 CST 2020


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Dec  2 20:17:59 2020 +0330

wined3d: Reference the constant buffer bo in context_gl_load_shader_resources().

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

---

 dlls/wined3d/context_gl.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c
index beb418ba960..83c61834f5a 100644
--- a/dlls/wined3d/context_gl.c
+++ b/dlls/wined3d/context_gl.c
@@ -3703,8 +3703,12 @@ static void context_gl_load_shader_resources(struct wined3d_context_gl *context_
 
         for (j = 0; j < WINED3D_MAX_CBS; ++j)
         {
-            if (state->cb[i][j])
-                wined3d_buffer_load(state->cb[i][j], &context_gl->c, state);
+            if (!state->cb[i][j])
+                continue;
+
+            buffer_gl = wined3d_buffer_gl(state->cb[i][j]);
+            wined3d_buffer_load(&buffer_gl->b, &context_gl->c, state);
+            wined3d_context_gl_reference_bo(context_gl, &buffer_gl->bo);
         }
 
         for (j = 0; j < shader->reg_maps.sampler_map.count; ++j)




More information about the wine-cvs mailing list