summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-03-17 15:53:38 +0100
committerGitHub <noreply@github.com>2020-03-17 15:53:38 +0100
commit1c45c8086e316b16a526dc8ed5e1259d3725b45e (patch)
tree08d0b0f63157cac43f0d6389ea7442383d95079d
parentMerge pull request #3521 from ReinUsesLisp/nsight-debug (diff)
parentgl_shader_decompiler: Add layer component to texelFetch (diff)
downloadyuzu-1c45c8086e316b16a526dc8ed5e1259d3725b45e.tar
yuzu-1c45c8086e316b16a526dc8ed5e1259d3725b45e.tar.gz
yuzu-1c45c8086e316b16a526dc8ed5e1259d3725b45e.tar.bz2
yuzu-1c45c8086e316b16a526dc8ed5e1259d3725b45e.tar.lz
yuzu-1c45c8086e316b16a526dc8ed5e1259d3725b45e.tar.xz
yuzu-1c45c8086e316b16a526dc8ed5e1259d3725b45e.tar.zst
yuzu-1c45c8086e316b16a526dc8ed5e1259d3725b45e.zip
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 3adf7f0cb..849839fe3 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -2009,16 +2009,19 @@ private:
expr += GetSampler(meta->sampler);
expr += ", ";
- expr += constructors.at(operation.GetOperandsCount() - 1);
+ expr += constructors.at(operation.GetOperandsCount() + (meta->array ? 1 : 0) - 1);
expr += '(';
for (std::size_t i = 0; i < count; ++i) {
- expr += VisitOperand(operation, i).AsInt();
- const std::size_t next = i + 1;
- if (next == count)
- expr += ')';
- else if (next < count)
+ if (i > 0) {
expr += ", ";
+ }
+ expr += VisitOperand(operation, i).AsInt();
}
+ if (meta->array) {
+ expr += ", ";
+ expr += Visit(meta->array).AsInt();
+ }
+ expr += ')';
if (meta->lod && !meta->sampler.IsBuffer()) {
expr += ", ";