mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
vulkan/wsi: fix -Wnarrowing warning
else I get this output:
[11/600] Compiling C++ object src/vulkan/wsi/libvulkan_wsi.a.p/wsi_common_win32.cpp.obj
../src/vulkan/wsi/wsi_common_win32.cpp: In function 'VkResult wsi_win32_surface_create_swapchain_dxgi(wsi_win32_surface*, VkDevice, wsi_win32*, const VkSwapchainCreateInfoKHR*, wsi_win32_swapchain*)':
../src/vulkan/wsi/wsi_common_win32.cpp:757:65: warning: narrowing conversion of '((((int)chain->wsi_win32_swapchain::base.wsi_swapchain::present_mode) == ((int)VK_PRESENT_MODE_IMMEDIATE_KHR)) ? ((int)DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING) : 0)' from 'int' to 'UINT' {aka 'unsigned int'} [-Wnarrowing]
757 | chain->base.present_mode == VK_PRESENT_MODE_IMMEDIATE_KHR ?
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
758 | DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING : 0
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fixes: d7730fcf22
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22475>
This commit is contained in:
parent
a6c8d74cd7
commit
d5871d21a5
1 changed files with 1 additions and 1 deletions
|
|
@ -755,7 +755,7 @@ wsi_win32_surface_create_swapchain_dxgi(
|
|||
DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL,
|
||||
DXGI_ALPHA_MODE_UNSPECIFIED,
|
||||
chain->base.present_mode == VK_PRESENT_MODE_IMMEDIATE_KHR ?
|
||||
DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING : 0
|
||||
DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING : 0u
|
||||
};
|
||||
|
||||
if (create_info->imageUsage &
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue