[Piglit] [PATCH] Fix GetProgramPipelineiv test with GLSL 4.30+.

Dylan Baker dylan at pnwbakers.com
Wed Jun 1 13:50:48 UTC 2016


Quoting Kenneth Graunke (2016-05-31 18:39:01)
> The test was set up to use GLSL 4.30, 1.50, or 1.10, as available.
> 
> GLSL 4.20 removes the gl_FragColor variable, so the fragment shader
> would fail to compile if GLSL 4.30 was available.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96301
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> Cc: mark.a.janes at intel.com
> ---
>  tests/spec/arb_separate_shader_objects/GetProgramPipelineiv.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/spec/arb_separate_shader_objects/GetProgramPipelineiv.c b/tests/spec/arb_separate_shader_objects/GetProgramPipelineiv.c
> index 1975180..2746e8b 100644
> --- a/tests/spec/arb_separate_shader_objects/GetProgramPipelineiv.c
> +++ b/tests/spec/arb_separate_shader_objects/GetProgramPipelineiv.c
> @@ -119,9 +119,14 @@ piglit_init(int argc, char **argv)
>                 "    gl_Position = position;\n"
>                 "}\n";
>         static const char fs_source[] =
> +               "#if __VERSION__ >= 430\n"

Even though the test runs with 430 shouldn't this be 420, since
gl_FragColor was removed in there, not 420?

> +               "layout(location = 0) out vec4 color;\n"
> +               "#else\n"
> +               "#define color gl_FragColor\n"
> +               "#endif\n"
>                 "void main()\n"
>                 "{\n"
> -               "    gl_FragColor = vec4(0.0, 1.0, 0.0, 0.0);\n"
> +               "    color = vec4(0.0, 1.0, 0.0, 0.0);\n"
>                 "}\n";
>         static const char gs_source[] =
>                 "/* At least some versions of AMD's closed-source driver\n"
> -- 
> 2.8.3
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit

Either way this seems reasonable,
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20160601/b92ef037/attachment.sig>


More information about the Piglit mailing list