[Piglit] [PATCH 1/4] glslparsertest: Add complementary shaders to link GLSL ES 3.00 shaders too

Paul Berry stereotype441 at gmail.com
Mon Aug 12 18:01:47 PDT 2013


On 9 August 2013 15:40, Ian Romanick <idr at freedesktop.org> wrote:

> From: Ian Romanick <ian.d.romanick at intel.com>
>
> Fixes failures in ES3 --check-link tests
> default-precision-sampler.frag and default-precision-sampler.vert.  It
> also makes "glsl-es-3.00 compiler no-default-float-precision.frag"
> correctly fail.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
>

Series is:

Reviewed-by: Paul Berry <stereotype441 at gmail.com>


> ---
>  tests/glslparsertest/glslparsertest.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/tests/glslparsertest/glslparsertest.c
> b/tests/glslparsertest/glslparsertest.c
> index bba6cb3..d9f1947 100644
> --- a/tests/glslparsertest/glslparsertest.c
> +++ b/tests/glslparsertest/glslparsertest.c
> @@ -134,12 +134,12 @@ attach_dummy_shader(GLuint shader_prog, GLenum type)
>         switch (type) {
>         case GL_VERTEX_SHADER:
>                 shader_template =
> -                       "#version %d\n"
> +                       "#version %d %s\n"
>                         "void main() { gl_Position = vec4(0.0); }";
>                 break;
>         case GL_FRAGMENT_SHADER:
>                 shader_template =
> -                       "#version %d\n"
> +                       "#version %d %s\n"
>                         "void main() { }";
>                 break;
>         default:
> @@ -148,7 +148,10 @@ attach_dummy_shader(GLuint shader_prog, GLenum type)
>                 break;
>         }
>
> -       sprintf(shader_text, shader_template, requested_version);
> +       sprintf(shader_text,
> +               shader_template,
> +               requested_version,
> +               (requested_version == 300) ? "es" : "");
>         shader = piglit_compile_shader_text(type, shader_text);
>         glAttachShader(shader_prog, shader);
>  }
> @@ -242,7 +245,7 @@ test(void)
>
>                 shader_prog = glCreateProgram();
>                 glAttachShader(shader_prog, prog);
> -               if (requested_version == 100)
> +               if (requested_version == 100 || requested_version == 300)
>                         attach_complementary_shader(shader_prog, type);
>  #if PIGLIT_USE_OPENGL
>                 if (type == GL_GEOMETRY_SHADER)
> --
> 1.8.1.4
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130812/c3e8c41f/attachment.html>


More information about the Piglit mailing list