diff options
| author | 2021-05-19 02:05:24 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:32 -0400 | |
| commit | 4a22942f452dd1bba5e10d20217a0bfbf214dacb (patch) | |
| tree | b54e2cde969a5e44f08181745d5d4a3549f7e295 /src/shader_recompiler/backend/glasm/emit_context.cpp | |
| parent | glasm: Implement IADD.CC (diff) | |
| download | yuzu-4a22942f452dd1bba5e10d20217a0bfbf214dacb.tar.gz yuzu-4a22942f452dd1bba5e10d20217a0bfbf214dacb.tar.xz yuzu-4a22942f452dd1bba5e10d20217a0bfbf214dacb.zip | |
glasm: Implement ImageFetch
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 | |||
| 80 | Add("OUTPUT out_attr{}[]={{result.attrib[{}..{}]}};", index, index, index); | 80 | Add("OUTPUT out_attr{}[]={{result.attrib[{}..{}]}};", index, index, index); |
| 81 | } | 81 | } |
| 82 | } | 82 | } |
| 83 | const size_t num_textures{program.info.texture_descriptors.size()}; | 83 | texture_buffer_bindings.reserve(program.info.texture_buffer_descriptors.size()); |
| 84 | texture_bindings.resize(num_textures); | 84 | for (const auto& desc : program.info.texture_buffer_descriptors) { |
| 85 | for (size_t index = 0; index < num_textures; ++index) { | 85 | texture_buffer_bindings.push_back(bindings.texture); |
| 86 | const auto& desc{program.info.texture_descriptors[index]}; | 86 | bindings.texture += desc.count; |
| 87 | texture_bindings[index] = bindings.texture; | 87 | } |
| 88 | texture_bindings.reserve(program.info.texture_descriptors.size()); | ||
| 89 | for (const auto& desc : program.info.texture_descriptors) { | ||
| 90 | texture_bindings.push_back(bindings.texture); | ||
| 88 | bindings.texture += desc.count; | 91 | bindings.texture += desc.count; |
| 89 | } | 92 | } |
| 90 | } | 93 | } |