From b2c05dc09df91025e003a57c99b646ab4facd4a1 Mon Sep 17 00:00:00 2001 From: psucien Date: Sun, 25 Aug 2024 00:53:50 +0200 Subject: [PATCH] shader_recompiler: fix for crash on inline sampler access --- src/shader_recompiler/ir/passes/resource_tracking_pass.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp b/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp index efee710d..016ba366 100644 --- a/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp +++ b/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp @@ -246,10 +246,7 @@ public: return true; } // Samplers with different bindings might still be the same. - const auto old_sharp = - info.ReadUd(existing.sgpr_base, existing.dword_offset); - const auto new_sharp = info.ReadUd(desc.sgpr_base, desc.dword_offset); - return old_sharp == new_sharp; + return existing.GetSsharp(info) == desc.GetSsharp(info); })}; return index; }