summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/lima/ir
diff options
context:
space:
mode:
authorVasily Khoruzhick <[email protected]>2019-04-30 19:53:01 -0700
committerVasily Khoruzhick <[email protected]>2019-05-06 14:08:09 -0700
commitd085920b6479e2b3aae94450e2bc105307d2cfdc (patch)
treef1dd9f17db03e97059083ccbbcee4a5b7eba3c17 /src/gallium/drivers/lima/ir
parentd84b85bc28d50182f77f2e42e3c14ccedd70715f (diff)
lima/gpir: fix float uniform alignment issue
If PIPE_CAP_PACKED_UNIFORMS is not set uniforms are vec4 aligned, so lima_nir_lower_uniform_to_scalar should use first channel of vec4 for float uniforms. Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
Diffstat (limited to 'src/gallium/drivers/lima/ir')
-rw-r--r--src/gallium/drivers/lima/ir/lima_nir_lower_uniform_to_scalar.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/lima/ir/lima_nir_lower_uniform_to_scalar.c b/src/gallium/drivers/lima/ir/lima_nir_lower_uniform_to_scalar.c
index c1bbbc4b71a..2bea90cef78 100644
--- a/src/gallium/drivers/lima/ir/lima_nir_lower_uniform_to_scalar.c
+++ b/src/gallium/drivers/lima/ir/lima_nir_lower_uniform_to_scalar.c
@@ -71,8 +71,7 @@ lima_nir_lower_uniform_to_scalar(nir_shader *shader)
nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr);
- if (intr->intrinsic != nir_intrinsic_load_uniform ||
- intr->num_components == 1)
+ if (intr->intrinsic != nir_intrinsic_load_uniform)
continue;
lower_load_uniform_to_scalar(&b, intr);