aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Kraus <petr_kraus@email.cz>2018-04-14 14:45:17 +0200
committerTobin Ehlis <tobine@google.com>2018-04-17 15:07:46 -0600
commit2f1dbdbfe2b8adac45ff00df12a7bfb308070952 (patch)
tree6d3817d58f8ee868eef19a92f8eb23f530fc2329
parent3d548f222fed040cdeb7f49ab69422f4f66fa64e (diff)
downloadusermoji-2f1dbdbfe2b8adac45ff00df12a7bfb308070952.tar.xz
demos: Remove undesirable gpu_count assert
to allow the useful error message to be shown instead
-rw-r--r--demos/cube.c2
-rw-r--r--demos/cube.cpp1
2 files changed, 1 insertions, 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<vk::PhysicalDevice[]> physical_devices(new vk::PhysicalDevice[gpu_count]);