From 5a4cdc809bb654f331d9ff4dc09c7185c7400935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 24 Apr 2022 07:13:15 -0400 Subject: [PATCH] radeonsi/test_image_copy: remove special SDMA codepaths Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- .../radeonsi/si_test_image_copy_region.c | 37 ++++--------------- 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_test_image_copy_region.c b/src/gallium/drivers/radeonsi/si_test_image_copy_region.c index 717ed14937d..7aa47115c58 100644 --- a/src/gallium/drivers/radeonsi/si_test_image_copy_region.c +++ b/src/gallium/drivers/radeonsi/si_test_image_copy_region.c @@ -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; + /* just make sure that it doesn't divide by zero */ + assert(max_width > 0 && max_height > 0); - srcx = rand() % (tsrc.width0 - width + 1) & ~0x7; - srcy = rand() % (tsrc.height0 - height + 1) & ~0x7; + width = (rand() % max_width) + 1; + height = (rand() % max_height) + 1; - 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); + srcx = rand() % (tsrc.width0 - width + 1); + srcy = rand() % (tsrc.height0 - height + 1); - 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); - } - - /* 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; - } + dstx = rand() % (tdst.width0 - width + 1); + dsty = rand() % (tdst.height0 - height + 1); /* GPU copy */ u_box_3d(srcx, srcy, srcz, width, height, depth, &box);