[Piglit] [PATCH 05/11] shader_runner: Add compute command to access DispatchCompute
Jordan Justen
jordan.l.justen at intel.com
Sun Jun 1 17:39:10 PDT 2014
This will run glDispatchCompute allowing a compute shader to run.
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
tests/shaders/shader_runner.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 4f9fd47..b71a401 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -1878,7 +1878,7 @@ piglit_display(void)
while (line[0] != '\0') {
float c[32];
double d[4];
- int x, y, w, h, l, tex, level;
+ int x, y, z, w, h, l, tex, level;
char s[32];
line = eat_whitespace(line);
@@ -1897,6 +1897,13 @@ piglit_display(void)
piglit_report_result(PIGLIT_FAIL);
}
glClipPlane(GL_CLIP_PLANE0 + x, d);
+ } else if (sscanf(line,
+ "compute %d %d %d",
+ &x, &y, &z) == 3) {
+ program_must_be_in_use();
+ glMemoryBarrier(GL_ALL_BARRIER_BITS);
+ glDispatchCompute(x, y, z);
+ glMemoryBarrier(GL_ALL_BARRIER_BITS);
} else if (string_match("draw rect tex", line)) {
program_must_be_in_use();
get_floats(line + 13, c, 8);
--
2.0.0.rc4
More information about the Piglit
mailing list