[Mesa-dev] [PATCH 1/2] mesa/compute: move compute checks around for tests.
Dave Airlie
airlied at gmail.com
Thu May 5 00:41:52 UTC 2016
From: Dave Airlie <airlied at redhat.com>
This fixes GL43-CTS.compute_shader.api-indirect
which tests the length/4 before anything else.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/mesa/main/api_validate.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 688408f..d455f19 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -1109,9 +1109,6 @@ valid_dispatch_indirect(struct gl_context *ctx,
{
GLintptr end = (GLintptr)indirect + size;
- if (!check_valid_to_compute(ctx, name))
- return GL_FALSE;
-
/* From the OpenGL 4.3 Core Specification, Chapter 19, Compute Shaders:
*
* "An INVALID_VALUE error is generated if indirect is negative or is not a
@@ -1153,6 +1150,9 @@ valid_dispatch_indirect(struct gl_context *ctx,
return GL_FALSE;
}
+ if (!check_valid_to_compute(ctx, name))
+ return GL_FALSE;
+
return GL_TRUE;
}
--
2.5.5
More information about the mesa-dev
mailing list