summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/shader_ir.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-05-19 20:02:58 +0200
committerGitHub <noreply@github.com>2019-05-19 20:02:58 +0200
commitd49efbfb4aa4e935f6c753871d6af6534701f542 (patch)
tree79608391a32719a0be20c898fc79aba93f9f1d48 /src/video_core/shader/shader_ir.cpp
parentMerge pull request #2410 from lioncash/affinity (diff)
parentshader_ir/other: Implement IPA.IDX (diff)
downloadyuzu-d49efbfb4aa4e935f6c753871d6af6534701f542.tar
yuzu-d49efbfb4aa4e935f6c753871d6af6534701f542.tar.gz
yuzu-d49efbfb4aa4e935f6c753871d6af6534701f542.tar.bz2
yuzu-d49efbfb4aa4e935f6c753871d6af6534701f542.tar.lz
yuzu-d49efbfb4aa4e935f6c753871d6af6534701f542.tar.xz
yuzu-d49efbfb4aa4e935f6c753871d6af6534701f542.tar.zst
yuzu-d49efbfb4aa4e935f6c753871d6af6534701f542.zip
Diffstat (limited to 'src/video_core/shader/shader_ir.cpp')
-rw-r--r--src/video_core/shader/shader_ir.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/video_core/shader/shader_ir.cpp b/src/video_core/shader/shader_ir.cpp
index 196235e5d..153ad1fd0 100644
--- a/src/video_core/shader/shader_ir.cpp
+++ b/src/video_core/shader/shader_ir.cpp
@@ -96,13 +96,14 @@ Node ShaderIR::GetPredicate(bool immediate) {
return GetPredicate(static_cast<u64>(immediate ? Pred::UnusedIndex : Pred::NeverExecute));
}
-Node ShaderIR::GetInputAttribute(Attribute::Index index, u64 element,
- const Tegra::Shader::IpaMode& input_mode, Node buffer) {
- const auto [entry, is_new] =
- used_input_attributes.emplace(std::make_pair(index, std::set<Tegra::Shader::IpaMode>{}));
- entry->second.insert(input_mode);
+Node ShaderIR::GetInputAttribute(Attribute::Index index, u64 element, Node buffer) {
+ used_input_attributes.emplace(index);
+ return StoreNode(AbufNode(index, static_cast<u32>(element), buffer));
+}
- return StoreNode(AbufNode(index, static_cast<u32>(element), input_mode, buffer));
+Node ShaderIR::GetPhysicalInputAttribute(Tegra::Shader::Register physical_address, Node buffer) {
+ uses_physical_attributes = true;
+ return StoreNode(AbufNode(GetRegister(physical_address), buffer));
}
Node ShaderIR::GetOutputAttribute(Attribute::Index index, u64 element, Node buffer) {