summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-07-11 09:24:57 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-07-11 09:27:00 +0200
commitaca40de224994ba6bc7547224a4f8450a840fde3 (patch)
treec876b77fde62a8cd3aa86104cb5981e89ece9b25 /src
parentgl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shaders (diff)
downloadyuzu-aca40de224994ba6bc7547224a4f8450a840fde3.tar
yuzu-aca40de224994ba6bc7547224a4f8450a840fde3.tar.gz
yuzu-aca40de224994ba6bc7547224a4f8450a840fde3.tar.bz2
yuzu-aca40de224994ba6bc7547224a4f8450a840fde3.tar.lz
yuzu-aca40de224994ba6bc7547224a4f8450a840fde3.tar.xz
yuzu-aca40de224994ba6bc7547224a4f8450a840fde3.tar.zst
yuzu-aca40de224994ba6bc7547224a4f8450a840fde3.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index a4451dd2f..d0f579323 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -246,7 +246,7 @@ public:
}
entries.clip_distances = ir.GetClipDistances();
entries.shader_viewport_layer_array =
- stage == ShaderStage::Vertex && (ir.UsesLayer() || ir.UsesPointSize());
+ stage == ShaderStage::Vertex && (ir.UsesLayer() || ir.UsesViewportIndex());
entries.shader_length = ir.GetLength();
return entries;
}
@@ -302,7 +302,8 @@ private:
if (ir.UsesViewportIndex()) {
code.AddLine("int gl_ViewportIndex;");
}
- } else if (stage == ShaderStage::Vertex && !device.HasVertexViewportLayer()) {
+ } else if ((ir.UsesLayer() || ir.UsesViewportIndex()) && stage == ShaderStage::Vertex &&
+ !device.HasVertexViewportLayer()) {
LOG_ERROR(
Render_OpenGL,
"GL_ARB_shader_viewport_layer_array is not available and its required by a shader");