Explorar o código

gl_shader_decompiler: Fix casts from fp32 to f16

Casts from f32 to f16 zeroes the higher half of the target register.
ReinUsesLisp %!s(int64=6) %!d(string=hai) anos
pai
achega
ef4446cb11
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/video_core/renderer_opengl/gl_shader_decompiler.cpp

+ 2 - 1
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) {