From 89eb8df12be1aa3bce2ae021b578da7a6d3d0981 Mon Sep 17 00:00:00 2001 From: Alexandre BACQUART Date: Thu, 28 Apr 2016 14:25:09 -0600 Subject: [PATCH] demos: replace raw value with Vulkan constant in demos Change-Id: I517467bc1afae07fdf6346596908ddb15757dc5d --- demos/cube.c | 2 +- demos/tri.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/cube.c b/demos/cube.c index bc53298..c4dd33c 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -452,7 +452,7 @@ static bool memory_type_from_properties(struct demo *demo, uint32_t typeBits, VkFlags requirements_mask, uint32_t *typeIndex) { // Search memtypes to find first index with those properties - for (uint32_t i = 0; i < 32; i++) { + for (uint32_t i = 0; i < VK_MAX_MEMORY_TYPES; i++) { if ((typeBits & 1) == 1) { // Type is available, does it match user properties? if ((demo->memory_properties.memoryTypes[i].propertyFlags & diff --git a/demos/tri.c b/demos/tri.c index 288e72c..ed8dfda 100644 --- a/demos/tri.c +++ b/demos/tri.c @@ -291,7 +291,7 @@ static bool memory_type_from_properties(struct demo *demo, uint32_t typeBits, VkFlags requirements_mask, uint32_t *typeIndex) { // Search memtypes to find first index with those properties - for (uint32_t i = 0; i < 32; i++) { + for (uint32_t i = 0; i < VK_MAX_MEMORY_TYPES; i++) { if ((typeBits & 1) == 1) { // Type is available, does it match user properties? if ((demo->memory_properties.memoryTypes[i].propertyFlags & -- 2.7.4