VK_NV_dedicated_allocation extension

This commit is contained in:
Jeff Bolz 2016-07-08 04:38:55 +01:00
parent b7cac8fc28
commit 4f1e93d797
20 changed files with 394 additions and 10 deletions

View File

@ -0,0 +1,134 @@
== VK_NV_dedicated_allocation
*Name String*:: VK_NV_dedicated_allocation
*Extension Type*:: Device extension
*Registered Extension Number*:: 27
*Status*:: Draft.
*Last Modified Date*:: 31/05/2016
*Revision*:: 1
*IP Status*:: No known IP claims.
*Dependencies*::
- This extension is written against version 1.0. of the Vulkan API.
*Contributors*::
- Jeff Bolz, NVIDIA
*Contacts*::
- Jeff Bolz (jbolz 'at' nvidia.com)
This extension allows device memory to be allocated for a particular buffer or
image resource, which on some devices can significantly improve the
performance of that resource. Normal device memory allocations must support
memory aliasing and sparse binding, which could interfere with optimizations
like framebuffer compression or efficient page table usage. This is important
for render targets and very large resources, but need not (and probably should
not) be used for smaller resources that can benefit from suballocation.
This extension adds a few small structures to resource creation and memory
allocation: a new structure that flags whether am image/buffer will have a
dedicated allocation, and a structure indicating the image or buffer that an
allocation will be bound to.
=== New Object Types
None.
=== New Enum Constants
* Extending ename:VkStructureType:
** ename:VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV
** ename:VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV
** ename:VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV
=== New Enums
None.
=== New Structures
* slink:VkDedicatedAllocationImageCreateInfoNV
* slink:VkDedicatedAllocationBufferCreateInfoNV
* slink:VkDedicatedAllocationMemoryAllocateInfoNV
=== New Functions
None.
=== Issues
None.
=== Examples
[source,{basebackend@docbook:c++:cpp}]
----------------------------------------
// Create an image with
// VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation
// set to VK_TRUE
VkDedicatedAllocationImageCreateInfoNV dedicatedImageInfo =
{
VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV, // sType
NULL, // pNext
VK_TRUE, // dedicatedAllocation
};
VkImageCreateInfo imageCreateInfo =
{
VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, // sType
&dedicatedImageInfo // pNext
// Other members set as usual
};
VkImage image;
VkResult result = vkCreateImage(
device,
&imageCreateInfo,
NULL, // pAllocator
&image);
VkMemoryRequirements memoryRequirements;
vkGetImageMemoryRequirements(
device,
image,
&memoryRequirements);
// Allocate memory with VkDedicatedAllocationMemoryAllocateInfoNV::image
// pointing to the image we're allocating the memory for
VkDedicatedAllocationMemoryAllocateInfoNV dedicatedInfo =
{
VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV, // sType
NULL, // pNext
image, // image
VK_NULL_HANDLE, // buffer
};
VkMemoryAllocateInfo memoryAllocateInfo =
{
VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, // sType
&dedicatedInfo, // pNext
memoryRequirements.size, // allocationSize
FindMemoryTypeIndex(memoryRequirements.memoryTypeBits), // memoryTypeIndex
};
VkDeviceMemory memory;
vkAllocateMemory(
device,
&memoryAllocateInfo,
NULL, // pAllocator
&memory);
// Bind the image to the memory
vkBindImageMemory(
device,
image,
memory,
0);
----------------------------------------
=== Version History
* Revision 1, 2016-05-31 (Jeff Bolz)
- Internal revisions

View File

@ -571,6 +571,25 @@ include::../structs/VkMemoryAllocateInfo.txt[]
include::../validity/structs/VkMemoryAllocateInfo.txt[]
If the pname:pNext list includes a
sname:VkDedicatedAllocationMemoryAllocateInfoNV structure, then that
structure includes a handle of the sole buffer or image resource that the
memory can: be bound to.
The sname:VkDedicatedAllocationMemoryAllocateInfoNV structure is
defined as:
include::../structs/VkDedicatedAllocationMemoryAllocateInfoNV.txt[]
* pname:sType is the type of this structure.
* pname:pNext is `NULL` or a pointer to an extension-specific structure.
* pname:image is sname:VK_NULL_HANDLE or a handle of an image which this
memory will be bound to.
* pname:buffer is sname:VK_NULL_HANDLE or a handle of a buffer which this
memory will be bound to.
include::../validity/structs/VkDedicatedAllocationMemoryAllocateInfoNV.txt[]
Allocations returned by fname:vkAllocateMemory are guaranteed to meet any
alignment requirement by the implementation. For example, if an
implementation requires 128 byte alignment for images and 64 byte alignment

View File

@ -59,6 +59,23 @@ include::../structs/VkBufferCreateInfo.txt[]
include::../validity/structs/VkBufferCreateInfo.txt[]
If the pname:pNext list includes a
sname:VkDedicatedAllocationBufferCreateInfoNV structure, then that
structure includes an enable controlling whether the buffer will have a
dedicated memory allocation bound to it.
The sname:VkDedicatedAllocationBufferCreateInfoNV structure is defined
as:
include::../structs/VkDedicatedAllocationBufferCreateInfoNV.txt[]
* pname:sType is the type of this structure.
* pname:pNext is `NULL` or a pointer to an extension-specific structure.
* pname:dedicatedAllocation indicates whether the buffer will have a
dedicated allocation bound to it.
include::../validity/structs/VkDedicatedAllocationBufferCreateInfoNV.txt[]
Bits which may: be set in pname:usage are:
include::../enums/VkBufferUsageFlagBits.txt[]
@ -276,6 +293,30 @@ out in memory in row-major order, possibly with some padding on each row).
include::../validity/structs/VkImageCreateInfo.txt[]
If the pname:pNext list includes a
sname:VkDedicatedAllocationImageCreateInfoNV structure, then that
structure includes an enable controlling whether the image will have a
dedicated memory allocation bound to it.
The sname:VkDedicatedAllocationImageCreateInfoNV structure is defined
as:
include::../structs/VkDedicatedAllocationImageCreateInfoNV.txt[]
* pname:sType is the type of this structure.
* pname:pNext is `NULL` or a pointer to an extension-specific structure.
* pname:dedicatedAllocation indicates whether the image will have a
dedicated allocation bound to it.
include::../validity/structs/VkDedicatedAllocationImageCreateInfoNV.txt[]
[NOTE]
.Note
====
Using a dedicated allocation for color and depth/stencil attachments or other
large images may: improve performance on some devices.
====
Valid limits for the image pname:extent, pname:mipLevels, pname:arrayLayers
and pname:samples members are queried with the
flink:vkGetPhysicalDeviceImageFormatProperties command.

View File

@ -57,5 +57,8 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46,
VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47,
VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48,
VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000,
VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001,
VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002,
} VkStructureType;
------------------------------------------------------------------------------

View File

@ -0,0 +1,15 @@
// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry
ifndef::doctype-manpage[]
[[VkDedicatedAllocationBufferCreateInfoNV,VkDedicatedAllocationBufferCreateInfoNV]]
["source","{basebackend@docbook:c++:cpp}",title=""]
endif::doctype-manpage[]
ifdef::doctype-manpage[]
["source","{basebackend@docbook:c++:cpp}"]
endif::doctype-manpage[]
------------------------------------------------------------------------------
typedef struct VkDedicatedAllocationBufferCreateInfoNV {
VkStructureType sType;
const void* pNext;
VkBool32 dedicatedAllocation;
} VkDedicatedAllocationBufferCreateInfoNV;
------------------------------------------------------------------------------

View File

@ -0,0 +1,15 @@
// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry
ifndef::doctype-manpage[]
[[VkDedicatedAllocationImageCreateInfoNV,VkDedicatedAllocationImageCreateInfoNV]]
["source","{basebackend@docbook:c++:cpp}",title=""]
endif::doctype-manpage[]
ifdef::doctype-manpage[]
["source","{basebackend@docbook:c++:cpp}"]
endif::doctype-manpage[]
------------------------------------------------------------------------------
typedef struct VkDedicatedAllocationImageCreateInfoNV {
VkStructureType sType;
const void* pNext;
VkBool32 dedicatedAllocation;
} VkDedicatedAllocationImageCreateInfoNV;
------------------------------------------------------------------------------

View File

@ -0,0 +1,16 @@
// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry
ifndef::doctype-manpage[]
[[VkDedicatedAllocationMemoryAllocateInfoNV,VkDedicatedAllocationMemoryAllocateInfoNV]]
["source","{basebackend@docbook:c++:cpp}",title=""]
endif::doctype-manpage[]
ifdef::doctype-manpage[]
["source","{basebackend@docbook:c++:cpp}"]
endif::doctype-manpage[]
------------------------------------------------------------------------------
typedef struct VkDedicatedAllocationMemoryAllocateInfoNV {
VkStructureType sType;
const void* pNext;
VkImage image;
VkBuffer buffer;
} VkDedicatedAllocationMemoryAllocateInfoNV;
------------------------------------------------------------------------------

View File

@ -22,6 +22,8 @@ endif::doctype-manpage[]
* pname:memory must: have been allocated using one of the memory types allowed in the pname:memoryTypeBits member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetBufferMemoryRequirements with pname:buffer
* pname:memoryOffset must: be an integer multiple of the pname:alignment member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetBufferMemoryRequirements with pname:buffer
* The pname:size member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetBufferMemoryRequirements with pname:buffer must: be less than or equal to the size of pname:memory minus pname:memoryOffset
* If pname:buffer was created with sname:VkDedicatedAllocationBufferCreateInfoNV::pname:dedicatedAllocation equal to ename:VK_TRUE, pname:memory must: have been created with sname:VkDedicatedAllocationMemoryAllocateInfoNV::pname:buffer equal to pname:buffer and pname:memoryOffset must: be zero.
* If pname:buffer was not created with sname:VkDedicatedAllocationBufferCreateInfoNV::pname:dedicatedAllocation equal to ename:VK_TRUE, pname:memory must: not have been allocated dedicated for a specific buffer or image
ifndef::doctype-manpage[]
********************************************************************************
endif::doctype-manpage[]

View File

@ -19,6 +19,8 @@ endif::doctype-manpage[]
* pname:memory must: have been allocated using one of the memory types allowed in the pname:memoryTypeBits member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetImageMemoryRequirements with pname:image
* pname:memoryOffset must: be an integer multiple of the pname:alignment member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetImageMemoryRequirements with pname:image
* The pname:size member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetImageMemoryRequirements with pname:image must: be less than or equal to the size of pname:memory minus pname:memoryOffset
* If pname:image was created with sname:VkDedicatedAllocationImageCreateInfoNV::pname:dedicatedAllocation equal to ename:VK_TRUE, pname:memory must: have been created with sname:VkDedicatedAllocationMemoryAllocateInfoNV::pname:image equal to pname:image and pname:memoryOffset must: be zero.
* If pname:image was not created with sname:VkDedicatedAllocationImageCreateInfoNV::pname:dedicatedAllocation equal to ename:VK_TRUE, pname:memory must: not have been allocated dedicated for a specific buffer or image
ifndef::doctype-manpage[]
********************************************************************************
endif::doctype-manpage[]

View File

@ -8,7 +8,7 @@ Valid Usage
-----------
endif::doctype-manpage[]
* pname:sType must: be ename:VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
* pname:pNext must: be `NULL`
* pname:pNext must: be `NULL`, or a pointer to a valid instance of slink:VkDedicatedAllocationBufferCreateInfoNV
* pname:flags must: be a valid combination of elink:VkBufferCreateFlagBits values
* pname:usage must: be a valid combination of elink:VkBufferUsageFlagBits values
* pname:usage mustnot: be `0`

View File

@ -0,0 +1,16 @@
// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry
ifndef::doctype-manpage[]
.Valid Usage
********************************************************************************
endif::doctype-manpage[]
ifdef::doctype-manpage[]
Valid Usage
-----------
endif::doctype-manpage[]
* pname:sType must: be ename:VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV
* pname:pNext must: be `NULL`
* If pname:dedicatedAllocation is ename:VK_TRUE, sname:VkBufferCreateInfo::pname:flags mustnot: include ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT, ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, or ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT
ifndef::doctype-manpage[]
********************************************************************************
endif::doctype-manpage[]

View File

@ -0,0 +1,16 @@
// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry
ifndef::doctype-manpage[]
.Valid Usage
********************************************************************************
endif::doctype-manpage[]
ifdef::doctype-manpage[]
Valid Usage
-----------
endif::doctype-manpage[]
* pname:sType must: be ename:VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV
* pname:pNext must: be `NULL`
* If pname:dedicatedAllocation is ename:VK_TRUE, sname:VkImageCreateInfo::pname:flags mustnot: include ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT, ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT
ifndef::doctype-manpage[]
********************************************************************************
endif::doctype-manpage[]

View File

@ -0,0 +1,23 @@
// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry
ifndef::doctype-manpage[]
.Valid Usage
********************************************************************************
endif::doctype-manpage[]
ifdef::doctype-manpage[]
Valid Usage
-----------
endif::doctype-manpage[]
* pname:sType must: be ename:VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV
* pname:pNext must: be `NULL`
* If pname:image is not sname:VK_NULL_HANDLE, pname:image must: be a valid sname:VkImage handle
* If pname:buffer is not sname:VK_NULL_HANDLE, pname:buffer must: be a valid sname:VkBuffer handle
* Each of pname:image and pname:buffer that are valid handles must: have been created, allocated or retrieved from the same sname:VkDevice
* At least one of pname:image and pname:buffer must: be sname:VK_NULL_HANDLE
* If pname:image is not sname:VK_NULL_HANDLE, the image must: have been created with sname:VkDedicatedAllocationImageCreateInfoNV::pname:dedicatedAllocation equal to ename:VK_TRUE
* If pname:buffer is not sname:VK_NULL_HANDLE, the buffer must: have been created with sname:VkDedicatedAllocationBufferCreateInfoNV::pname:dedicatedAllocation equal to ename:VK_TRUE
* If pname:image is not sname:VK_NULL_HANDLE, sname:VkMemoryAllocateInfo::pname:allocationSize must: equal the sname:VkMemoryRequirements::pname:size of the image
* If pname:buffer is not sname:VK_NULL_HANDLE, sname:VkMemoryAllocateInfo::pname:allocationSize must: equal the sname:VkMemoryRequirements::pname:size of the buffer
ifndef::doctype-manpage[]
********************************************************************************
endif::doctype-manpage[]

View File

@ -8,7 +8,7 @@ Valid Usage
-----------
endif::doctype-manpage[]
* pname:sType must: be ename:VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO
* pname:pNext must: be `NULL`
* pname:pNext must: be `NULL`, or a pointer to a valid instance of slink:VkDedicatedAllocationImageCreateInfoNV
* pname:flags must: be a valid combination of elink:VkImageCreateFlagBits values
* pname:imageType must: be a valid elink:VkImageType value
* pname:format must: be a valid elink:VkFormat value

View File

@ -8,7 +8,7 @@ Valid Usage
-----------
endif::doctype-manpage[]
* pname:sType must: be ename:VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO
* pname:pNext must: be `NULL`
* pname:pNext must: be `NULL`, or a pointer to a valid instance of slink:VkDedicatedAllocationMemoryAllocateInfoNV
* 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
* pname:allocationSize must: be greater than `0`
ifndef::doctype-manpage[]

View File

@ -117,7 +117,10 @@ consts['VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD']
consts['VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT'] = 'VkStructureType'
consts['VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT'] = 'VkStructureType'
consts['VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT'] = 'VkStructureType'
enums['VkStructureType'] = ['VK_STRUCTURE_TYPE_APPLICATION_INFO', 'VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO', 'VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO', 'VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO', 'VK_STRUCTURE_TYPE_SUBMIT_INFO', 'VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO', 'VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE', 'VK_STRUCTURE_TYPE_BIND_SPARSE_INFO', 'VK_STRUCTURE_TYPE_FENCE_CREATE_INFO', 'VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO', 'VK_STRUCTURE_TYPE_EVENT_CREATE_INFO', 'VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO', 'VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO', 'VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO', 'VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO', 'VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO', 'VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO', 'VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO', 'VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO', 'VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO', 'VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO', 'VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO', 'VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET', 'VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET', 'VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO', 'VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO', 'VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO', 'VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO', 'VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO', 'VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO', 'VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO', 'VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER', 'VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER', 'VK_STRUCTURE_TYPE_MEMORY_BARRIER', 'VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO', 'VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO', 'VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_PRESENT_INFO_KHR', 'VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR', 'VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT', 'VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD', 'VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT', 'VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT', 'VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT']
consts['VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV'] = 'VkStructureType'
consts['VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV'] = 'VkStructureType'
consts['VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV'] = 'VkStructureType'
enums['VkStructureType'] = ['VK_STRUCTURE_TYPE_APPLICATION_INFO', 'VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO', 'VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO', 'VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO', 'VK_STRUCTURE_TYPE_SUBMIT_INFO', 'VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO', 'VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE', 'VK_STRUCTURE_TYPE_BIND_SPARSE_INFO', 'VK_STRUCTURE_TYPE_FENCE_CREATE_INFO', 'VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO', 'VK_STRUCTURE_TYPE_EVENT_CREATE_INFO', 'VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO', 'VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO', 'VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO', 'VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO', 'VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO', 'VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO', 'VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO', 'VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO', 'VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO', 'VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO', 'VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO', 'VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET', 'VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET', 'VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO', 'VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO', 'VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO', 'VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO', 'VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO', 'VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO', 'VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO', 'VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER', 'VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER', 'VK_STRUCTURE_TYPE_MEMORY_BARRIER', 'VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO', 'VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO', 'VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_PRESENT_INFO_KHR', 'VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR', 'VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT', 'VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD', 'VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT', 'VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT', 'VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT', 'VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV', 'VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV', 'VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV']
# Unprocessed type: void
# Unprocessed type: uint32_t
# Unprocessed type: VkFlags category: basetype
@ -1035,3 +1038,8 @@ structs['VkDrawIndexedIndirectCommand'] = ['indexCount', 'instanceCount', 'firs
structs['VkDrawIndirectCommand'] = ['vertexCount', 'instanceCount', 'firstVertex', 'firstInstance']
consts['VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION'] = None
consts['VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME'] = None
structs['VkDedicatedAllocationImageCreateInfoNV'] = ['sType', 'pNext', 'dedicatedAllocation']
structs['VkDedicatedAllocationBufferCreateInfoNV'] = ['sType', 'pNext', 'dedicatedAllocation']
structs['VkDedicatedAllocationMemoryAllocateInfoNV'] = ['sType', 'pNext', 'image', 'buffer']
consts['VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION'] = None
consts['VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME'] = None

View File

@ -107,6 +107,8 @@ include::appendices/extensions.txt[]
include::appendices/VK_KHR_sampler_mirror_clamp_to_edge.txt[]
include::appendices/VK_NV_dedicated_allocation.txt[]
include::appendices/invariance.txt[]
include::appendices/glossary.txt[]

View File

@ -190,6 +190,7 @@ buildList = [
addExtensions =
makeREstring([
'VK_KHR_sampler_mirror_clamp_to_edge',
'VK_NV_dedicated_allocation',
]),
removeExtensions =
makeREstring([
@ -214,6 +215,7 @@ buildList = [
addExtensions =
makeREstring([
'VK_KHR_sampler_mirror_clamp_to_edge',
'VK_NV_dedicated_allocation',
]),
removeExtensions =
makeREstring([
@ -232,6 +234,7 @@ buildList = [
addExtensions =
makeREstring([
'VK_KHR_sampler_mirror_clamp_to_edge',
'VK_NV_dedicated_allocation',
]),
removeExtensions =
makeREstring([
@ -251,6 +254,7 @@ buildList = [
addExtensions =
makeREstring([
'VK_KHR_sampler_mirror_clamp_to_edge',
'VK_NV_dedicated_allocation',
]),
removeExtensions =
makeREstring([

View File

@ -534,7 +534,7 @@ maintained in the master branch of the Khronos Vulkan Github project.
</type>
<type category="struct" name="VkMemoryAllocateInfo">
<member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO -->
<member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
<member validextensionstructs="VkDedicatedAllocationMemoryAllocateInfoNV">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
<member><type>VkDeviceSize</type> <name>allocationSize</name></member> <!-- Size of memory allocation -->
<member><type>uint32_t</type> <name>memoryTypeIndex</name></member> <!-- Index of the of the memory type to allocate from -->
<validity>
@ -659,7 +659,7 @@ maintained in the master branch of the Khronos Vulkan Github project.
</type>
<type category="struct" name="VkBufferCreateInfo">
<member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO -->
<member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. -->
<member validextensionstructs="VkDedicatedAllocationBufferCreateInfoNV">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. -->
<member optional="true"><type>VkBufferCreateFlags</type> <name>flags</name></member> <!-- Buffer creation flags -->
<member><type>VkDeviceSize</type> <name>size</name></member> <!-- Specified in bytes -->
<member><type>VkBufferUsageFlags</type> <name>usage</name></member> <!-- Buffer usage flags -->
@ -783,7 +783,7 @@ maintained in the master branch of the Khronos Vulkan Github project.
</type>
<type category="struct" name="VkImageCreateInfo">
<member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO -->
<member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. -->
<member validextensionstructs="VkDedicatedAllocationImageCreateInfoNV">const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure. -->
<member optional="true"><type>VkImageCreateFlags</type> <name>flags</name></member> <!-- Image creation flags -->
<member><type>VkImageType</type> <name>imageType</name></member>
<member><type>VkFormat</type> <name>format</name></member>
@ -2157,6 +2157,35 @@ maintained in the master branch of the Khronos Vulkan Github project.
<member len="null-terminated">const <type>char</type>* <name>pMarkerName</name></member> <!-- Name of the debug marker -->
<member optional="true"><type>float</type> <name>color</name>[4]</member> <!-- Optional color for debug marker -->
</type>
<type category="struct" name="VkDedicatedAllocationImageCreateInfoNV">
<member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV -->
<member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
<member><type>VkBool32</type> <name>dedicatedAllocation</name></member> <!-- Whether this image uses a dedicated allocation -->
<validity>
<usage>If pname:dedicatedAllocation is ename:VK_TRUE, sname:VkImageCreateInfo::pname:flags mustnot: include ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT, ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, or ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT</usage>
</validity>
</type>
<type category="struct" name="VkDedicatedAllocationBufferCreateInfoNV">
<member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV -->
<member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
<member><type>VkBool32</type> <name>dedicatedAllocation</name></member> <!-- Whether this buffer uses a dedicated allocation -->
<validity>
<usage>If pname:dedicatedAllocation is ename:VK_TRUE, sname:VkBufferCreateInfo::pname:flags mustnot: include ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT, ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, or ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT</usage>
</validity>
</type>
<type category="struct" name="VkDedicatedAllocationMemoryAllocateInfoNV">
<member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV -->
<member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
<member optional="true"><type>VkImage</type> <name>image</name></member> <!-- Image that this allocation will be bound to -->
<member optional="true"><type>VkBuffer</type> <name>buffer</name></member> <!-- Buffer that this allocation will be bound to -->
<validity>
<usage>At least one of pname:image and pname:buffer must: be sname:VK_NULL_HANDLE</usage>
<usage>If pname:image is not sname:VK_NULL_HANDLE, the image must: have been created with sname:VkDedicatedAllocationImageCreateInfoNV::pname:dedicatedAllocation equal to ename:VK_TRUE</usage>
<usage>If pname:buffer is not sname:VK_NULL_HANDLE, the buffer must: have been created with sname:VkDedicatedAllocationBufferCreateInfoNV::pname:dedicatedAllocation equal to ename:VK_TRUE</usage>
<usage>If pname:image is not sname:VK_NULL_HANDLE, sname:VkMemoryAllocateInfo::pname:allocationSize must: equal the sname:VkMemoryRequirements::pname:size of the image</usage>
<usage>If pname:buffer is not sname:VK_NULL_HANDLE, sname:VkMemoryAllocateInfo::pname:allocationSize must: equal the sname:VkMemoryRequirements::pname:size of the buffer</usage>
</validity>
</type>
</types>
<!-- SECTION: Vulkan enumerant (token) definitions. -->
@ -5319,10 +5348,21 @@ maintained in the master branch of the Khronos Vulkan Github project.
<enum value="&quot;VK_AMD_gcn_shader&quot;" name="VK_AMD_GCN_SHADER_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_NV_extension_27" number="27" author="NVIDIA" contact="Jeff Bolz @jbolz" supported="disabled">
<extension name="VK_NV_dedicated_allocation" number="27" author="NVIDIA" contact="Jeff Bolz @jbolz" supported="vulkan">
<require>
<enum value="0" name="VK_NV_EXTENSION_27_SPEC_VERSION"/>
<enum value="&quot;VK_NV_extension_27&quot;" name="VK_NV_EXTENSION_27_EXTENSION_NAME"/>
<enum value="1" name="VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION"/>
<enum value="&quot;VK_NV_dedicated_allocation&quot;" name="VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV"/>
<type name="VkDedicatedAllocationImageCreateInfoNV"/>
<type name="VkDedicatedAllocationBufferCreateInfoNV"/>
<type name="VkDedicatedAllocationMemoryAllocateInfoNV"/>
<usage command="vkBindBufferMemory">If pname:buffer was created with sname:VkDedicatedAllocationBufferCreateInfoNV::pname:dedicatedAllocation equal to ename:VK_TRUE, pname:memory must: have been created with sname:VkDedicatedAllocationMemoryAllocateInfoNV::pname:buffer equal to pname:buffer and pname:memoryOffset must: be zero.</usage>
<usage command="vkBindBufferMemory">If pname:buffer was not created with sname:VkDedicatedAllocationBufferCreateInfoNV::pname:dedicatedAllocation equal to ename:VK_TRUE, pname:memory must: not have been allocated dedicated for a specific buffer or image</usage>
<usage command="vkBindImageMemory">If pname:image was created with sname:VkDedicatedAllocationImageCreateInfoNV::pname:dedicatedAllocation equal to ename:VK_TRUE, pname:memory must: have been created with sname:VkDedicatedAllocationMemoryAllocateInfoNV::pname:image equal to pname:image and pname:memoryOffset must: be zero.</usage>
<usage command="vkBindImageMemory">If pname:image was not created with sname:VkDedicatedAllocationImageCreateInfoNV::pname:dedicatedAllocation equal to ename:VK_TRUE, pname:memory must: not have been allocated dedicated for a specific buffer or image</usage>
</require>
</extension>
<extension name="VK_EXT_extension_28" number="28" author="NVIDIA" contact="Piers Daniell @pdaniell" supported="disabled">

View File

@ -214,6 +214,9 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002,
VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000,
VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001,
VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002,
VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO,
VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO,
VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1),
@ -3927,6 +3930,31 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerInsertEXT(
#define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader"
#define VK_NV_dedicated_allocation 1
#define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1
#define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation"
typedef struct VkDedicatedAllocationImageCreateInfoNV {
VkStructureType sType;
const void* pNext;
VkBool32 dedicatedAllocation;
} VkDedicatedAllocationImageCreateInfoNV;
typedef struct VkDedicatedAllocationBufferCreateInfoNV {
VkStructureType sType;
const void* pNext;
VkBool32 dedicatedAllocation;
} VkDedicatedAllocationBufferCreateInfoNV;
typedef struct VkDedicatedAllocationMemoryAllocateInfoNV {
VkStructureType sType;
const void* pNext;
VkImage image;
VkBuffer buffer;
} VkDedicatedAllocationMemoryAllocateInfoNV;
#ifdef __cplusplus
}
#endif