summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-12-24 23:53:36 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2021-12-25 02:03:54 +0100
commit640fc1418b08449f2ba729588aef5e06bc5df636 (patch)
treeb4b3b2e66b9b57719f22bebc0eaa6b897b328a5a /src/shader_recompiler/backend
parentMerge pull request #7623 from ameerj/unused-func (diff)
downloadyuzu-640fc1418b08449f2ba729588aef5e06bc5df636.tar
yuzu-640fc1418b08449f2ba729588aef5e06bc5df636.tar.gz
yuzu-640fc1418b08449f2ba729588aef5e06bc5df636.tar.bz2
yuzu-640fc1418b08449f2ba729588aef5e06bc5df636.tar.lz
yuzu-640fc1418b08449f2ba729588aef5e06bc5df636.tar.xz
yuzu-640fc1418b08449f2ba729588aef5e06bc5df636.tar.zst
yuzu-640fc1418b08449f2ba729588aef5e06bc5df636.zip
Diffstat (limited to 'src/shader_recompiler/backend')
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp
index b765a251b..474189d87 100644
--- a/src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp
@@ -125,11 +125,11 @@ void EmitFPNeg16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& i
}
void EmitFPNeg32(EmitContext& ctx, IR::Inst& inst, std::string_view value) {
- ctx.AddF32("{}=-({});", inst, value);
+ ctx.AddF32("{}=0.f-({});", inst, value);
}
void EmitFPNeg64(EmitContext& ctx, IR::Inst& inst, std::string_view value) {
- ctx.AddF64("{}=-({});", inst, value);
+ ctx.AddF64("{}=double(0.)-({});", inst, value);
}
void EmitFPSin(EmitContext& ctx, IR::Inst& inst, std::string_view value) {