[Piglit] [PATCH] Fix build of shader_runner for GLES.

Paul Berry stereotype441 at gmail.com
Fri Mar 29 20:33:14 PDT 2013

Commit f184de94 (shader_runner: Add lod_bias option to texparameter)
added support for testing the GL_TEXTURE_LOD_BIAS texture parameter to
shader_runner.  However, this feature is only available in desktop GL.
This caused compile errors with GLES.

This patch ifdefs the feature out when building the GLES version of
 tests/shaders/shader_runner.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 002cf72..a2908a5 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -1578,10 +1578,15 @@ handle_texparameter(const char *line)
 		line += strlen("mag ");
 		strings = mag_filter_modes;
 	} else if (string_match("lod_bias ", line)) {
 		line += strlen("lod_bias ");
 		glTexParameterf(target, GL_TEXTURE_LOD_BIAS,
 				strtod(line, NULL));
+		printf("lod_bias feature is only available in desktop GL\n");
+		piglit_report_result(PIGLIT_SKIP);
 	} else {
 		fprintf(stderr, "unknown texture parameter in `%s'\n", line);

More information about the Piglit mailing list