[Mesa-dev] [PATCH] mesa: allow indirect draws with the default VAO and compatibility profile
Marek Olšák
maraeo at gmail.com
Tue Jul 24 04:13:23 UTC 2018
From: Marek Olšák <marek.olsak at amd.com>
---
src/mesa/main/draw_validate.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/draw_validate.c b/src/mesa/main/draw_validate.c
index c0a234a2bc2..29304bd5144 100644
--- a/src/mesa/main/draw_validate.c
+++ b/src/mesa/main/draw_validate.c
@@ -1078,21 +1078,22 @@ valid_draw_indirect(struct gl_context *ctx,
{
const uint64_t end = (uint64_t) (uintptr_t) indirect + size;
/* OpenGL ES 3.1 spec. section 10.5:
*
* "DrawArraysIndirect requires that all data sourced for the
* command, including the DrawArraysIndirectCommand
* structure, be in buffer objects, and may not be called when
* the default vertex array object is bound."
*/
- if (ctx->Array.VAO == ctx->Array.DefaultVAO) {
+ if (ctx->API != API_OPENGL_COMPAT &&
+ ctx->Array.VAO == ctx->Array.DefaultVAO) {
_mesa_error(ctx, GL_INVALID_OPERATION, "(no VAO bound)");
return GL_FALSE;
}
/* From OpenGL ES 3.1 spec. section 10.5:
* "An INVALID_OPERATION error is generated if zero is bound to
* VERTEX_ARRAY_BINDING, DRAW_INDIRECT_BUFFER or to any enabled
* vertex array."
*
* Here we check that for each enabled vertex array we have a vertex
--
2.17.1
More information about the mesa-dev
mailing list