radeonsi/test_image_copy: remove special SDMA codepaths
authorMarek Olšák <marek.olsak@amd.com>
Sun, 24 Apr 2022 11:13:15 +0000 (07:13 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 3 May 2022 15:11:08 +0000 (11:11 -0400)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>

src/gallium/drivers/radeonsi/si_test_image_copy_region.c

index 717ed14..7aa4711 100644 (file)
@@ -288,38 +288,17 @@ void si_test_image_copy_region(struct si_screen *sscreen)
          srcz = rand() % (tsrc.array_size - depth + 1);
          dstz = rand() % (tdst.array_size - depth + 1);
 
-         /* special code path to hit the tiled partial copies */
-         if (!ssrc->surface.is_linear && !sdst->surface.is_linear && rand() & 1) {
-            if (max_width < 8 || max_height < 8)
-               continue;
-            width = ((rand() % (max_width / 8)) + 1) * 8;
-            height = ((rand() % (max_height / 8)) + 1) * 8;
-
-            srcx = rand() % (tsrc.width0 - width + 1) & ~0x7;
-            srcy = rand() % (tsrc.height0 - height + 1) & ~0x7;
-
-            dstx = rand() % (tdst.width0 - width + 1) & ~0x7;
-            dsty = rand() % (tdst.height0 - height + 1) & ~0x7;
-         } else {
-            /* just make sure that it doesn't divide by zero */
-            assert(max_width > 0 && max_height > 0);
-
-            width = (rand() % max_width) + 1;
-            height = (rand() % max_height) + 1;
-
-            srcx = rand() % (tsrc.width0 - width + 1);
-            srcy = rand() % (tsrc.height0 - height + 1);
-
-            dstx = rand() % (tdst.width0 - width + 1);
-            dsty = rand() % (tdst.height0 - height + 1);
-         }
+         /* just make sure that it doesn't divide by zero */
+         assert(max_width > 0 && max_height > 0);
 
-         /* special code path to hit out-of-bounds reads in L2T */
-         if (ssrc->surface.is_linear && !sdst->surface.is_linear && rand() % 4 == 0) {
-            srcx = 0;
-            srcy = 0;
-            srcz = 0;
-         }
+         width = (rand() % max_width) + 1;
+         height = (rand() % max_height) + 1;
+
+         srcx = rand() % (tsrc.width0 - width + 1);
+         srcy = rand() % (tsrc.height0 - height + 1);
+
+         dstx = rand() % (tdst.width0 - width + 1);
+         dsty = rand() % (tdst.height0 - height + 1);
 
          /* GPU copy */
          u_box_3d(srcx, srcy, srcz, width, height, depth, &box);