panfrost: Set reads_frag_coord as a sysval
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 29 May 2020 20:06:10 +0000 (16:06 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 29 May 2020 20:19:46 +0000 (20:19 +0000)
In addition to parsing out the varying. This is needed so it works on
Bifrost as well.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5267>

src/gallium/drivers/panfrost/pan_assemble.c

index f804e2beb13f2da78570fb3fe4dd22c9260dcd44..3bc384d49b401fc72bb38c18ac663878e343dc63 100644 (file)
@@ -177,6 +177,9 @@ panfrost_shader_compile(struct panfrost_context *ctx,
         bool vertex_id = s->info.system_values_read & (1 << SYSTEM_VALUE_VERTEX_ID);
         bool instance_id = s->info.system_values_read & (1 << SYSTEM_VALUE_INSTANCE_ID);
 
+        /* On Bifrost it's a sysval, on Midgard it's a varying */
+        state->reads_frag_coord = s->info.system_values_read & (1 << SYSTEM_VALUE_FRAG_COORD);
+
         switch (stage) {
         case MESA_SHADER_VERTEX:
                 state->attribute_count = util_bitcount64(s->info.inputs_read);