Mesa (master): panfrost: Set reads_frag_coord as a sysval

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 29 20:34:03 UTC 2020


Module: Mesa
Branch: master
Commit: 1d194f8ac471a075984a0d4f5c6399318c525998
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1d194f8ac471a075984a0d4f5c6399318c525998

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Fri May 29 16:06:10 2020 -0400

panfrost: Set reads_frag_coord as a sysval

In addition to parsing out the varying. This is needed so it works on
Bifrost as well.

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

---

 src/gallium/drivers/panfrost/pan_assemble.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/panfrost/pan_assemble.c b/src/gallium/drivers/panfrost/pan_assemble.c
index f804e2beb13..3bc384d49b4 100644
--- a/src/gallium/drivers/panfrost/pan_assemble.c
+++ b/src/gallium/drivers/panfrost/pan_assemble.c
@@ -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);



More information about the mesa-commit mailing list