aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/pandecode/decode.c
diff options
context:
space:
mode:
authorBoris Brezillon <[email protected]>2020-01-31 12:37:38 +0100
committerMarge Bot <[email protected]>2020-02-05 15:41:55 +0000
commit8ed94d38b4169e18bf81e956241d1c8674cc2ec6 (patch)
tree17f4c570545f2827ca63d0a034b16d44ae132eb7 /src/panfrost/pandecode/decode.c
parent0406ea4856498c25479b1e1b191471f7222747d6 (diff)
panfrost: Add the MALI_WRITES_{Z,S} flags
We discovered 2 new shader flags used when a fragment shader updates the depth/stencil value through a ZS writeout. If those flags are not set, the depth/stencil value stored in the depth/stencil tilebuffer remain unchanged. While at it, rename unknown2 into flags_hi and rename flags into flags_lo. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3697>
Diffstat (limited to 'src/panfrost/pandecode/decode.c')
-rw-r--r--src/panfrost/pandecode/decode.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c
index 32a6ba42a7a..dc755fcc364 100644
--- a/src/panfrost/pandecode/decode.c
+++ b/src/panfrost/pandecode/decode.c
@@ -263,12 +263,18 @@ static const struct pandecode_flag_info mfbd_extra_flag_lo_info[] = {
#undef FLAG_INFO
#define FLAG_INFO(flag) { MALI_##flag, "MALI_" #flag }
-static const struct pandecode_flag_info shader_midgard1_flag_info [] = {
+static const struct pandecode_flag_info shader_midgard1_flag_lo_info [] = {
+ FLAG_INFO(WRITES_Z),
FLAG_INFO(EARLY_Z),
FLAG_INFO(READS_TILEBUFFER),
FLAG_INFO(READS_ZS),
{}
};
+
+static const struct pandecode_flag_info shader_midgard1_flag_hi_info [] = {
+ FLAG_INFO(WRITES_S),
+ {}
+};
#undef FLAG_INFO
#define FLAG_INFO(flag) { MALI_MFBD_##flag, "MALI_MFBD_" #flag }
@@ -2213,19 +2219,21 @@ pandecode_vertex_tiler_postfix_pre(
if (is_bifrost) {
pandecode_prop("bifrost1.unk1 = 0x%" PRIx32, s->bifrost1.unk1);
} else {
- bool helpers = s->midgard1.flags & MALI_HELPER_INVOCATIONS;
- s->midgard1.flags &= ~MALI_HELPER_INVOCATIONS;
+ bool helpers = s->midgard1.flags_lo & MALI_HELPER_INVOCATIONS;
+ s->midgard1.flags_lo &= ~MALI_HELPER_INVOCATIONS;
if (helpers != info.helper_invocations) {
pandecode_msg("XXX: expected helpers %u but got %u\n",
info.helper_invocations, helpers);
}
- pandecode_log(".midgard1.flags = ");
- pandecode_log_decoded_flags(shader_midgard1_flag_info, s->midgard1.flags);
+ pandecode_log(".midgard1.flags_lo = ");
+ pandecode_log_decoded_flags(shader_midgard1_flag_lo_info, s->midgard1.flags_lo);
pandecode_log_cont(",\n");
- pandecode_prop("midgard1.unknown2 = 0x%" PRIx32, s->midgard1.unknown2);
+ pandecode_log(".midgard1.flags_hi = ");
+ pandecode_log_decoded_flags(shader_midgard1_flag_hi_info, s->midgard1.flags_hi);
+ pandecode_log_cont(",\n");
}
if (s->depth_units || s->depth_factor) {