summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-07-19 14:28:57 +0200
committerSamuel Pitoiset <[email protected]>2017-07-31 13:53:40 +0200
commitc8ea79272355caf134bf2750cc3b1f408d97d106 (patch)
treeda3ea9ed8383a6bc420c3845ec9fddbbfe1a1a21
parenta187fcf584c11e0af2f64798d0fb7dde51c23c2d (diff)
mesa: add KHR_no_error support to glDrawTransformFeedback*()
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
-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 809deb71303..92f04726c70 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -1442,9 +1442,16 @@ vbo_draw_transform_feedback(struct gl_context *ctx, GLenum mode,
struct vbo_context *vbo = vbo_context(ctx);
struct _mesa_prim prim;
- if (!_mesa_validate_DrawTransformFeedback(ctx, mode, obj, stream,
- numInstances)) {
- return;
+ if (_mesa_is_no_error_enabled(ctx)) {
+ FLUSH_CURRENT(ctx, 0);
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+ } else {
+ if (!_mesa_validate_DrawTransformFeedback(ctx, mode, obj, stream,
+ numInstances)) {
+ return;
+ }
}
if (ctx->Driver.GetTransformFeedbackVertexCount &&