mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-23 15:22:45 +01:00
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
1 changed files with 2 additions and 12 deletions
|
@ -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();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue