diff options
| author | lizzie <lizzie@eden-emu.dev> | 2025-09-09 20:47:49 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2025-09-09 20:47:49 +0200 |
| commit | 9d2681ecc9565681db623fb71799e76381998512 (patch) | |
| tree | 3133129860a1569a8be8e7e0c9c5985adbd992ca /src/video_core/renderer_vulkan/vk_swapchain.cpp | |
| parent | 428f136a754096e34c7bfec902684e2546a43ca4 (diff) | |
[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>
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_swapchain.cpp')
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_swapchain.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/video_core/renderer_vulkan/vk_swapchain.cpp b/src/video_core/renderer_vulkan/vk_swapchain.cpp index a002ca83a0..096b9df087 100644 --- a/src/video_core/renderer_vulkan/vk_swapchain.cpp +++ b/src/video_core/renderer_vulkan/vk_swapchain.cpp @@ -79,15 +79,15 @@ static VkPresentModeKHR ChooseSwapPresentMode(bool has_imm, bool has_mailbox, } VkExtent2D ChooseSwapExtent(const VkSurfaceCapabilitiesKHR& capabilities, u32 width, u32 height) { - constexpr auto undefined_size{std::numeric_limits<u32>::max()}; + constexpr auto undefined_size{(std::numeric_limits<u32>::max)()}; if (capabilities.currentExtent.width != undefined_size) { return capabilities.currentExtent; } VkExtent2D extent; - extent.width = std::max(capabilities.minImageExtent.width, - std::min(capabilities.maxImageExtent.width, width)); - extent.height = std::max(capabilities.minImageExtent.height, - std::min(capabilities.maxImageExtent.height, height)); + extent.width = (std::max)(capabilities.minImageExtent.width, + (std::min)(capabilities.maxImageExtent.width, width)); + extent.height = (std::max)(capabilities.minImageExtent.height, + (std::min)(capabilities.maxImageExtent.height, height)); return extent; } @@ -172,7 +172,7 @@ void Swapchain::Create( bool Swapchain::AcquireNextImage() { const VkResult result = device.GetLogical().AcquireNextImageKHR( - *swapchain, std::numeric_limits<u64>::max(), *present_semaphores[frame_index], + *swapchain, (std::numeric_limits<u64>::max)(), *present_semaphores[frame_index], VK_NULL_HANDLE, &image_index); switch (result) { case VK_SUCCESS: @@ -261,10 +261,10 @@ void Swapchain::CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities) { requested_image_count = capabilities.maxImageCount; } else { requested_image_count = - std::max(requested_image_count, std::min(3U, capabilities.maxImageCount)); + (std::max)(requested_image_count, (std::min)(3U, capabilities.maxImageCount)); } } else { - requested_image_count = std::max(requested_image_count, 3U); + requested_image_count = (std::max)(requested_image_count, 3U); } VkSwapchainCreateInfoKHR swapchain_ci{ .sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR, |
