[Piglit] [PATCH 1/1] shader_runner.c: Fix lod_bias breakage on GLES.

Jordan Justen jljusten at gmail.com
Mon Apr 1 13:33:46 PDT 2013


Paul sent a patch for this as well. It looks like it hasn't been pushed yet
though.

On Mon, Apr 1, 2013 at 1:21 PM, Tom Gall <tom.gall at linaro.org> wrote:
>
> When lod_bias was added to shader_runner it broke compilation
> on OpenGL ES. GL_TEXTURE_LOD_BIAS isn't defined as part of
> OpenGL ES. Added #ifdef PIGLIT_USE_OPENGL to handle_texparameter
> when the string_match checks for lod_bias.
>
> Signed-off-by: Tom Gall <tom.gall at linaro.org>
> ---
>  tests/shaders/shader_runner.c |    2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
> index 002cf72..22a9f0f 100644
> --- a/tests/shaders/shader_runner.c
> +++ b/tests/shaders/shader_runner.c
> @@ -1577,11 +1577,13 @@ handle_texparameter(const char *line)
>                 parameter_name = "mag";
>                 line += strlen("mag ");
>                 strings = mag_filter_modes;
> +#ifdef PIGLIT_USE_OPENGL
>         } else if (string_match("lod_bias ", line)) {
>                 line += strlen("lod_bias ");
>                 glTexParameterf(target, GL_TEXTURE_LOD_BIAS,
>                                 strtod(line, NULL));
>                 return;
> +#endif
>         } else {
>                 fprintf(stderr, "unknown texture parameter in `%s'\n",
line);
>                 piglit_report_result(PIGLIT_FAIL);
> --
> 1.7.10.4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130401/db613d92/attachment.html>


More information about the Piglit mailing list