[Piglit] [PATCH v2 1/2] shader_runner: add support for glDispatchComputeGroupSizeARB()

Samuel Pitoiset samuel.pitoiset at gmail.com
Sat Sep 10 15:19:17 UTC 2016


This allows to dispatch compute shaders with a variable local size
using the new "compute group size" command.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 tests/shaders/shader_runner.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 8e29346..e9d39e9 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -2924,6 +2924,13 @@ piglit_display(void)
 			glMemoryBarrier(GL_ALL_BARRIER_BITS);
 			glDispatchCompute(x, y, z);
 			glMemoryBarrier(GL_ALL_BARRIER_BITS);
+		} else if (sscanf(line,
+				  "compute group size %d %d %d %d %d %d",
+				  &x, &y, &z, &w, &h, &l) == 6) {
+			program_must_be_in_use();
+			glMemoryBarrier(GL_ALL_BARRIER_BITS);
+			glDispatchComputeGroupSizeARB(x, y, z, w, h, l);
+			glMemoryBarrier(GL_ALL_BARRIER_BITS);
 		} else if (string_match("draw rect tex", line)) {
 			program_must_be_in_use();
 			program_subroutine_uniforms();
-- 
2.9.3



More information about the Piglit mailing list