From 2f1dbdbfe2b8adac45ff00df12a7bfb308070952 Mon Sep 17 00:00:00 2001 From: Petr Kraus Date: Sat, 14 Apr 2018 14:45:17 +0200 Subject: demos: Remove undesirable gpu_count assert to allow the useful error message to be shown instead --- demos/cube.c | 2 +- demos/cube.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/demos/cube.c b/demos/cube.c index 640be20b..b8b49508 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -3148,7 +3148,7 @@ static void demo_init_vk(struct demo *demo) { /* Make initial call to query gpu_count, then second call for gpu info*/ err = vkEnumeratePhysicalDevices(demo->inst, &gpu_count, NULL); - assert(!err && gpu_count > 0); + assert(!err); if (gpu_count > 0) { VkPhysicalDevice *physical_devices = malloc(sizeof(VkPhysicalDevice) * gpu_count); diff --git a/demos/cube.cpp b/demos/cube.cpp index ff760893..a7218617 100644 --- a/demos/cube.cpp +++ b/demos/cube.cpp @@ -1217,7 +1217,6 @@ void Demo::init_vk() { uint32_t gpu_count; result = inst.enumeratePhysicalDevices(&gpu_count, nullptr); VERIFY(result == vk::Result::eSuccess); - assert(gpu_count > 0); if (gpu_count > 0) { std::unique_ptr physical_devices(new vk::PhysicalDevice[gpu_count]); -- cgit v1.2.3