Vulkan: Fix a couple of unsigned/signed warnings.

This commit is contained in:
BearOso 2024-05-04 15:43:54 -05:00
parent c39e86c0c6
commit 51b6528224
2 changed files with 2 additions and 2 deletions

View File

@ -204,7 +204,7 @@ bool Context::init_device(int preferred_device)
auto device_list = instance->enumeratePhysicalDevices().value;
if (preferred_device > -1 &&
preferred_device < device_list.size() &&
(size_t)preferred_device < device_list.size() &&
check_extensions(device_list[preferred_device]))
{
physical_device = device_list[preferred_device];

View File

@ -126,7 +126,7 @@ bool Swapchain::create(unsigned int desired_num_swapchain_images, int new_width,
// If extents aren't reported (Wayland), we have to rely on Wayland to report
// the size, so keep current extent.
if (surface_capabilities.currentExtent.width != -1)
if (surface_capabilities.currentExtent.width != UINT32_MAX)
extents = surface_capabilities.currentExtent;
uint32_t graphics_queue_index = 0;