vc4: Don't forget to set the range when scalarizing our uniforms.
authorEric Anholt <eric@anholt.net>
Tue, 9 Apr 2019 04:01:02 +0000 (21:01 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 10 Apr 2019 18:45:30 +0000 (11:45 -0700)
In the next commit, we'll want this for handling UBO access clamping.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/gallium/drivers/vc4/vc4_nir_lower_io.c

index 27051ec403076a6e928ebea609adca4aa36af12d..5dbc2c8e324c7a0891df2f56fc6bbe56f122485c 100644 (file)
@@ -339,6 +339,8 @@ vc4_nir_lower_uniform(struct vc4_compile *c, nir_builder *b,
                 nir_intrinsic_set_base(intr_comp,
                                        nir_intrinsic_base(intr) * 16 +
                                        i * 4);
+                nir_intrinsic_set_range(intr_comp,
+                                        nir_intrinsic_range(intr) * 16 - i * 4);
 
                 intr_comp->src[0] =
                         nir_src_for_ssa(nir_ishl(b, intr->src[0].ssa,