diff options
author | Brian Paul <[email protected]> | 2013-05-01 19:15:32 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-05-02 09:03:15 -0600 |
commit | ecea61e414bf772944aff7d9a0899fe8f68af90a (patch) | |
tree | 3f7baa91c57afce443b452cece951cc27987d26c /src/mesa/vbo | |
parent | a07437dc28283d471988e69586c849547894cc3c (diff) |
vbo: fix error detection in vbo_save_playback_vertex_list()
The old code didn't make sense. The clause in question did the
same thing as the next else-if clause. If we're already executing
a glBegin/End pair and we're starting a new primitive, that's an
error.
Fixes more failures in piglit gl-1.0-beginend-coverage test.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r-- | src/mesa/vbo/vbo_save_draw.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c index bc0e13dfa17..a6ce379e20a 100644 --- a/src/mesa/vbo/vbo_save_draw.c +++ b/src/mesa/vbo/vbo_save_draw.c @@ -269,17 +269,12 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data) if (node->prim_count > 0) { - if (_mesa_inside_begin_end(ctx) && - node->prim[0].begin) { - - /* Degenerate case: list is called inside begin/end pair and - * includes operations such as glBegin or glDrawArrays. - */ - if (0) - printf("displaylist recursive begin"); - - vbo_save_loopback_vertex_list( ctx, node ); - + if (_mesa_inside_begin_end(ctx) && node->prim[0].begin) { + /* Error: we're about to begin a new primitive but we're already + * inside a glBegin/End pair. + */ + _mesa_error(ctx, GL_INVALID_OPERATION, + "draw operation inside glBegin/End"); goto end; } else if (save->replay_flags) { |