From: Samuel Pitoiset Date: Fri, 2 Feb 2018 17:56:39 +0000 (+0100) Subject: ac/nir: fix a crash in load_gs_input() on pre-GFX9 chips X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a1d568c8302b0c775fda583beefbbe7725f13dec;p=mesa.git ac/nir: fix a crash in load_gs_input() on pre-GFX9 chips Fixes: df1d5174fcc ("ac/nir: replace SI.buffer.load.dword with amdgcn.buffer.load") Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index cfcd2179094..fb29b6c46f0 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -3074,6 +3074,9 @@ load_gs_input(struct ac_shader_abi *abi, ctx->ac.i32_0, vtx_offset, soffset, 0, 1, 0, true, false); + + value[i] = LLVMBuildBitCast(ctx->builder, value[i], + type, ""); } } result = ac_build_varying_gather_values(&ctx->ac, value, num_components, component);