diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-05-19 07:05:24 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:32 +0200 |
commit | 4a22942f452dd1bba5e10d20217a0bfbf214dacb (patch) | |
tree | b54e2cde969a5e44f08181745d5d4a3549f7e295 /src/shader_recompiler/backend/glasm/emit_context.cpp | |
parent | glasm: Implement IADD.CC (diff) | |
download | yuzu-4a22942f452dd1bba5e10d20217a0bfbf214dacb.tar yuzu-4a22942f452dd1bba5e10d20217a0bfbf214dacb.tar.gz yuzu-4a22942f452dd1bba5e10d20217a0bfbf214dacb.tar.bz2 yuzu-4a22942f452dd1bba5e10d20217a0bfbf214dacb.tar.lz yuzu-4a22942f452dd1bba5e10d20217a0bfbf214dacb.tar.xz yuzu-4a22942f452dd1bba5e10d20217a0bfbf214dacb.tar.zst yuzu-4a22942f452dd1bba5e10d20217a0bfbf214dacb.zip |
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_context.cpp')
-rw-r--r-- | src/shader_recompiler/backend/glasm/emit_context.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_context.cpp b/src/shader_recompiler/backend/glasm/emit_context.cpp index d1fe84a5f..e2182400c 100644 --- a/src/shader_recompiler/backend/glasm/emit_context.cpp +++ b/src/shader_recompiler/backend/glasm/emit_context.cpp @@ -80,11 +80,14 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings) : info{progra Add("OUTPUT out_attr{}[]={{result.attrib[{}..{}]}};", index, index, index); } } - const size_t num_textures{program.info.texture_descriptors.size()}; - texture_bindings.resize(num_textures); - for (size_t index = 0; index < num_textures; ++index) { - const auto& desc{program.info.texture_descriptors[index]}; - texture_bindings[index] = bindings.texture; + texture_buffer_bindings.reserve(program.info.texture_buffer_descriptors.size()); + for (const auto& desc : program.info.texture_buffer_descriptors) { + texture_buffer_bindings.push_back(bindings.texture); + bindings.texture += desc.count; + } + texture_bindings.reserve(program.info.texture_descriptors.size()); + for (const auto& desc : program.info.texture_descriptors) { + texture_bindings.push_back(bindings.texture); bindings.texture += desc.count; } } |