Skip to content

Commit

Permalink
cube: Check return value of vkGetPhysicalDeviceSurfaceSupportKHR
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-lunarg committed Nov 28, 2024
1 parent 3dc27fa commit a2224ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cube/cube.c
Original file line number Diff line number Diff line change
Expand Up @@ -4145,7 +4145,7 @@ static void demo_init_vk(struct demo *demo) {
volkLoadInstance(demo->inst);
}

static void demo_select_physical_device(struct demo* demo) {
static void demo_select_physical_device(struct demo *demo) {
VkResult err;
/* Make initial call to query gpu_count, then second call for gpu info */
uint32_t gpu_count = 0;
Expand Down Expand Up @@ -4192,8 +4192,8 @@ static void demo_select_physical_device(struct demo* demo) {

// Continue next gpu if this gpu does not support the surface.
VkBool32 supported = VK_FALSE;
vkGetPhysicalDeviceSurfaceSupportKHR(physical_devices[i], 0, demo->surface, &supported);
if (!supported) continue;
VkResult result = vkGetPhysicalDeviceSurfaceSupportKHR(physical_devices[i], 0, demo->surface, &supported);
if (result != VK_SUCCESS || !supported) continue;

int priority = 0;
switch (physicalDeviceProperties.deviceType) {
Expand Down

0 comments on commit a2224ab

Please sign in to comment.