mesa: only verify that enabled arrays have backing buffers
authorIlia Mirkin <imirkin@alum.mit.edu>
Wed, 30 Nov 2016 22:04:06 +0000 (17:04 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 1 Dec 2016 11:35:13 +0000 (06:35 -0500)
We were previously also verifying that no backing buffers were available
when an array wasn't enabled. This is has no basis in the spec, and it
causes GLupeN64 to fail as a result.

Fixes: c2e146f487 ("mesa: error out in indirect draw when vertex bindings mismatch")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/main/api_validate.c

index d3b4cab7d5b3fd4c018067d1ee4e640c2408c1aa..071c16d1a1d8a99200a84731b1e744b68089764a 100644 (file)
@@ -925,7 +925,7 @@ valid_draw_indirect(struct gl_context *ctx,
     * buffer bound.
     */
    if (_mesa_is_gles31(ctx) &&
-       ctx->Array.VAO->_Enabled != ctx->Array.VAO->VertexAttribBufferMask) {
+       ctx->Array.VAO->_Enabled & ~ctx->Array.VAO->VertexAttribBufferMask) {
       _mesa_error(ctx, GL_INVALID_OPERATION, "%s(No VBO bound)", name);
       return GL_FALSE;
    }