mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-11 14:33:29 +00:00
gl_shader_decompiler: Fix conditional usage of GL_ARB_shader_viewport_layer_array
This commit is contained in:
parent
c9d886c84e
commit
aca40de224
|
@ -246,7 +246,7 @@ public:
|
||||||
}
|
}
|
||||||
entries.clip_distances = ir.GetClipDistances();
|
entries.clip_distances = ir.GetClipDistances();
|
||||||
entries.shader_viewport_layer_array =
|
entries.shader_viewport_layer_array =
|
||||||
stage == ShaderStage::Vertex && (ir.UsesLayer() || ir.UsesPointSize());
|
stage == ShaderStage::Vertex && (ir.UsesLayer() || ir.UsesViewportIndex());
|
||||||
entries.shader_length = ir.GetLength();
|
entries.shader_length = ir.GetLength();
|
||||||
return entries;
|
return entries;
|
||||||
}
|
}
|
||||||
|
@ -302,7 +302,8 @@ private:
|
||||||
if (ir.UsesViewportIndex()) {
|
if (ir.UsesViewportIndex()) {
|
||||||
code.AddLine("int gl_ViewportIndex;");
|
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(
|
LOG_ERROR(
|
||||||
Render_OpenGL,
|
Render_OpenGL,
|
||||||
"GL_ARB_shader_viewport_layer_array is not available and its required by a shader");
|
"GL_ARB_shader_viewport_layer_array is not available and its required by a shader");
|
||||||
|
|
Loading…
Reference in a new issue