}
}
+#if defined(VK_USE_PLATFORM_XCB_KHR) || \
+ defined(VK_USE_PLATFORM_XLIB_KHR) || \
+ defined(VK_USE_PLATFORM_WIN32_KHR) || \
+ defined(VK_USE_PLATFORM_ANDROID_KHR)
if (ext_count)
for (i = 0; ((i < inst->global_extension_count) &&
(ext_count < MAX_EXTENSIONS));
}
#endif
}
+#endif
// If we don't find the KHR_SURFACE extension and at least one other
// device-specific extension,
// then give up on reporting presentable surface formats."
#endif //VK_USE_PLATFORM_WIN32_KHR
//-----------------------------------------------------------
+#if defined(VK_USE_PLATFORM_XCB_KHR) || \
+ defined(VK_USE_PLATFORM_XLIB_KHR) || \
+ defined(VK_USE_PLATFORM_WIN32_KHR)
static void app_destroy_surface(struct app_instance *inst) { //same for all platforms
vkDestroySurfaceKHR(inst->instance, inst->surface, NULL);
}
+#endif
//----------------------------XCB----------------------------
#endif //VK_USE_PLATFORM_XLIB_KHR
//-----------------------------------------------------------
+#if defined(VK_USE_PLATFORM_XCB_KHR) || \
+ defined(VK_USE_PLATFORM_XLIB_KHR) || \
+ defined(VK_USE_PLATFORM_WIN32_KHR)
static int app_dump_surface_formats(struct app_instance *inst, struct app_gpu *gpu){
// Get the list of VkFormat's that are supported:
VkResult U_ASSERT_ONLY err;
fflush(stdout);
return formatCount;
}
+#endif
static void app_dev_dump_format_props(const struct app_dev *dev, VkFormat fmt)
{
fflush(stdout);
}
+#if defined(VK_USE_PLATFORM_XCB_KHR) || \
+ defined(VK_USE_PLATFORM_XLIB_KHR) || \
+ defined(VK_USE_PLATFORM_WIN32_KHR)
// Returns true if the named extension is in the list of extensions.
static bool has_extension(const char *extension_name,
const uint32_t extension_count,
}
return false;
}
+#endif
static void app_gpu_dump_queue_props(const struct app_gpu *gpu, uint32_t id) {
const VkQueueFamilyProperties *props = &gpu->queue_props[id];