Commit a381f0ca authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Reference the indirect buffer bo in wined3d_context_gl_draw_indirect().

parent 14ed6b1c
...@@ -4488,8 +4488,8 @@ static void wined3d_context_gl_draw_indirect(struct wined3d_context_gl *context_ ...@@ -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) const struct wined3d_indirect_draw_parameters *parameters, unsigned int idx_size)
{ {
GLenum gl_primitive_type = gl_primitive_type_from_d3d(state->primitive_type); 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; const struct wined3d_gl_info *gl_info = context_gl->gl_info;
struct wined3d_buffer *buffer = parameters->buffer;
const void *offset; const void *offset;
if (!gl_info->supported[ARB_DRAW_INDIRECT]) if (!gl_info->supported[ARB_DRAW_INDIRECT])
...@@ -4498,7 +4498,7 @@ static void wined3d_context_gl_draw_indirect(struct wined3d_context_gl *context_ ...@@ -4498,7 +4498,7 @@ static void wined3d_context_gl_draw_indirect(struct wined3d_context_gl *context_
return; 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; offset = (void *)(GLintptr)parameters->offset;
if (idx_size) if (idx_size)
...@@ -4514,6 +4514,7 @@ static void wined3d_context_gl_draw_indirect(struct wined3d_context_gl *context_ ...@@ -4514,6 +4514,7 @@ static void wined3d_context_gl_draw_indirect(struct wined3d_context_gl *context_
} }
GL_EXTCALL(glBindBuffer(GL_DRAW_INDIRECT_BUFFER, 0)); GL_EXTCALL(glBindBuffer(GL_DRAW_INDIRECT_BUFFER, 0));
wined3d_context_gl_reference_bo(context_gl, &buffer_gl->bo);
checkGLcall("draw indirect"); checkGLcall("draw indirect");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment