panfrost: Identify MALI_BIFROST_EARLY_Z flag
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 27 May 2020 20:29:01 +0000 (16:29 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 27 May 2020 20:49:44 +0000 (16:49 -0400)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>

src/panfrost/include/panfrost-job.h

index 678349edc0d70bac1ce764329be7ad285b6d60f3..1edef5d2fe8ccd2835e0d702c609a2a6c83ecd0e 100644 (file)
@@ -433,6 +433,17 @@ enum mali_format {
  * available at half thread count */
 #define MALI_BIFROST_FULL_THREAD (1 << 9)
 
+/* Enable early-z testing (presumably). This flag may not be set if the shader:
+ *
+ *  - Uses blending
+ *  - Uses discard
+ *  - Writes gl_FragDepth
+ *
+ * This differs from Midgard which sets the MALI_EARLY_Z flag even with
+ * blending, although I've begun to suspect that flag does not in fact enable
+ * EARLY_Z alone. */
+#define MALI_BIFROST_EARLY_Z (1 << 15)
+
 /* First clause type is ATEST */
 #define MALI_BIFROST_FIRST_ATEST (1 << 26)