gl_shader_decompiler: Fix regression in render target declarations
A previous commit introduced a way to declare as few render targets as possible. Turns out this introduced a regression in some games.
This commit is contained in:
parent
eb5861e0a2
commit
825d629565
|
@ -543,18 +543,8 @@ private:
|
||||||
if (stage != ShaderType::Fragment) {
|
if (stage != ShaderType::Fragment) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
for (u32 rt = 0; rt < Maxwell::NumRenderTargets; ++rt) {
|
||||||
bool any = false;
|
code.AddLine("layout (location = {}) out vec4 frag_color{};", rt, rt);
|
||||||
for (u32 render_target = 0; render_target < Maxwell::NumRenderTargets; ++render_target) {
|
|
||||||
if (!IsRenderTargetEnabled(render_target)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
code.AddLine("layout (location = {}) out vec4 frag_color{};", render_target,
|
|
||||||
render_target);
|
|
||||||
any = true;
|
|
||||||
}
|
|
||||||
if (any) {
|
|
||||||
code.AddNewLine();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue