diff options
| author | spencer-lunarg <spencer@lunarg.com> | 2023-02-19 19:06:31 +0900 |
|---|---|---|
| committer | Spencer Fricke <115671160+spencer-lunarg@users.noreply.github.com> | 2023-02-20 08:57:07 +0900 |
| commit | 33f41f56840b063ba99f025c68af69eabc06d568 (patch) | |
| tree | 3cd201bbef858a017cb5df05abc641925c003ef3 /icd/generated/mock_icd.cpp | |
| parent | b794befb5d9569ee63f00edb716c608d7a3437cf (diff) | |
| download | usermoji-33f41f56840b063ba99f025c68af69eabc06d568.tar.xz | |
mockicd: Add more Memory Types
Diffstat (limited to 'icd/generated/mock_icd.cpp')
| -rw-r--r-- | icd/generated/mock_icd.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/icd/generated/mock_icd.cpp b/icd/generated/mock_icd.cpp index 6323b6fe..2be22cb5 100644 --- a/icd/generated/mock_icd.cpp +++ b/icd/generated/mock_icd.cpp @@ -323,13 +323,27 @@ static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties) { - pMemoryProperties->memoryTypeCount = 2; + pMemoryProperties->memoryTypeCount = 6; + // Host visible Coherent pMemoryProperties->memoryTypes[0].propertyFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; pMemoryProperties->memoryTypes[0].heapIndex = 0; - pMemoryProperties->memoryTypes[1].propertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; - pMemoryProperties->memoryTypes[1].heapIndex = 1; + // Host visible Cached + pMemoryProperties->memoryTypes[1].propertyFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT; + pMemoryProperties->memoryTypes[1].heapIndex = 0; + // Device local and Host visible + pMemoryProperties->memoryTypes[2].propertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; + pMemoryProperties->memoryTypes[2].heapIndex = 1; + // Device local lazily + pMemoryProperties->memoryTypes[3].propertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT; + pMemoryProperties->memoryTypes[3].heapIndex = 1; + // Device local protected + pMemoryProperties->memoryTypes[4].propertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_PROTECTED_BIT; + pMemoryProperties->memoryTypes[4].heapIndex = 1; + // Device local only + pMemoryProperties->memoryTypes[5].propertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; + pMemoryProperties->memoryTypes[5].heapIndex = 1; pMemoryProperties->memoryHeapCount = 2; - pMemoryProperties->memoryHeaps[0].flags = 0; + pMemoryProperties->memoryHeaps[0].flags = VK_MEMORY_HEAP_MULTI_INSTANCE_BIT; pMemoryProperties->memoryHeaps[0].size = 8000000000; pMemoryProperties->memoryHeaps[1].flags = VK_MEMORY_HEAP_DEVICE_LOCAL_BIT; pMemoryProperties->memoryHeaps[1].size = 8000000000; |
