From 08d2fa96b63495c27948de94a9465f29005a28c7 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 13 Mar 2026 12:41:12 +0000 Subject: [PATCH] Fix for compiling on 32-bit without if constexpr --- renderdoc/3rdparty/glslang/SPIRV/SpvBuilder.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/renderdoc/3rdparty/glslang/SPIRV/SpvBuilder.h b/renderdoc/3rdparty/glslang/SPIRV/SpvBuilder.h index 7c92432f2..0b29dc6ea 100644 --- a/renderdoc/3rdparty/glslang/SPIRV/SpvBuilder.h +++ b/renderdoc/3rdparty/glslang/SPIRV/SpvBuilder.h @@ -1120,21 +1120,23 @@ protected: // 64/32 bit mix function from MurmurHash3 inline std::size_t hash_mix(std::size_t h) const { // RD Modification - remove if constexpr - if (sizeof(std::size_t) == 8) { +#if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(_M_X64) || \ + defined(__ia64) || defined(_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) || \ + (defined(__riscv64) && __riscv_xlen == 64) h ^= h >> 33; h *= UINT64_C(0xff51afd7ed558ccd); h ^= h >> 33; h *= UINT64_C(0xc4ceb9fe1a85ec53); h ^= h >> 33; return h; - } else { +#else h ^= h >> 16; h *= UINT32_C(0x85ebca6b); h ^= h >> 13; h *= UINT32_C(0xc2b2ae35); h ^= h >> 16; return h; - } +#endif } // Hash combine from boost