From: Timothy Arceri Date: Mon, 21 Aug 2017 00:42:21 +0000 (+1000) Subject: mesa: fix ES only draw if we have vertex positions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a4635c84dcd119376a8daaa91ec906c8b9de17af;p=mesa.git mesa: fix ES only draw if we have vertex positions 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 --- diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 92f04726c70..0617d65935d 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: