summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-11-26 09:11:23 -0500
committerGitHub <noreply@github.com>2019-11-26 09:11:23 -0500
commit31daaa79119a2a863adf4216c7ce64495dc71344 (patch)
treebfa979a8e0da8564748215e5c28cdb26bb788139 /src
parent59484442a0a7bf72f6b627a9b0672898314f2dad (diff)
parentef4446cb11b649cbae5d403239d979b8d99e357c (diff)
Merge pull request #3164 from ReinUsesLisp/half-cast-float
gl_shader_decompiler: Fix casts from fp32 to fp16
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp3
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 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) {