[Piglit] [PATCH] shader_image: decrease number of images in indexing test

Dave Airlie airlied at gmail.com
Wed Feb 28 02:52:45 UTC 2018


From: Dave Airlie <airlied at redhat.com>

This decreases the indexing test to use 7 images, so it can run
on GPUs which have a limit of 8 images.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 tests/spec/arb_shader_image_load_store/indexing.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/spec/arb_shader_image_load_store/indexing.c b/tests/spec/arb_shader_image_load_store/indexing.c
index acef2db17..5a7c2eb09 100644
--- a/tests/spec/arb_shader_image_load_store/indexing.c
+++ b/tests/spec/arb_shader_image_load_store/indexing.c
@@ -64,7 +64,7 @@ init_images(const struct image_info img, GLuint prog)
         uint32_t pixels[H][W];
         int i, j, unit;
 
-        for (unit = 0; unit < 8; ++unit) {
+        for (unit = 0; unit < 7; ++unit) {
                 char *name = NULL;
 
                 for (i = 0; i < W; ++i)
@@ -98,9 +98,9 @@ check(const struct grid_info grid, unsigned u)
                                 /* Active invocation. */
                                 unsigned x = 0;
 
-                                for (unit = 0; unit < 8; ++unit)
+                                for (unit = 0; unit < 7; ++unit)
                                         x = (x << 4 |
-                                             ((i + j + (unit + u) % 8) % 16));
+                                             ((i + j + (unit + u) % 7) % 16));
 
                                 expect[j][i] = x;
                         }
@@ -126,7 +126,7 @@ run_test(const struct image_stage_info *stage)
                 grid, stage->stage ,
                 concat(image_hunk(img, ""),
                        hunk("uniform int u;\n"
-                            "IMAGE_UNIFORM_T imgs[8];\n"
+                            "IMAGE_UNIFORM_T imgs[7];\n"
                             "\n"
                             "GRID_T op(ivec2 idx, GRID_T x) {\n"
                             "        int i;\n"
@@ -134,9 +134,9 @@ run_test(const struct image_stage_info *stage)
                             "        if (idx.x % 2 == idx.y % 3)\n"
                             "                return GRID_T(0xdeadcafeu);\n"
                             "\n"
-                            "        for (i = 0; i < 8; ++i) {\n"
+                            "        for (i = 0; i < 7; ++i) {\n"
                             "                x.x = (x.x << 4 |"
-                            "                       imageLoad(imgs[(i + u) % 8],"
+                            "                       imageLoad(imgs[(i + u) % 7],"
                             "                                 IMAGE_ADDR(idx)).x);\n"
                             "        }\n"
                             "\n"
-- 
2.14.3



More information about the Piglit mailing list