diff options
author | bunnei <bunneidev@gmail.com> | 2018-08-05 22:42:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-05 22:42:21 +0200 |
commit | c8e5c740924896810897b3f9090858f307fd313a (patch) | |
tree | 7c8da90626d2e99dcb5b5bea5acf8aaf5ab98605 /src/video_core | |
parent | Merge pull request #912 from lioncash/global-var (diff) | |
parent | gl_shader_decompiler: Fix TEXS mask and dest. (diff) | |
download | yuzu-c8e5c740924896810897b3f9090858f307fd313a.tar yuzu-c8e5c740924896810897b3f9090858f307fd313a.tar.gz yuzu-c8e5c740924896810897b3f9090858f307fd313a.tar.bz2 yuzu-c8e5c740924896810897b3f9090858f307fd313a.tar.lz yuzu-c8e5c740924896810897b3f9090858f307fd313a.tar.xz yuzu-c8e5c740924896810897b3f9090858f307fd313a.tar.zst yuzu-c8e5c740924896810897b3f9090858f307fd313a.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 68db3c22a..e3217db81 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -766,13 +766,16 @@ private: // goes into gpr28+0 and gpr28+1 size_t texs_offset{}; + size_t src_elem{}; for (const auto& dest : {instr.gpr0.Value(), instr.gpr28.Value()}) { + size_t dest_elem{}; for (unsigned elem = 0; elem < 2; ++elem) { - if (!instr.texs.IsComponentEnabled(elem)) { + if (!instr.texs.IsComponentEnabled(src_elem++)) { // Skip disabled components continue; } - regs.SetRegisterToFloat(dest, elem + texs_offset, texture, 1, 4, false, elem); + regs.SetRegisterToFloat(dest, elem + texs_offset, texture, 1, 4, false, + dest_elem++); } if (!instr.texs.HasTwoDestinations()) { |