Mesa (staging/22.1): ac/llvm: set the correct cache policy for sparse buffer loads
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed May 4 22:17:20 UTC 2022
Module: Mesa
Branch: staging/22.1
Commit: c8979e1ae784ecfaef3a286da240157d0993eead
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c8979e1ae784ecfaef3a286da240157d0993eead
Author: Marek Olšák <marek.olsak at amd.com>
Date: Tue Apr 26 23:21:08 2022 -0400
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 <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16215>
(cherry picked from commit 0cd59c7cb0e75c100e8540cc89f5fc80486190fe)
---
.pick_status.json | 2 +-
src/amd/llvm/ac_llvm_build.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index 864dd8c5ac7..2a678716892 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1012,7 +1012,7 @@
"description": "ac/llvm: set the correct cache policy for sparse buffer loads",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "6d5e26752c664c7095ed0e7693591be797066110"
},
diff --git a/src/amd/llvm/ac_llvm_build.c b/src/amd/llvm/ac_llvm_build.c
index 33836b6d18e..0d8bd08d282 100644
--- a/src/amd/llvm/ac_llvm_build.c
+++ b/src/amd/llvm/ac_llvm_build.c
@@ -1285,6 +1285,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.
More information about the mesa-commit
mailing list