aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Schultz <karl@lunarg.com>2016-09-12 13:28:09 -0600
committerKarl Schultz <karl@lunarg.com>2016-09-12 13:31:19 -0600
commite49d04cd3c867422cc0226bc8abf6a621e24085e (patch)
tree26a48f475386603b49f1b029b58b6630b2379d42
parent747e2e4502360bfff57c844caf8ea835487a2261 (diff)
downloadusermoji-e49d04cd3c867422cc0226bc8abf6a621e24085e.tar.xz
demos: fix vulkaninfo warnings in display-only build
Change-Id: Iabc8edd7cd90f848d4957d005eb14c1094e94790
-rw-r--r--demos/vulkaninfo.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/demos/vulkaninfo.c b/demos/vulkaninfo.c
index 324720c6..e6467fc1 100644
--- a/demos/vulkaninfo.c
+++ b/demos/vulkaninfo.c
@@ -606,6 +606,10 @@ static void app_create_instance(struct app_instance *inst) {
}
}
+#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));
@@ -632,6 +636,7 @@ static void app_create_instance(struct app_instance *inst) {
}
#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."
@@ -834,9 +839,13 @@ static void app_destroy_win32_window(struct app_instance *inst) {
#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----------------------------
@@ -931,6 +940,9 @@ static void app_destroy_xlib_window(struct app_instance *inst) {
#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;
@@ -950,6 +962,7 @@ static int app_dump_surface_formats(struct app_instance *inst, struct app_gpu *g
fflush(stdout);
return formatCount;
}
+#endif
static void app_dev_dump_format_props(const struct app_dev *dev, VkFormat fmt)
{
@@ -1251,6 +1264,9 @@ app_dump_extensions(const char *indent, const char *layer_name,
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,
@@ -1261,6 +1277,7 @@ static bool has_extension(const char *extension_name,
}
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];