[igt-dev] [PATCH i-g-t v19 17/34] tests/api_intel_bb: Add compressed->compressed copy
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Tue Feb 2 09:24:26 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>
---
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 5e34f2c86..293076f6b 100644
--- a/tests/i915/api_intel_bb.c
+++ b/tests/i915/api_intel_bb.c
@@ -1340,7 +1340,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;
@@ -1355,6 +1355,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);
@@ -1374,6 +1376,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);
@@ -1389,12 +1397,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