summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2019-11-26 09:11:23 -0500
committerGravatar GitHub2019-11-26 09:11:23 -0500
commit31daaa79119a2a863adf4216c7ce64495dc71344 (patch)
treebfa979a8e0da8564748215e5c28cdb26bb788139
parentMerge pull request #3162 from bunnei/fix-shared-ptr-crash (diff)
parentgl_shader_decompiler: Fix casts from fp32 to f16 (diff)
downloadyuzu-31daaa79119a2a863adf4216c7ce64495dc71344.tar.gz
yuzu-31daaa79119a2a863adf4216c7ce64495dc71344.tar.xz
yuzu-31daaa79119a2a863adf4216c7ce64495dc71344.zip
Merge pull request #3164 from ReinUsesLisp/half-cast-float
gl_shader_decompiler: Fix casts from fp32 to fp16
-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:
1469 } 1469 }
1470 1470
1471 Expression HCastFloat(Operation operation) { 1471 Expression HCastFloat(Operation operation) {
1472 return {fmt::format("vec2({})", VisitOperand(operation, 0).AsFloat()), Type::HalfFloat}; 1472 return {fmt::format("vec2({}, 0.0f)", VisitOperand(operation, 0).AsFloat()),
1473 Type::HalfFloat};
1473 } 1474 }
1474 1475
1475 Expression HUnpack(Operation operation) { 1476 Expression HUnpack(Operation operation) {