Mesa (staging/20.3): radeonsi: add options.inline_uniforms to the shader cache key

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Nov 19 18:46:59 UTC 2020


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Tue Nov 10 18:48:22 2020 -0500

radeonsi: add options.inline_uniforms to the shader cache key

It affects how shaders are finalized before caching.

Fixes: b7501184b90 ("radeonsi: implement inlinable uniforms")

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542>
(cherry picked from commit 025bc9e50e2489f9a312b92435409f58f4cd35f7)

Conflicts:
	src/gallium/drivers/radeonsi/si_state_shaders.c

---

 .pick_status.json                               | 2 +-
 src/gallium/drivers/radeonsi/si_state_shaders.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 03a9d438bcd..57121eab2dd 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -643,7 +643,7 @@
         "description": "radeonsi: add options.inline_uniforms to the shader cache key",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "b7501184b90a20015885b3f2276a7a5ceaef31a7"
     },
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 75419c440ea..9409969f779 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -89,6 +89,8 @@ void si_get_ir_cache_key(struct si_shader_selector *sel, bool ngg, bool es,
       shader_variant_flags |= 1 << 8;
    if (sel->screen->debug_flags & DBG(GISEL))
       shader_variant_flags |= 1 << 9;
+   if (sel->screen->options.inline_uniforms)
+      shader_variant_flags |= 1 << 11;
 
    struct mesa_sha1 ctx;
    _mesa_sha1_init(&ctx);



More information about the mesa-commit mailing list