Module: Mesa
Branch: master
Commit: ac65d3b6b8522a25b91150a61cac1799c551c51b
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ac65d3b6b8522a25b91150a61cac1799c551c51b

Author: Rhys Perry <[email protected]>
Date:   Tue Nov  3 10:55:14 2020 +0000

radv: fix shader caching with NaN fixup workaround

Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Fixes: 6f21995f986 ("radv: add new drirc option 
radv_enable_mrt_output_nan_fixup")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7423>

---

 src/amd/vulkan/radv_pipeline.c | 2 ++
 src/amd/vulkan/radv_private.h  | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 02e346d9b82..d5fb7c0757b 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -221,6 +221,8 @@ static uint32_t get_hash_flags(const struct radv_device 
*device)
                hash_flags |= RADV_HASH_SHADER_LLVM;
        if (device->instance->debug_flags & RADV_DEBUG_DISCARD_TO_DEMOTE)
                hash_flags |= RADV_HASH_SHADER_DISCARD_TO_DEMOTE;
+       if (device->instance->enable_mrt_output_nan_fixup)
+               hash_flags |= RADV_HASH_SHADER_MRT_NAN_FIXUP;
        return hash_flags;
 }
 
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h
index fdf763a1286..298ae08b190 100644
--- a/src/amd/vulkan/radv_private.h
+++ b/src/amd/vulkan/radv_private.h
@@ -1647,6 +1647,7 @@ struct radv_shader_module;
 #define RADV_HASH_SHADER_GE_WAVE32           (1 << 3)
 #define RADV_HASH_SHADER_LLVM                (1 << 4)
 #define RADV_HASH_SHADER_DISCARD_TO_DEMOTE   (1 << 5)
+#define RADV_HASH_SHADER_MRT_NAN_FIXUP       (1 << 6)
 
 void
 radv_hash_shaders(unsigned char *hash,

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to