From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
"Karolina Stolarek" <karolina.stolarek@intel.com>,
"Akshata Jahagirdar" <akshata.jahagirdar@intel.com>
Subject: [PATCH i-g-t 2/2] tests/gem|xe_ccs: Check surface ccs data instead of naive comparison
Date: Fri, 29 Mar 2024 10:16:55 +0100 [thread overview]
Message-ID: <20240329091655.1347862-3-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20240329091655.1347862-1-zbigniew.kempczynski@intel.com>
Start using function which extracts ccs data from the surface and
determines its compression.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Karolina Stolarek <karolina.stolarek@intel.com>
Cc: Akshata Jahagirdar <akshata.jahagirdar@intel.com>
---
tests/intel/gem_ccs.c | 15 ++++++++++++---
tests/intel/xe_ccs.c | 9 +++------
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/tests/intel/gem_ccs.c b/tests/intel/gem_ccs.c
index e4126bcaa8..c59fc69fb7 100644
--- a/tests/intel/gem_ccs.c
+++ b/tests/intel/gem_ccs.c
@@ -305,6 +305,10 @@ static int blt_block_copy3(int i915,
return ret;
}
+#define CHECK_FROM_WIDTH 256
+#define CHECK_FROM_HEIGHT 256
+#define FROM_EXP_WH(w, h) ((w) >= CHECK_FROM_WIDTH && (h) >= CHECK_FROM_HEIGHT)
+
static void block_copy(int i915,
const intel_ctx_t *ctx,
const struct intel_execution_engine2 *e,
@@ -359,9 +363,14 @@ static void block_copy(int i915,
blt_block_copy(i915, ctx, e, ahnd, &blt, pext);
gem_sync(i915, mid->handle);
- /* We expect mid != src if there's compression */
- if (mid->compression)
- igt_assert(memcmp(src->ptr, mid->ptr, src->size) != 0);
+ /*
+ * We expect mid != src if there's compression. Ignore this for small
+ * width x height for linear as compression for gradient occurs in the
+ * middle for bigger sizes.
+ */
+ if (mid->compression && FROM_EXP_WH(width, height))
+ igt_assert(blt_surface_is_compressed(i915, (intel_ctx_t *)ctx, e,
+ ahnd, mid));
WRITE_PNG(i915, run_id, "mid", &blt.dst, width, height, bpp);
diff --git a/tests/intel/xe_ccs.c b/tests/intel/xe_ccs.c
index 7d0f2f2a11..5525aaed65 100644
--- a/tests/intel/xe_ccs.c
+++ b/tests/intel/xe_ccs.c
@@ -361,13 +361,10 @@ static void block_copy(int xe,
/*
* We expect mid != src if there's compression. Ignore this for small
* width x height for linear as compression for gradient occurs in the
- * middle for bigger sizes. We also ignore 1x1 as this looks same for
- * xmajor.
+ * middle for bigger sizes.
*/
- if (mid->compression && MIN_EXP_WH(width, height)) {
- if (mid_tiling != T_LINEAR || FROM_EXP_WH(width, height))
- igt_assert(memcmp(src->ptr, mid->ptr, src->size) != 0);
- }
+ if (mid->compression && FROM_EXP_WH(width, height))
+ igt_assert(blt_surface_is_compressed(xe, ctx, NULL, ahnd, mid));
WRITE_PNG(xe, run_id, "mid", &blt.dst, width, height, bpp);
--
2.34.1
next prev parent reply other threads:[~2024-03-29 9:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-29 9:16 [PATCH i-g-t 0/2] Add surface flat ccs check Zbigniew Kempczyński
2024-03-29 9:16 ` [PATCH i-g-t 1/2] lib/intel_blt: Add functions which extract and check object ccs data Zbigniew Kempczyński
2024-03-29 13:31 ` Karolina Stolarek
2024-04-10 8:33 ` Zbigniew Kempczyński
2024-04-10 10:12 ` Karolina Stolarek
2024-03-29 9:16 ` Zbigniew Kempczyński [this message]
2024-03-29 13:40 ` [PATCH i-g-t 2/2] tests/gem|xe_ccs: Check surface ccs data instead of naive comparison Karolina Stolarek
2024-04-10 8:37 ` Zbigniew Kempczyński
2024-03-29 10:21 ` ✓ CI.xeBAT: success for Add surface flat ccs check Patchwork
2024-03-29 10:24 ` ✓ Fi.CI.BAT: " Patchwork
2024-03-30 12:24 ` ✗ Fi.CI.IGT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240329091655.1347862-3-zbigniew.kempczynski@intel.com \
--to=zbigniew.kempczynski@intel.com \
--cc=akshata.jahagirdar@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=karolina.stolarek@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox