[Piglit] [PATCH V2] arb_shader_image_load_store: fix syntax error in execution tests

Francisco Jerez currojerez at riseup.net
Tue Jan 19 18:30:26 PST 2016


Timothy Arceri <timothy.arceri at collabora.com> writes:

> In GLSL 1.50 layout qualifiers must come before the storage
> qualifier. A recent fix in Mesa exposed this issue.
>
> V2: rename IMAGE_T -> IMAGE_UNIFORM_T, fix DST/SRC_IMAGE_T miss in V1
>
> Cc: Francisco Jerez <currojerez at riseup.net>

Reviewed-by: Francisco Jerez <currojerez at riseup.net>

> ---
>  tests/spec/arb_shader_image_load_store/atomicity.c          | 2 +-
>  tests/spec/arb_shader_image_load_store/bitcast.c            | 2 +-
>  tests/spec/arb_shader_image_load_store/coherency.c          | 4 ++--
>  tests/spec/arb_shader_image_load_store/common.c             | 8 ++++----
>  tests/spec/arb_shader_image_load_store/dead-fragments.c     | 2 +-
>  tests/spec/arb_shader_image_load_store/early-z.c            | 2 +-
>  tests/spec/arb_shader_image_load_store/grid.c               | 6 +++---
>  tests/spec/arb_shader_image_load_store/host-mem-barrier.c   | 4 ++--
>  tests/spec/arb_shader_image_load_store/indexing.c           | 2 +-
>  tests/spec/arb_shader_image_load_store/invalid.c            | 2 +-
>  tests/spec/arb_shader_image_load_store/layer.c              | 2 +-
>  tests/spec/arb_shader_image_load_store/level.c              | 2 +-
>  tests/spec/arb_shader_image_load_store/max-images.c         | 2 +-
>  tests/spec/arb_shader_image_load_store/max-size.c           | 4 ++--
>  tests/spec/arb_shader_image_load_store/restrict.c           | 4 ++--
>  tests/spec/arb_shader_image_load_store/semantics.c          | 4 ++--
>  tests/spec/arb_shader_image_load_store/shader-mem-barrier.c | 2 +-
>  tests/spec/arb_shader_image_load_store/state.c              | 2 +-
>  tests/spec/arb_shader_image_load_store/unused.c             | 2 +-
>  19 files changed, 29 insertions(+), 29 deletions(-)
>
> diff --git a/tests/spec/arb_shader_image_load_store/atomicity.c b/tests/spec/arb_shader_image_load_store/atomicity.c
> index 92e3afa..fe6bdb3 100644
> --- a/tests/spec/arb_shader_image_load_store/atomicity.c
> +++ b/tests/spec/arb_shader_image_load_store/atomicity.c
> @@ -128,7 +128,7 @@ run_test(uint32_t init_value, unsigned check_sz, uint32_t check_value,
>          GLuint prog = generate_program(
>                  grid, GL_FRAGMENT_SHADER,
>                  concat(image_hunk(img, ""),
> -                       hunk("volatile uniform IMAGE_T img;\n"),
> +                       hunk("volatile IMAGE_UNIFORM_T img;\n"),
>                         hunk(op), NULL));
>          bool ret = prog &&
>                  init_fb(grid) &&
> diff --git a/tests/spec/arb_shader_image_load_store/bitcast.c b/tests/spec/arb_shader_image_load_store/bitcast.c
> index ab04ca1..9180e79 100644
> --- a/tests/spec/arb_shader_image_load_store/bitcast.c
> +++ b/tests/spec/arb_shader_image_load_store/bitcast.c
> @@ -126,7 +126,7 @@ run_test(const struct image_format_info *src_format,
>          GLuint prog = generate_program(
>                  grid, GL_FRAGMENT_SHADER,
>                  concat(image_hunk(dst_img, ""),
> -                       hunk("uniform IMAGE_T img;\n"
> +                       hunk("IMAGE_UNIFORM_T img;\n"
>                              "\n"
>                              "GRID_T op(ivec2 idx, GRID_T x) {\n"
>                              "        return imageLoad(img, IMAGE_ADDR(idx));\n"
> diff --git a/tests/spec/arb_shader_image_load_store/coherency.c b/tests/spec/arb_shader_image_load_store/coherency.c
> index 5a5bbdd..365e3ec 100644
> --- a/tests/spec/arb_shader_image_load_store/coherency.c
> +++ b/tests/spec/arb_shader_image_load_store/coherency.c
> @@ -142,7 +142,7 @@ run_test(const struct image_qualifier_info *qual,
>                  stage_w->stage,
>                  concat(qualifier_hunk(qual),
>                         image_hunk(img, ""),
> -                       hunk("IMAGE_Q uniform IMAGE_T img;\n"
> +                       hunk("IMAGE_Q IMAGE_UNIFORM_T img;\n"
>                              "\n"
>                              "GRID_T op(ivec2 idx, GRID_T x) {\n"
>                              "       imageStore(img, idx, DATA_T(11, 22, 33, 44));"
> @@ -158,7 +158,7 @@ run_test(const struct image_qualifier_info *qual,
>                  stage_r->stage,
>                  concat(qualifier_hunk(qual),
>                         image_hunk(img, ""),
> -                       hunk("IMAGE_Q uniform IMAGE_T img;\n"
> +                       hunk("IMAGE_Q IMAGE_UNIFORM_T img;\n"
>                              "\n"
>                              "GRID_T op(ivec2 idx, GRID_T x) {\n"
>                              "       DATA_T v = imageLoad(img, idx);"
> diff --git a/tests/spec/arb_shader_image_load_store/common.c b/tests/spec/arb_shader_image_load_store/common.c
> index 3e56c22..f5a387a 100644
> --- a/tests/spec/arb_shader_image_load_store/common.c
> +++ b/tests/spec/arb_shader_image_load_store/common.c
> @@ -286,8 +286,8 @@ upload_image_levels(const struct image_info img, unsigned num_levels,
>                          grid, GL_FRAGMENT_SHADER,
>                          concat(image_hunk(image_info_for_grid(grid), "SRC_"),
>                                 image_hunk(img, "DST_"),
> -                               hunk("readonly uniform SRC_IMAGE_T src_img;\n"
> -                                    "writeonly uniform DST_IMAGE_T dst_img;\n"
> +                               hunk("readonly SRC_IMAGE_UNIFORM_T src_img;\n"
> +                                    "writeonly DST_IMAGE_UNIFORM_T dst_img;\n"
>                                      "\n"
>                                      "GRID_T op(ivec2 idx, GRID_T x) {\n"
>                                      "       imageStore(dst_img, DST_IMAGE_ADDR(idx),\n"
> @@ -447,8 +447,8 @@ download_image_levels(const struct image_info img, unsigned num_levels,
>                          grid, GL_FRAGMENT_SHADER,
>                          concat(image_hunk(img, "SRC_"),
>                                 image_hunk(image_info_for_grid(grid), "DST_"),
> -                               hunk("readonly uniform SRC_IMAGE_T src_img;\n"
> -                                    "writeonly uniform DST_IMAGE_T dst_img;\n"
> +                               hunk("readonly SRC_IMAGE_UNIFORM_T src_img;\n"
> +                                    "writeonly DST_IMAGE_UNIFORM_T dst_img;\n"
>                                      "\n"
>                                      "GRID_T op(ivec2 idx, GRID_T x) {\n"
>                                      "       imageStore(dst_img, DST_IMAGE_ADDR(idx),\n"
> diff --git a/tests/spec/arb_shader_image_load_store/dead-fragments.c b/tests/spec/arb_shader_image_load_store/dead-fragments.c
> index d33fa02..70c8f3f 100644
> --- a/tests/spec/arb_shader_image_load_store/dead-fragments.c
> +++ b/tests/spec/arb_shader_image_load_store/dead-fragments.c
> @@ -183,7 +183,7 @@ run_test(const struct image_op_info *op,
>          GLuint prog = generate_program(
>                  grid, GL_FRAGMENT_SHADER,
>                  concat(image_hunk(img, ""),
> -                       hunk("uniform IMAGE_T img;\n"),
> +                       hunk("IMAGE_UNIFORM_T img;\n"),
>                         hunk(op->hunk),
>                         hunk(body), NULL));
>          bool ret = prog &&
> diff --git a/tests/spec/arb_shader_image_load_store/early-z.c b/tests/spec/arb_shader_image_load_store/early-z.c
> index 2485602..913a220 100644
> --- a/tests/spec/arb_shader_image_load_store/early-z.c
> +++ b/tests/spec/arb_shader_image_load_store/early-z.c
> @@ -140,7 +140,7 @@ run_test_image(const char *input_layout, GLenum depth_func,
>                  grid, GL_FRAGMENT_SHADER,
>                  concat(hunk(input_layout),
>                         image_hunk(img, ""),
> -                       hunk("uniform IMAGE_T img;\n"
> +                       hunk("IMAGE_UNIFORM_T img;\n"
>                              "\n"
>                              "GRID_T op(ivec2 idx, GRID_T x) {\n"
>                              "        imageStore(img, IMAGE_ADDR(idx),"
> diff --git a/tests/spec/arb_shader_image_load_store/grid.c b/tests/spec/arb_shader_image_load_store/grid.c
> index ba87899..35b1b37 100644
> --- a/tests/spec/arb_shader_image_load_store/grid.c
> +++ b/tests/spec/arb_shader_image_load_store/grid.c
> @@ -64,7 +64,7 @@ image_hunk(const struct image_info img, const char *prefix)
>                   "                      ((idx).x + W * (idx).y))\n"
>                   "#define %sIMAGE_LAYOUT_Q layout(%s)\n"
>                   "#define %sIMAGE_BARE_T %s%s\n"
> -                 "#define %sIMAGE_T %sIMAGE_LAYOUT_Q %sIMAGE_BARE_T\n",
> +                 "#define %sIMAGE_UNIFORM_T %sIMAGE_LAYOUT_Q uniform %sIMAGE_BARE_T\n",
>                   prefix, image_scalar_type_name(img.format),
>                   prefix, image_vector_type_name(img.format),
>                   prefix, image_format_scale(img.format).x,
> @@ -98,7 +98,7 @@ header_hunk(const struct grid_info grid)
>                   "#define H %d\n"
>                   "#define N %d\n"
>                   "#define GRID_T %s\n"
> -                 "#define RET_IMAGE_T layout(%s) %s2D\n",
> +                 "#define RET_IMAGE_UNIFORM_T uniform layout(%s) %s2D\n",
>                   grid.size.x, grid.size.y, product(grid.size),
>                   image_vector_type_name(grid.format),
>                   grid.format->name, image_type_name(grid.format));
> @@ -227,7 +227,7 @@ generate_stage_source(const struct grid_info grid,
>                          body,
>                          hunk("layout (local_size_x = W) in;\n"
>                               "\n"
> -                             "uniform RET_IMAGE_T ret_img;\n"
> +                             "RET_IMAGE_UNIFORM_T ret_img;\n"
>                               "\n"
>                               "void main() {\n"
>                               "       ivec2 idx = ivec2(gl_GlobalInvocationID);\n"
> diff --git a/tests/spec/arb_shader_image_load_store/host-mem-barrier.c b/tests/spec/arb_shader_image_load_store/host-mem-barrier.c
> index 833d7ec..12b966a 100644
> --- a/tests/spec/arb_shader_image_load_store/host-mem-barrier.c
> +++ b/tests/spec/arb_shader_image_load_store/host-mem-barrier.c
> @@ -71,8 +71,8 @@ common_hunk(const struct image_info img)
>                        hunk("#define RED DATA_T(1, 0, 0, 1)\n"
>                             "#define GREEN DATA_T(0, 1, 0, 1)\n"
>                             "\n"
> -                           "uniform IMAGE_T src_img;\n"
> -                           "uniform IMAGE_T dst_img;\n"
> +                           "IMAGE_UNIFORM_T src_img;\n"
> +                           "IMAGE_UNIFORM_T dst_img;\n"
>                             "uniform int pass;\n"), NULL);
>  }
>  
> diff --git a/tests/spec/arb_shader_image_load_store/indexing.c b/tests/spec/arb_shader_image_load_store/indexing.c
> index cab7d3f..5ce29a0 100644
> --- a/tests/spec/arb_shader_image_load_store/indexing.c
> +++ b/tests/spec/arb_shader_image_load_store/indexing.c
> @@ -125,7 +125,7 @@ run_test(const struct image_stage_info *stage)
>                  grid, stage->stage ,
>                  concat(image_hunk(img, ""),
>                         hunk("uniform int u;\n"
> -                            "uniform IMAGE_T imgs[8];\n"
> +                            "IMAGE_UNIFORM_T imgs[8];\n"
>                              "\n"
>                              "GRID_T op(ivec2 idx, GRID_T x) {\n"
>                              "        int i;\n"
> diff --git a/tests/spec/arb_shader_image_load_store/invalid.c b/tests/spec/arb_shader_image_load_store/invalid.c
> index a0981e4..6bf3bce 100644
> --- a/tests/spec/arb_shader_image_load_store/invalid.c
> +++ b/tests/spec/arb_shader_image_load_store/invalid.c
> @@ -316,7 +316,7 @@ run_test(const struct image_op_info *op,
>          GLuint prog = generate_program(
>                  grid, GL_FRAGMENT_SHADER,
>                  concat(image_hunk(prog_img, ""),
> -                       hunk("uniform IMAGE_T imgs[1];\n"
> +                       hunk("IMAGE_UNIFORM_T imgs[1];\n"
>                              "uniform int u;\n"
>                              "uniform int off;\n"),
>                         hunk(op->hunk),
> diff --git a/tests/spec/arb_shader_image_load_store/layer.c b/tests/spec/arb_shader_image_load_store/layer.c
> index 8cf2673..527cc70 100644
> --- a/tests/spec/arb_shader_image_load_store/layer.c
> +++ b/tests/spec/arb_shader_image_load_store/layer.c
> @@ -176,7 +176,7 @@ run_test(const struct image_target_info *target,
>          GLuint prog = generate_program(
>                  grid, GL_FRAGMENT_SHADER,
>                  concat(image_hunk(slice_img, ""),
> -                       hunk("uniform IMAGE_T img;\n"
> +                       hunk("IMAGE_UNIFORM_T img;\n"
>                              "\n"
>                              "GRID_T op(ivec2 idx, GRID_T x) {\n"
>                              "        GRID_T v = imageLoad(img, IMAGE_ADDR(idx));\n"
> diff --git a/tests/spec/arb_shader_image_load_store/level.c b/tests/spec/arb_shader_image_load_store/level.c
> index 5fbdbaf..f23e805 100644
> --- a/tests/spec/arb_shader_image_load_store/level.c
> +++ b/tests/spec/arb_shader_image_load_store/level.c
> @@ -153,7 +153,7 @@ run_test(const struct image_target_info *target)
>          GLuint prog = generate_program(
>                  grid, GL_FRAGMENT_SHADER,
>                  concat(image_hunk(level_img, ""),
> -                       hunk("uniform IMAGE_T img;\n"
> +                       hunk("IMAGE_UNIFORM_T img;\n"
>                              "\n"
>                              "GRID_T op(ivec2 idx, GRID_T x) {\n"
>                              "        GRID_T v = imageLoad(img, IMAGE_ADDR(idx));\n"
> diff --git a/tests/spec/arb_shader_image_load_store/max-images.c b/tests/spec/arb_shader_image_load_store/max-images.c
> index 1e1186c..d06e5c4 100644
> --- a/tests/spec/arb_shader_image_load_store/max-images.c
> +++ b/tests/spec/arb_shader_image_load_store/max-images.c
> @@ -159,7 +159,7 @@ generate_source(const struct grid_info grid,
>                   */
>                  return concat(stage_hunk(grid, stage),
>                                image_hunk(img, ""),
> -                              hunk("uniform IMAGE_T IMGS[NUM_IMGS];\n"
> +                              hunk("IMAGE_UNIFORM_T IMGS[NUM_IMGS];\n"
>                                     "\n"
>                                     "GRID_T op(ivec2 idx, GRID_T x) {\n"
>                                     "        int i;\n"
> diff --git a/tests/spec/arb_shader_image_load_store/max-size.c b/tests/spec/arb_shader_image_load_store/max-size.c
> index bd08091..6f8134f 100644
> --- a/tests/spec/arb_shader_image_load_store/max-size.c
> +++ b/tests/spec/arb_shader_image_load_store/max-size.c
> @@ -92,8 +92,8 @@ run_test(const struct image_target_info *target,
>          GLuint prog = generate_program(
>                  grid, GL_FRAGMENT_SHADER,
>                  concat(image_hunk(img, ""),
> -                       hunk("readonly uniform IMAGE_T src_img;\n"
> -                            "writeonly uniform IMAGE_T dst_img;\n"
> +                       hunk("readonly IMAGE_UNIFORM_T src_img;\n"
> +                            "writeonly IMAGE_UNIFORM_T dst_img;\n"
>                              "\n"
>                              "GRID_T op(ivec2 idx, GRID_T x) {\n"
>                              "        imageStore(dst_img, IMAGE_ADDR(idx),"
> diff --git a/tests/spec/arb_shader_image_load_store/restrict.c b/tests/spec/arb_shader_image_load_store/restrict.c
> index 32d3092..97981c1 100644
> --- a/tests/spec/arb_shader_image_load_store/restrict.c
> +++ b/tests/spec/arb_shader_image_load_store/restrict.c
> @@ -128,8 +128,8 @@ run_test(const struct image_qualifier_info *qual)
>                  GL_FRAGMENT_SHADER,
>                  concat(qualifier_hunk(qual),
>                         image_hunk(img, ""),
> -                       hunk("IMAGE_Q uniform IMAGE_T src_img;\n"
> -                            "IMAGE_Q uniform IMAGE_T dst_img;\n"
> +                       hunk("IMAGE_Q IMAGE_UNIFORM_T src_img;\n"
> +                            "IMAGE_Q IMAGE_UNIFORM_T dst_img;\n"
>                              "\n"
>                              "GRID_T op(ivec2 idx, GRID_T x) {\n"
>                              "        int i;\n"
> diff --git a/tests/spec/arb_shader_image_load_store/semantics.c b/tests/spec/arb_shader_image_load_store/semantics.c
> index 122e490..216eff4 100644
> --- a/tests/spec/arb_shader_image_load_store/semantics.c
> +++ b/tests/spec/arb_shader_image_load_store/semantics.c
> @@ -322,8 +322,8 @@ run_test(const struct image_op_info *op,
>          GLuint prog = generate_program(
>                  grid, stage->stage,
>                  concat(image_hunk(img, ""),
> -                       hunk("uniform IMAGE_T img;\n"
> -                            "uniform IMAGE_T arg_img;\n"
> +                       hunk("IMAGE_UNIFORM_T img;\n"
> +                            "IMAGE_UNIFORM_T arg_img;\n"
>                              "\n"
>                              "GRID_T arg(ivec2 idx) {\n"
>                              "        return imageLoad(arg_img, IMAGE_ADDR(idx));\n"
> diff --git a/tests/spec/arb_shader_image_load_store/shader-mem-barrier.c b/tests/spec/arb_shader_image_load_store/shader-mem-barrier.c
> index c5011f9..5fdd86b 100644
> --- a/tests/spec/arb_shader_image_load_store/shader-mem-barrier.c
> +++ b/tests/spec/arb_shader_image_load_store/shader-mem-barrier.c
> @@ -129,7 +129,7 @@ run_test(const struct image_test_info *test,
>                  grid, stage->stage,
>                  concat(test_hunk(test, k),
>                         image_hunk(img, ""),
> -                       hunk("IMAGE_Q uniform IMAGE_T img;\n"
> +                       hunk("IMAGE_Q IMAGE_UNIFORM_T img;\n"
>                              "\n"
>                              "GRID_T op(ivec2 idx, GRID_T arg) {\n"
>                              "       /*\n"
> diff --git a/tests/spec/arb_shader_image_load_store/state.c b/tests/spec/arb_shader_image_load_store/state.c
> index bc25b56..08fd2c6 100644
> --- a/tests/spec/arb_shader_image_load_store/state.c
> +++ b/tests/spec/arb_shader_image_load_store/state.c
> @@ -359,7 +359,7 @@ run_test_uniform(void)
>          GLuint prog = generate_program(
>                  grid, GL_FRAGMENT_SHADER,
>                  concat(image_hunk(image_info_for_grid(grid), ""),
> -                       hunk("uniform IMAGE_T imgs[2];\n"
> +                       hunk("IMAGE_UNIFORM_T imgs[2];\n"
>                              "\n"
>                              "GRID_T op(ivec2 idx, GRID_T x) {\n"
>                              "        imageStore(imgs[0], IMAGE_ADDR(idx), x);\n"
> diff --git a/tests/spec/arb_shader_image_load_store/unused.c b/tests/spec/arb_shader_image_load_store/unused.c
> index 91fa5c5..304358e 100644
> --- a/tests/spec/arb_shader_image_load_store/unused.c
> +++ b/tests/spec/arb_shader_image_load_store/unused.c
> @@ -82,7 +82,7 @@ run_test(uint32_t init_value, uint32_t check_value,
>          GLuint prog = generate_program(
>                  grid, GL_FRAGMENT_SHADER,
>                  concat(image_hunk(img, ""),
> -                       hunk("uniform IMAGE_T img;\n"),
> +                       hunk("IMAGE_UNIFORM_T img;\n"),
>                         hunk(op), NULL));
>          bool ret = prog &&
>                  init_fb(grid) &&
> -- 
> 2.4.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20160119/b06be6f5/attachment-0001.sig>


More information about the Piglit mailing list