Zebediah Figura : wined3d: Allow OpenGL transform feedback buffer objects to be suballocated from a larger buffer.

Alexandre Julliard julliard at winehq.org
Fri Nov 19 15:45:32 CST 2021


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

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Thu Nov 18 21:06:19 2021 -0600

wined3d: Allow OpenGL transform feedback buffer objects to be suballocated from a larger buffer.

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

---

 dlls/wined3d/state.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 21b5ba1d032..adbaa50a349 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -4651,6 +4651,7 @@ static void state_so(struct wined3d_context *context, const struct wined3d_state
     const struct wined3d_gl_info *gl_info = context_gl->gl_info;
     struct wined3d_buffer *buffer;
     unsigned int offset, size, i;
+    struct wined3d_bo_gl *bo_gl;
 
     TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id);
 
@@ -4666,6 +4667,7 @@ static void state_so(struct wined3d_context *context, const struct wined3d_state
 
         buffer = state->stream_output[i].buffer;
         offset = state->stream_output[i].offset;
+        bo_gl = wined3d_bo_gl(buffer->buffer_object);
         if (offset == ~0u)
         {
             FIXME("Appending to stream output buffers not implemented.\n");
@@ -4673,7 +4675,7 @@ static void state_so(struct wined3d_context *context, const struct wined3d_state
         }
         size = buffer->resource.size - offset;
         GL_EXTCALL(glBindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, i,
-                wined3d_bo_gl(buffer->buffer_object)->id, offset, size));
+                bo_gl->id, bo_gl->buffer_offset + offset, size));
         buffer->bo_user.valid = true;
     }
     checkGLcall("bind transform feedback buffers");




More information about the wine-cvs mailing list