diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-06-01 19:34:18 +0200 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-06-01 21:34:05 +0200 |
commit | 70188d69b0deca34d6c98baa4a0b680692d79066 (patch) | |
tree | ff7a0241b68c0dd7f3230ed510b26f357f4b28b9 /src | |
parent | Merge pull request #3930 from ReinUsesLisp/animal-borders (diff) | |
download | yuzu-70188d69b0deca34d6c98baa4a0b680692d79066.tar yuzu-70188d69b0deca34d6c98baa4a0b680692d79066.tar.gz yuzu-70188d69b0deca34d6c98baa4a0b680692d79066.tar.bz2 yuzu-70188d69b0deca34d6c98baa4a0b680692d79066.tar.lz yuzu-70188d69b0deca34d6c98baa4a0b680692d79066.tar.xz yuzu-70188d69b0deca34d6c98baa4a0b680692d79066.tar.zst yuzu-70188d69b0deca34d6c98baa4a0b680692d79066.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 9cb115959..f5a592490 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -618,19 +618,6 @@ private: break; } } - 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()) && stage == ShaderType::Vertex && - !device.HasVertexViewportLayer()) { - LOG_ERROR( - Render_OpenGL, - "GL_ARB_shader_viewport_layer_array is not available and its required by a shader"); - } if (ir.UsesPointSize()) { code.AddLine("float gl_PointSize;"); @@ -647,6 +634,21 @@ private: --code.scope; code.AddLine("}};"); code.AddNewLine(); + + if (stage != ShaderType::Vertex || device.HasVertexViewportLayer()) { + if (ir.UsesLayer()) { + code.AddLine("out int gl_Layer;"); + } + if (ir.UsesViewportIndex()) { + code.AddLine("out int gl_ViewportIndex;"); + } + } else if ((ir.UsesLayer() || ir.UsesViewportIndex()) && stage == ShaderType::Vertex && + !device.HasVertexViewportLayer()) { + LOG_ERROR( + Render_OpenGL, + "GL_ARB_shader_viewport_layer_array is not available and its required by a shader"); + } + code.AddNewLine(); } void DeclareRegisters() { |