diff options
author | Brian Paul <[email protected]> | 2011-09-21 08:22:07 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-09-21 08:22:07 -0600 |
commit | 0e6646db3248057b7750031d825535cd7a0e5aec (patch) | |
tree | 25fc910e905a30d3b7c0d04c84e71305a6e76ca9 /src/mesa/main/api_validate.h | |
parent | 51002968c97758c30511eefab1bd1358b8380e15 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/mesa/main/api_validate.h')
-rw-r--r-- | src/mesa/main/api_validate.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/api_validate.h b/src/mesa/main/api_validate.h index 09e9522d20e..7d6a66012df 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); |