Mesa (master): vc4: Fix point size lookup.

Eric Anholt anholt at kemper.freedesktop.org
Sun Nov 22 02:56:43 UTC 2015


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

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Nov 20 18:52:58 2015 -0800

vc4: Fix point size lookup.

I think I may have regressed this in the NIR conversion.  TGSI-to-NIR is
putting the PSIZ in the .x channel, not .w, so we were grabbing some
garbage for point size, which ended up meaning just not drawing points.

Fixes glean pointAtten and pointsprite.

---

 src/gallium/drivers/vc4/vc4_program.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 52317bd..197577b 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -1171,7 +1171,7 @@ emit_point_size_write(struct vc4_compile *c)
         struct qreg point_size;
 
         if (c->output_point_size_index != -1)
-                point_size = c->outputs[c->output_point_size_index + 3];
+                point_size = c->outputs[c->output_point_size_index];
         else
                 point_size = qir_uniform_f(c, 1.0);
 




More information about the mesa-commit mailing list