summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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:
246 } 246 }
247 entries.clip_distances = ir.GetClipDistances(); 247 entries.clip_distances = ir.GetClipDistances();
248 entries.shader_viewport_layer_array = 248 entries.shader_viewport_layer_array =
249 stage == ShaderStage::Vertex && (ir.UsesLayer() || ir.UsesPointSize()); 249 stage == ShaderStage::Vertex && (ir.UsesLayer() || ir.UsesViewportIndex());
250 entries.shader_length = ir.GetLength(); 250 entries.shader_length = ir.GetLength();
251 return entries; 251 return entries;
252 } 252 }
@@ -302,7 +302,8 @@ private:
302 if (ir.UsesViewportIndex()) { 302 if (ir.UsesViewportIndex()) {
303 code.AddLine("int gl_ViewportIndex;"); 303 code.AddLine("int gl_ViewportIndex;");
304 } 304 }
305 } else if (stage == ShaderStage::Vertex && !device.HasVertexViewportLayer()) { 305 } else if ((ir.UsesLayer() || ir.UsesViewportIndex()) && stage == ShaderStage::Vertex &&
306 !device.HasVertexViewportLayer()) {
306 LOG_ERROR( 307 LOG_ERROR(
307 Render_OpenGL, 308 Render_OpenGL,
308 "GL_ARB_shader_viewport_layer_array is not available and its required by a shader"); 309 "GL_ARB_shader_viewport_layer_array is not available and its required by a shader");