diff options
author | Fernando S <fsahmkow27@gmail.com> | 2022-01-03 00:39:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-03 00:39:59 +0100 |
commit | ae7da0b12dd8aef115d741eb60d00ddf8ed357df (patch) | |
tree | 09d269fe3838d1f8aa5672d2af06cbeb9b45d81f /src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp | |
parent | Merge pull request #7659 from ameerj/overlap-overflow (diff) | |
parent | glsl: Add boolean reference workaround (diff) | |
download | yuzu-ae7da0b12dd8aef115d741eb60d00ddf8ed357df.tar yuzu-ae7da0b12dd8aef115d741eb60d00ddf8ed357df.tar.gz yuzu-ae7da0b12dd8aef115d741eb60d00ddf8ed357df.tar.bz2 yuzu-ae7da0b12dd8aef115d741eb60d00ddf8ed357df.tar.lz yuzu-ae7da0b12dd8aef115d741eb60d00ddf8ed357df.tar.xz yuzu-ae7da0b12dd8aef115d741eb60d00ddf8ed357df.tar.zst yuzu-ae7da0b12dd8aef115d741eb60d00ddf8ed357df.zip |
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp')
-rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp index 44060df33..b0d85be99 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp @@ -87,11 +87,11 @@ void EmitUDiv32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::strin } void EmitINeg32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { - ctx.AddU32("{}=uint(-({}));", inst, value); + ctx.AddU32("{}=uint(int(0)-int({}));", inst, value); } void EmitINeg64(EmitContext& ctx, IR::Inst& inst, std::string_view value) { - ctx.AddU64("{}=-({});", inst, value); + ctx.AddU64("{}=uint64_t(int64_t(0)-int64_t({}));", inst, value); } void EmitIAbs32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { |