Mesa (master): intel/isl: Switch to R8_UNORM format for compatiblity

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Feb 13 19:08:30 UTC 2020


Module: Mesa
Branch: master
Commit: 3547e19bbd0d70fc391f5982ea38a026a5994b1c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3547e19bbd0d70fc391f5982ea38a026a5994b1c

Author: Sagar Ghuge <sagar.ghuge at intel.com>
Date:   Mon Feb  3 21:58:50 2020 -0800

intel/isl: Switch to R8_UNORM format for compatiblity

Gen12 added CCS_E support for A8_UNORM. Intercept A8_UNORM format and
switch to R8_UNORM, as both share the same aux map format encoding so
they are compatible.

Fixes Piglit's ext_framebuffer_multisample-formats all_samples, which
was hitting an assert about A8_UNORM and R8_UINT not being CCS_E
compatible formats.

v2: Add gen check (Kenneth Graunke)

v3: Intercept A8_UNORM and set format to R8_UNORM (Jason Ekstrand)

v4:
- Remove gen check and move block little bit down (Jason Ekstrand)

Signed-off-by: Sagar Ghuge <sagar.ghuge at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3719>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3719>

---

 src/intel/isl/isl_format.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/intel/isl/isl_format.c b/src/intel/isl/isl_format.c
index 57964650dc6..5f92c3e1f36 100644
--- a/src/intel/isl/isl_format.c
+++ b/src/intel/isl/isl_format.c
@@ -928,6 +928,15 @@ isl_formats_are_ccs_e_compatible(const struct gen_device_info *devinfo,
        !isl_format_supports_ccs_e(devinfo, format2))
       return false;
 
+   /* Gen12 added CCS_E support for A8_UNORM, A8_UNORM and R8_UNORM share the
+    * same aux map format encoding so they are definitely compatible.
+    */
+   if (format1 == ISL_FORMAT_A8_UNORM)
+      format1 = ISL_FORMAT_R8_UNORM;
+
+   if (format2 == ISL_FORMAT_A8_UNORM)
+      format2 = ISL_FORMAT_R8_UNORM;
+
    const struct isl_format_layout *fmtl1 = isl_format_get_layout(format1);
    const struct isl_format_layout *fmtl2 = isl_format_get_layout(format2);
 



More information about the mesa-commit mailing list