summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-03-18 21:28:03 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-03-19 00:03:19 +0100
commit351816ac389461372fcc6405986bfc27f290feac (patch)
treeca74813d2e8a4f9d919f653928a0418b41da54a3 /src
parentgl_rasterizer: Silence misc warnings (diff)
downloadyuzu-351816ac389461372fcc6405986bfc27f290feac.tar
yuzu-351816ac389461372fcc6405986bfc27f290feac.tar.gz
yuzu-351816ac389461372fcc6405986bfc27f290feac.tar.bz2
yuzu-351816ac389461372fcc6405986bfc27f290feac.tar.lz
yuzu-351816ac389461372fcc6405986bfc27f290feac.tar.xz
yuzu-351816ac389461372fcc6405986bfc27f290feac.tar.zst
yuzu-351816ac389461372fcc6405986bfc27f290feac.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 849839fe3..2c38f57fd 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -393,10 +393,6 @@ std::string FlowStackTopName(MetaStackClass stack) {
return fmt::format("{}_flow_stack_top", GetFlowStackPrefix(stack));
}
-[[deprecated]] constexpr bool IsVertexShader(ShaderType stage) {
- return stage == ShaderType::Vertex;
-}
-
struct GenericVaryingDescription {
std::string name;
u8 first_element = 0;
@@ -529,8 +525,9 @@ private:
}
void DeclareVertex() {
- if (!IsVertexShader(stage))
+ if (stage != ShaderType::Vertex) {
return;
+ }
DeclareVertexRedeclarations();
}
@@ -602,14 +599,14 @@ private:
break;
}
}
- if (!IsVertexShader(stage) || device.HasVertexViewportLayer()) {
+ if (stage != ShaderType::Vertex || device.HasVertexViewportLayer()) {
if (ir.UsesLayer()) {
code.AddLine("int gl_Layer;");
}
if (ir.UsesViewportIndex()) {
code.AddLine("int gl_ViewportIndex;");
}
- } else if ((ir.UsesLayer() || ir.UsesViewportIndex()) && IsVertexShader(stage) &&
+ } else if ((ir.UsesLayer() || ir.UsesViewportIndex()) && stage == ShaderType::Vertex &&
!device.HasVertexViewportLayer()) {
LOG_ERROR(
Render_OpenGL,
@@ -1147,7 +1144,7 @@ private:
// TODO(Subv): Find out what the values are for the first two elements when inside a
// vertex shader, and what's the value of the fourth element when inside a Tess Eval
// shader.
- ASSERT(IsVertexShader(stage));
+ ASSERT(stage == ShaderType::Vertex);
switch (element) {
case 2:
// Config pack's first value is instance_id.
@@ -1218,12 +1215,12 @@ private:
UNIMPLEMENTED();
return {};
case 1:
- if (IsVertexShader(stage) && !device.HasVertexViewportLayer()) {
+ if (stage == ShaderType::Vertex && !device.HasVertexViewportLayer()) {
return {};
}
return {{"gl_Layer", Type::Int}};
case 2:
- if (IsVertexShader(stage) && !device.HasVertexViewportLayer()) {
+ if (stage == ShaderType::Vertex && !device.HasVertexViewportLayer()) {
return {};
}
return {{"gl_ViewportIndex", Type::Int}};
@@ -2532,7 +2529,7 @@ private:
}
u32 GetNumPhysicalInputAttributes() const {
- return IsVertexShader(stage) ? GetNumPhysicalAttributes() : GetNumPhysicalVaryings();
+ return stage == ShaderType::Vertex ? GetNumPhysicalAttributes() : GetNumPhysicalVaryings();
}
u32 GetNumPhysicalAttributes() const {