[Piglit] [PATCH] Fix a couple EXT_blend_func_extended test bugs exposed by the Nvidia blob.

Ilia Mirkin imirkin at alum.mit.edu
Wed Jan 27 15:47:25 PST 2016


Reviwed-by: Ilia Mirkin <imirkin at alum.mit.edu>

Will push this shortly.

On Wed, Jan 27, 2016 at 1:46 PM, Ryan Houdek <sonicadvance1 at gmail.com> wrote:
> fbo-extended-blend-pattern was using an implicit integer to float conversion
> which isn't allowed in ESSL.
>
> builtins program linker error checking was dumb, do explicit link checking instead.
> ---
>  tests/spec/arb_blend_func_extended/api/builtins.c                    | 5 ++++-
>  .../arb_blend_func_extended/execution/fbo-extended-blend-pattern.c   | 4 ++--
>  2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/tests/spec/arb_blend_func_extended/api/builtins.c b/tests/spec/arb_blend_func_extended/api/builtins.c
> index e0a6c6f..7525244 100644
> --- a/tests/spec/arb_blend_func_extended/api/builtins.c
> +++ b/tests/spec/arb_blend_func_extended/api/builtins.c
> @@ -35,6 +35,7 @@ bool compile_simple_program(const char* vs_text, const char* fs_text)
>         GLuint vs;
>         GLuint fs;
>         GLuint prog;
> +       bool status;
>
>         prog = glCreateProgram();
>
> @@ -48,7 +49,9 @@ bool compile_simple_program(const char* vs_text, const char* fs_text)
>         glAttachShader(prog, fs);
>         glLinkProgram(prog);
>
> -       return !!prog;
> +       status = piglit_link_check_status(prog);
> +       glDeleteProgram(prog);
> +       return status;
>  }
>
>  enum piglit_result
> diff --git a/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-pattern.c b/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-pattern.c
> index 50f84af..129fe63 100644
> --- a/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-pattern.c
> +++ b/tests/spec/arb_blend_func_extended/execution/fbo-extended-blend-pattern.c
> @@ -83,7 +83,7 @@ static const char *fs_text =
>     "void main() {\n"
>     "   int a = int(gl_FragCoord.x) / 10;\n"
>     "   int b = int(gl_FragCoord.y) / 10;\n"
> -   "   int c = int(mod(a + b, 2));\n"
> +   "   int c = (a + b) % 2;\n"
>     "   col0 = src0;\n"
>     "   if (c == 0)\n"
>     "      col1 = src1;\n"
> @@ -112,7 +112,7 @@ static const char *fs_text =
>     "void main() {\n"
>     "   int a = int(gl_FragCoord.x) / 10;\n"
>     "   int b = int(gl_FragCoord.y) / 10;\n"
> -   "   int c = int(mod(a + b, 2));\n"
> +   "   int c = (a + b) % 2;\n"
>     "   col0 = src0;\n"
>     "   if (c == 0)\n"
>     "      col1 = src1;\n"
> --
> 2.5.0
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list