2016-02-16 09:53:44 +00:00
|
|
|
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[]
|
|
|
|
|
Change log for March 4, 2016 Vulkan 1.0.5 spec update:
* Bump API patch number to 5 for this update.
Github Issues:
* Correctly describe slink:VkPhysicalDeviceProperties pname:deviceName
member as a string, not a pointer to a string. Also one typo fix for
"hetereogeneous" (public issue 4).
* Replace maynot: macro with may: not, and "may: or maynot:" with
"may:" (public issue 4).
* Clarify that redundantly setting the state of a fence or event has
no effect (public issue 4).
* Minor fixes to ref pages to track descriptions of memory bits that
changed in the core spec. Fix name of a member in the description of
sname:sname:VkPipelineMultisampleStateCreateInfo (public issues 8,
13).
* Remove redundant validity statement for
sname:VkGraphicsPipelineCreateInfo::pname:stageCount (public issue
14).
* Fix typos in chapters 7-9 (public issue 14).
* Clarify the example demonstrating the behavior of
code:OpMemoryBarrier in the
<<shaders-execution-memory-ordering,shader memory acces
ordering>> section (public issue 16).
* Specify that freeing mapped memory implicitly unmaps the memory in
the description of flink:vkFreeMemory (public issue 17).
* Forbid allocation callbacks from calling into the API in the
<<memory-allocation,memory allocation>> section (public issue
20).
* Add missing validity rules about size being greater than 0 and
offset being less than size of object. Fix
flink:VkMappedMemoryRange's misinterpretation of offset (public
issues 27, 31).
* Add validity rule disallowing overlapping source/destination
descriptors in flink:VkCopyDescriptorSet (public issue 32).
* Clarify that array and matrix stride has to be a multiple of the
base alignment of the array or matrix in the
<<interfaces-resources-layout,Offset and Stride Assignment>>
section (public issue 38).
* Correct parenthesis floor nesting error in equation for
<<textures-RGB-sexp,RGB to shared exponent conversion>>.
Clarify case of when exp' is forced to 0, avoiding log2(0) undefined
problem (public issue 40).
* Remove redundant statement from the code:FragDepth description in
the <<interfaces-builtin-variables,Built-In Variables>>
section (public issue 47).
* Define the clamping of the
<<textures-level-of-detail-operation,bias added to the scale
factor>> by linking to the slink:VkPhysicalDevice feature
pname:maxSamplerLodBias (public issue 64).
* Fix typo "optimal linear resources" and clarify the set of resources
<<features-limits-bufferImageGranularity,the
pname:bufferImageGranularity resource>> applies to (public issue
67).
* Replace 'descriptor accessed by a pipeline' language for
sname:VkDescriptorSetAllocateInfo with more precise phrasing about
binding a descriptor set before a command that invokes work using
that set (public issue 69).
* tstripadj.svg contained an Inkscape tag which caused Firefox and IE
11 to fail to render it, and was illegal SVG. Generating Plain SVG
from the Inkscape SVG source fixes this (public issue 70).
* Fix validity for sname:VkVertexInputBindingDescription and
sname:VkVertexInputAttributeDescription numbers (public issue 72).
Internal Issues:
* Clarify the meaning of
ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT in
elink:VkFormatFeatureFlagBits with respect to depth compare
(internal issue 107).
* Added a note explaining that ename:VK_QUEUE_TRANSFER_BIT may or may
not be reported for a queue family that already supports
ename:VK_QUEUE_GRAPHICS_BIT or ename:VK_QUEUE_COMPUTE_BIT as the
former is a strict subset of the latter ones (internal issue 116).
* Add validity language for sname:VkDescriptorSetAllocateInfo about
exceeding the descriptor pool capacity (internal issue 140).
* Add ename:VK_INCOMPLETE success code for
flink:vkEnumeratePhysicalDevices query (internal issue 163).
Other Commits:
* Add the VK_NV_glsl_shader extension definitions to the API.
* Update GL_KHR_vulkan_glsl with 1) origin_upper_left as default 2)
specialization array constant semantics.
* Corrected/updated Data Format Specification date.
2016-03-03 13:06:18 +00:00
|
|
|
* ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT signifies that the memory is the
|
|
|
|
most efficient type for device access (e.g. local device memory).
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
* 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.
|
|
|
|
|
Change log for March 4, 2016 Vulkan 1.0.5 spec update:
* Bump API patch number to 5 for this update.
Github Issues:
* Correctly describe slink:VkPhysicalDeviceProperties pname:deviceName
member as a string, not a pointer to a string. Also one typo fix for
"hetereogeneous" (public issue 4).
* Replace maynot: macro with may: not, and "may: or maynot:" with
"may:" (public issue 4).
* Clarify that redundantly setting the state of a fence or event has
no effect (public issue 4).
* Minor fixes to ref pages to track descriptions of memory bits that
changed in the core spec. Fix name of a member in the description of
sname:sname:VkPipelineMultisampleStateCreateInfo (public issues 8,
13).
* Remove redundant validity statement for
sname:VkGraphicsPipelineCreateInfo::pname:stageCount (public issue
14).
* Fix typos in chapters 7-9 (public issue 14).
* Clarify the example demonstrating the behavior of
code:OpMemoryBarrier in the
<<shaders-execution-memory-ordering,shader memory acces
ordering>> section (public issue 16).
* Specify that freeing mapped memory implicitly unmaps the memory in
the description of flink:vkFreeMemory (public issue 17).
* Forbid allocation callbacks from calling into the API in the
<<memory-allocation,memory allocation>> section (public issue
20).
* Add missing validity rules about size being greater than 0 and
offset being less than size of object. Fix
flink:VkMappedMemoryRange's misinterpretation of offset (public
issues 27, 31).
* Add validity rule disallowing overlapping source/destination
descriptors in flink:VkCopyDescriptorSet (public issue 32).
* Clarify that array and matrix stride has to be a multiple of the
base alignment of the array or matrix in the
<<interfaces-resources-layout,Offset and Stride Assignment>>
section (public issue 38).
* Correct parenthesis floor nesting error in equation for
<<textures-RGB-sexp,RGB to shared exponent conversion>>.
Clarify case of when exp' is forced to 0, avoiding log2(0) undefined
problem (public issue 40).
* Remove redundant statement from the code:FragDepth description in
the <<interfaces-builtin-variables,Built-In Variables>>
section (public issue 47).
* Define the clamping of the
<<textures-level-of-detail-operation,bias added to the scale
factor>> by linking to the slink:VkPhysicalDevice feature
pname:maxSamplerLodBias (public issue 64).
* Fix typo "optimal linear resources" and clarify the set of resources
<<features-limits-bufferImageGranularity,the
pname:bufferImageGranularity resource>> applies to (public issue
67).
* Replace 'descriptor accessed by a pipeline' language for
sname:VkDescriptorSetAllocateInfo with more precise phrasing about
binding a descriptor set before a command that invokes work using
that set (public issue 69).
* tstripadj.svg contained an Inkscape tag which caused Firefox and IE
11 to fail to render it, and was illegal SVG. Generating Plain SVG
from the Inkscape SVG source fixes this (public issue 70).
* Fix validity for sname:VkVertexInputBindingDescription and
sname:VkVertexInputAttributeDescription numbers (public issue 72).
Internal Issues:
* Clarify the meaning of
ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT in
elink:VkFormatFeatureFlagBits with respect to depth compare
(internal issue 107).
* Added a note explaining that ename:VK_QUEUE_TRANSFER_BIT may or may
not be reported for a queue family that already supports
ename:VK_QUEUE_GRAPHICS_BIT or ename:VK_QUEUE_COMPUTE_BIT as the
former is a strict subset of the latter ones (internal issue 116).
* Add validity language for sname:VkDescriptorSetAllocateInfo about
exceeding the descriptor pool capacity (internal issue 140).
* Add ename:VK_INCOMPLETE success code for
flink:vkEnumeratePhysicalDevices query (internal issue 163).
Other Commits:
* Add the VK_NV_glsl_shader extension definitions to the API.
* Update GL_KHR_vulkan_glsl with 1) origin_upper_left as default 2)
specialization array constant semantics.
* Corrected/updated Data Format Specification date.
2016-03-03 13:06:18 +00:00
|
|
|
* 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.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
Change log for March 4, 2016 Vulkan 1.0.5 spec update:
* Bump API patch number to 5 for this update.
Github Issues:
* Correctly describe slink:VkPhysicalDeviceProperties pname:deviceName
member as a string, not a pointer to a string. Also one typo fix for
"hetereogeneous" (public issue 4).
* Replace maynot: macro with may: not, and "may: or maynot:" with
"may:" (public issue 4).
* Clarify that redundantly setting the state of a fence or event has
no effect (public issue 4).
* Minor fixes to ref pages to track descriptions of memory bits that
changed in the core spec. Fix name of a member in the description of
sname:sname:VkPipelineMultisampleStateCreateInfo (public issues 8,
13).
* Remove redundant validity statement for
sname:VkGraphicsPipelineCreateInfo::pname:stageCount (public issue
14).
* Fix typos in chapters 7-9 (public issue 14).
* Clarify the example demonstrating the behavior of
code:OpMemoryBarrier in the
<<shaders-execution-memory-ordering,shader memory acces
ordering>> section (public issue 16).
* Specify that freeing mapped memory implicitly unmaps the memory in
the description of flink:vkFreeMemory (public issue 17).
* Forbid allocation callbacks from calling into the API in the
<<memory-allocation,memory allocation>> section (public issue
20).
* Add missing validity rules about size being greater than 0 and
offset being less than size of object. Fix
flink:VkMappedMemoryRange's misinterpretation of offset (public
issues 27, 31).
* Add validity rule disallowing overlapping source/destination
descriptors in flink:VkCopyDescriptorSet (public issue 32).
* Clarify that array and matrix stride has to be a multiple of the
base alignment of the array or matrix in the
<<interfaces-resources-layout,Offset and Stride Assignment>>
section (public issue 38).
* Correct parenthesis floor nesting error in equation for
<<textures-RGB-sexp,RGB to shared exponent conversion>>.
Clarify case of when exp' is forced to 0, avoiding log2(0) undefined
problem (public issue 40).
* Remove redundant statement from the code:FragDepth description in
the <<interfaces-builtin-variables,Built-In Variables>>
section (public issue 47).
* Define the clamping of the
<<textures-level-of-detail-operation,bias added to the scale
factor>> by linking to the slink:VkPhysicalDevice feature
pname:maxSamplerLodBias (public issue 64).
* Fix typo "optimal linear resources" and clarify the set of resources
<<features-limits-bufferImageGranularity,the
pname:bufferImageGranularity resource>> applies to (public issue
67).
* Replace 'descriptor accessed by a pipeline' language for
sname:VkDescriptorSetAllocateInfo with more precise phrasing about
binding a descriptor set before a command that invokes work using
that set (public issue 69).
* tstripadj.svg contained an Inkscape tag which caused Firefox and IE
11 to fail to render it, and was illegal SVG. Generating Plain SVG
from the Inkscape SVG source fixes this (public issue 70).
* Fix validity for sname:VkVertexInputBindingDescription and
sname:VkVertexInputAttributeDescription numbers (public issue 72).
Internal Issues:
* Clarify the meaning of
ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT in
elink:VkFormatFeatureFlagBits with respect to depth compare
(internal issue 107).
* Added a note explaining that ename:VK_QUEUE_TRANSFER_BIT may or may
not be reported for a queue family that already supports
ename:VK_QUEUE_GRAPHICS_BIT or ename:VK_QUEUE_COMPUTE_BIT as the
former is a strict subset of the latter ones (internal issue 116).
* Add validity language for sname:VkDescriptorSetAllocateInfo about
exceeding the descriptor pool capacity (internal issue 140).
* Add ename:VK_INCOMPLETE success code for
flink:vkEnumeratePhysicalDevices query (internal issue 163).
Other Commits:
* Add the VK_NV_glsl_shader extension definitions to the API.
* Update GL_KHR_vulkan_glsl with 1) origin_upper_left as default 2)
specialization array constant semantics.
* Corrected/updated Data Format Specification date.
2016-03-03 13:06:18 +00:00
|
|
|
* 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.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
* 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[]
|