summaryrefslogtreecommitdiff
path: root/src/asahi
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>2021-12-15 21:28:00 -0500
committerMarge Bot <emma+marge@anholt.net>2022-01-16 18:23:28 +0000
commitdcc12656e3b57a5f53bb07df7b8aaca0192417d0 (patch)
treee58ae456a56f33b7655f67ecda5bb9fbc33de24f /src/asahi
parent9b57600502ace5fafaf170ad748af58f3181ba4f (diff)
asahi: Route sample mask from shader
Compiler-controlled bit in the cmdstream. Some other magic bits are needed for sample mask writes to work properly. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14219>
Diffstat (limited to 'src/asahi')
-rw-r--r--src/asahi/compiler/agx_compile.h3
-rw-r--r--src/asahi/lib/cmdbuf.xml1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/asahi/compiler/agx_compile.h b/src/asahi/compiler/agx_compile.h
index b874ee1b6a1..a3392faeec1 100644
--- a/src/asahi/compiler/agx_compile.h
+++ b/src/asahi/compiler/agx_compile.h
@@ -94,6 +94,9 @@ struct agx_shader_info {
/* Does the shader write point size? */
bool writes_psiz;
+
+ /* Does the shader control the sample mask? */
+ bool writes_sample_mask;
};
#define AGX_MAX_RTS (8)
diff --git a/src/asahi/lib/cmdbuf.xml b/src/asahi/lib/cmdbuf.xml
index c3d96ca2ff3..47b0767bc9d 100644
--- a/src/asahi/lib/cmdbuf.xml
+++ b/src/asahi/lib/cmdbuf.xml
@@ -313,6 +313,7 @@
<field name="Unk 1" size="1" start="1:9" type="bool" default="true"/>
<field name="Lines or points" size="1" start="1:26" type="bool"/>
<field name="Reads tilebuffer" size="1" start="1:29" type="bool"/>
+ <field name="Sample mask from shader" size="1" start="1:30" type="bool"/>
<field name="Front" size="32" start="2:0" type="Unknown face"/>
<field name="Back" size="32" start="3:0" type="Unknown face"/>
<!-- maybe sample mask -->