diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-03-16 00:49:35 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-03-16 00:49:35 +0100 |
commit | 464bd5fad79c59455504d10b7aa084d683817de4 (patch) | |
tree | 379b587e303bf25b5eccde75d30aa9eb98d53fa5 /src | |
parent | Merge pull request #3508 from FernandoS27/page-table (diff) | |
download | yuzu-464bd5fad79c59455504d10b7aa084d683817de4.tar yuzu-464bd5fad79c59455504d10b7aa084d683817de4.tar.gz yuzu-464bd5fad79c59455504d10b7aa084d683817de4.tar.bz2 yuzu-464bd5fad79c59455504d10b7aa084d683817de4.tar.lz yuzu-464bd5fad79c59455504d10b7aa084d683817de4.tar.xz yuzu-464bd5fad79c59455504d10b7aa084d683817de4.tar.zst yuzu-464bd5fad79c59455504d10b7aa084d683817de4.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/shader/shader_ir.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/video_core/shader/shader_ir.cpp b/src/video_core/shader/shader_ir.cpp index 425927777..bc75d400e 100644 --- a/src/video_core/shader/shader_ir.cpp +++ b/src/video_core/shader/shader_ir.cpp @@ -106,7 +106,8 @@ Node ShaderIR::GetPhysicalInputAttribute(Tegra::Shader::Register physical_addres } Node ShaderIR::GetOutputAttribute(Attribute::Index index, u64 element, Node buffer) { - if (index == Attribute::Index::LayerViewportPointSize) { + switch (index) { + case Attribute::Index::LayerViewportPointSize: switch (element) { case 0: UNIMPLEMENTED(); @@ -121,8 +122,8 @@ Node ShaderIR::GetOutputAttribute(Attribute::Index index, u64 element, Node buff uses_point_size = true; break; } - } - if (index == Attribute::Index::TessCoordInstanceIDVertexID) { + break; + case Attribute::Index::TessCoordInstanceIDVertexID: switch (element) { case 2: uses_instance_id = true; @@ -130,18 +131,17 @@ Node ShaderIR::GetOutputAttribute(Attribute::Index index, u64 element, Node buff case 3: uses_vertex_id = true; break; - default: - break; } - } - if (index == Attribute::Index::ClipDistances0123 || - index == Attribute::Index::ClipDistances4567) { + break; + case Attribute::Index::ClipDistances0123: + case Attribute::Index::ClipDistances4567: { const auto clip_index = static_cast<u32>((index == Attribute::Index::ClipDistances4567 ? 1 : 0) + element); used_clip_distances.at(clip_index) = true; + break; + } } used_output_attributes.insert(index); - return MakeNode<AbufNode>(index, static_cast<u32>(element), std::move(buffer)); } |