summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2013-11-06 20:09:46 +1300
committerChris Forbes <[email protected]>2013-11-25 22:01:35 +1300
commit5127318ae8c1ac4d9b502356bc456a8d513215c0 (patch)
treec2ecf23213422d11a549a4b976855766f4791a34 /src/mesa/vbo
parent80ac616fca709ab10f7aae062d96ec18d05097a7 (diff)
glapi: add plumbing for GL_ARB_draw_indirect and GL_ARB_multi_draw_indirect
Based on part of Patch 2 of Christoph Bumiller's ARB_draw_indirect series. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index a2c0c7d8f31..303e87f779c 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -1564,6 +1564,34 @@ vbo_exec_DrawTransformFeedbackStreamInstanced(GLenum mode, GLuint name,
vbo_draw_transform_feedback(ctx, mode, obj, stream, primcount);
}
+/**
+ * Like [Multi]DrawArrays/Elements, but they take most arguments from
+ * a buffer object.
+ */
+static void GLAPIENTRY
+vbo_exec_DrawArraysIndirect(GLenum mode, const GLvoid *indirect)
+{
+}
+
+static void GLAPIENTRY
+vbo_exec_DrawElementsIndirect(GLenum mode, GLenum type,
+ const GLvoid *indirect)
+{
+}
+
+static void GLAPIENTRY
+vbo_exec_MultiDrawArraysIndirect(GLenum mode,
+ const GLvoid *indirect,
+ GLsizei primcount, GLsizei stride)
+{
+}
+
+static void GLAPIENTRY
+vbo_exec_MultiDrawElementsIndirect(GLenum mode, GLenum type,
+ const GLvoid *indirect,
+ GLsizei primcount, GLsizei stride)
+{
+}
/**
* Initialize the dispatch table with the VBO functions for drawing.
@@ -1597,6 +1625,13 @@ vbo_initialize_exec_dispatch(const struct gl_context *ctx,
SET_DrawElementsInstancedBaseVertexBaseInstance(exec, vbo_exec_DrawElementsInstancedBaseVertexBaseInstance);
}
+ if (ctx->API == API_OPENGL_CORE) {
+ SET_DrawArraysIndirect(exec, vbo_exec_DrawArraysIndirect);
+ SET_DrawElementsIndirect(exec, vbo_exec_DrawElementsIndirect);
+ SET_MultiDrawArraysIndirect(exec, vbo_exec_MultiDrawArraysIndirect);
+ SET_MultiDrawElementsIndirect(exec, vbo_exec_MultiDrawElementsIndirect);
+ }
+
if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
SET_DrawArraysInstancedARB(exec, vbo_exec_DrawArraysInstanced);
SET_DrawElementsInstancedARB(exec, vbo_exec_DrawElementsInstanced);