From a1d568c8302b0c775fda583beefbbe7725f13dec Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 2 Feb 2018 18:56:39 +0100 Subject: [PATCH] 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 --- src/amd/common/ac_nir_to_llvm.c | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.30.2