summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-12-25 22:59:55 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2021-12-30 01:03:50 +0100
commit9f34be5a6176674c9f4be0e2636cf1c01c067e69 (patch)
tree4ae8648116cf5eacbd39d4fbc673f8384dd6caec /src
parentshader: Add integer attribute get optimization pass (diff)
downloadyuzu-9f34be5a6176674c9f4be0e2636cf1c01c067e69.tar
yuzu-9f34be5a6176674c9f4be0e2636cf1c01c067e69.tar.gz
yuzu-9f34be5a6176674c9f4be0e2636cf1c01c067e69.tar.bz2
yuzu-9f34be5a6176674c9f4be0e2636cf1c01c067e69.tar.lz
yuzu-9f34be5a6176674c9f4be0e2636cf1c01c067e69.tar.xz
yuzu-9f34be5a6176674c9f4be0e2636cf1c01c067e69.tar.zst
yuzu-9f34be5a6176674c9f4be0e2636cf1c01c067e69.zip
Diffstat (limited to 'src')
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp4
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) {