asahi: Broadcast Z for all components on texture fetch
authorAsahi Lina <lina@asahilina.net>
Fri, 7 Apr 2023 14:09:45 +0000 (23:09 +0900)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 7 May 2023 12:58:23 +0000 (08:58 -0400)
Gallium expects this.

Related commit: 6cac9c748e

Co-authored-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22891>

src/gallium/drivers/asahi/agx_state.c

index 52eba19..996fe02 100644 (file)
@@ -667,10 +667,11 @@ agx_pack_texture(void *out, struct agx_resource *rsrc,
       desc->swizzle[3],
    };
 
-   if (util_format_has_stencil(desc)) {
-      assert(!util_format_has_depth(desc) && "separate stencil always used");
+   if (util_format_is_depth_or_stencil(format)) {
+      assert(!util_format_is_depth_and_stencil(format) &&
+             "separate stencil always used");
 
-      /* Broadcast stencil */
+      /* Broadcast depth and stencil */
       format_swizzle[0] = 0;
       format_swizzle[1] = 0;
       format_swizzle[2] = 0;