[cmake] enable clang-cl and WoA builds (#348)

Compilation and CMake fixes for both Windows on ARM and clang-cl, meaning Windows can now be built on both MSVC and clang on both amd64 and aarch64.

Compiling on clang is *dramatically* faster so this should be useful for CI.

Co-authored-by: crueter <crueter@eden-emu.dev>
Co-authored-by: crueter <crueter@crueter.xyz>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/348
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
lizzie 2025-09-09 20:47:49 +02:00 committed by crueter
parent 428f136a75
commit 9d2681ecc9
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
276 changed files with 973 additions and 1010 deletions

View file

@ -699,9 +699,9 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
LOG_WARNING(Render_Vulkan,
"MVK driver breaks when using more than 16 vertex attributes/bindings");
properties.properties.limits.maxVertexInputAttributes =
std::min(properties.properties.limits.maxVertexInputAttributes, 16U);
(std::min)(properties.properties.limits.maxVertexInputAttributes, 16U);
properties.properties.limits.maxVertexInputBindings =
std::min(properties.properties.limits.maxVertexInputBindings, 16U);
(std::min)(properties.properties.limits.maxVertexInputBindings, 16U);
}
if (is_turnip) {

View file

@ -136,7 +136,7 @@ namespace Vulkan {
if (vmaMapMemory(allocator, allocation, &mapped_ptr) != VK_SUCCESS) return {};
}
const size_t n = static_cast<size_t>(std::min<VkDeviceSize>(size,
std::numeric_limits<size_t>::max()));
(std::numeric_limits<size_t>::max)()));
return std::span<u8>{static_cast<u8 *>(mapped_ptr), n};
}
@ -149,7 +149,7 @@ namespace Vulkan {
const_cast<MemoryCommit *>(this)->mapped_ptr = p;
}
const size_t n = static_cast<size_t>(std::min<VkDeviceSize>(size,
std::numeric_limits<size_t>::max()));
(std::numeric_limits<size_t>::max)()));
return std::span<const u8>{static_cast<const u8 *>(mapped_ptr), n};
}

View file

@ -860,7 +860,7 @@ public:
/// Set object name.
void SetObjectNameEXT(const char* name) const;
VkResult Wait(u64 timeout = std::numeric_limits<u64>::max()) const noexcept {
VkResult Wait(u64 timeout = (std::numeric_limits<u64>::max)()) const noexcept {
return dld->vkWaitForFences(owner, 1, &handle, true, timeout);
}
@ -961,7 +961,7 @@ public:
* @param timeout Time in nanoseconds to timeout
* @return True on successful wait, false on timeout
*/
bool Wait(u64 value, u64 timeout = std::numeric_limits<u64>::max()) const {
bool Wait(u64 value, u64 timeout = (std::numeric_limits<u64>::max)()) const {
const VkSemaphoreWaitInfo wait_info{
.sType = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO,
.pNext = nullptr,