OSDN Git Service

vc4: Fix point size lookup.
authorEric Anholt <eric@anholt.net>
Sat, 21 Nov 2015 02:52:58 +0000 (18:52 -0800)
committerEric Anholt <eric@anholt.net>
Sun, 22 Nov 2015 02:55:31 +0000 (18:55 -0800)
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

index 52317bd..197577b 100644 (file)
@@ -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);