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:
@@ -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
|
||||
|
Reference in New Issue
Block a user