[PATCH i-g-t] tests/xe_ccs: Separate inc dimension start width

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Mon Mar 11 11:47:30 UTC 2024


Instead of manipulating param width/heigth add dedicated variable
used in inc-dimension subtests. This fixes issue when all subtests
are run one-by-one what causes failures on comparing surfaces due
to different sizes.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Matthew Auld <matthew.auld at intel.com>
---
 tests/intel/xe_ccs.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/tests/intel/xe_ccs.c b/tests/intel/xe_ccs.c
index 9ac05983fb..5a79642c9d 100644
--- a/tests/intel/xe_ccs.c
+++ b/tests/intel/xe_ccs.c
@@ -63,6 +63,7 @@ static struct param {
 	bool print_surface_info;
 	int width;
 	int height;
+	int incdim_width;
 } param = {
 	.compression_format = 0,
 	.tiling = -1,
@@ -71,6 +72,7 @@ static struct param {
 	.print_surface_info = false,
 	.width = 512,
 	.height = 512,
+	.incdim_width = 1,
 };
 
 struct test_config {
@@ -636,8 +638,8 @@ static void block_copy_test(int xe,
 						    param.width, param.height,
 						    tiling, copy_function);
 			} else {
-				for (int w = param.width;
-				     w < param.width + config->width_steps;
+				for (int w = param.incdim_width;
+				     w < param.incdim_width + config->width_steps;
 				     w += config->width_increment) {
 					snprintf(testname, sizeof(testname),
 						 "%s-%s-compfmt%d-%s%s-%dx%d",
@@ -735,8 +737,6 @@ igt_main_args("bf:pst:W:H:", NULL, help_str, opt_handler, NULL)
 	igt_subtest_with_dynamic("block-copy-uncompressed-inc-dimension") {
 		struct test_config config = { .width_increment = 15,
 					      .width_steps = 512 };
-		param.width = 1;
-		param.height = 1;
 
 		block_copy_test(xe, &config, set, BLOCK_COPY);
 	}
@@ -753,8 +753,6 @@ igt_main_args("bf:pst:W:H:", NULL, help_str, opt_handler, NULL)
 		struct test_config config = { .compression = true,
 					      .width_increment = 15,
 					      .width_steps = 512 };
-		param.width = 1;
-		param.height = 1;
 
 		block_copy_test(xe, &config, set, BLOCK_COPY);
 	}
-- 
2.34.1



More information about the igt-dev mailing list