diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-11-25 22:00:42 -0300 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-11-25 22:22:33 -0300 |
commit | ef4446cb11b649cbae5d403239d979b8d99e357c (patch) | |
tree | 2e1b09fe1781e7a90793a0b968195f65ad51a503 /src | |
parent | 6d23b045a06ee49e81ae0ef7dd726c11983db304 (diff) |
gl_shader_decompiler: Fix casts from fp32 to f16
Casts from f32 to f16 zeroes the higher half of the target register.
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index b17c4e7036..0e644564a0 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -1469,7 +1469,8 @@ private: } Expression HCastFloat(Operation operation) { - return {fmt::format("vec2({})", VisitOperand(operation, 0).AsFloat()), Type::HalfFloat}; + return {fmt::format("vec2({}, 0.0f)", VisitOperand(operation, 0).AsFloat()), + Type::HalfFloat}; } Expression HUnpack(Operation operation) { |