aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/api_validate.h
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2013-11-06 20:03:21 +1300
committerChris Forbes <[email protected]>2013-11-25 22:01:35 +1300
commit36046ae2789f74c04e6b62fa5250d81e8d1160eb (patch)
treec71e4f473e6e9b2b71b2144caedc861b3692db29 /src/mesa/main/api_validate.h
parenta95236cfc1d55750840a6ac7a5747da3ecd200d2 (diff)
mesa: Add validation helpers for new indirect draws
Based on part of Patch 2 of Christoph Bumiller's ARB_draw_indirect series. V3: - Disallow primcount==0 for DrawMulti*Indirect. The spec is unclear on this, but it's silly. We might go back on this later if it turns out to be a problem. - Make it clear that the caller has dealt with stride==0 V4: - Allow primcount==0 again. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/api_validate.h')
-rw-r--r--src/mesa/main/api_validate.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/mesa/main/api_validate.h b/src/mesa/main/api_validate.h
index f2b753ca90f..8238df16c24 100644
--- a/src/mesa/main/api_validate.h
+++ b/src/mesa/main/api_validate.h
@@ -87,5 +87,31 @@ _mesa_validate_DrawTransformFeedback(struct gl_context *ctx,
GLuint stream,
GLsizei numInstances);
+extern GLboolean
+_mesa_validate_DrawArraysIndirect(struct gl_context *ctx,
+ GLenum mode,
+ const GLvoid *indirect);
+
+extern GLboolean
+_mesa_validate_DrawElementsIndirect(struct gl_context *ctx,
+ GLenum mode,
+ GLenum type,
+ const GLvoid *indirect);
+
+extern GLboolean
+_mesa_validate_MultiDrawArraysIndirect(struct gl_context *ctx,
+ GLenum mode,
+ const GLvoid *indirect,
+ GLsizei primcount,
+ GLsizei stride);
+
+extern GLboolean
+_mesa_validate_MultiDrawElementsIndirect(struct gl_context *ctx,
+ GLenum mode,
+ GLenum type,
+ const GLvoid *indirect,
+ GLsizei primcount,
+ GLsizei stride);
+
#endif