GPU/OpenGL: Fix GLES again

This commit is contained in:
Connor McLaughlin
2020-05-03 19:38:27 +10:00
parent 8139230d05
commit 257c86930f
3 changed files with 23 additions and 14 deletions

View File

@ -394,8 +394,17 @@ void GPU_HW_ShaderGen::DeclareFragmentEntryPoint(
if (m_use_glsl_binding_layout)
{
for (u32 i = 0; i < num_color_outputs; i++)
ss << "layout(location = 0, index = " << i << ") out float4 o_col" << i << ";\n";
if (m_supports_dual_source_blend)
{
for (u32 i = 0; i < num_color_outputs; i++)
ss << "layout(location = 0, index = " << i << ") out float4 o_col" << i << ";\n";
}
else
{
Assert(num_color_outputs <= 1);
for (u32 i = 0; i < num_color_outputs; i++)
ss << "layout(location = 0" << i << ") out float4 o_col" << i << ";\n";
}
}
else
{