diff options
author | Alyssa Rosenzweig <alyssa@rosenzweig.io> | 2023-04-14 19:57:20 -0400 |
---|---|---|
committer | Alyssa Rosenzweig <alyssa@rosenzweig.io> | 2023-05-07 09:05:39 -0400 |
commit | 87e57eae092162a80c882bdf73afd15ecbeb28df (patch) | |
tree | 0bdae79d1583d6535d749efaf575c4bb9c91a249 /src/asahi | |
parent | e13f9caa255882b49b4835dfaac18d4f6fa491b7 (diff) | |
download | mesa-87e57eae092162a80c882bdf73afd15ecbeb28df.tar.gz |
asahi: Rename no colour output to tag write disable
Comparison with PowerVR's XML shows that this is the actual name... And it needs
to be set a bit more carefully than "no colour output" in order to get correct
behaviour for depth-only passes that use sample mask / discard. Fix the name
first, the extra conditions will come when they're needed for multisampling.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22891>
Diffstat (limited to 'src/asahi')
-rw-r--r-- | src/asahi/compiler/agx_compile.c | 3 | ||||
-rw-r--r-- | src/asahi/compiler/agx_compile.h | 7 | ||||
-rw-r--r-- | src/asahi/lib/cmdbuf.xml | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index 3bc3d990028..01c87ac6dd2 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -2376,7 +2376,8 @@ agx_compile_shader_nir(nir_shader *nir, struct agx_shader_key *key, out->writes_psiz = nir->info.outputs_written & BITFIELD_BIT(VARYING_SLOT_PSIZ); } else if (nir->info.stage == MESA_SHADER_FRAGMENT) { - out->no_colour_output = !(nir->info.outputs_written >> FRAG_RESULT_DATA0); + out->tag_write_disable = + !(nir->info.outputs_written >> FRAG_RESULT_DATA0); out->disable_tri_merging = nir->info.fs.needs_all_helper_invocations || nir->info.fs.needs_quad_helper_invocations || nir->info.writes_memory; diff --git a/src/asahi/compiler/agx_compile.h b/src/asahi/compiler/agx_compile.h index dfc4a66c9f1..1cd392b6c4f 100644 --- a/src/asahi/compiler/agx_compile.h +++ b/src/asahi/compiler/agx_compile.h @@ -100,8 +100,11 @@ struct agx_shader_info { /* Depth layout, never equal to NONE */ enum gl_frag_depth_layout depth_layout; - /* Is colour output omitted? */ - bool no_colour_output; + /* Based only the compiled shader, should tag writes be disabled? This is set + * based on what is outputted. Note if rasterizer discard is used, that needs + * to disable tag writes regardless of this flag. + */ + bool tag_write_disable; /* Shader is incompatible with triangle merging */ bool disable_tri_merging; diff --git a/src/asahi/lib/cmdbuf.xml b/src/asahi/lib/cmdbuf.xml index 756c70a9512..7c61853848c 100644 --- a/src/asahi/lib/cmdbuf.xml +++ b/src/asahi/lib/cmdbuf.xml @@ -439,7 +439,7 @@ <field name="Depth bias enable" size="1" start="17" type="bool"/> <field name="Stencil test enable" size="1" start="18" type="bool"/> <field name="Two-sided stencil" size="1" start="19" type="bool"/> - <field name="No colour output" size="1" start="21" type="bool"/> + <field name="Tag write disable" size="1" start="21" type="bool"/> <field name="Sample mask after depth/stencil" size="1" start="25" type="bool"/> <field name="Disable tri merging" size="1" start="26" type="bool"/> <field name="Pass type" size="3" start="29" type="Pass type"/> |