amd/common/gfx10: set DLC for llvm.amdgcn.s.buffer.load
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 27 May 2019 14:16:39 +0000 (16:16 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 3 Jul 2019 19:51:13 +0000 (15:51 -0400)
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_llvm_build.c

index 5089463e2db4be13c47041ed57f0026735d5c948..eb71a69eebd7733b0325fa6f38ffeaef2ef3ec87 100644 (file)
@@ -1413,12 +1413,10 @@ ac_build_buffer_load(struct ac_llvm_context *ctx,
                                HAVE_LLVM >= 0x0800 ? "llvm.amdgcn.s.buffer.load.f32"
                                                    : "llvm.SI.load.const.v4i32";
                        unsigned num_args = HAVE_LLVM >= 0x0800 ? 3 : 2;
-                       /* TODO: set glc+dlc on GFX10 (LLVM support is missing) */
-                       assert(!glc || ctx->chip_class < GFX10);
                        LLVMValueRef args[3] = {
                                rsrc,
                                offset,
-                               glc ? ctx->i32_1 : ctx->i32_0,
+                               get_cache_policy(ctx, true, glc, false),
                        };
                        result[i] = ac_build_intrinsic(ctx, intrname,
                                                       ctx->f32, args, num_args,