mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 21:35:46 +00:00
opengl: Declare fragment outputs even if they are not used
Fixes Ori and the Blind Forest's menu on GLASM. For some reason (probably high level optimizations) it is not sanitized on SPIR-V for OpenGL. Vulkan is unaffected by this change.
This commit is contained in:
parent
ebfbb5e09f
commit
9750e0410b
6 changed files with 18 additions and 10 deletions
|
@ -117,13 +117,9 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile
|
|||
index, index);
|
||||
}
|
||||
}
|
||||
for (size_t index = 0; index < info.stores_frag_color.size(); ++index) {
|
||||
if (!info.stores_frag_color[index]) {
|
||||
continue;
|
||||
}
|
||||
if (index == 0) {
|
||||
Add("OUTPUT frag_color0=result.color;");
|
||||
} else {
|
||||
if (stage == Stage::Fragment) {
|
||||
Add("OUTPUT frag_color0=result.color;");
|
||||
for (size_t index = 1; index < info.stores_frag_color.size(); ++index) {
|
||||
Add("OUTPUT frag_color{}=result.color[{}];", index, index);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue