Mesa (master): blorp: Stop whacking Z24 depth to BGRA8

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jan 4 20:41:35 UTC 2020


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

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Tue Dec  3 20:25:19 2019 -0600

blorp: Stop whacking Z24 depth to BGRA8

The shader code required to do this is int(sat(x) * UINT24_MAX) which
isn't really worth all the effort to avoid.  Doing the format
conversion, on the other hand, prevents us from sampling with HiZ which
is something that we very much want on gen8-9 where we can.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/intel/blorp/blorp_blit.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
index 3a2757447c8..b63a6e53e23 100644
--- a/src/intel/blorp/blorp_blit.c
+++ b/src/intel/blorp/blorp_blit.c
@@ -2297,17 +2297,6 @@ blorp_blit(struct blorp_batch *batch,
       }
    }
 
-   /* ISL_FORMAT_R24_UNORM_X8_TYPELESS it isn't supported as a render target,
-    * which requires shader math to render to it.  Blitting Z24X8 to Z24X8
-    * is fairly common though, so we'd like to avoid it.  Since we don't need
-    * to blend depth values, we can simply pick a renderable format with the
-    * right number of bits-per-pixel, like 8-bit BGRA.
-    */
-   if (dst_surf->surf->format == ISL_FORMAT_R24_UNORM_X8_TYPELESS &&
-       src_surf->surf->format == ISL_FORMAT_R24_UNORM_X8_TYPELESS) {
-      src_format = dst_format = ISL_FORMAT_B8G8R8A8_UNORM;
-   }
-
    brw_blorp_surface_info_init(batch->blorp, &params.src, src_surf, src_level,
                                src_layer, src_format, false);
    brw_blorp_surface_info_init(batch->blorp, &params.dst, dst_surf, dst_level,




More information about the mesa-commit mailing list