Module: Mesa
Branch: main
Commit: 5d58d5caaf9df90045c2ff6bbe13ac63c7c6ee48
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5d58d5caaf9df90045c2ff6bbe13ac63c7c6ee48

Author: Alyssa Rosenzweig <[email protected]>
Date:   Mon Feb 21 19:28:43 2022 -0500

asahi: Add separate_stencil, internal_format fields

Currently unused, but will be set when u_transfer_helper is integrated
for emulating packed depth/stencil.

Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482>

---

 src/gallium/drivers/asahi/agx_state.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/gallium/drivers/asahi/agx_state.h 
b/src/gallium/drivers/asahi/agx_state.h
index 558c7966d90..cc0a187250a 100644
--- a/src/gallium/drivers/asahi/agx_state.h
+++ b/src/gallium/drivers/asahi/agx_state.h
@@ -256,6 +256,16 @@ struct agx_resource {
 
    /* Bytes from one miptree to the next */
    unsigned array_stride;
+
+   /* Metal does not support packed depth/stencil formats; presumably AGX does
+    * not either. Instead, we create separate depth and stencil resources,
+    * managed by u_transfer_helper.  We provide the illusion of packed
+    * resources.
+    */
+   struct agx_resource *separate_stencil;
+
+   /* Internal format, since many depth/stencil formats are emulated. */
+   enum pipe_format internal_format;
 };
 
 static inline struct agx_resource *

Reply via email to