summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-05-22 21:06:14 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:36 +0200
commit3064bde4155b865d61258e8fa87df9e6377578b6 (patch)
treea615735520ff688e6ba64775856c76d84e2d2416 /src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp
parentglsl: More FP instructions/fixes (diff)
downloadyuzu-3064bde4155b865d61258e8fa87df9e6377578b6.tar
yuzu-3064bde4155b865d61258e8fa87df9e6377578b6.tar.gz
yuzu-3064bde4155b865d61258e8fa87df9e6377578b6.tar.bz2
yuzu-3064bde4155b865d61258e8fa87df9e6377578b6.tar.lz
yuzu-3064bde4155b865d61258e8fa87df9e6377578b6.tar.xz
yuzu-3064bde4155b865d61258e8fa87df9e6377578b6.tar.zst
yuzu-3064bde4155b865d61258e8fa87df9e6377578b6.zip
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.cpp8
1 files changed, 4 insertions, 4 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 3f3a83b20..2aa9f2cd3 100644
--- a/src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp
@@ -156,12 +156,12 @@ void EmitFPSqrt([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& in
void EmitFPSaturate16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst,
[[maybe_unused]] std::string_view value) {
- ctx.AddF64("{}=sqrt({});", inst, value);
+ throw NotImplementedException("GLSL");
}
void EmitFPSaturate32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst,
[[maybe_unused]] std::string_view value) {
- ctx.AddF32("{}=clamp({},0.0f,1.0f);", inst, value);
+ ctx.AddF32("{}=clamp({},0.0,1.0);", inst, value);
}
void EmitFPSaturate64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst,
@@ -197,12 +197,12 @@ void EmitFPRoundEven16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::I
void EmitFPRoundEven32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst,
[[maybe_unused]] std::string_view value) {
- ctx.AddF32("{}=round({});", inst, value);
+ ctx.AddF32("{}=roundEven({});", inst, value);
}
void EmitFPRoundEven64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst,
[[maybe_unused]] std::string_view value) {
- ctx.AddF64("{}=round({});", inst, value);
+ ctx.AddF64("{}=roundEven({});", inst, value);
}
void EmitFPFloor16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst,