diff options
| author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-05-27 20:31:03 -0400 |
|---|---|---|
| committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-22 21:51:36 -0400 |
| commit | a752ec88d06c6bcfb13605447a164c6b6915ed6e (patch) | |
| tree | 5e0bb8f30120199ed4955d402ff0b554db257e2c /src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp | |
| parent | ed14d31f663e126a8f9fe0ea8abff8e27c46248b (diff) | |
glsl: Implement derivatives and YDirection
plus some other misc additions/changed
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.cpp | 6 |
1 files changed, 3 insertions, 3 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 33aba9fef..6a9b95eca 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp @@ -124,16 +124,16 @@ void EmitFPLog2(EmitContext& ctx, IR::Inst& inst, std::string_view value) { } void EmitFPRecip32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { - ctx.AddF32("{}=1/{};", inst, value); + ctx.AddF32("{}=(1.0f)/{};", inst, value); } void EmitFPRecip64(EmitContext& ctx, IR::Inst& inst, std::string_view value) { - ctx.AddF64("{}=1/{};", inst, value); + ctx.AddF64("{}=1.0/{};", inst, value); } void EmitFPRecipSqrt32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, [[maybe_unused]] std::string_view value) { - ctx.AddF32("{}=1/sqrt({});", inst, value); + ctx.AddF32("{}=(1.0f)/sqrt({});", inst, value); } void EmitFPRecipSqrt64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, |
