ac: use new LLVM 8 intrinsics in ac_build_buffer_load()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 12 Mar 2019 10:18:34 +0000 (11:18 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 20 Mar 2019 21:19:08 +0000 (22:19 +0100)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_llvm_build.c

index 2dacb67eede9861de8633d637e2346d6c35fd420..98f016ad059b63631f7c87f051d91ca71ec987b7 100644 (file)
@@ -1412,6 +1412,14 @@ ac_build_buffer_load(struct ac_llvm_context *ctx,
                return ac_build_gather_values(ctx, result, num_channels);
        }
 
+       if (HAVE_LLVM >= 0x0800) {
+               return ac_build_llvm8_buffer_load_common(ctx, rsrc, vindex,
+                                                        offset, ctx->i32_0,
+                                                        num_channels, glc, slc,
+                                                        can_speculate, false,
+                                                        false);
+       }
+
        return ac_build_buffer_load_common(ctx, rsrc, vindex, offset,
                                           num_channels, glc, slc,
                                           can_speculate, false);