[igt-dev] [PATCH i-g-t v33 22/39] tests/api_intel_bb: Add compressed->compressed copy

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Tue Apr 13 08:42:09 UTC 2021


Check aux pagetables are working when more than one compressed
buffers are added.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Cc: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Acked-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 tests/i915/api_intel_bb.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/tests/i915/api_intel_bb.c b/tests/i915/api_intel_bb.c
index 918ebd629..dd1a4ac13 100644
--- a/tests/i915/api_intel_bb.c
+++ b/tests/i915/api_intel_bb.c
@@ -1260,7 +1260,7 @@ static void render_ccs(struct buf_ops *bops)
 	struct intel_bb *ibb;
 	const int width = 1024;
 	const int height = 1024;
-	struct intel_buf src, dst, final;
+	struct intel_buf src, dst, dst2, final;
 	int i915 = buf_ops_get_fd(bops);
 	uint32_t fails = 0;
 	uint32_t compressed = 0;
@@ -1275,6 +1275,8 @@ static void render_ccs(struct buf_ops *bops)
 			 I915_COMPRESSION_NONE);
 	scratch_buf_init(bops, &dst, width, height, I915_TILING_Y,
 			 I915_COMPRESSION_RENDER);
+	scratch_buf_init(bops, &dst2, width, height, I915_TILING_Y,
+			 I915_COMPRESSION_RENDER);
 	scratch_buf_init(bops, &final, width, height, I915_TILING_NONE,
 			 I915_COMPRESSION_NONE);
 
@@ -1294,6 +1296,12 @@ static void render_ccs(struct buf_ops *bops)
 	render_copy(ibb,
 		    &dst,
 		    0, 0, width, height,
+		    &dst2,
+		    0, 0);
+
+	render_copy(ibb,
+		    &dst2,
+		    0, 0, width, height,
 		    &final,
 		    0, 0);
 
@@ -1309,12 +1317,15 @@ static void render_ccs(struct buf_ops *bops)
 	if (write_png) {
 		intel_buf_write_to_png(&src, "render-ccs-src.png");
 		intel_buf_write_to_png(&dst, "render-ccs-dst.png");
+		intel_buf_write_to_png(&dst2, "render-ccs-dst2.png");
 		intel_buf_write_aux_to_png(&dst, "render-ccs-dst-aux.png");
+		intel_buf_write_aux_to_png(&dst2, "render-ccs-dst2-aux.png");
 		intel_buf_write_to_png(&final, "render-ccs-final.png");
 	}
 
 	intel_buf_close(bops, &src);
 	intel_buf_close(bops, &dst);
+	intel_buf_close(bops, &dst2);
 	intel_buf_close(bops, &final);
 
 	igt_assert_f(fails == 0, "render-ccs fails: %d\n", fails);
-- 
2.26.0



More information about the igt-dev mailing list