From 2af00b1fdd9ce58b9e953540e447fdce4d3b9502 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Sun, 28 Jul 2019 22:32:33 +0200 Subject: ac/nir: Use correct cast for readfirstlane and ptrs. Fixes: 028ce527 "radv: Add non-uniform indexing lowering." Reviewed-by: Dave Airlie Reviewed-by: Samuel Pitoiset --- src/amd/common/ac_llvm_build.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/amd') diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index a666ecd1ea1..0943d0364dd 100644 --- a/src/amd/common/ac_llvm_build.c +++ b/src/amd/common/ac_llvm_build.c @@ -3840,6 +3840,8 @@ ac_build_readlane(struct ac_llvm_context *ctx, LLVMValueRef src, LLVMValueRef la LLVMConstInt(ctx->i32, i, 0), ""); } } + if (LLVMGetTypeKind(src_type) == LLVMPointerTypeKind) + return LLVMBuildIntToPtr(ctx->builder, ret, src_type, ""); return LLVMBuildBitCast(ctx->builder, ret, src_type, ""); } -- cgit v1.2.3