summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/vc4
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2018-12-15 19:42:57 -0800
committerJason Ekstrand <jason@jlekstrand.net>2018-12-16 21:03:01 +0000
commit91a0251dbcc4d190ef3936f1d009897b60880f4e (patch)
treeed516d40dcf955ce5879c70b8c6cf7e37de05a2e /src/gallium/drivers/vc4
parentbde9f482de69528db5ccf5dd6bbfd8359adfbb19 (diff)
vc4: Use the original bit size when scalarizing uniform loads.
Prevents a regression in jekstrand's 1-bit series. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/gallium/drivers/vc4')
-rw-r--r--src/gallium/drivers/vc4/vc4_nir_lower_io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_nir_lower_io.c b/src/gallium/drivers/vc4/vc4_nir_lower_io.c
index b7969a562a6..fc2baee1b9a 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