From ca7c8f0074c24dbdaff7e1b5b41ca4a548395566 Mon Sep 17 00:00:00 2001 From: Ali Almohaya Date: Tue, 11 Aug 2026 08:38:22 +0300 Subject: [PATCH] agc: fix linux build of gs oversubscription clamps (#232) --- src/libs/agc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/agc.cpp b/src/libs/agc.cpp index 4919b7611..f12638143 100644 --- a/src/libs/agc.cpp +++ b/src/libs/agc.cpp @@ -1254,7 +1254,7 @@ int KYTY_SYSV_ABI GraphicsGetGsOversubscription(ShaderRegister* regs, const Shad if (target < base.export_count) { const auto range = std::max(expanded.vertex - base.vertex, 1u); auto value = static_cast( - std::min((static_cast(target - base.vertex) << 10u) / range, 1024ull)); + std::min((static_cast(target - base.vertex) << 10u) / range, 1024)); value = std::max(value, 1u); regs[0].value = (regs[0].value & ~FULL_PC_OVERSUBSCRIPTION) | (((value << 1u) - 1u) & FULL_PC_OVERSUBSCRIPTION); @@ -1262,7 +1262,7 @@ int KYTY_SYSV_ABI GraphicsGetGsOversubscription(ShaderRegister* regs, const Shad } else { const auto range = std::max(expanded.export_count - base.export_count, 1u); const auto value = static_cast( - std::min((static_cast(target - base.export_count) * 127u) / range, 127ull)); + std::min((static_cast(target - base.export_count) * 127u) / range, 127)); regs[0].value |= FULL_PC_OVERSUBSCRIPTION; regs[1].value = (regs[1].value & ~FULL_SH_OVERSUBSCRIPTION) | (value << 16u); }