summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-01-08 20:59:21 +0100
committerFernandoS27 <fsahmkow27@gmail.com>2020-01-24 21:44:48 +0100
commit806f5691430b86640d64d4c5ae77c5e1dac1625a (patch)
tree7c453e25fae7d7bca4ea0bab9831a166b3a7f086 /src/video_core
parentShader_IR: Corrections, styling and extras. (diff)
downloadyuzu-806f5691430b86640d64d4c5ae77c5e1dac1625a.tar
yuzu-806f5691430b86640d64d4c5ae77c5e1dac1625a.tar.gz
yuzu-806f5691430b86640d64d4c5ae77c5e1dac1625a.tar.bz2
yuzu-806f5691430b86640d64d4c5ae77c5e1dac1625a.tar.lz
yuzu-806f5691430b86640d64d4c5ae77c5e1dac1625a.tar.xz
yuzu-806f5691430b86640d64d4c5ae77c5e1dac1625a.tar.zst
yuzu-806f5691430b86640d64d4c5ae77c5e1dac1625a.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/shader/decode/texture.cpp2
-rw-r--r--src/video_core/shader/shader_ir.h3
-rw-r--r--src/video_core/shader/track.cpp12
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
std::optional<SamplerInfo> sampler_info) {
const Node sampler_register = GetRegister(reg);
const auto [base_node, tracked_sampler_info] =
- TrackSampler(sampler_register, global_code, static_cast<s64>(global_code.size()));
+ TrackBindlessSampler(sampler_register, global_code, static_cast<s64>(global_code.size()));
ASSERT(base_node != nullptr);
if (base_node == nullptr) {
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:
std::tuple<Node, u32, u32> TrackCbuf(Node tracked, const NodeBlock& code, s64 cursor) const;
- std::tuple<Node, TrackSampler> TrackSampler(Node tracked, const NodeBlock& code, s64 cursor);
+ std::tuple<Node, TrackSampler> TrackBindlessSampler(Node tracked, const NodeBlock& code,
+ s64 cursor);
std::optional<u32> TrackImmediate(Node tracked, const NodeBlock& code, s64 cursor) const;
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) {
return false;
}
-std::tuple<Node, TrackSampler> ShaderIR::TrackSampler(Node tracked, const NodeBlock& code,
- s64 cursor) {
+std::tuple<Node, TrackSampler> ShaderIR::TrackBindlessSampler(Node tracked, const NodeBlock& code,
+ s64 cursor) {
if (const auto cbuf = std::get_if<CbufNode>(&*tracked)) {
// Constant buffer found, test if it's an immediate
const auto offset = cbuf->GetOffset();
@@ -124,11 +124,12 @@ std::tuple<Node, TrackSampler> ShaderIR::TrackSampler(Node tracked, const NodeBl
if (!source) {
return {};
}
- return TrackSampler(source, code, new_cursor);
+ return TrackBindlessSampler(source, code, new_cursor);
}
if (const auto operation = std::get_if<OperationNode>(&*tracked)) {
for (std::size_t i = operation->GetOperandsCount(); i > 0; --i) {
- if (auto found = TrackSampler((*operation)[i - 1], code, cursor); std::get<0>(found)) {
+ if (auto found = TrackBindlessSampler((*operation)[i - 1], code, cursor);
+ std::get<0>(found)) {
// Cbuf found in operand.
return found;
}
@@ -137,7 +138,8 @@ std::tuple<Node, TrackSampler> ShaderIR::TrackSampler(Node tracked, const NodeBl
}
if (const auto conditional = std::get_if<ConditionalNode>(&*tracked)) {
const auto& conditional_code = conditional->GetCode();
- return TrackSampler(tracked, conditional_code, static_cast<s64>(conditional_code.size()));
+ return TrackBindlessSampler(tracked, conditional_code,
+ static_cast<s64>(conditional_code.size()));
}
return {};
}