summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-04-12 10:06:55 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-04-12 10:06:55 +0200
commit75eb953575b99da5657c1d1e5fe0605782b30e35 (patch)
tree6060859516ef00557d053480173412e97ea6e808 /src/video_core
parentMerge pull request #3635 from FernandoS27/buffer-free (diff)
downloadyuzu-75eb953575b99da5657c1d1e5fe0605782b30e35.tar
yuzu-75eb953575b99da5657c1d1e5fe0605782b30e35.tar.gz
yuzu-75eb953575b99da5657c1d1e5fe0605782b30e35.tar.bz2
yuzu-75eb953575b99da5657c1d1e5fe0605782b30e35.tar.lz
yuzu-75eb953575b99da5657c1d1e5fe0605782b30e35.tar.xz
yuzu-75eb953575b99da5657c1d1e5fe0605782b30e35.tar.zst
yuzu-75eb953575b99da5657c1d1e5fe0605782b30e35.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp14
1 files changed, 8 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 160ae4340..59bbd1211 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -1819,15 +1819,17 @@ private:
}
Expression HMergeH0(Operation operation) {
- std::string dest = VisitOperand(operation, 0).AsUint();
- std::string src = VisitOperand(operation, 1).AsUint();
- return {fmt::format("(({} & 0x0000FFFFU) | ({} & 0xFFFF0000U))", src, dest), Type::Uint};
+ const std::string dest = VisitOperand(operation, 0).AsUint();
+ const std::string src = VisitOperand(operation, 1).AsUint();
+ return {fmt::format("vec2(unpackHalf2x16({}).x, unpackHalf2x16({}).y)", src, dest),
+ Type::HalfFloat};
}
Expression HMergeH1(Operation operation) {
- std::string dest = VisitOperand(operation, 0).AsUint();
- std::string src = VisitOperand(operation, 1).AsUint();
- return {fmt::format("(({} & 0x0000FFFFU) | ({} & 0xFFFF0000U))", dest, src), Type::Uint};
+ const std::string dest = VisitOperand(operation, 0).AsUint();
+ const std::string src = VisitOperand(operation, 1).AsUint();
+ return {fmt::format("vec2(unpackHalf2x16({}).x, unpackHalf2x16({}).y)", dest, src),
+ Type::HalfFloat};
}
Expression HPack2(Operation operation) {