aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/bifrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-05-01 16:12:55 -0400
committerAlyssa Rosenzweig <[email protected]>2020-05-04 11:08:15 -0400
commitef9b4b3a0bea318bcc853f9654721b56d7e1c27d (patch)
tree2c82291c8ba81f02b817df26668b23e830c374f6 /src/panfrost/bifrost
parent47c84ee73546f1b86df808c02aa509840e6158df (diff)
pan/bi: Set clause type for gl_FragCoord.z
Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4883>
Diffstat (limited to 'src/panfrost/bifrost')
-rw-r--r--src/panfrost/bifrost/bi_schedule.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/panfrost/bifrost/bi_schedule.c b/src/panfrost/bifrost/bi_schedule.c
index e309890cd64..d52fe1c4489 100644
--- a/src/panfrost/bifrost/bi_schedule.c
+++ b/src/panfrost/bifrost/bi_schedule.c
@@ -28,6 +28,15 @@
/* Finds the clause type required or return none */
+static bool
+bi_is_fragz(bi_instruction *ins)
+{
+ if (!(ins->src[0] & BIR_INDEX_CONSTANT))
+ return false;
+
+ return (ins->constant.u32 == BIFROST_FRAGZ);
+}
+
static enum bifrost_clause_type
bi_clause_type_for_ins(bi_instruction *ins)
{
@@ -43,6 +52,9 @@ bi_clause_type_for_ins(bi_instruction *ins)
return BIFROST_CLAUSE_NONE;
case BI_LOAD_VAR:
+ if (bi_is_fragz(ins))
+ return BIFROST_CLAUSE_FRAGZ;
+
return BIFROST_CLAUSE_LOAD_VARY;
case BI_LOAD_UNIFORM: