diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-05-31 02:02:44 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:37 +0200 |
commit | 4b5a4ea72e471eaf7d3fae34746e49aa9a6aaf08 (patch) | |
tree | fccc88e162423b9523a529caa55ed4193cb73f46 /src/shader_recompiler/backend/glsl/emit_context.cpp | |
parent | glsl: implement set clip distance (diff) | |
download | yuzu-4b5a4ea72e471eaf7d3fae34746e49aa9a6aaf08.tar yuzu-4b5a4ea72e471eaf7d3fae34746e49aa9a6aaf08.tar.gz yuzu-4b5a4ea72e471eaf7d3fae34746e49aa9a6aaf08.tar.bz2 yuzu-4b5a4ea72e471eaf7d3fae34746e49aa9a6aaf08.tar.lz yuzu-4b5a4ea72e471eaf7d3fae34746e49aa9a6aaf08.tar.xz yuzu-4b5a4ea72e471eaf7d3fae34746e49aa9a6aaf08.tar.zst yuzu-4b5a4ea72e471eaf7d3fae34746e49aa9a6aaf08.zip |
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_context.cpp')
-rw-r--r-- | src/shader_recompiler/backend/glsl/emit_context.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_context.cpp b/src/shader_recompiler/backend/glsl/emit_context.cpp index da29290a2..788679f40 100644 --- a/src/shader_recompiler/backend/glsl/emit_context.cpp +++ b/src/shader_recompiler/backend/glsl/emit_context.cpp @@ -121,7 +121,6 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile } void EmitContext::SetupExtensions(std::string&) { - header += "#extension GL_ARB_separate_shader_objects : enable\n"; // TODO: track this usage header += "#extension GL_ARB_sparse_texture2 : enable\n"; header += "#extension GL_EXT_texture_shadow_lod : enable\n"; @@ -171,11 +170,13 @@ void EmitContext::DefineStorageBuffers(Bindings& bindings) { if (info.storage_buffers_descriptors.empty()) { return; } + u32 index{}; for (const auto& desc : info.storage_buffers_descriptors) { - header += - fmt::format("layout(std430,binding={}) buffer ssbo_{}{{uint ssbo{}[];}};", - bindings.storage_buffer, bindings.storage_buffer, bindings.storage_buffer); + header += fmt::format("layout(std430,binding={}) buffer {}_ssbo_{}{{uint {}_ssbo{}[];}};", + bindings.storage_buffer, stage_name, bindings.storage_buffer, + stage_name, index); bindings.storage_buffer += desc.count; + index += desc.count; } } |