mesa: fix ES only draw if we have vertex positions
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 21 Aug 2017 00:42:21 +0000 (10:42 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Tue, 22 Aug 2017 00:42:18 +0000 (10:42 +1000)
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 <brianp@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/vbo/vbo_exec_array.c

index 92f04726c703549681243d13bef5cb18531a20b8..0617d65935d592782f26e39ea6df3b774f5b33e3 100644 (file)
@@ -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: