summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/tests/dispatch_sanity.cpp8
-rw-r--r--src/mesa/vbo/vbo_exec_array.c35
2 files changed, 39 insertions, 4 deletions
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index 922f0acafc2..e57fb52d394 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -667,8 +667,8 @@ const struct function gl_core_functions_possible[] = {
{ "glVertexAttribP3uiv", 43, -1 },
{ "glVertexAttribP4ui", 43, -1 },
{ "glVertexAttribP4uiv", 43, -1 },
-// { "glDrawArraysIndirect", 43, -1 }, // XXX: Add to xml
-// { "glDrawElementsIndirect", 43, -1 }, // XXX: Add to xml
+ { "glDrawArraysIndirect", 43, -1 },
+ { "glDrawElementsIndirect", 43, -1 },
// { "glUniform1d", 43, -1 }, // XXX: Add to xml
// { "glUniform2d", 43, -1 }, // XXX: Add to xml
// { "glUniform3d", 43, -1 }, // XXX: Add to xml
@@ -877,8 +877,8 @@ const struct function gl_core_functions_possible[] = {
{ "glInvalidateBufferData", 43, -1 },
{ "glInvalidateFramebuffer", 43, -1 },
{ "glInvalidateSubFramebuffer", 43, -1 },
-// { "glMultiDrawArraysIndirect", 43, -1 }, // XXX: Add to xml
-// { "glMultiDrawElementsIndirect", 43, -1 }, // XXX: Add to xml
+ { "glMultiDrawArraysIndirect", 43, -1 },
+ { "glMultiDrawElementsIndirect", 43, -1 },
// { "glGetProgramInterfaceiv", 43, -1 }, // XXX: Add to xml
// { "glGetProgramResourceIndex", 43, -1 }, // XXX: Add to xml
// { "glGetProgramResourceName", 43, -1 }, // XXX: Add to xml
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);