aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/include
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/include
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/include')
-rw-r--r--src/panfrost/include/panfrost-job.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h
index 0861d10e509..1a59f4c77c8 100644
--- a/src/panfrost/include/panfrost-job.h
+++ b/src/panfrost/include/panfrost-job.h
@@ -384,7 +384,10 @@ enum mali_format {
#define MALI_ALPHA_COVERAGE(clampf) ((uint16_t) (int) (clampf * 15.0f))
#define MALI_GET_ALPHA_COVERAGE(nibble) ((float) nibble / 15.0f)
-/* Applies to midgard1.flags */
+/* Applies to midgard1.flags_lo */
+
+/* Should be set when the fragment shader updates the depth value. */
+#define MALI_WRITES_Z (1 << 4)
/* Should the hardware perform early-Z testing? Normally should be set
* for performance reasons. Clear if you use: discard,
@@ -406,6 +409,11 @@ enum mali_format {
#define MALI_READS_ZS (1 << 8)
#define MALI_READS_TILEBUFFER (1 << 12)
+/* Applies to midgard1.flags_hi */
+
+/* Should be set when the fragment shader updates the stencil value. */
+#define MALI_WRITES_S (1 << 2)
+
/* The raw Midgard blend payload can either be an equation or a shader
* address, depending on the context */
@@ -534,12 +542,12 @@ struct mali_shader_meta {
} bifrost1;
struct {
unsigned uniform_buffer_count : 4;
- unsigned flags : 12;
+ unsigned flags_lo : 12;
/* vec4 units */
unsigned work_count : 5;
unsigned uniform_count : 5;
- unsigned unknown2 : 6;
+ unsigned flags_hi : 6;
} midgard1;
};