diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-12-28 05:59:32 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-12-30 01:03:50 +0100 |
commit | b84d429c2ec59e54a89d9d4e34b0df9f22172e8f (patch) | |
tree | e275b74a6fb2d16219697cbad38925e2e660e058 /src/shader_recompiler/backend/glsl/glsl_emit_context.cpp | |
parent | emit_glsl_integer: Use negation work around (diff) | |
download | yuzu-b84d429c2ec59e54a89d9d4e34b0df9f22172e8f.tar yuzu-b84d429c2ec59e54a89d9d4e34b0df9f22172e8f.tar.gz yuzu-b84d429c2ec59e54a89d9d4e34b0df9f22172e8f.tar.bz2 yuzu-b84d429c2ec59e54a89d9d4e34b0df9f22172e8f.tar.lz yuzu-b84d429c2ec59e54a89d9d4e34b0df9f22172e8f.tar.xz yuzu-b84d429c2ec59e54a89d9d4e34b0df9f22172e8f.tar.zst yuzu-b84d429c2ec59e54a89d9d4e34b0df9f22172e8f.zip |
Diffstat (limited to 'src/shader_recompiler/backend/glsl/glsl_emit_context.cpp')
-rw-r--r-- | src/shader_recompiler/backend/glsl/glsl_emit_context.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp b/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp index bc9d2a904..bb7f1a0fd 100644 --- a/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp +++ b/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp @@ -428,9 +428,10 @@ void EmitContext::DefineConstantBuffers(Bindings& bindings) { return; } for (const auto& desc : info.constant_buffer_descriptors) { - header += fmt::format( - "layout(std140,binding={}) uniform {}_cbuf_{}{{vec4 {}_cbuf{}[{}];}};", - bindings.uniform_buffer, stage_name, desc.index, stage_name, desc.index, 4 * 1024); + const auto cbuf_type{profile.has_gl_cbuf_ftou_bug ? "uvec4" : "vec4"}; + header += fmt::format("layout(std140,binding={}) uniform {}_cbuf_{}{{{} {}_cbuf{}[{}];}};", + bindings.uniform_buffer, stage_name, desc.index, cbuf_type, + stage_name, desc.index, 4 * 1024); bindings.uniform_buffer += desc.count; } } |