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 23:16:57 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: ae44b3365ff9882b21660829ddb274a858c82290
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ae44b3365ff9882b21660829ddb274a858c82290

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 cc458c9d113..8088c0bd1bd 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1345,7 +1345,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