diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/shader/decode/texture.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/shader/shader_ir.h | 3 | ||||
| -rw-r--r-- | src/video_core/shader/track.cpp | 12 |
3 files changed, 10 insertions, 7 deletions
diff --git a/src/video_core/shader/decode/texture.cpp b/src/video_core/shader/decode/texture.cpp index 31b09b18c..6da9668fe 100644 --- a/src/video_core/shader/decode/texture.cpp +++ b/src/video_core/shader/decode/texture.cpp | |||
| @@ -393,7 +393,7 @@ const Sampler* ShaderIR::GetBindlessSampler(Tegra::Shader::Register reg, Node& i | |||
| 393 | std::optional<SamplerInfo> sampler_info) { | 393 | std::optional<SamplerInfo> sampler_info) { |
| 394 | const Node sampler_register = GetRegister(reg); | 394 | const Node sampler_register = GetRegister(reg); |
| 395 | const auto [base_node, tracked_sampler_info] = | 395 | const auto [base_node, tracked_sampler_info] = |
| 396 | TrackSampler(sampler_register, global_code, static_cast<s64>(global_code.size())); | 396 | TrackBindlessSampler(sampler_register, global_code, static_cast<s64>(global_code.size())); |
| 397 | ASSERT(base_node != nullptr); | 397 | ASSERT(base_node != nullptr); |
| 398 | if (base_node == nullptr) { | 398 | if (base_node == nullptr) { |
| 399 | return nullptr; | 399 | return nullptr; |
diff --git a/src/video_core/shader/shader_ir.h b/src/video_core/shader/shader_ir.h index 0421dac0c..43672b41c 100644 --- a/src/video_core/shader/shader_ir.h +++ b/src/video_core/shader/shader_ir.h | |||
| @@ -394,7 +394,8 @@ private: | |||
| 394 | 394 | ||
| 395 | std::tuple<Node, u32, u32> TrackCbuf(Node tracked, const NodeBlock& code, s64 cursor) const; | 395 | std::tuple<Node, u32, u32> TrackCbuf(Node tracked, const NodeBlock& code, s64 cursor) const; |
| 396 | 396 | ||
| 397 | std::tuple<Node, TrackSampler> TrackSampler(Node tracked, const NodeBlock& code, s64 cursor); | 397 | std::tuple<Node, TrackSampler> TrackBindlessSampler(Node tracked, const NodeBlock& code, |
| 398 | s64 cursor); | ||
| 398 | 399 | ||
| 399 | std::optional<u32> TrackImmediate(Node tracked, const NodeBlock& code, s64 cursor) const; | 400 | std::optional<u32> TrackImmediate(Node tracked, const NodeBlock& code, s64 cursor) const; |
| 400 | 401 | ||
diff --git a/src/video_core/shader/track.cpp b/src/video_core/shader/track.cpp index d449b625e..4db721f69 100644 --- a/src/video_core/shader/track.cpp +++ b/src/video_core/shader/track.cpp | |||
| @@ -72,8 +72,8 @@ bool AmendNodeCv(std::size_t amend_index, Node node) { | |||
| 72 | return false; | 72 | return false; |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | std::tuple<Node, TrackSampler> ShaderIR::TrackSampler(Node tracked, const NodeBlock& code, | 75 | std::tuple<Node, TrackSampler> ShaderIR::TrackBindlessSampler(Node tracked, const NodeBlock& code, |
| 76 | s64 cursor) { | 76 | s64 cursor) { |
| 77 | if (const auto cbuf = std::get_if<CbufNode>(&*tracked)) { | 77 | if (const auto cbuf = std::get_if<CbufNode>(&*tracked)) { |
| 78 | // Constant buffer found, test if it's an immediate | 78 | // Constant buffer found, test if it's an immediate |
| 79 | const auto offset = cbuf->GetOffset(); | 79 | const auto offset = cbuf->GetOffset(); |
| @@ -124,11 +124,12 @@ std::tuple<Node, TrackSampler> ShaderIR::TrackSampler(Node tracked, const NodeBl | |||
| 124 | if (!source) { | 124 | if (!source) { |
| 125 | return {}; | 125 | return {}; |
| 126 | } | 126 | } |
| 127 | return TrackSampler(source, code, new_cursor); | 127 | return TrackBindlessSampler(source, code, new_cursor); |
| 128 | } | 128 | } |
| 129 | if (const auto operation = std::get_if<OperationNode>(&*tracked)) { | 129 | if (const auto operation = std::get_if<OperationNode>(&*tracked)) { |
| 130 | for (std::size_t i = operation->GetOperandsCount(); i > 0; --i) { | 130 | for (std::size_t i = operation->GetOperandsCount(); i > 0; --i) { |
| 131 | if (auto found = TrackSampler((*operation)[i - 1], code, cursor); std::get<0>(found)) { | 131 | if (auto found = TrackBindlessSampler((*operation)[i - 1], code, cursor); |
| 132 | std::get<0>(found)) { | ||
| 132 | // Cbuf found in operand. | 133 | // Cbuf found in operand. |
| 133 | return found; | 134 | return found; |
| 134 | } | 135 | } |
| @@ -137,7 +138,8 @@ std::tuple<Node, TrackSampler> ShaderIR::TrackSampler(Node tracked, const NodeBl | |||
| 137 | } | 138 | } |
| 138 | if (const auto conditional = std::get_if<ConditionalNode>(&*tracked)) { | 139 | if (const auto conditional = std::get_if<ConditionalNode>(&*tracked)) { |
| 139 | const auto& conditional_code = conditional->GetCode(); | 140 | const auto& conditional_code = conditional->GetCode(); |
| 140 | return TrackSampler(tracked, conditional_code, static_cast<s64>(conditional_code.size())); | 141 | return TrackBindlessSampler(tracked, conditional_code, |
| 142 | static_cast<s64>(conditional_code.size())); | ||
| 141 | } | 143 | } |
| 142 | return {}; | 144 | return {}; |
| 143 | } | 145 | } |