mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
v3dv: implement vkGetPhysicalDeviceMemoryProperties
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
parent
0f0a0145a9
commit
e75d462950
1 changed files with 18 additions and 1 deletions
|
|
@ -578,7 +578,24 @@ void
|
|||
v3dv_GetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice,
|
||||
VkPhysicalDeviceMemoryProperties *pMemoryProperties)
|
||||
{
|
||||
/* FIXME: stub */
|
||||
pMemoryProperties->memoryHeapCount = 1;
|
||||
pMemoryProperties->memoryHeaps[0].size = compute_heap_size();
|
||||
pMemoryProperties->memoryHeaps[0].flags = VK_MEMORY_HEAP_DEVICE_LOCAL_BIT;
|
||||
|
||||
pMemoryProperties->memoryTypeCount = 2;
|
||||
|
||||
/* This is the only combination required by the spec */
|
||||
pMemoryProperties->memoryTypes[0].propertyFlags =
|
||||
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
|
||||
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;
|
||||
pMemoryProperties->memoryTypes[1].heapIndex = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue