106 lines
4.1 KiB
Plaintext
106 lines
4.1 KiB
Plaintext
vkGetPhysicalDeviceMemoryProperties(3)
|
|
======================================
|
|
|
|
Name
|
|
----
|
|
vkGetPhysicalDeviceMemoryProperties - Reports memory information for the specified physical device.
|
|
|
|
C Specification
|
|
---------------
|
|
|
|
include::../protos/vkGetPhysicalDeviceMemoryProperties.txt[]
|
|
|
|
Parameters
|
|
----------
|
|
|
|
pname:physicalDevice::
|
|
A handle to the physical device about which information is to be retrieved.
|
|
|
|
pname:pMemoryProperties::
|
|
A pointer to a structure that is to receive the memory information.
|
|
|
|
Description
|
|
-----------
|
|
|
|
fname:vkGetPhysicalDeviceMemoryProperties retrieves information about the memory of the physical
|
|
device whose handle is given in pname:physicalDevice. pname:pMemoryProperties should point to an
|
|
instance of the sname:VkPhysicalDeviceMemoryProperties structure, into which will be stored the
|
|
information about the device. The definition of sname:VkPhysicalDeviceMemoryProperties is as
|
|
follows.
|
|
|
|
include::../structs/VkPhysicalDeviceMemoryProperties.txt[]
|
|
|
|
* pname:memoryTypeCount will be filled with the number of memory types supported by
|
|
the device.
|
|
|
|
* pname:memoryTypes is an array of ename:VK_MAX_MEMORY_TYPES instances of the
|
|
slink:VkMemoryType structures. Upon return from fname:vkGetPhysicalDeviceMemoryProperties,
|
|
the first pname:memoryTypeCount elements of pname:memoryTypes will contain valid data.
|
|
|
|
* pname:memoryHeapCount will be filled with the number of memory heaps supported by
|
|
the device.
|
|
|
|
* pname:memoryHeaps is an array of ename:VK_MAX_MEMORY_HEAPS slink:VkMemoryHeap
|
|
structures which describe the heaps available to the device.
|
|
|
|
The definition of the slink:VkMemoryType structure is as follows:
|
|
|
|
include::../structs/VkMemoryType.txt[]
|
|
|
|
* pname:propertyFlags is a bitfield made up from members of the elink:VkMemoryPropertyFlagBits
|
|
enumeration, which is described below.
|
|
|
|
* pname:heapIndex is the index into the ptext:memoryHeaps array returned through this
|
|
command from which the memory type will be allocated.
|
|
|
|
The elink:VkMemoryPropertyFlagBits enumeration, which forms the available bits for use in the
|
|
pname:propertyFlags member of the slink:VkMemoryType structure is defined as follows:
|
|
|
|
include::../enums/VkMemoryPropertyFlagBits.txt[]
|
|
|
|
* ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT signifies that the memory is the
|
|
most efficient type for device access (e.g. local device memory).
|
|
|
|
* ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT indicates that memory with this property is visible
|
|
to the host. That is, a valid host address may be obtained and allocations from this memory
|
|
type may be mapped.
|
|
|
|
* ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT indicates that accesses to
|
|
mapped memory of this type is coherent with accesses to the same memory
|
|
by the device. Such access do not need to be marshalled using calls to
|
|
flink:vkFlushMappedMemoryRanges or by unmapping the memory.
|
|
|
|
* ename:VK_MEMORY_PROPERTY_HOST_CACHED_BIT indicates that data stored in
|
|
memory of this type is cached by the host and as such, it is likely that
|
|
reads from such regions by the host will be faster than reads from uncached
|
|
memory.
|
|
|
|
* ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT indicates that allocations from this type of memory
|
|
may be made on an as-needed basis. In general, allocations from this type of memory will almost
|
|
always succeed and return quickly, but first access to such a region may take longer than expected.
|
|
|
|
The definition of the slink:VkMemoryHeap structure is as follows:
|
|
|
|
include::../structs/VkMemoryHeap.txt[]
|
|
|
|
* pname:size specifies the size in bytes of the memory heap.
|
|
|
|
* pname:flags is a bitfield made up of the members of the
|
|
elink:VkMemoryHeapFlagBits enumeration, the definition of which is:
|
|
|
|
include::../enums/VkMemoryHeapFlagBits.txt[]
|
|
|
|
* If the ptext:flags member of slink:VkMemoryHeap contains ename:VK_MEMORY_HEAP_HOST_LOCAL_BIT,
|
|
then the memory for that heap is located closer to the host than to the device in NUMA (Non-Unified
|
|
Memory Architecture) systems. Even in unified architectures, this flag may indicate that access
|
|
to this heap is more efficient from the host than from the device.
|
|
|
|
include::../validity/protos/vkGetPhysicalDeviceMemoryProperties.txt[]
|
|
|
|
See Also
|
|
--------
|
|
|
|
flink:vkGetPhysicalDeviceProperties
|
|
|
|
include::footer.txt[]
|