mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-10-31 20:37:52 +00:00
gl_shader_decompiler: Elide unnecessary copies within DeclareConstantBuffers()
Resolves a -Wrange-loop-analysis warning.
This commit is contained in:
parent
5cd051eced
commit
edcbd47800
1 changed files with 1 additions and 1 deletions
|
@ -878,7 +878,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 binding = device.GetBaseBindings(stage).uniform_buffer;
|
u32 binding = device.GetBaseBindings(stage).uniform_buffer;
|
||||||
for (const auto [index, info] : ir.GetConstantBuffers()) {
|
for (const auto& [index, info] : ir.GetConstantBuffers()) {
|
||||||
const u32 num_elements = Common::AlignUp(info.GetSize(), 4) / 4;
|
const u32 num_elements = Common::AlignUp(info.GetSize(), 4) / 4;
|
||||||
const u32 size = info.IsIndirect() ? MAX_CONSTBUFFER_ELEMENTS : num_elements;
|
const u32 size = info.IsIndirect() ? MAX_CONSTBUFFER_ELEMENTS : num_elements;
|
||||||
code.AddLine("layout (std140, binding = {}) uniform {} {{", binding++,
|
code.AddLine("layout (std140, binding = {}) uniform {} {{", binding++,
|
||||||
|
|
Loading…
Reference in a new issue