summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/api_validate.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-09-21 08:22:07 -0600
committerBrian Paul <brianp@vmware.com>2011-09-21 08:22:07 -0600
commit0e6646db3248057b7750031d825535cd7a0e5aec (patch)
tree25fc910e905a30d3b7c0d04c84e71305a6e76ca9 /src/mesa/main/api_validate.h
parent51002968c97758c30511eefab1bd1358b8380e15 (diff)
downloadexternal_mesa3d-0e6646db3248057b7750031d825535cd7a0e5aec.zip
external_mesa3d-0e6646db3248057b7750031d825535cd7a0e5aec.tar.gz
external_mesa3d-0e6646db3248057b7750031d825535cd7a0e5aec.tar.bz2
mesa: check glBegin()/glDrawArrays()/etc mode with _mesa_valid_prim_mode()
We now raise an GL_INVALID_ENUM in glBegin() if mode is illegal, as was done in Yuanhan Liu's original patch. Take geometry shaders support into account too. Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Diffstat (limited to 'src/mesa/main/api_validate.h')
-rw-r--r--src/mesa/main/api_validate.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/api_validate.h b/src/mesa/main/api_validate.h
index 09e9522..7d6a660 100644
--- a/src/mesa/main/api_validate.h
+++ b/src/mesa/main/api_validate.h
@@ -39,6 +39,11 @@ _mesa_max_buffer_index(struct gl_context *ctx, GLuint count, GLenum type,
const void *indices,
struct gl_buffer_object *elementBuf);
+
+extern GLboolean
+_mesa_valid_prim_mode(const struct gl_context *ctx, GLenum mode);
+
+
extern GLboolean
_mesa_validate_DrawArrays(struct gl_context *ctx,
GLenum mode, GLint start, GLsizei count);