diff options
authorPetr Kraus <>2017-08-23 18:05:23 +0200
committerPetr Kraus <>2017-10-24 14:33:22 +0200
commitcb5abc90f283e0361ac12f6bca2279d3e15dfc3b (patch)
parent2608657344890ce7473093c00f905d91212b9f28 (diff)
Device memory chapter fixes
1) Make explicit there is a <=> relationship between `DEVICE_LOCAL` heap and `DEVICE_LOCAL` memory type 2) Make >4GB runtime error report mandatory. Otherwise it basically says "do not pass >= 4GB, because possible undefined behavior". 3) Removed `VUID-vkAllocateMemory-device-00636`. Behavior is deterministic returning `VK_ERROR_TOO_MANY_OBJECTS` 4) Moved `allocationSize` VU (depends on non-local state). 5) Changed `allocationSize`. Not sure what the original means, so improvized a new one saying alloc size must be <= the whole size of the heap. 6) Added VU restricting `memoryTypeIndex` to only the memory types of the device.
1 files changed, 11 insertions, 11 deletions
diff --git a/doc/specs/vulkan/chapters/memory.txt b/doc/specs/vulkan/chapters/memory.txt
index d1aa00a..6119e58 100644
--- a/doc/specs/vulkan/chapters/memory.txt
+++ b/doc/specs/vulkan/chapters/memory.txt
@@ -708,8 +708,8 @@ include::../api/enums/VkMemoryPropertyFlagBits.txt[]
* ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT bit indicates that memory
allocated with this type is the most efficient for device access.
- This property will only be set for memory types belonging to heaps with
+ This property will be set if and only if the memory type belongs to a
+ heap with the ename:VK_MEMORY_HEAP_DEVICE_LOCAL_BIT set.
* ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT bit indicates that memory
allocated with this type can: be mapped for host access using
@@ -783,14 +783,18 @@ Some platforms may: have a limit on the maximum size of a single allocation.
For example, certain systems may: fail to create allocations with a size
greater than or equal to 4GB.
Such a limit is implementation-dependent, and if such a failure occurs then
-the error ename:VK_ERROR_OUT_OF_DEVICE_MEMORY should: be returned.
+the error ename:VK_ERROR_OUT_OF_DEVICE_MEMORY must: be returned.
.Valid Usage
- * [[VUID-vkAllocateMemory-device-00636]]
- The number of currently valid memory objects, allocated from
- pname:device, must: be less than
- sname:VkPhysicalDeviceLimits::pname:maxMemoryAllocationCount
+ * pname:pAllocateInfo::pname:allocationSize must: be less than or equal to
+ sname:VkPhysicalDeviceMemoryProperties::pname:memoryHeaps[pname:pAllocateInfo::pname:memoryTypeIndex].pname:size
+ as returned by flink:vkGetPhysicalDeviceMemoryProperties for physical
+ device parent of pname:device
+ * pname:pAllocateInfo::pname:memoryTypeIndex must: be less than
+ sname:VkPhysicalDeviceMemoryProperties::pname:memoryTypeCount
+ as returned by flink:vkGetPhysicalDeviceMemoryProperties for physical
+ device parent of pname:device
@@ -859,10 +863,6 @@ endif::VK_KHR_external_memory_win32,VK_KHR_external_memory_fd[]
.Valid Usage
- * [[VUID-VkMemoryAllocateInfo-allocationSize-00637]]
- pname:allocationSize must: be less than or equal to the amount of memory
- available to the sname:VkMemoryHeap specified by pname:memoryTypeIndex
- and the calling command's sname:VkDevice
* [[VUID-VkMemoryAllocateInfo-allocationSize-00638]]
pname:allocationSize must: be greater than `0`