diff options
| author | 2019-11-25 22:00:42 -0300 | |
|---|---|---|
| committer | 2019-11-25 22:22:33 -0300 | |
| commit | ef4446cb11b649cbae5d403239d979b8d99e357c (patch) | |
| tree | 2e1b09fe1781e7a90793a0b968195f65ad51a503 /src | |
| parent | Merge pull request #3160 from DarkLordZach/opt-ea-clang-fmt (diff) | |
| download | yuzu-ef4446cb11b649cbae5d403239d979b8d99e357c.tar.gz yuzu-ef4446cb11b649cbae5d403239d979b8d99e357c.tar.xz yuzu-ef4446cb11b649cbae5d403239d979b8d99e357c.zip | |
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 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) { |