From ef4446cb11b649cbae5d403239d979b8d99e357c Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Mon, 25 Nov 2019 22:00:42 -0300 Subject: gl_shader_decompiler: Fix casts from fp32 to f16 Casts from f32 to f16 zeroes the higher half of the target register. --- src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/video_core/renderer_opengl') diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index b17c4e703..0e644564a 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) { -- cgit v1.2.3