summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-06-08 16:15:58 +1000
committerTimothy Arceri <[email protected]>2017-06-09 09:58:07 +1000
commitd0a26edc25a0125ab85dc5eabdd235792b5ac899 (patch)
treeec9849cd1e4ec57284ab29dba6a47af865f5a2de /src
parent87cb44d9b0eb9976f3dc2dc91de9f3d7c36004c6 (diff)
mesa: add KHR_no_error support to glDrawRangeElements*()
Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 437d2607484..4f86d196dbc 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -948,9 +948,16 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end,
_mesa_enum_to_string(mode), start, end, count,
_mesa_enum_to_string(type), indices, basevertex);
- if (!_mesa_validate_DrawRangeElements(ctx, mode, start, end, count,
- type, indices))
- return;
+ if (_mesa_is_no_error_enabled(ctx)) {
+ FLUSH_CURRENT(ctx, 0);
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+ } else {
+ if (!_mesa_validate_DrawRangeElements(ctx, mode, start, end, count,
+ type, indices))
+ return;
+ }
if ((int) end + basevertex < 0 || start + basevertex >= max_element) {
/* The application requested we draw using a range of indices that's