aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre BACQUART <tek512@gmail.com>2016-04-28 14:25:09 -0600
committerTony Barbour <tony@LunarG.com>2016-04-28 14:31:26 -0600
commit89eb8df12be1aa3bce2ae021b578da7a6d3d0981 (patch)
treee9928f86a9240513986c10067c3e47e014c407e4
parentf62d28cda78358e5e69a533d57201f756e0051c3 (diff)
downloadusermoji-89eb8df12be1aa3bce2ae021b578da7a6d3d0981.tar.xz
demos: replace raw value with Vulkan constant in demos
Change-Id: I517467bc1afae07fdf6346596908ddb15757dc5d
-rw-r--r--demos/cube.c2
-rw-r--r--demos/tri.c2
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 &