nulldrv: Initialize memory types mask
authorChris Forbes <chrisforbes@google.com>
Tue, 29 Dec 2015 21:43:16 +0000 (10:43 +1300)
committerJon Ashburn <jon@lunarg.com>
Thu, 14 Jan 2016 22:25:47 +0000 (15:25 -0700)
Previously apps would randomly succeed or fail to find a matching memory type based on whatever junk happened to be here. Instead, claim to support all memory types.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
icd/nulldrv/nulldrv.c

index 3523f48d2d98f2c082bd5d686065f35e7ba07810..903738e35ae2f35ed9d8efd2f11e240f25b49dfc 100644 (file)
@@ -270,6 +270,7 @@ static VkResult img_get_memory_requirements(struct nulldrv_base *base,
 
     pRequirements->size = img->total_size;
     pRequirements->alignment = 4096;
+    pRequirements->memoryTypeBits = ~0u;        /* can use any memory type */
 
     return ret;
 }