summaryrefslogtreecommitdiff
path: root/src/mesa/vbo/vbo_exec_array.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-04-15 13:23:23 +1000
committerBen Skeggs <skeggsb@gmail.com>2008-04-15 13:23:23 +1000
commit276e177dfb644c60af6247598cda6c1c49dfea7b (patch)
treedac9407ee5e6cb67af67d8b52603ab8e2d5312ae /src/mesa/vbo/vbo_exec_array.c
parent7f811f2c42937f254ae1b11e5b0ece765a8ea31b (diff)
parentd3878b070b7b5084526b65499737cc686a6039b6 (diff)
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/mesa/vbo/vbo_exec_array.c')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 77f3cf1455..a52521db64 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -245,6 +245,11 @@ vbo_exec_DrawArrays(GLenum mode, GLint start, GLsizei count)
if (ctx->NewState)
_mesa_update_state( ctx );
+ if (!vbo_validate_shaders(ctx)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawArrays(bad shader)");
+ return;
+ }
+
bind_arrays( ctx );
prim[0].begin = 1;
@@ -280,6 +285,11 @@ vbo_exec_DrawRangeElements(GLenum mode,
if (ctx->NewState)
_mesa_update_state( ctx );
+ if (!vbo_validate_shaders(ctx)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawRangeElements(bad shader)");
+ return;
+ }
+
bind_arrays( ctx );
ib.count = count;
@@ -340,6 +350,11 @@ vbo_exec_DrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *ind
if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices ))
return;
+ if (!vbo_validate_shaders(ctx)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawElements(bad shader)");
+ return;
+ }
+
if (ctx->Array.ElementArrayBufferObj->Name) {
const GLvoid *map = ctx->Driver.MapBuffer(ctx,
GL_ELEMENT_ARRAY_BUFFER_ARB,