mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 18:30:09 +01:00
vulkan/wsi: Convert bit tests to bool with != 0
Otherwise the bool result could be some value other than 0 or 1.
Fixes: d7938de8 ("vulkan/wsi: don't support present with queues where blit is unsupported")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26706>
This commit is contained in:
parent
19175e474b
commit
2ea04ef69b
2 changed files with 2 additions and 2 deletions
|
|
@ -782,7 +782,7 @@ wsi_GetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice,
|
|||
VkResult res = iface->get_support(surface, wsi_device,
|
||||
queueFamilyIndex, pSupported);
|
||||
if (res == VK_SUCCESS) {
|
||||
bool blit = wsi_device->queue_supports_blit & BITFIELD64_BIT(queueFamilyIndex);
|
||||
bool blit = (wsi_device->queue_supports_blit & BITFIELD64_BIT(queueFamilyIndex)) != 0;
|
||||
*pSupported = (bool)*pSupported && blit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ wsi_GetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice
|
|||
{
|
||||
VK_FROM_HANDLE(vk_physical_device, pdevice, physicalDevice);
|
||||
struct wsi_device *wsi_device = pdevice->wsi_device;
|
||||
return wsi_device->queue_supports_blit & BITFIELD64_BIT(queueFamilyIndex);
|
||||
return (wsi_device->queue_supports_blit & BITFIELD64_BIT(queueFamilyIndex)) != 0;
|
||||
}
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue