diff mbox

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

Message ID 1364847711-28771-1-git-send-email-tom.gall@linaro.org
State New
Headers show

Commit Message

Tom Gall April 1, 2013, 8:21 p.m. UTC
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@linaro.org>
---
 tests/shaders/shader_runner.c |    2 ++
 1 file changed, 2 insertions(+)

Comments

Jordan Justen April 1, 2013, 8:33 p.m. UTC | #1
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@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@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
Paul Berry April 2, 2013, 4:02 p.m. UTC | #2
On 1 April 2013 13:33, Jordan Justen <jljusten@gmail.com> wrote:

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

Yeah, sorry about that.  My day was unexpectedly busy yesterday.  I've
pushed my patch (commit 609d0c1a953ab3f87aa6186ffaeeb16fe18e4b4e).


>
>
> On Mon, Apr 1, 2013 at 1:21 PM, Tom Gall <tom.gall@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@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
>
>
> _______________________________________________
> Piglit mailing list
> Piglit@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
>
diff mbox

Patch

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);