vulkan: fix 32-bit integer overflow in CEIL_DIV (#25245)

This commit is contained in:
hokanosekai 2026-07-06 10:35:57 +02:00 committed by GitHub
parent d80e878501
commit 86961efd56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -129,7 +129,7 @@ typedef struct VkPhysicalDeviceShaderMixedFloatDotProductFeaturesVALVE {
#endif
#define ROUNDUP_POW2(M, N) (((M) + (N) - 1) & ~((N) - 1))
#define CEIL_DIV(M, N) (((M) + (N)-1) / (N))
#define CEIL_DIV(M, N) (((M) / (N)) + (((M) % (N)) != 0))
static bool is_pow2(uint32_t x) { return x > 1 && (x & (x-1)) == 0; }
#define VK_VENDOR_ID_AMD 0x1002