From 0cd59c7cb0e75c100e8540cc89f5fc80486190fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 26 Apr 2022 23:21:08 -0400 Subject: [PATCH] ac/llvm: set the correct cache policy for sparse buffer loads The DLC bit was missing on gfx10. Fixes: 6d5e26752c664c "ac/nir: implement sparse image/texture loads" Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/amd/llvm/ac_llvm_build.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/amd/llvm/ac_llvm_build.c b/src/amd/llvm/ac_llvm_build.c index 3a59d839eb6..799c2b0ecb9 100644 --- a/src/amd/llvm/ac_llvm_build.c +++ b/src/amd/llvm/ac_llvm_build.c @@ -1257,6 +1257,8 @@ LLVMValueRef ac_build_buffer_load_format(struct ac_llvm_context *ctx, LLVMValueR if (tfe) { assert(!d16); + cache_policy = get_load_cache_policy(ctx, cache_policy); + char code[256]; /* The definition in the assembly and the one in the constraint string * differs because of an assembler bug.