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.
This commit is contained in:
Petr Kraus 2017-08-23 18:05:23 +02:00
parent 2608657344
commit cb5abc90f2
1 changed files with 11 additions and 11 deletions

View File

@ -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
the ename:VK_MEMORY_HEAP_DEVICE_LOCAL_BIT set.
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
flink:vkMapMemory.
@ -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
****
include::../validity/protos/vkAllocateMemory.txt[]
@ -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`
ifdef::VK_KHR_external_memory[]