Mesa (master): vc4: Add VARYING_SLOT_PNTC support.

Eric Anholt anholt at kemper.freedesktop.org
Mon Aug 22 19:11:32 UTC 2016


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

Author: Eric Anholt <eric at anholt.net>
Date:   Thu Aug  4 23:06:36 2016 -0700

vc4: Add VARYING_SLOT_PNTC support.

We end up with this when doing GLSL-to-NIR.

---

 src/gallium/drivers/vc4/vc4_program.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 2420698..8b50831 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -1427,10 +1427,11 @@ ntq_setup_inputs(struct vc4_compile *c)
                 if (c->stage == QSTAGE_FRAG) {
                         if (var->data.location == VARYING_SLOT_POS) {
                                 emit_fragcoord_input(c, loc);
-                        } else if (var->data.location >= VARYING_SLOT_VAR0 &&
-                                   (c->fs_key->point_sprite_mask &
-                                    (1 << (var->data.location -
-                                           VARYING_SLOT_VAR0)))) {
+                        } else if (var->data.location == VARYING_SLOT_PNTC ||
+                                   (var->data.location >= VARYING_SLOT_VAR0 &&
+                                    (c->fs_key->point_sprite_mask &
+                                     (1 << (var->data.location -
+                                            VARYING_SLOT_VAR0))))) {
                                 c->inputs[loc * 4 + 0] = c->point_x;
                                 c->inputs[loc * 4 + 1] = c->point_y;
                         } else {




More information about the mesa-commit mailing list