diff options
| -rw-r--r-- | demos/cube.c | 2 | ||||
| -rw-r--r-- | demos/tri.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/demos/cube.c b/demos/cube.c index bc532980..c4dd33ca 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 288e72c2..ed8dfdaf 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 & |
