From f01cd4feeb5ee081a97a62f3dd5fb0d9e59e8fdc Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Mon, 21 Aug 2017 10:42:21 +1000 Subject: [PATCH] mesa: fix ES only draw if we have vertex positions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This code was separated from the validation code so it could use used with KHR_no_error paths. The return values were inverted to reflect the name of the helper, but here the condtion was mistakenly inverted rather than the return value. Fixes: 4df2931a87fe (mesa/vbo: move some Draw checks out of validation) Reported-by: Brian Paul Reviewed-by: Marek Olšák (cherry picked from commit a4635c84dcd119376a8daaa91ec906c8b9de17af) --- src/mesa/vbo/vbo_exec_array.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 4f86d196dbc..21d14a830c9 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -193,8 +193,8 @@ skip_validated_draw(struct gl_context *ctx) case API_OPENGLES: /* For OpenGL ES, only draw if we have vertex positions */ - if (ctx->Array.VAO->VertexAttrib[VERT_ATTRIB_POS].Enabled) - return false; + if (!ctx->Array.VAO->VertexAttrib[VERT_ATTRIB_POS].Enabled) + return true; break; case API_OPENGL_CORE: