From: Vasily Khoruzhick Date: Wed, 1 May 2019 02:53:01 +0000 (-0700) Subject: lima/gpir: fix float uniform alignment issue X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d085920b6479e2b3aae94450e2bc105307d2cfdc;p=mesa.git 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 Signed-off-by: Vasily Khoruzhick --- 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);