Module: Mesa
Branch: master
Commit: a1d568c8302b0c775fda583beefbbe7725f13dec
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a1d568c8302b0c775fda583beefbbe7725f13dec

Author: Samuel Pitoiset <[email protected]>
Date:   Fri Feb  2 18:56:39 2018 +0100

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 <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>

---

 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 cfcd217909..fb29b6c46f 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);

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to