wl_shell_surface_add_listener(demo->shell_surface,
&shell_surface_listener, demo);
wl_shell_surface_set_toplevel(demo->shell_surface);
+ wl_shell_surface_set_title(demo->shell_surface, APP_SHORT_NAME);
}
wl_surface_set_user_data(demo->wl_surface, demo);
if (gpu_count > 0) {
VkPhysicalDevice *physical_devices =
malloc(sizeof(VkPhysicalDevice) * gpu_count);
+ assert(physical_devices);
err = vkEnumeratePhysicalDevices(demo->inst, &gpu_count,
physical_devices);
assert(!err);
// Iterate over each queue to learn whether it supports presenting:
VkBool32 *supportsPresent =
(VkBool32 *)malloc(demo->queue_count * sizeof(VkBool32));
+ assert(supportsPresent);
for (i = 0; i < demo->queue_count; i++) {
demo->fpGetPhysicalDeviceSurfaceSupportKHR(demo->gpu, i, demo->surface,
&supportsPresent[i]);
assert(!err);
VkSurfaceFormatKHR *surfFormats =
(VkSurfaceFormatKHR *)malloc(formatCount * sizeof(VkSurfaceFormatKHR));
+ assert(surfFormats);
err = demo->fpGetPhysicalDeviceSurfaceFormatsKHR(demo->gpu, demo->surface,
&formatCount, surfFormats);
assert(!err);