diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-05-31 04:42:52 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:37 +0200 |
commit | 14bfb4719ad366745b5d16452914c4c78e43b8ae (patch) | |
tree | 16e61490f8263f80574a73e2bef2a4aebde6b634 /src/shader_recompiler/backend/glsl/emit_context.cpp | |
parent | glsl: Fix ssbo indexing and name shadowing between shader stages (diff) | |
download | yuzu-14bfb4719ad366745b5d16452914c4c78e43b8ae.tar yuzu-14bfb4719ad366745b5d16452914c4c78e43b8ae.tar.gz yuzu-14bfb4719ad366745b5d16452914c4c78e43b8ae.tar.bz2 yuzu-14bfb4719ad366745b5d16452914c4c78e43b8ae.tar.lz yuzu-14bfb4719ad366745b5d16452914c4c78e43b8ae.tar.xz yuzu-14bfb4719ad366745b5d16452914c4c78e43b8ae.tar.zst yuzu-14bfb4719ad366745b5d16452914c4c78e43b8ae.zip |
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_context.cpp')
-rw-r--r-- | src/shader_recompiler/backend/glsl/emit_context.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_context.cpp b/src/shader_recompiler/backend/glsl/emit_context.cpp index 788679f40..8de33b582 100644 --- a/src/shader_recompiler/backend/glsl/emit_context.cpp +++ b/src/shader_recompiler/backend/glsl/emit_context.cpp @@ -110,8 +110,11 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile header += fmt::format("layout(location={})out vec4 frag_color{};", index, index); } for (size_t index = 0; index < info.stores_generics.size(); ++index) { - if (info.stores_generics[index]) { - header += fmt::format("layout(location={}) out vec4 out_attr{};", index, index); + // TODO: Properly resolve attribute issues + const auto declaration{ + fmt::format("layout(location={}) out vec4 out_attr{};", index, index)}; + if (info.stores_generics[index] || stage == Stage::VertexA || stage == Stage::VertexB) { + header += declaration; } } DefineConstantBuffers(bindings); |