Mesa (master): vc4: Use the original bit size when scalarizing uniform loads.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Dec 16 21:03:23 UTC 2018


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

Author: Eric Anholt <eric at anholt.net>
Date:   Sat Dec 15 19:42:57 2018 -0800

vc4: Use the original bit size when scalarizing uniform loads.

Prevents a regression in jekstrand's 1-bit series.

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 src/gallium/drivers/vc4/vc4_nir_lower_io.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/vc4/vc4_nir_lower_io.c b/src/gallium/drivers/vc4/vc4_nir_lower_io.c
index b7969a562a..fc2baee1b9 100644
--- a/src/gallium/drivers/vc4/vc4_nir_lower_io.c
+++ b/src/gallium/drivers/vc4/vc4_nir_lower_io.c
@@ -330,7 +330,8 @@ vc4_nir_lower_uniform(struct vc4_compile *c, nir_builder *b,
                 nir_intrinsic_instr *intr_comp =
                         nir_intrinsic_instr_create(c->s, intr->intrinsic);
                 intr_comp->num_components = 1;
-                nir_ssa_dest_init(&intr_comp->instr, &intr_comp->dest, 1, 32, NULL);
+                nir_ssa_dest_init(&intr_comp->instr, &intr_comp->dest, 1,
+                                  intr->dest.ssa.bit_size, NULL);
 
                 /* Convert the uniform offset to bytes.  If it happens
                  * to be a constant, constant-folding will clean up




More information about the mesa-commit mailing list