[Piglit] [PATCH 4/9] shader_runner: Support SHADER_RUNNER_GET_PROGRAM_BINARY env var

Jordan Justen jordan.l.justen at intel.com
Sat Jun 9 05:48:02 UTC 2018


If set to 1/yes/true, SHADER_RUNNER_GET_PROGRAM_BINARY will run as if
the -get-program-binary parameter were used.

This allows comparing piglit runs with and without shader runner using
GetProgramBinary.

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 tests/shaders/shader_runner.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index b3f1b3deb..0b449c056 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -4126,7 +4126,10 @@ piglit_init(int argc, char **argv)
 	float default_piglit_tolerance[4];
 
 	use_get_program_binary =
-		piglit_strip_arg(&argc, argv, "-get-program-binary");
+		piglit_strip_arg(&argc, argv, "-get-program-binary") ||
+		piglit_env_var_as_boolean("SHADER_RUNNER_GET_PROGRAM_BINARY",
+		                          false);
+
 	report_subtests = piglit_strip_arg(&argc, argv, "-report-subtests");
 	if (argc < 2) {
 		printf("usage: shader_runner <test.shader_test>\n");
-- 
2.17.1



More information about the Piglit mailing list