aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-01-22 15:23:45 +1300
committerJon Ashburn <jon@lunarg.com>2016-01-22 16:47:27 -0700
commit6f857357936711e99efa2017ca5fe92ed3d5ccb4 (patch)
tree6361527e31983574bb8d0b603300361d1a7b3688
parent8f665690986636017315357735fd46a89f31da3b (diff)
downloadusermoji-6f857357936711e99efa2017ca5fe92ed3d5ccb4.tar.xz
nulldrv: fill out physical device memory info
Previously we just left this filled with junk. Signed-off-by: Chris Forbes <chrisforbes@google.com>
-rw-r--r--icd/nulldrv/nulldrv.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/icd/nulldrv/nulldrv.c b/icd/nulldrv/nulldrv.c
index 26579323..68dbe2c3 100644
--- a/icd/nulldrv/nulldrv.c
+++ b/icd/nulldrv/nulldrv.c
@@ -1412,7 +1412,17 @@ VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties(
VkPhysicalDevice gpu_,
VkPhysicalDeviceMemoryProperties* pProperties)
{
- // TODO: Fill in with real data
+ // the null driver pretends to have a single memory type (and single heap);
+ pProperties->memoryTypeCount = 1;
+ pProperties->memoryHeapCount = 1;
+ pProperties->memoryTypes[0].heapIndex = 0;
+ pProperties->memoryTypes[0].propertyFlags =
+ VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
+ VK_MEMORY_PROPERTY_HOST_COHERENT_BIT |
+ VK_MEMORY_PROPERTY_HOST_CACHED_BIT |
+ VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT;
+ pProperties->memoryHeaps[0].flags = 0; /* not device local */
+ pProperties->memoryHeaps[0].size = 0; /* it's just malloc-backed memory */
}
VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceLayerProperties(