aboutsummaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp
diff options
context:
space:
mode:
authorFernando S <fsahmkow27@gmail.com>2022-01-03 00:39:59 +0100
committerGitHub <noreply@github.com>2022-01-03 00:39:59 +0100
commitae7da0b12dd8aef115d741eb60d00ddf8ed357df (patch)
tree09d269fe3838d1f8aa5672d2af06cbeb9b45d81f /src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp
parent214b9fc9a7749784915dad37f734e03b1db9912b (diff)
parent8c907c620d830bdaef30ff4316489443775b3ea4 (diff)
Merge pull request #7629 from ameerj/nv-driver-fixes
shaders: Add fixes for NVIDIA drivers 495+
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp')
-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) {