Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/wined3d/context_gl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index 4aaf50434a6..419fc4923bd 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -4488,8 +4488,8 @@ static void wined3d_context_gl_draw_indirect(struct wined3d_context_gl *context_ const struct wined3d_indirect_draw_parameters *parameters, unsigned int idx_size) { GLenum gl_primitive_type = gl_primitive_type_from_d3d(state->primitive_type); + struct wined3d_buffer_gl *buffer_gl = wined3d_buffer_gl(parameters->buffer); const struct wined3d_gl_info *gl_info = context_gl->gl_info; - struct wined3d_buffer *buffer = parameters->buffer; const void *offset;
if (!gl_info->supported[ARB_DRAW_INDIRECT]) @@ -4498,7 +4498,7 @@ static void wined3d_context_gl_draw_indirect(struct wined3d_context_gl *context_ return; }
- GL_EXTCALL(glBindBuffer(GL_DRAW_INDIRECT_BUFFER, wined3d_buffer_gl(buffer)->bo.id)); + GL_EXTCALL(glBindBuffer(GL_DRAW_INDIRECT_BUFFER, buffer_gl->bo.id));
offset = (void *)(GLintptr)parameters->offset; if (idx_size) @@ -4514,6 +4514,7 @@ static void wined3d_context_gl_draw_indirect(struct wined3d_context_gl *context_ }
GL_EXTCALL(glBindBuffer(GL_DRAW_INDIRECT_BUFFER, 0)); + wined3d_context_gl_reference_bo(context_gl, &buffer_gl->bo);
checkGLcall("draw indirect"); }