summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/shader/shader_ir.cpp18
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));
}