[Piglit] [PATCH] Fix build of shader_runner for GLES.
Matt Turner
mattst88 at gmail.com
Fri Mar 29 23:31:45 PDT 2013
On Fri, Mar 29, 2013 at 8:33 PM, Paul Berry <stereotype441 at gmail.com> wrote:
> 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
> shader_runner.
> ---
> 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)) {
> +#ifdef PIGLIT_USE_OPENGL
> line += strlen("lod_bias ");
> glTexParameterf(target, GL_TEXTURE_LOD_BIAS,
> strtod(line, NULL));
> return;
> +#else
> + printf("lod_bias feature is only available in desktop GL\n");
> + piglit_report_result(PIGLIT_SKIP);
> +#endif
> } else {
> fprintf(stderr, "unknown texture parameter in `%s'\n", line);
> piglit_report_result(PIGLIT_FAIL);
> --
> 1.8.2
Oh, indeed. I didn't think of this. Thanks, I've learned something new.
Reviewed-by: Matt Turner <mattst88 at gmail.com>
More information about the Piglit
mailing list