summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
diff options
context:
space:
mode:
authorRodrigo Locatti <reinuseslisp@airmail.cc>2020-09-23 01:37:51 +0200
committerGitHub <noreply@github.com>2020-09-23 01:37:51 +0200
commit2b863c9aa34e388f6c64665a2e7d8c808d598c26 (patch)
tree288ff1cc4677d6511ed8cc7e1b0db20ce2d2590f /src/video_core/renderer_opengl/gl_shader_decompiler.cpp
parentMerge pull request #4697 from lioncash/copy5 (diff)
parentGeneral: Make use of std::nullopt where applicable (diff)
downloadyuzu-2b863c9aa34e388f6c64665a2e7d8c808d598c26.tar
yuzu-2b863c9aa34e388f6c64665a2e7d8c808d598c26.tar.gz
yuzu-2b863c9aa34e388f6c64665a2e7d8c808d598c26.tar.bz2
yuzu-2b863c9aa34e388f6c64665a2e7d8c808d598c26.tar.lz
yuzu-2b863c9aa34e388f6c64665a2e7d8c808d598c26.tar.xz
yuzu-2b863c9aa34e388f6c64665a2e7d8c808d598c26.tar.zst
yuzu-2b863c9aa34e388f6c64665a2e7d8c808d598c26.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_decompiler.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index ce3a65122..bbb8fb095 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -813,7 +813,7 @@ private:
const u8 location = static_cast<u8>(static_cast<u32>(index) * 4 + element);
const auto it = transform_feedback.find(location);
if (it == transform_feedback.end()) {
- return {};
+ return std::nullopt;
}
return it->second.components;
}
@@ -1295,21 +1295,21 @@ private:
switch (element) {
case 0:
UNIMPLEMENTED();
- return {};
+ return std::nullopt;
case 1:
if (stage == ShaderType::Vertex && !device.HasVertexViewportLayer()) {
- return {};
+ return std::nullopt;
}
return {{"gl_Layer", Type::Int}};
case 2:
if (stage == ShaderType::Vertex && !device.HasVertexViewportLayer()) {
- return {};
+ return std::nullopt;
}
return {{"gl_ViewportIndex", Type::Int}};
case 3:
return {{"gl_PointSize", Type::Float}};
}
- return {};
+ return std::nullopt;
case Attribute::Index::FrontColor:
return {{"gl_FrontColor"s + GetSwizzle(element), Type::Float}};
case Attribute::Index::FrontSecondaryColor:
@@ -1332,7 +1332,7 @@ private:
Type::Float}};
}
UNIMPLEMENTED_MSG("Unhandled output attribute: {}", static_cast<u32>(attribute));
- return {};
+ return std::nullopt;
}
}