From b74bb472c58087a523c4e342dca6b3e04fd8923f Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Thu, 1 Oct 2026 22:09:53 +0200 Subject: [PATCH] GPU: refuse deterministic mode on Metal Simply not working for now --- GPU/Common/GPUCommonDef.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/GPU/Common/GPUCommonDef.h b/GPU/Common/GPUCommonDef.h index 90746019d9a99..3b15e16314eef 100644 --- a/GPU/Common/GPUCommonDef.h +++ b/GPU/Common/GPUCommonDef.h @@ -81,6 +81,14 @@ #define GPUCA_RTC_CONSTEXPR #endif +#if defined(GPUCA_DETERMINISTIC_MODE) && defined(__METAL__) + // The deterministic paths compute the transcendentals in double (see + // GPUCommonMath::SinCos). The emulated double is bit-exact for + - * / but + // its sin and cos are within 2 ulp of libm, not identical to it, so the + // results could not match the other backends. + #error "GPUCA_DETERMINISTIC_MODE is not supported on Metal" +#endif + #ifndef GPUCA_DETERMINISTIC_CODE #ifdef GPUCA_DETERMINISTIC_MODE #define GPUCA_DETERMINISTIC_CODE(det, indet) det // In deterministic mode, take deterministic code path