diff --git a/ChangeLog.txt b/ChangeLog.txt index bd02575f..10f5cd70 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -8,6 +8,60 @@ public pull requests that have been accepted. ----------------------------------------------------- +Change log for November 27, 2017 Vulkan 1.0.66 spec update: + + * Bump API patch number and header version number to 66 for this update. + +Github Issues: + + * Clarified how and when ename:VK_ERROR_TOO_MANY_OBJECTS is generated in + flink:vkAllocate Memory, and remove incorrect valid usage statement + about exceeding the API limit (public issue 356). + * Minor clarification of the description of + flink:vkUpdateDescriptorSetWithTemplateKHR::pname:descriptorUpdateTemplate + (public issue 564). + * Minor fixes for flink:vkCmdSetViewportWScalingNV (public pull request + 588). + * Fix random name markup issues (public pull request 603). + * Fix code:BuiltIn decoration typo in the <> section (public pull request 606). + * Fix synchronization language following the definition of + flink:vkAcquireNextImageKHR (public issue 607). + * Restore descriptions of several commands and structures missing from the + generated spec due to a mistyped asciidoctor conditional (public issue + 612). + * Fix 1.0.41 changelog to refer to public issues 403/404 (public issue + 618). + +Internal Issues: + + * Refactor valid usage statements with internal conditionals in + `copies.txt`, `pipelines.txt`, `renderpass.txt`, and `resources.txt` so + each branch of the conditional appears as a standalone statement which + can contain a separate VUID. This should have no impact on the generated + specs, but is necessary given the present state of the VU extractor and + the validation layer code that consumes them (internal issue 1043). + * Fix VkQueueGlobalPriorityEXT enum values missing _EXT suffix (internal + issue 1045). + * Clarified initial ownership of resources bound to shared memory objects, + (internal issue 1068). + * Fix duplicated valid usage ID tag for flink:vkCmdCopyImage, and make the + required layouts include ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIONAL in + both cases (internal issue 1084). + +Other Issues: + + * Remove the noise functions from GLSL for SPIR-V for Vulkan in the + `GL_KHR_vulkan_glsl.txt` extension. + +New Extensions: + + * `VK_EXT_external_memory_host` + * `VK_EXT_external_memory_dma_buf` + * `VK_EXT_queue_family_foreign` + +----------------------------------------------------- + Change log for October 27, 2017 Vulkan 1.0.65 spec update: * Bump API patch number and header version number to 65 for this update. @@ -1168,7 +1222,7 @@ Github Issues: * Made all uses of `NULL` vs. code:VK_NULL_HANDLE consistent (public issue 276). * Clarify render pass compatibility in different usage scenarios (public - issues 303 and 304). + issues 403 and 404). * Add valid usage statements to slink:VkFramebufferCreateInfo requiring that the width, height, and number of layers of the framebuffer all be nonzero (public issue 432). diff --git a/doc/specs/misc/GL_KHR_vulkan_glsl.txt b/doc/specs/misc/GL_KHR_vulkan_glsl.txt index 6e5312a2..35b8f5cc 100644 --- a/doc/specs/misc/GL_KHR_vulkan_glsl.txt +++ b/doc/specs/misc/GL_KHR_vulkan_glsl.txt @@ -33,8 +33,8 @@ Status Version - Last Modified Date: 07-Jul-2017 - Revision: 42 + Last Modified Date: 25-Oct-2017 + Revision: 43 Number @@ -66,6 +66,7 @@ Overview * subroutines * shared and packed block layouts * the already deprecated texturing functions (e.g., texture2D()) + * the already deprecated noise functions (e.g., noise1()) * compatibility-mode-only features * gl_DepthRangeParameters and gl_NumSamples * gl_VertexID and gl_InstanceID @@ -1245,6 +1246,8 @@ Changes to Chapter 8 of the OpenGL Shading Language Specification Remove section 8.10 Atomic-Counter Functions + Remove section 8.14 Noise Functions + Add a section "8.X Subpass Functions @@ -1401,6 +1404,7 @@ Revision History Rev. Date Author Changes ---- ----------- ------- -------------------------------------------- + 43 25-Oct-2017 JohnK remove the already deprecated noise functions 42 07-Jul-2017 JohnK arrays of buffers consume only one binding 41 05-Jul-2017 JohnK allow std430 on push_constant declarations 40 21-May-2017 JohnK Require in/out explicit locations diff --git a/doc/specs/vulkan/Makefile b/doc/specs/vulkan/Makefile index b53abcbe..b83aa497 100644 --- a/doc/specs/vulkan/Makefile +++ b/doc/specs/vulkan/Makefile @@ -92,7 +92,7 @@ VERBOSE = # $(EXTENSIONS)) # ADOCOPTS options for asciidoc->HTML5 output NOTEOPTS = -a editing-notes -a implementation-guide -SPECREVISION = 1.0.65 +SPECREVISION = 1.0.66 # Spell out ISO 8601 format as not all date commands support --rfc-3339 SPECDATE = $(shell echo `date -u "+%Y-%m-%d %TZ"`) diff --git a/doc/specs/vulkan/appendices/VK_AMD_shader_fragment_mask.txt b/doc/specs/vulkan/appendices/VK_AMD_shader_fragment_mask.txt index e2148a81..6c5205af 100644 --- a/doc/specs/vulkan/appendices/VK_AMD_shader_fragment_mask.txt +++ b/doc/specs/vulkan/appendices/VK_AMD_shader_fragment_mask.txt @@ -27,7 +27,7 @@ color sample 0 will be in bits 0-3 of the fragment mask, for color sample 7 the index will be in bits 28-31. The color fragment for a particular color sample may then be fetched with -the correspoding fragment mask value using the code:fragmentFetchAMD shader +the corresponding fragment mask value using the code:fragmentFetchAMD shader function. === New Object Types diff --git a/doc/specs/vulkan/appendices/VK_EXT_external_memory_dma_buf.txt b/doc/specs/vulkan/appendices/VK_EXT_external_memory_dma_buf.txt new file mode 100644 index 00000000..03eb10ca --- /dev/null +++ b/doc/specs/vulkan/appendices/VK_EXT_external_memory_dma_buf.txt @@ -0,0 +1,60 @@ +include::meta/VK_EXT_external_memory_dma_buf.txt[] + +*Last Modified Date*:: + 2017-10-10 +*IP Status*:: + No known IP claims. +*Contributors*:: + - Chad Versace, Google + - James Jones, NVIDIA + - Jason Ekstrand, Intel + +A dma_buf is a type of file descriptor, defined by the Linux kernel, that +allows sharing memory across kernel device drivers and across processes. +This extension enables applications to import a dma_buf as +slink:VkDeviceMemory; to export slink:VkDeviceMemory as a dma_buf; and to +create slink:VkBuffer objects that can: be bound to that memory. + +=== New Enum Constants + + * Extending elink:VkExternalMemoryHandleTypeFlagBitsKHR: + ** ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT + +=== Issues + +1. + How does the application, when creating a slink:VkImage that it intends + to bind to dma_buf slink:VkDeviceMemory that contains an externally + produced image, specify the memory layout (such as row pitch and DRM + format modifier) of the slink:VkImage? In other words, how does the + application achieve behavior comparable to that provided by + https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import.txt[EGL_EXT_image_dma_buf_import] + and + https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt[EGL_EXT_image_dma_buf_import_modifiers]? ++ +-- +*RESOLVED*. +Features comparable to those in +https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import.txt[EGL_EXT_image_dma_buf_import] +and +https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt[EGL_EXT_image_dma_buf_import_modifiers] +will be provided by an extension layered atop this one. +-- + +2. + Without the ability to specify the memory layout of external dma_buf + images, how is this extension useful? ++ +-- +*RESOLVED*. +This extension provides exactly one new feature: the ability to +import/export between dma_bufs and slink:VkDeviceMemory. +This feature, together with features provided by +<>, is sufficient to bind a slink:VkBuffer to +dma_buf. +-- + +=== Version History + + * Revision 1, 2017-10-10 (Chad Versace) + - Squashed internal revisions diff --git a/doc/specs/vulkan/appendices/VK_EXT_external_memory_host.txt b/doc/specs/vulkan/appendices/VK_EXT_external_memory_host.txt new file mode 100644 index 00000000..e1f8a18b --- /dev/null +++ b/doc/specs/vulkan/appendices/VK_EXT_external_memory_host.txt @@ -0,0 +1,110 @@ +include::meta/VK_EXT_external_memory_host.txt[] + +*Last Modified Date*:: + 2017-11-10 +*IP Status*:: + No known IP claims. +*Contributors*:: + - Jaakko Konttinen, AMD + - David Mao, AMD + - Daniel Rakos, AMD + - Tobias Hector, Imagination Technologies + - Jason Ekstrand, Intel + - James Jones, NVIDIA + +This extension enables an application to import host allocations and host +mapped foreign device memory to Vulkan memory objects. + +=== New Object Types + +None. + +=== New Enum Constants + + * Extending elink:VkStructureType: + ** ename:VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT + ** ename:VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT + ** ename:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT + + * Extending elink:VkExternalMemoryHandleTypeFlagBitsKHR: + ** ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT + ** ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT + +=== New Enums + +None. + +=== New Structs + + * slink:VkImportMemoryHostPointerInfoEXT + * slink:VkMemoryHostPointerPropertiesEXT + * slink:VkPhysicalDeviceExternalMemoryHostPropertiesEXT + +=== New Functions + + * flink:vkGetMemoryHostPointerPropertiesEXT + +=== Issues + +1) What memory type has to be used to import host pointers? + +RESOLVED: Depends on the implementation. +Applications have to use the new flink:vkGetMemoryHostPointerPropertiesEXT +command to query the supported memory types for a particular host pointer. +The reported memory types may include memory types that come from a memory +heap that is otherwise not usable for regular memory object allocation and +thus such a heap's size may be zero. + +2) Can the application still access the contents of the host allocation +after importing? + +RESOLVED: Yes. +However, usual synchronization requirements apply. + +3) Can the application free the host allocation? + +RESOLVED: No, it violates valid usage conditions. +Using the memory object imported from a host allocation that's already freed +thus results in undefined behavior. + +4) Is flink:vkMapMemory expected to return the same host address which was +specified when importing it to the memory object? + +RESOLVED: No. +Implementations are allowed to return the same address but it's not +required. +Some implementations might return a different virtual mapping of the +allocation, although the same physical pages will be used. + +5) Is there any limitation on the alignment of the host pointer and/or size? + +RESOLVED: Yes. +Both the address and the size have to be an integer multiple of +pname:minImportedHostPointerAlignment. +In addition, some platforms and foreign devices may have additional +restrictions. + +6) Can the same host allocation be imported multiple times into a given +physical device? + +RESOLVED: No, at least not guaranteed by this extension. +Some platforms do not allow locking the same physical pages for device +access multiple times, so attempting to do it may result in undefined +behavior. + +7) Does this extension support exporting the new handle type? + +RESOLVED: No. + +8) Should we include the possibility to import host mapped foreign device +memory using this API? + +RESOLVED: Yes, through a separate handle type. +Implementations are still allowed to support only one of the handle types +introduced by this extension by not returning import support for a +particular handle type as returned in slink:VkExternalMemoryPropertiesKHR. + +=== Version History + + * Revision 1, 2017-11-10 (Daniel Rakos) + - Internal revisions diff --git a/doc/specs/vulkan/appendices/VK_EXT_global_priority.txt b/doc/specs/vulkan/appendices/VK_EXT_global_priority.txt index 3140bb06..aa80fc64 100644 --- a/doc/specs/vulkan/appendices/VK_EXT_global_priority.txt +++ b/doc/specs/vulkan/appendices/VK_EXT_global_priority.txt @@ -15,7 +15,7 @@ In some cases it may be useful to extend this concept to a system-wide scope. This extension provides a mechanism for caller's to set their system-wide priority. -The default queue priority is ename:VK_QUEUE_GLOBAL_PRIORITY_MEDIUM. +The default queue priority is ename:VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT. The driver implementation will attempt to skew hardware resource allocation in favour of the higher-priority task. @@ -29,8 +29,8 @@ per-process queue priority Abuse of this feature may result in starving the rest of the system from hardware resources. Therefore, the driver implementation may deny requests to acquire a priority -above the default priority (ename:VK_QUEUE_GLOBAL_PRIORITY_MEDIUM) if the -caller does not have sufficient privileges. +above the default priority (ename:VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT) if +the caller does not have sufficient privileges. In this scenario ename:VK_ERROR_NOT_PERMITTED_EXT is returned. The driver implementation may fail the queue allocation request if resources @@ -68,5 +68,8 @@ None. === Version History + * Revision 2, 2017-11-03 (Andres Rodriguez) + - Fixed VkQueueGlobalPriorityEXT missing _EXT suffix + * Revision 1, 2017-10-06 (Andres Rodriguez) - First version. diff --git a/doc/specs/vulkan/appendices/VK_EXT_queue_family_foreign.txt b/doc/specs/vulkan/appendices/VK_EXT_queue_family_foreign.txt new file mode 100644 index 00000000..d86efdac --- /dev/null +++ b/doc/specs/vulkan/appendices/VK_EXT_queue_family_foreign.txt @@ -0,0 +1,43 @@ +include::meta/VK_EXT_queue_family_foreign.txt[] + +*Last Modified Date*:: + 2017-11-01 +*IP Status*:: + No known IP claims. +*Contributors*:: + - Chad Versace, Google + - James Jones, NVIDIA + - Jason Ekstrand, Intel + - Jesse Hall, Google + - Daniel Rakos, AMD + - Ray Smith, ARM + +This extension defines a special queue family, +ename:VK_QUEUE_FAMILY_FOREIGN_EXT, which can be used to transfer ownership +of resources backed by external memory to foreign, external queues. +This is similar to ename:VK_QUEUE_FAMILY_EXTERNAL_KHR, defined in +<>. +The key differences between the two are: + + * The queues represented by ename:VK_QUEUE_FAMILY_EXTERNAL_KHR must share + the same physical device and the same driver version as the current + slink:VkInstance. + ename:VK_QUEUE_FAMILY_FOREIGN_EXT has no such restrictions. + It can represent devices and drivers from other vendors, and can even + represent non-Vulkan-capable devices. + * All resources backed by external memory support + ename:VK_QUEUE_FAMILY_EXTERNAL_KHR. + Support for ename:VK_QUEUE_FAMILY_FOREIGN_EXT is more restrictive. + * Applications should expect transitions to/from + ename:VK_QUEUE_FAMILY_FOREIGN_EXT to be more expensive than transitions + to/from ename:VK_QUEUE_FAMILY_EXTERNAL_KHR. + +=== New Enum Constants + + * Special constants: + ** ename:VK_QUEUE_FAMILY_FOREIGN_EXT + +=== Version History + + * Revision 1, 2017-11-01 (Chad Versace) + - Squashed internal revisions diff --git a/doc/specs/vulkan/appendices/VK_KHR_maintenance1.txt b/doc/specs/vulkan/appendices/VK_KHR_maintenance1.txt index 4111d9f5..8b365e2d 100644 --- a/doc/specs/vulkan/appendices/VK_KHR_maintenance1.txt +++ b/doc/specs/vulkan/appendices/VK_KHR_maintenance1.txt @@ -34,8 +34,8 @@ The new features are as follows: This extension allows copying from layers of a 2D array image to slices of a 3D image and vice versa. * Allow negative height to be specified in the - slink:VkViewport::pname:height field to perform y-inversion of - the clip-space to framebuffer-space transform. + slink:VkViewport::pname:height field to perform y-inversion of the + clip-space to framebuffer-space transform. This allows apps to avoid having to use `gl_Position.y = -gl_Position.y` in shaders also targeting other APIs. * Allow implementations to express support for doing just transfers and diff --git a/doc/specs/vulkan/appendices/VK_KHR_shader_draw_parameters.txt b/doc/specs/vulkan/appendices/VK_KHR_shader_draw_parameters.txt index 538c1302..30ad791c 100644 --- a/doc/specs/vulkan/appendices/VK_KHR_shader_draw_parameters.txt +++ b/doc/specs/vulkan/appendices/VK_KHR_shader_draw_parameters.txt @@ -30,8 +30,8 @@ This extension adds support for the following SPIR-V extension in Vulkan: The extension provides access to three additional built-in shader variables in Vulkan: - * code:BaseInstance, which contains the pname:firstInstance parameter passed to - draw commands, + * code:BaseInstance, which contains the pname:firstInstance parameter + passed to draw commands, * code:BaseVertex, which contains the pname:firstVertex/pname:vertexOffset parameter passed to draw commands, and * code:DrawIndex, which contains the index of the draw call currently @@ -87,8 +87,8 @@ integer value passed to the parameter to the command that resulted in the current shader invocation. In the case where the command has no code:baseVertex parameter, the value of code:gl_BaseVertexARB is zero. -This means that code:gl_BaseVertexARB = code:baseVertex (for code:glDrawElements -commands with code:baseVertex) or 0. +This means that code:gl_BaseVertexARB = code:baseVertex (for +code:glDrawElements commands with code:baseVertex) or 0. In particular there are no code:glDrawArrays commands that take a code:baseVertex parameter. diff --git a/doc/specs/vulkan/appendices/VK_KHR_wayland_surface.txt b/doc/specs/vulkan/appendices/VK_KHR_wayland_surface.txt index 6b24d3ef..1115830b 100644 --- a/doc/specs/vulkan/appendices/VK_KHR_wayland_surface.txt +++ b/doc/specs/vulkan/appendices/VK_KHR_wayland_surface.txt @@ -59,8 +59,8 @@ None physical device and a specific Wayland display? This would be a more general query than flink:vkGetPhysicalDeviceSurfaceSupportKHR: if the Wayland-specific query returned ename:VK_TRUE for a (slink:VkPhysicalDevice, -`struct wl_display*`) pair, then the physical device could be assumed to support -presentation to any slink:VkSurfaceKHR for surfaces on the display. +`struct wl_display*`) pair, then the physical device could be assumed to +support presentation to any slink:VkSurfaceKHR for surfaces on the display. *RESOLVED*: Yes. flink:vkGetPhysicalDeviceWaylandPresentationSupportKHR was added to address diff --git a/doc/specs/vulkan/appendices/VK_NVX_multiview_per_view_attributes.txt b/doc/specs/vulkan/appendices/VK_NVX_multiview_per_view_attributes.txt index 9d0117df..2ee6527e 100644 --- a/doc/specs/vulkan/appendices/VK_NVX_multiview_per_view_attributes.txt +++ b/doc/specs/vulkan/appendices/VK_NVX_multiview_per_view_attributes.txt @@ -37,9 +37,8 @@ compiled for this subpass will obey this restriction. Shaders that use the new per-view outputs (e.g. code:gl_PositionPerViewNV) must: also write the non-per-view output (code:gl_Position), and the values -written must: be such that -`gl_Position = gl_PositionPerViewNV[gl_ViewIndex]` -for all views in the subpass. +written must: be such that `gl_Position = +gl_PositionPerViewNV[gl_ViewIndex]` for all views in the subpass. Implementations are free to either use the per-view outputs or the non-per-view outputs, whichever would be more efficient. diff --git a/doc/specs/vulkan/appendices/extensions.txt b/doc/specs/vulkan/appendices/extensions.txt index b2560a29..7003073e 100644 --- a/doc/specs/vulkan/appendices/extensions.txt +++ b/doc/specs/vulkan/appendices/extensions.txt @@ -290,6 +290,14 @@ ifdef::VK_EXT_display_surface_counter[] include::VK_EXT_display_surface_counter.txt[] endif::VK_EXT_display_surface_counter[] +ifdef::VK_EXT_external_memory_dma_buf[] +include::VK_EXT_external_memory_dma_buf.txt[] +endif::VK_EXT_external_memory_dma_buf[] + +ifdef::VK_EXT_external_memory_host[] +include::VK_EXT_external_memory_host.txt[] +endif::VK_EXT_external_memory_host[] + ifdef::VK_EXT_global_priority[] include::VK_EXT_global_priority.txt[] endif::VK_EXT_global_priority[] @@ -302,6 +310,10 @@ ifdef::VK_EXT_post_depth_coverage[] include::VK_EXT_post_depth_coverage.txt[] endif::VK_EXT_post_depth_coverage[] +ifdef::VK_EXT_queue_family_foreign[] +include::VK_EXT_queue_family_foreign.txt[] +endif::VK_EXT_queue_family_foreign[] + ifdef::VK_EXT_sample_locations[] include::VK_EXT_sample_locations.txt[] endif::VK_EXT_sample_locations[] diff --git a/doc/specs/vulkan/appendices/glossary.txt b/doc/specs/vulkan/appendices/glossary.txt index 8b97b3a7..dcbca6e6 100644 --- a/doc/specs/vulkan/appendices/glossary.txt +++ b/doc/specs/vulkan/appendices/glossary.txt @@ -519,6 +519,11 @@ Host:: The processor(s) and execution environment that the application runs on, and that the Vulkan API is exposed on. +ifdef::VK_EXT_external_memory_host[] +Host Mapped Foreign Memory:: + Memory owned by a foreign device that is mapped for host access. +endif::VK_EXT_external_memory_host[] + Host Memory:: Memory not accessible to the device, used to store implementation data structures. diff --git a/doc/specs/vulkan/chapters/VK_KHR_display/display.txt b/doc/specs/vulkan/chapters/VK_KHR_display/display.txt index be07f8c6..bb305e0b 100644 --- a/doc/specs/vulkan/chapters/VK_KHR_display/display.txt +++ b/doc/specs/vulkan/chapters/VK_KHR_display/display.txt @@ -478,7 +478,8 @@ include::../../api/structs/VkDisplaySurfaceCreateInfoKHR.txt[] * pname:planeIndex is the plane on which this surface appears. * pname:planeStackIndex is the z-order of the plane. * pname:transform is a elink:VkSurfaceTransformFlagBitsKHR value - specifying the transformation to apply to images as part of the scanout operation. + specifying the transformation to apply to images as part of the scanout + operation. * pname:globalAlpha is the global alpha value. This value is ignored if pname:alphaMode is not ename:VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR. diff --git a/doc/specs/vulkan/chapters/VK_KHR_swapchain/wsi.txt b/doc/specs/vulkan/chapters/VK_KHR_swapchain/wsi.txt index c7d41187..0cccd0d2 100644 --- a/doc/specs/vulkan/chapters/VK_KHR_swapchain/wsi.txt +++ b/doc/specs/vulkan/chapters/VK_KHR_swapchain/wsi.txt @@ -752,31 +752,25 @@ requirements. The semaphore is guaranteed to signal, so a wait operation can: be queued for the semaphore without risk of deadlock. -The fname:vkCmdWaitEvents or fname:vkCmdPipelineBarrier used to transition -the image away from ename:VK_IMAGE_LAYOUT_PRESENT_SRC_KHR layout must: have -pname:dstStageMask and pname:dstAccessMask parameters set based on the next -use of the image. -The application must: use <> and <> to prevent the image transition from occurring before the -semaphore passed to fname:vkAcquireNextImageKHR has signaled. +The application must: ensure that the image layout transition happens-after +pname:semaphore is signalled by fname:vkAcquireNextImageKHR. [NOTE] .Note ==== -When the presentable image will be written by some stage [eq]#S#, the +When the presentable image will be accessed by some stage [eq]#S#, the recommended idiom for ensuring the semaphore signals before the transition occurs is: - * The batch that contains the transition includes the image-acquire - semaphore in the list of semaphores to wait for, with a wait stage mask - that includes [eq]#S#. - * The pipeline barrier that performs the transition includes [eq]#S# in - both the pname:srcStageMask and pname:dstStageMask. + * The slink:VkSubmitInfo used to submit the image layout transition for + execution includes pname:semaphore in its pname:pWaitSemaphores member, + with the corresponding element of pname:pWaitDstStageMask including + [eq]#S#. + * The <> that performs the image + layout transition includes [eq]#S# in both the pname:srcStageMask and + pname:dstStageMask. -This causes the pipeline barrier to wait at [eq]#S# until the semaphore -signals before performing the transition and memory barrier, while allowing -earlier pipeline stages of subsequent commands to proceed. +This will ensure that the image layout transition happens-after [eq]#S#. ==== After a successful return, the image indicated by pname:pImageIndex will diff --git a/doc/specs/vulkan/chapters/VK_NV_clip_space_w_scaling/vertexpostproc.txt b/doc/specs/vulkan/chapters/VK_NV_clip_space_w_scaling/vertexpostproc.txt index 9542700e..a17e11cd 100644 --- a/doc/specs/vulkan/chapters/VK_NV_clip_space_w_scaling/vertexpostproc.txt +++ b/doc/specs/vulkan/chapters/VK_NV_clip_space_w_scaling/vertexpostproc.txt @@ -45,7 +45,8 @@ member of slink:VkPipelineViewportWScalingStateCreateInfoNV in the pipeline state object. If the pipeline state object was created with the ename:VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV dynamic state enabled, the -viewport transformation parameters are dynamically set and changed with the command: +viewport transformation parameters are dynamically set and changed with the +command: include::../../api/protos/vkCmdSetViewportWScalingNV.txt[] diff --git a/doc/specs/vulkan/chapters/copies.txt b/doc/specs/vulkan/chapters/copies.txt index 06dc1551..5c9e549a 100644 --- a/doc/specs/vulkan/chapters/copies.txt +++ b/doc/specs/vulkan/chapters/copies.txt @@ -357,9 +357,8 @@ ifndef::VK_KHR_shared_presentable_image[] or ename:VK_IMAGE_LAYOUT_GENERAL endif::VK_KHR_shared_presentable_image[] ifdef::VK_KHR_shared_presentable_image[] - * [[VUID-vkCmdCopyImage-srcImageLayout-00129]] pname:srcImageLayout must: be - ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, + ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, ename:VK_IMAGE_LAYOUT_GENERAL, or ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR endif::VK_KHR_shared_presentable_image[] @@ -626,68 +625,115 @@ endif::VK_KHR_maintenance1[] If the calling command's pname:dstImage is of type ename:VK_IMAGE_TYPE_1D or ename:VK_IMAGE_TYPE_2D, then pname:dstOffset.z must: be `0` and pname:extent.depth must: be `1`. +// The block of VU below come in alternate versions when the extension is +// enabled. +ifndef::VK_KHR_sampler_ycbcr_conversion[] * [[VUID-VkImageCopy-srcOffset-00157]] - If the calling command's pname:srcImage is a compressed image, -ifdef::VK_KHR_sampler_ycbcr_conversion[] - or a _single-plane_, "`etext:_422`" image format, -endif::VK_KHR_sampler_ycbcr_conversion[] - all members of pname:srcOffset must: be a multiple of the corresponding + If the calling command's pname:srcImage is a compressed image, all + members of pname:srcOffset must: be a multiple of the corresponding dimensions of the compressed texel block * [[VUID-VkImageCopy-extent-00158]] If the calling command's pname:srcImage is a compressed image, -ifdef::VK_KHR_sampler_ycbcr_conversion[] - or a _single-plane_, "`etext:_422`" image format, -endif::VK_KHR_sampler_ycbcr_conversion[] pname:extent.width must: be a multiple of the compressed texel block width or [eq]#(pname:extent.width {plus} pname:srcOffset.x)# must: equal the source image subresource width * [[VUID-VkImageCopy-extent-00159]] If the calling command's pname:srcImage is a compressed image, -ifdef::VK_KHR_sampler_ycbcr_conversion[] - or a _single-plane_, "`etext:_422`" image format, -endif::VK_KHR_sampler_ycbcr_conversion[] pname:extent.height must: be a multiple of the compressed texel block height or [eq]#(pname:extent.height {plus} pname:srcOffset.y)# must: equal the source image subresource height * [[VUID-VkImageCopy-extent-00160]] If the calling command's pname:srcImage is a compressed image, -ifdef::VK_KHR_sampler_ycbcr_conversion[] - or a _single-plane_, "`etext:_422`" image format, -endif::VK_KHR_sampler_ycbcr_conversion[] pname:extent.depth must: be a multiple of the compressed texel block depth or [eq]#(pname:extent.depth {plus} pname:srcOffset.z)# must: equal the source image subresource depth * [[VUID-VkImageCopy-dstOffset-00162]] If the calling command's pname:dstImage is a compressed format image, -ifdef::VK_KHR_sampler_ycbcr_conversion[] - or a _single-plane_, "`etext:_422`" image format, -endif::VK_KHR_sampler_ycbcr_conversion[] all members of pname:dstOffset must: be a multiple of the corresponding dimensions of the compressed texel block * [[VUID-VkImageCopy-extent-00163]] If the calling command's pname:dstImage is a compressed format image, -ifdef::VK_KHR_sampler_ycbcr_conversion[] - or a _single-plane_, "`etext:_422`" image format, -endif::VK_KHR_sampler_ycbcr_conversion[] pname:extent.width must: be a multiple of the compressed texel block width or [eq]#(pname:extent.width {plus} pname:dstOffset.x)# must: equal the destination image subresource width * [[VUID-VkImageCopy-extent-00164]] If the calling command's pname:dstImage is a compressed format image, -ifdef::VK_KHR_sampler_ycbcr_conversion[] - or a _single-plane_, "`etext:_422`" image format, -endif::VK_KHR_sampler_ycbcr_conversion[] pname:extent.height must: be a multiple of the compressed texel block height or [eq]#(pname:extent.height {plus} pname:dstOffset.y)# must: equal the destination image subresource height * [[VUID-VkImageCopy-extent-00165]] If the calling command's pname:dstImage is a compressed format image, -ifdef::VK_KHR_sampler_ycbcr_conversion[] - or a _single-plane_, "`etext:_422`" image format, -endif::VK_KHR_sampler_ycbcr_conversion[] pname:extent.depth must: be a multiple of the compressed texel block depth or [eq]#(pname:extent.depth {plus} pname:dstOffset.z)# must: equal the destination image subresource depth +endif::VK_KHR_sampler_ycbcr_conversion[] +// The nested ifdefs are there in anticipation of the hoped-for day when the +// VU extractor and validation layers can handle VU with imbedded +// conditionals. +ifdef::VK_KHR_sampler_ycbcr_conversion[] + * [[VUID-VkImageCopy-srcImage-01727]] + If the calling command's pname:srcImage is a compressed image, +// ifdef::VK_KHR_sampler_ycbcr_conversion[] + or a _single-plane_, "`etext:_422`" image format, +// endif::VK_KHR_sampler_ycbcr_conversion[] + all members of pname:srcOffset must: be a multiple of the corresponding + dimensions of the compressed texel block + * [[VUID-VkImageCopy-srcImage-01728]] + If the calling command's pname:srcImage is a compressed image, +// ifdef::VK_KHR_sampler_ycbcr_conversion[] + or a _single-plane_, "`etext:_422`" image format, +// endif::VK_KHR_sampler_ycbcr_conversion[] + pname:extent.width must: be a multiple of the compressed texel block + width or [eq]#(pname:extent.width {plus} pname:srcOffset.x)# must: equal + the source image subresource width + * [[VUID-VkImageCopy-srcImage-01729]] + If the calling command's pname:srcImage is a compressed image, +// ifdef::VK_KHR_sampler_ycbcr_conversion[] + or a _single-plane_, "`etext:_422`" image format, +// endif::VK_KHR_sampler_ycbcr_conversion[] + pname:extent.height must: be a multiple of the compressed texel block + height or [eq]#(pname:extent.height {plus} pname:srcOffset.y)# must: + equal the source image subresource height + * [[VUID-VkImageCopy-srcImage-01730]] + If the calling command's pname:srcImage is a compressed image, +// ifdef::VK_KHR_sampler_ycbcr_conversion[] + or a _single-plane_, "`etext:_422`" image format, +// endif::VK_KHR_sampler_ycbcr_conversion[] + pname:extent.depth must: be a multiple of the compressed texel block + depth or [eq]#(pname:extent.depth {plus} pname:srcOffset.z)# must: equal + the source image subresource depth + * [[VUID-VkImageCopy-dstImage-01731]] + If the calling command's pname:dstImage is a compressed format image, +// ifdef::VK_KHR_sampler_ycbcr_conversion[] + or a _single-plane_, "`etext:_422`" image format, +// endif::VK_KHR_sampler_ycbcr_conversion[] + all members of pname:dstOffset must: be a multiple of the corresponding + dimensions of the compressed texel block + * [[VUID-VkImageCopy-dstImage-01732]] + If the calling command's pname:dstImage is a compressed format image, +// ifdef::VK_KHR_sampler_ycbcr_conversion[] + or a _single-plane_, "`etext:_422`" image format, +// endif::VK_KHR_sampler_ycbcr_conversion[] + pname:extent.width must: be a multiple of the compressed texel block + width or [eq]#(pname:extent.width {plus} pname:dstOffset.x)# must: equal + the destination image subresource width + * [[VUID-VkImageCopy-dstImage-01733]] + If the calling command's pname:dstImage is a compressed format image, +// ifdef::VK_KHR_sampler_ycbcr_conversion[] + or a _single-plane_, "`etext:_422`" image format, +// endif::VK_KHR_sampler_ycbcr_conversion[] + pname:extent.height must: be a multiple of the compressed texel block + height or [eq]#(pname:extent.height {plus} pname:dstOffset.y)# must: + equal the destination image subresource height + * [[VUID-VkImageCopy-dstImage-01734]] + If the calling command's pname:dstImage is a compressed format image, +// ifdef::VK_KHR_sampler_ycbcr_conversion[] + or a _single-plane_, "`etext:_422`" image format, +// endif::VK_KHR_sampler_ycbcr_conversion[] + pname:extent.depth must: be a multiple of the compressed texel block + depth or [eq]#(pname:extent.depth {plus} pname:dstOffset.z)# must: equal + the destination image subresource depth +endif::VK_KHR_sampler_ycbcr_conversion[] * [[VUID-VkImageCopy-srcOffset-00166]] pname:srcOffset, pname:dstOffset, and pname:extent must: respect the image transfer granularity requirements of the queue family that it will @@ -1079,58 +1125,98 @@ endif::VK_KHR_sampler_ycbcr_conversion[] ename:VK_IMAGE_TYPE_1D or ename:VK_IMAGE_TYPE_2D, then pname:imageOffset.z must: be `0` and pname:imageExtent.depth must: be `1` +// The block of VU below come in alternate versions when the extension is +// enabled. +ifndef::VK_KHR_sampler_ycbcr_conversion[] * [[VUID-VkBufferImageCopy-bufferRowLength-00203]] If the calling command's sname:VkImage parameter is a compressed image, -ifdef::VK_KHR_sampler_ycbcr_conversion[] - or a _single-plane_, "`etext:_422`" image format, -endif::VK_KHR_sampler_ycbcr_conversion[] pname:bufferRowLength must: be a multiple of the compressed texel block width * [[VUID-VkBufferImageCopy-bufferImageHeight-00204]] If the calling command's sname:VkImage parameter is a compressed image, -ifdef::VK_KHR_sampler_ycbcr_conversion[] - or a _single-plane_, "`etext:_422`" image format, -endif::VK_KHR_sampler_ycbcr_conversion[] pname:bufferImageHeight must: be a multiple of the compressed texel block height * [[VUID-VkBufferImageCopy-imageOffset-00205]] If the calling command's sname:VkImage parameter is a compressed image, -ifdef::VK_KHR_sampler_ycbcr_conversion[] - or a _single-plane_, "`etext:_422`" image format, -endif::VK_KHR_sampler_ycbcr_conversion[] all members of pname:imageOffset must: be a multiple of the corresponding dimensions of the compressed texel block * [[VUID-VkBufferImageCopy-bufferOffset-00206]] If the calling command's sname:VkImage parameter is a compressed image, -ifdef::VK_KHR_sampler_ycbcr_conversion[] - or a _single-plane_, "`etext:_422`" image format, -endif::VK_KHR_sampler_ycbcr_conversion[] pname:bufferOffset must: be a multiple of the compressed texel block size in bytes * [[VUID-VkBufferImageCopy-imageExtent-00207]] If the calling command's sname:VkImage parameter is a compressed image, -ifdef::VK_KHR_sampler_ycbcr_conversion[] - or a _single-plane_, "`etext:_422`" image format, -endif::VK_KHR_sampler_ycbcr_conversion[] pname:imageExtent.width must: be a multiple of the compressed texel block width or [eq]#(pname:imageExtent.width {plus} pname:imageOffset.x)# must: equal the image subresource width * [[VUID-VkBufferImageCopy-imageExtent-00208]] If the calling command's sname:VkImage parameter is a compressed image, -ifdef::VK_KHR_sampler_ycbcr_conversion[] - or a _single-plane_, "`etext:_422`" image format, -endif::VK_KHR_sampler_ycbcr_conversion[] pname:imageExtent.height must: be a multiple of the compressed texel block height or [eq]#(pname:imageExtent.height {plus} pname:imageOffset.y)# must: equal the image subresource height * [[VUID-VkBufferImageCopy-imageExtent-00209]] If the calling command's sname:VkImage parameter is a compressed image, -ifdef::VK_KHR_sampler_ycbcr_conversion[] - or a _single-plane_, "`etext:_422`" image format, -endif::VK_KHR_sampler_ycbcr_conversion[] pname:imageExtent.depth must: be a multiple of the compressed texel block depth or [eq]#(pname:imageExtent.depth {plus} pname:imageOffset.z)# must: equal the image subresource depth +endif::VK_KHR_sampler_ycbcr_conversion[] +// The nested ifdefs are there in anticipation of the hoped-for day when the +// VU extractor and validation layers can handle VU with imbedded +// conditionals. +ifdef::VK_KHR_sampler_ycbcr_conversion[] + * [[VUID-VkBufferImageCopy-None-01735]] + If the calling command's sname:VkImage parameter is a compressed image, +// ifdef::VK_KHR_sampler_ycbcr_conversion[] + or a _single-plane_, "`etext:_422`" image format, +// endif::VK_KHR_sampler_ycbcr_conversion[] + pname:bufferRowLength must: be a multiple of the compressed texel block + width + * [[VUID-VkBufferImageCopy-None-01736]] + If the calling command's sname:VkImage parameter is a compressed image, +// ifdef::VK_KHR_sampler_ycbcr_conversion[] + or a _single-plane_, "`etext:_422`" image format, +// endif::VK_KHR_sampler_ycbcr_conversion[] + pname:bufferImageHeight must: be a multiple of the compressed texel + block height + * [[VUID-VkBufferImageCopy-None-01737]] + If the calling command's sname:VkImage parameter is a compressed image, +// ifdef::VK_KHR_sampler_ycbcr_conversion[] + or a _single-plane_, "`etext:_422`" image format, +// endif::VK_KHR_sampler_ycbcr_conversion[] + all members of pname:imageOffset must: be a multiple of the + corresponding dimensions of the compressed texel block + * [[VUID-VkBufferImageCopy-None-01738]] + If the calling command's sname:VkImage parameter is a compressed image, +// ifdef::VK_KHR_sampler_ycbcr_conversion[] + or a _single-plane_, "`etext:_422`" image format, +// endif::VK_KHR_sampler_ycbcr_conversion[] + pname:bufferOffset must: be a multiple of the compressed texel block + size in bytes + * [[VUID-VkBufferImageCopy-None-01739]] + If the calling command's sname:VkImage parameter is a compressed image, +// ifdef::VK_KHR_sampler_ycbcr_conversion[] + or a _single-plane_, "`etext:_422`" image format, +// endif::VK_KHR_sampler_ycbcr_conversion[] + pname:imageExtent.width must: be a multiple of the compressed texel + block width or [eq]#(pname:imageExtent.width {plus} + pname:imageOffset.x)# must: equal the image subresource width + * [[VUID-VkBufferImageCopy-None-01740]] + If the calling command's sname:VkImage parameter is a compressed image, +// ifdef::VK_KHR_sampler_ycbcr_conversion[] + or a _single-plane_, "`etext:_422`" image format, +// endif::VK_KHR_sampler_ycbcr_conversion[] + pname:imageExtent.height must: be a multiple of the compressed texel + block height or [eq]#(pname:imageExtent.height {plus} + pname:imageOffset.y)# must: equal the image subresource height + * [[VUID-VkBufferImageCopy-None-01741]] + If the calling command's sname:VkImage parameter is a compressed image, +// ifdef::VK_KHR_sampler_ycbcr_conversion[] + or a _single-plane_, "`etext:_422`" image format, +// endif::VK_KHR_sampler_ycbcr_conversion[] + pname:imageExtent.depth must: be a multiple of the compressed texel + block depth or [eq]#(pname:imageExtent.depth {plus} + pname:imageOffset.z)# must: equal the image subresource depth +endif::VK_KHR_sampler_ycbcr_conversion[] * [[VUID-VkBufferImageCopy-bufferOffset-00210]] pname:bufferOffset, pname:bufferRowLength, pname:bufferImageHeight and all members of pname:imageOffset and pname:imageExtent must: respect the diff --git a/doc/specs/vulkan/chapters/descriptorsets.txt b/doc/specs/vulkan/chapters/descriptorsets.txt index 73bc83dc..ed69ce12 100644 --- a/doc/specs/vulkan/chapters/descriptorsets.txt +++ b/doc/specs/vulkan/chapters/descriptorsets.txt @@ -2434,7 +2434,7 @@ include::../api/protos/vkUpdateDescriptorSetWithTemplateKHR.txt[] * pname:descriptorSet is the descriptor set to update * pname:descriptorUpdateTemplate is the sname:VkDescriptorUpdateTemplateKHR which specifies the update mapping - between the application pointer and the descriptor set to update. + between pname:pData and the descriptor set to update. * pname:pData is a pointer to memory which contains one or more structures of slink:VkDescriptorImageInfo, slink:VkDescriptorBufferInfo, or slink:VkBufferView used to write the descriptors. diff --git a/doc/specs/vulkan/chapters/devsandqueues.txt b/doc/specs/vulkan/chapters/devsandqueues.txt index 1a05f613..f723062e 100644 --- a/doc/specs/vulkan/chapters/devsandqueues.txt +++ b/doc/specs/vulkan/chapters/devsandqueues.txt @@ -1095,7 +1095,7 @@ include::../api/structs/VkDeviceQueueGlobalPriorityCreateInfoEXT.txt[] A queue created without specifying sname:VkDeviceQueueGlobalPriorityCreateInfoEXT will default to -ename:VK_QUEUE_GLOBAL_PRIORITY_MEDIUM. +ename:VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT. include::../validity/structs/VkDeviceQueueGlobalPriorityCreateInfoEXT.txt[] -- @@ -1113,11 +1113,12 @@ Priority values are sorted in ascending order. A comparison operation on the enum values can be used to determine the priority order. - * ename:VK_QUEUE_GLOBAL_PRIORITY_LOW is below the system default. + * ename:VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT is below the system default. Useful for non-interactive tasks. - * ename:VK_QUEUE_GLOBAL_PRIORITY_MEDIUM is the system default priority. - * ename:VK_QUEUE_GLOBAL_PRIORITY_HIGH is above the system default. - * ename:VK_QUEUE_GLOBAL_PRIORITY_REALTIME is the highest priority. + * ename:VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT is the system default + priority. + * ename:VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT is above the system default. + * ename:VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT is the highest priority. Useful for critical tasks. -- @@ -1138,8 +1139,9 @@ queue priority (sname:VkDeviceQueueCreateInfo::pname:pQueuePriorities). Abuse of this feature may result in starving the rest of the system from hardware resources. Therefore, the driver implementation may: deny requests to acquire a -priority above the default priority (ename:VK_QUEUE_GLOBAL_PRIORITY_MEDIUM) -if the caller does not have sufficient privileges. +priority above the default priority +(ename:VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT) if the caller does not have +sufficient privileges. In this scenario ename:VK_ERROR_NOT_PERMITTED_EXT is returned. The driver implementation may: fail the queue allocation request if diff --git a/doc/specs/vulkan/chapters/features.txt b/doc/specs/vulkan/chapters/features.txt index 17a7bb22..6ecf576b 100644 --- a/doc/specs/vulkan/chapters/features.txt +++ b/doc/specs/vulkan/chapters/features.txt @@ -1787,6 +1787,34 @@ it is filled with the implementation-dependent limits. endif::VK_EXT_sample_locations[] +ifdef::VK_EXT_external_memory_host[] + +[open,refpage='VkPhysicalDeviceExternalMemoryHostPropertiesEXT,desc='Structure describing external memory host pointer limits that can be supported by an implementation',type='structs'] +-- + +The sname:VkPhysicalDeviceExternalMemoryHostPropertiesEXT structure is +defined as: + +include::../api/structs/VkPhysicalDeviceExternalMemoryHostPropertiesEXT.txt[] + +The members of the sname:VkPhysicalDeviceExternalMemoryHostPropertiesEXT +structure describe the following implementation-dependent limits: + + * [[features-limits-minImportedHostPointerAlignment]] + pname:minImportedHostPointerAlignment is the minimum required: + alignment, in bytes, for the base address and size of host pointers that + can: be imported to a Vulkan memory object. + +include::../validity/structs/VkPhysicalDeviceExternalMemoryHostPropertiesEXT.txt[] + +If the sname:VkPhysicalDeviceExternalMemoryHostPropertiesEXT structure is +included in the pname:pNext chain of slink:VkPhysicalDeviceProperties2KHR, +it is filled with the implementation-dependent limits. + +-- + +endif::VK_EXT_external_memory_host[] + ifdef::VK_NVX_multiview_per_view_attributes[] [open,refpage='VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX',desc='Structure describing multiview limits that can be supported by an implementation',type='structs'] @@ -2220,6 +2248,9 @@ ifdef::VK_EXT_sample_locations[] | pname:sampleLocationSubPixelBits | - | 4 | min | pname:variableSampleLocations | - |false| implementation dependent endif::VK_EXT_sample_locations[] +ifdef::VK_EXT_external_memory_host[] +| pname:minImportedHostPointerAlignment | - | 65536 | max +endif::VK_EXT_external_memory_host[] ifdef::VK_NVX_multiview_per_view_attributes[] | pname:perViewPositionAllComponents | - | - | implementation dependent endif::VK_NVX_multiview_per_view_attributes[] @@ -5220,9 +5251,8 @@ If pname:handleType is 0, flink:vkGetPhysicalDeviceImageFormatProperties2KHR will behave as if slink:VkPhysicalDeviceExternalImageFormatInfoKHR was not present, and slink:VkExternalImageFormatPropertiesKHR will be ignored. -If pname:handleType is not compatible with the pname:format, pname:type, -pname:tiling, pname:usage, and pname:flags specified in -slink:VkPhysicalDeviceImageFormatInfo2KHR, then +If pname:handleType is not compatible with the parameters specified in +slink:VkPhysicalDeviceImageFormatInfo2KHR and its pname:pNext chain, then flink:vkGetPhysicalDeviceImageFormatProperties2KHR returns ename:VK_ERROR_FORMAT_NOT_SUPPORTED. @@ -5281,6 +5311,23 @@ include::../api/enums/VkExternalMemoryHandleTypeFlagBitsKHR.txt[] NT handle returned by code:ID3D12Device::code:CreateSharedHandle referring to a Direct3D 12 committed resource. It owns a reference to the memory used by the Direct3D resource. +ifdef::VK_EXT_external_memory_host[] + * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT specifies a + host pointer returned by a host memory allocation command. + It does not own a reference to the underlying memory resource, and will + therefore become invalid if the host memory is freed. + * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT + specifies a host pointer to _host mapped foreign memory_. + It does not own a reference to the underlying memory resource, and will + therefore become invalid if the foreign memory is unmapped or otherwise + becomes no longer available. +endif::VK_EXT_external_memory_host[] +ifdef::VK_EXT_external_memory_dma_buf[] + * ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT is a file + descriptor for a Linux dma_buf. + It owns a reference to the underlying memory resource represented by its + Vulkan memory object. +endif::VK_EXT_external_memory_dma_buf[] <<< @@ -5299,8 +5346,42 @@ following table: | ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR | Must match | Must match | ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR | Must match | Must match | ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR | Must match | Must match +ifdef::VK_EXT_external_memory_host[] +| ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT | No restriction | No restriction +| ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT | No restriction | No restriction +endif::VK_EXT_external_memory_host[] +ifdef::VK_EXT_external_memory_dma_buf[] +| ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT | No restriction | No restriction +endif::VK_EXT_external_memory_dma_buf[] |==== +ifdef::VK_EXT_external_memory_host[] +[NOTE] +.Note +==== +The above table does not restrict the drivers and devices with which +ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT and +ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT may: +be shared, as these handle types inherently mean memory that does not come +from the same device, as they import memory from the host or a foreign +device, respectively. +==== +endif::VK_EXT_external_memory_host[] + +ifdef::VK_EXT_external_memory_dma_buf[] +[NOTE] +.Note +==== +Even though the above table does not restrict the drivers and devices with +which ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT may: be shared, +query mechanisms exist in the Vulkan API that prevent the import of +incompatible dma-bufs (such as flink:vkGetMemoryFdPropertiesKHR) and that +prevent incompatible usage of dma-bufs (such as +slink:VkPhysicalDeviceExternalBufferInfoKHR and +slink:VkPhysicalDeviceExternalImageFormatInfoKHR). +==== +endif::VK_EXT_external_memory_dma_buf[] + -- [open,refpage='VkExternalImageFormatPropertiesKHR',desc='Structure specifying supported external handle properties',type='structs'] diff --git a/doc/specs/vulkan/chapters/memory.txt b/doc/specs/vulkan/chapters/memory.txt index 67be34dc..8083923a 100644 --- a/doc/specs/vulkan/chapters/memory.txt +++ b/doc/specs/vulkan/chapters/memory.txt @@ -787,13 +787,16 @@ same memory object. When memory is allocated, its contents are undefined. -There is an implementation-dependent maximum number of memory allocations -that can: be simultaneously created on a device. -This is specified by the -<> -member of the slink:VkPhysicalDeviceLimits structure. -If pname:maxMemoryAllocationCount is exceeded, fname:vkAllocateMemory will -return ename:VK_ERROR_TOO_MANY_OBJECTS. +The maximum number of valid memory allocations that can: exist +simultaneously within a slink:VkDevice may: be restricted by implementation- +or platform-dependent limits. +If a call to flink:vkAllocateMemory would cause the total number of +allocations to exceed these limits, such a call will fail and must: return +ename:VK_ERROR_TOO_MANY_OBJECTS. +The +<> +feature describes the number of allocations that can: exist simultaneously +before encountering these internal limits. 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 @@ -833,20 +836,21 @@ include::../api/structs/VkMemoryAllocateInfo.txt[] pname:memoryTypes array of the slink:VkPhysicalDeviceMemoryProperties structure -ifdef::VK_KHR_external_memory_win32,VK_KHR_external_memory_fd[] -If the pname:pNext chain contains an instance of +ifdef::VK_KHR_external_memory_win32,VK_KHR_external_memory_fd,VK_EXT_external_memory_host[] +An instance of the slink:VkMemoryAllocateInfo structure defines a memory +import operation if the pname:pNext chain contains an instance of one of the +following structures with a non-zero value for their respective +pname:handleType member: ifdef::VK_KHR_external_memory_win32[] -slink:VkImportMemoryWin32HandleInfoKHR with a non-zero value for -sname:VkImportMemoryWin32HandleInfoKHR::pname:handleType, + * slink:VkImportMemoryWin32HandleInfoKHR endif::VK_KHR_external_memory_win32[] -ifdef::VK_KHR_external_memory_win32+VK_KHR_external_memory_fd[] -or -endif::VK_KHR_external_memory_win32+VK_KHR_external_memory_fd[] ifdef::VK_KHR_external_memory_fd[] -slink:VkImportMemoryFdInfoKHR with a non-zero value for -sname:VkImportMemoryFdInfoKHR::pname:handleType, + * slink:VkImportMemoryFdInfoKHR endif::VK_KHR_external_memory_fd[] -the slink:VkMemoryAllocateInfo instance defines a memory import operation. +ifdef::VK_EXT_external_memory_host[] + * slink:VkImportMemoryHostPointerInfoEXT +endif::VK_EXT_external_memory_host[] + Importing memory must: not modify the content of the memory. Implementations must: ensure that importing memory does not enable the importing Vulkan instance to access any memory or resources in other Vulkan @@ -878,7 +882,7 @@ If the external handle provided does not meet these requirements, the implementation must: fail the memory import operation with the error code ename:VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR. -endif::VK_KHR_external_memory_win32,VK_KHR_external_memory_fd[] +endif::VK_KHR_external_memory_win32,VK_KHR_external_memory_fd,VK_EXT_external_memory_host[] .Valid Usage **** @@ -916,13 +920,14 @@ ifdef::VK_KHR_external_memory_win32+VK_NV_external_memory_win32[] slink:VkImportMemoryWin32HandleInfoKHR, it must: not contain an instance of slink:VkImportMemoryWin32HandleInfoNV. endif::VK_KHR_external_memory_win32+VK_NV_external_memory_win32[] -ifdef::VK_KHR_external_memory_win32,VK_KHR_external_memory_fd[] - * [[VUID-VkMemoryAllocateInfo-allocationSize-00642]] - If the parameters define an import operation and the external handle - specified was created by the Vulkan API, the values of - pname:allocationSize and pname:memoryTypeIndex must: match those +ifdef::VK_KHR_external_memory_fd[] + * [[VUID-VkMemoryAllocateInfo-allocationSize-01742]] + If the parameters define an import operation, the external handle + specified was created by the Vulkan API, and the external handle type is + ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR, then the values + of pname:allocationSize and pname:memoryTypeIndex must: match those specified when the memory object being imported was created. -endif::VK_KHR_external_memory_win32,VK_KHR_external_memory_fd[] +endif::VK_KHR_external_memory_fd[] ifdef::VK_KHR_external_memory+VK_KHX_device_group[] * [[VUID-VkMemoryAllocateInfo-None-00643]] If the parameters define an import operation and the external handle @@ -942,6 +947,13 @@ ifdef::VK_KHR_external_memory_win32[] an NT handle or a global share handle created outside of the Vulkan API, the value of pname:memoryTypeIndex must: be one of those returned by flink:vkGetMemoryWin32HandlePropertiesKHR. + * [[VUID-VkMemoryAllocateInfo-allocationSize-01743]] + If the parameters define an import operation, the external handle was + created by the Vulkan API, and the external handle type is + ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR or + ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR, then the + values of pname:allocationSize and pname:memoryTypeIndex must: match + those specified when the memory object being imported was created. * [[VUID-VkMemoryAllocateInfo-allocationSize-00646]] If the parameters define an import operation and the external handle type is ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR, @@ -964,6 +976,16 @@ ifdef::VK_KHR_external_memory_fd[] pname:memoryTypeIndex must: be one of those returned by flink:vkGetMemoryFdPropertiesKHR. endif::VK_KHR_external_memory_fd[] +ifdef::VK_EXT_external_memory_host[] + * [[VUID-VkMemoryAllocateInfo-memoryTypeIndex-01744]] + If the parameters define an import operation and the external handle is + a host pointer, the value of pname:memoryTypeIndex must: be one of those + returned by flink:vkGetMemoryHostPointerPropertiesEXT + * [[VUID-VkMemoryAllocateInfo-allocationSize-01745]] + If the parameters define an import operation and the external handle is + a host pointer, pname:allocationSize must: be an integer multiple of + sname:VkPhysicalDeviceExternalMemoryHostPropertiesEXT::pname:minImportedHostPointerAlignment +endif::VK_EXT_external_memory_host[] **** include::../validity/structs/VkMemoryAllocateInfo.txt[] @@ -1406,15 +1428,17 @@ sname:VkDeviceMemory object. If pname:handleType is not `0`, it must: be supported for import, as reported by slink:VkExternalImageFormatPropertiesKHR or slink:VkExternalBufferPropertiesKHR. - * [[VUID-VkImportMemoryFdInfoKHR-fd-00668]] - The memory from which pname:fd was exported must: have been created on - the same underlying physical device as pname:device. * [[VUID-VkImportMemoryFdInfoKHR-handleType-00669]] If pname:handleType is not `0`, it must: be defined as a POSIX file descriptor handle. * [[VUID-VkImportMemoryFdInfoKHR-handleType-00670]] If pname:handleType is not `0`, pname:fd must: be a valid handle of the type specified by pname:handleType. + * [[VUID-VkImportMemoryFdInfoKHR-fd-01746]] + The memory represented by pname:fd must: have been created from a + physical device and driver that is compatible with pname:device and + pname:handleType, as described in + <>. * [[VUID-VkImportMemoryFdInfoKHR-fd-01520]] pname:fd must: obey any requirements listed for pname:handleType in <>. + +Applications can: import the same underlying memory into multiple instances +of Vulkan and multiple times into a given Vulkan instance. +However, implementations may: fail to import the same underlying memory +multiple times into a given physical device due to platform constraints. + +Importing memory from a particular host pointer may: not be possible due to +additional platform-specific restrictions beyond the scope of this +specification in which case the implementation must: fail the memory import +operation with the error code ename:VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR. + +The application must: ensure that the imported memory range remains valid +and accessible for the lifetime of the imported memory object. + +.Valid Usage +**** + * [[VUID-VkImportMemoryHostPointerInfoEXT-handleType-01747]] + If pname:handleType is not `0`, it must: be supported for import, as + reported in slink:VkExternalMemoryPropertiesKHR + * [[VUID-VkImportMemoryHostPointerInfoEXT-handleType-01748]] + If pname:handleType is not `0`, it must: be + ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT or + ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT + * [[VUID-VkImportMemoryHostPointerInfoEXT-pHostPointer-01749]] + pname:pHostPointer must: be a pointer aligned to an integer multiple of + sname:VkPhysicalDeviceExternalMemoryHostPropertiesEXT::pname:minImportedHostPointerAlignment + * [[VUID-VkImportMemoryHostPointerInfoEXT-handleType-01750]] + If pname:handleType is + ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT, + pname:pHostPointer must: be a pointer to pname:allocationSize number of + bytes of host memory, where pname:allocationSize is the member of the + sname:VkMemoryAllocateInfo structure this structure is chained to + * [[VUID-VkImportMemoryHostPointerInfoEXT-handleType-01751]] + If pname:handleType is + ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT, + pname:pHostPointer must: be a pointer to pname:allocationSize number of + bytes of host mapped foreign memory, where pname:allocationSize is the + member of the sname:VkMemoryAllocateInfo structure this structure is + chained to +**** + +include::../validity/structs/VkImportMemoryHostPointerInfoEXT.txt[] + +-- + +[open,refpage='vkGetMemoryHostPointerPropertiesEXT',desc='Get properties of external memory host pointer',type='protos'] +-- + +To determine the correct parameters to use when importing host pointers, +call: + +include::../api/protos/vkGetMemoryHostPointerPropertiesEXT.txt[] + + * pname:device is the logical device that will be importing + pname:pHostPointer. + * pname:handleType is the type of the handle pname:pHostPointer. + * pname:pHostPointer is the host pointer to import from. + +.Valid Usage +**** + * [[VUID-vkGetMemoryHostPointerPropertiesEXT-handleType-01752]] + pname:handleType must: be + ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT or + ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT + * [[VUID-vkGetMemoryHostPointerPropertiesEXT-pHostPointer-01753]] + pname:pHostPointer must: be a pointer aligned to an integer multiple of + sname:VkPhysicalDeviceExternalMemoryHostPropertiesEXT::pname:minImportedHostPointerAlignment + * [[VUID-vkGetMemoryHostPointerPropertiesEXT-handleType-01754]] + If pname:handleType is + ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT, + pname:pHostPointer must: be a pointer to host memory + * [[VUID-vkGetMemoryHostPointerPropertiesEXT-handleType-01755]] + If pname:handleType is + ename:VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT, + pname:pHostPointer must: be a pointer to host mapped foreign memory +**** + +include::../validity/protos/vkGetMemoryHostPointerPropertiesEXT.txt[] + +-- + +[open,refpage='VkMemoryHostPointerPropertiesEXT',desc'Properties of external memory host pointer',type='structs'] +-- + +The sname:VkMemoryHostPointerPropertiesEXT structure is defined as: + +include::../api/structs/VkMemoryHostPointerPropertiesEXT.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:memoryTypeBits is a bitmask containing one bit set for every + memory type which the specified host pointer can: be imported as. + +include::../validity/structs/VkMemoryHostPointerPropertiesEXT.txt[] + +-- + +endif::VK_EXT_external_memory_host[] + ifdef::VK_NV_external_memory[] include::VK_NV_external_memory/allocate_memory.txt[] endif::VK_NV_external_memory[] diff --git a/doc/specs/vulkan/chapters/pipelines.txt b/doc/specs/vulkan/chapters/pipelines.txt index 89581c61..59acb27f 100644 --- a/doc/specs/vulkan/chapters/pipelines.txt +++ b/doc/specs/vulkan/chapters/pipelines.txt @@ -578,28 +578,54 @@ endif::VK_NV_glsl_shader[] the rest of the state identified by this structure must: adhere to the pipeline linking rules described in the <> chapter +// The block of VU below come in alternate versions when the extension is +// enabled. +ifndef::VK_KHR_maintenance2[] * [[VUID-VkGraphicsPipelineCreateInfo-subpass-00743]] If rasterization is not disabled and pname:subpass uses a depth/stencil attachment in pname:renderPass that has a layout of - ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL -ifdef::VK_KHR_maintenance2[] - or ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR -endif::VK_KHR_maintenance2[] - in the sname:VkAttachmentReference defined by pname:subpass, the + ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL or + ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR in + the sname:VkAttachmentReference defined by pname:subpass, the pname:depthWriteEnable member of pname:pDepthStencilState must: be ename:VK_FALSE * [[VUID-VkGraphicsPipelineCreateInfo-subpass-00744]] If rasterization is not disabled and pname:subpass uses a depth/stencil attachment in pname:renderPass that has a layout of - ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL -ifdef::VK_KHR_maintenance2[] - or ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR + ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL or + ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR in + the sname:VkAttachmentReference defined by pname:subpass, the + pname:failOp, pname:passOp and pname:depthFailOp members of each of the + pname:front and pname:back members of pname:pDepthStencilState must: be + ename:VK_STENCIL_OP_KEEP endif::VK_KHR_maintenance2[] +// The nested ifdefs are there in anticipation of the hoped-for day when the +// VU extractor and validation layers can handle VU with imbedded +// conditionals. +ifdef::VK_KHR_maintenance2[] + * [[VUID-VkGraphicsPipelineCreateInfo-subpass-01756]] + If rasterization is not disabled and pname:subpass uses a depth/stencil + attachment in pname:renderpass that has a layout of + ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL +// ifdef::VK_KHR_maintenance2[] + or ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR +// endif::VK_KHR_maintenance2[] + in the sname:VkAttachmentReference defined by pname:subpass, the + pname:depthWriteEnable member of pname:pDepthStencilState must: be + ename:VK_FALSE + * [[VUID-VkGraphicsPipelineCreateInfo-subpass-01757]] + If rasterization is not disabled and pname:subpass uses a depth/stencil + attachment in pname:renderpass that has a layout of + ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL +// ifdef::VK_KHR_maintenance2[] + or ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR +// endif::VK_KHR_maintenance2[] in the sname:VkAttachmentReference defined by pname:subpass, the pname:failOp, pname:passOp and pname:depthFailOp members of each of the pname:front and pname:back members of pname:pDepthStencilState must: be ename:VK_STENCIL_OP_KEEP - * [[VUID-VkGraphicsPipelineCreateInfo-blendEnable-00745]] +endif::VK_KHR_maintenance2[] + * [[VUID-VkGraphicsPipelineCreateInfo-subpass-00745]] If rasterization is not disabled and the subpass uses color attachments, then for each color attachment in the subpass the pname:blendEnable member of the corresponding element of the pname:pAttachment member of diff --git a/doc/specs/vulkan/chapters/renderpass.txt b/doc/specs/vulkan/chapters/renderpass.txt index c9833477..2cdd3787 100644 --- a/doc/specs/vulkan/chapters/renderpass.txt +++ b/doc/specs/vulkan/chapters/renderpass.txt @@ -1635,21 +1635,41 @@ record the commands for the first subpass of that render pass. specified in the pname:framebuffer member of pname:pRenderPassBegin must: have been created with ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT set +// The VU below comes in an alternate version when the extension is +// enabled. +ifndef::VK_KHR_maintenance2[] * [[VUID-vkCmdBeginRenderPass-initialLayout-00896]] If any of the pname:initialLayout or pname:finalLayout member of the sname:VkAttachmentDescription structures or the pname:layout member of the sname:VkAttachmentReference structures specified when creating the render pass specified in the pname:renderPass member of pname:pRenderPassBegin is -ifdef::VK_KHR_maintenance2[] - ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR, - ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR, -endif::VK_KHR_maintenance2[] ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, or ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then the corresponding attachment image subresource of the framebuffer specified in the pname:framebuffer member of pname:pRenderPassBegin must: have been created with ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set +endif::VK_KHR_maintenance2[] +// The nested ifdefs are there in anticipation of the hoped-for day when the +// VU extractor and validation layers can handle VU with imbedded +// conditionals. +ifdef::VK_KHR_maintenance2[] + * [[VUID-vkCmdBeginRenderPass-initialLayout-01758]] + If any of the pname:initialLayout or pname:finalLayout member of the + sname:VkAttachmentDescription structures or the pname:layout member of + the sname:VkAttachmentReference structures specified when creating the + render pass specified in the pname:renderPass member of + pname:pRenderPassBegin is +// ifdef::VK_KHR_maintenance2[] + ename:VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR, + ename:VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR, +// endif::VK_KHR_maintenance2[] + ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, or + ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then the + corresponding attachment image subresource of the framebuffer specified + in the pname:framebuffer member of pname:pRenderPassBegin must: have + been created with ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set +endif::VK_KHR_maintenance2[] * [[VUID-vkCmdBeginRenderPass-initialLayout-00897]] If any of the pname:initialLayout or pname:finalLayout member of the sname:VkAttachmentDescription structures or the pname:layout member of diff --git a/doc/specs/vulkan/chapters/resources.txt b/doc/specs/vulkan/chapters/resources.txt index aceb3abe..e1dae46d 100644 --- a/doc/specs/vulkan/chapters/resources.txt +++ b/doc/specs/vulkan/chapters/resources.txt @@ -2202,21 +2202,63 @@ ifdef::VK_KHR_maintenance1[] the pname:extent.depth specified in slink:VkImageCreateInfo when pname:image was created endif::VK_KHR_maintenance1[] +// The VU below comes in 3 alternate versions when the two extensions +// are enabled, or only one is. * [[VUID-VkImageViewCreateInfo-image-01018]] If pname:image was created with the - ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, + ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, pname:format must: be + compatible with the pname:format used to create pname:image, as defined + in <> +// The nested ifdefs are there in anticipation of the hoped-for day when the +// VU extractor and validation layers can handle VU with imbedded +// conditionals. +// +// If VK_KHR_maintenance2 and NOT VK_KHR_sampler_ycbcr_conversion ifdef::VK_KHR_maintenance2[] - but without the +ifndef::VK_KHR_sampler_ycbcr_conversion[] + * [[VUID-VkImageViewCreateInfo-image-01759]] + If pname:image was created with the + ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, but without the ename:VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR flag, -endif::VK_KHR_maintenance2[] -ifdef::VK_KHR_sampler_ycbcr_conversion[] - and if the pname:format of the pname:image is not a - <> - format, -endif::VK_KHR_sampler_ycbcr_conversion[] pname:format must: be compatible with the pname:format used to create pname:image, as defined in <> +endif::VK_KHR_sampler_ycbcr_conversion[] +endif::VK_KHR_maintenance2[] +// If NOT VK_KHR_maintenance2 and VK_KHR_sampler_ycbcr_conversion +ifndef::VK_KHR_maintenance2[] +ifdef::VK_KHR_sampler_ycbcr_conversion[] + * [[VUID-VkImageViewCreateInfo-image-01760]] + If pname:image was created with the + ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, and if the pname:format + of the pname:image is not a + <> + format, pname:format must: be compatible with the pname:format used to + create pname:image, as defined in + <> +endif::VK_KHR_sampler_ycbcr_conversion[] +endif::VK_KHR_maintenance2[] +// If VK_KHR_maintenance2 and VK_KHR_sampler_ycbcr_conversion +ifdef::VK_KHR_maintenance2[] +ifdef::VK_KHR_sampler_ycbcr_conversion[] + * [[VUID-VkImageViewCreateInfo-image-01761]] + If pname:image was created with the + ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, +// ifdef::VK_KHR_maintenance2[] + but without the + ename:VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR flag, +// endif::VK_KHR_maintenance2[] +// ifdef::VK_KHR_sampler_ycbcr_conversion[] + and if the pname:format of the pname:image is not a + <> + format, +// endif::VK_KHR_sampler_ycbcr_conversion[] + pname:format must: be compatible with the pname:format used to create + pname:image, as defined in + <> +endif::VK_KHR_sampler_ycbcr_conversion[] +endif::VK_KHR_maintenance2[] ifdef::VK_KHR_maintenance2[] * [[VUID-VkImageViewCreateInfo-image-01583]] If pname:image was created with the @@ -2253,7 +2295,19 @@ ifdef::VK_KHR_sampler_ycbcr_conversion[] pname:format indicated by pname:subresourceRange.aspectMask, as defined in <> endif::VK_KHR_sampler_ycbcr_conversion[] +ifndef::VK_KHR_sampler_ycbcr_conversion[] +// The VU below comes in an alternate version when the extension is +// enabled. * [[VUID-VkImageViewCreateInfo-image-01019]] + If pname:image was not created with the + ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, pname:format must: be + identical to the pname:format used to create pname:image +endif::VK_KHR_sampler_ycbcr_conversion[] +// The nested ifdefs are there in anticipation of the hoped-for day when the +// VU extractor and validation layers can handle VU with imbedded +// conditionals. +ifdef::VK_KHR_sampler_ycbcr_conversion[] + * [[VUID-VkImageViewCreateInfo-image-01762]] If pname:image was not created with the ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, ifdef::VK_KHR_sampler_ycbcr_conversion[] @@ -2264,6 +2318,7 @@ ifdef::VK_KHR_sampler_ycbcr_conversion[] endif::VK_KHR_sampler_ycbcr_conversion[] pname:format must: be identical to the pname:format used to create pname:image +endif::VK_KHR_sampler_ycbcr_conversion[] * [[VUID-VkImageViewCreateInfo-image-01020]] If pname:image is non-sparse then it must: be bound completely and contiguously to a single sname:VkDeviceMemory object @@ -3570,7 +3625,7 @@ include::../validity/structs/VkBindImageMemoryInfoKHR.txt[] -- -ifdef::VK_KHR_device_group[] +ifdef::VK_KHX_device_group[] [open,refpage='VkBindImageMemoryDeviceGroupInfoKHX',desc='Structure specifying device within a group to bind to',type='structs'] -- @@ -3737,7 +3792,7 @@ pname:pSFRRects members of slink:VkBindImageMemoryDeviceGroupInfoKHX. include::../validity/structs/VkBindImageMemorySwapchainInfoKHX.txt[] -- -endif::VK_KHR_device_group[] +endif::VK_KHX_device_group[] endif::VK_KHR_bind_memory2[] @@ -3863,7 +3918,7 @@ ifdef::VK_KHR_external_memory[] [[resources-external-sharing]] === External Resource Sharing -Resources may only be accessed in the Vulkan instance that has exclusive +Resources should: only be accessed in the Vulkan instance that has exclusive ownership of their underlying memory. Only one Vulkan instance has exclusive ownership of a resource's underlying memory at a given time, regardless of whether the resource was created using @@ -3886,12 +3941,16 @@ specified explicitly when releasing ownership, nor is the source instance or API specified when acquiring ownership. Instead, the image or memory barrier's pname:dstQueueFamilyIndex or pname:srcQueueFamilyIndex parameters are set to the reserved queue family -index ename:VK_QUEUE_FAMILY_EXTERNAL_KHR to represent the external -destination or source respectively. +index ename:VK_QUEUE_FAMILY_EXTERNAL_KHR +ifdef::VK_EXT_queue_family_foreign[] +or ename:VK_QUEUE_FAMILY_FOREIGN_EXT +endif::VK_EXT_queue_family_foreign[] +to represent the external destination or source respectively. -Upon creation, memory objects shared between multiple Vulkan instances or -other APIs are not owned by any instance or API. -The first entity to access them implicitly acquires ownership. +Binding a resource to a memory object shared between multiple Vulkan +instances or other APIs does not change the ownership of the underlying +memory. +The first entity to access the resource implicitly acquires ownership. Accessing a resource backed by memory that is owned by a particular instance or API has the same semantics as accessing a ename:VK_SHARING_MODE_EXCLUSIVE resource, with one exception: Implementations must: ensure layout diff --git a/doc/specs/vulkan/chapters/synchronization.txt b/doc/specs/vulkan/chapters/synchronization.txt index 03dbcf99..fb9d3aee 100644 --- a/doc/specs/vulkan/chapters/synchronization.txt +++ b/doc/specs/vulkan/chapters/synchronization.txt @@ -3569,12 +3569,13 @@ ifdef::VK_KHR_external_memory[] ename:VK_SHARING_MODE_CONCURRENT, at least one of pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex must: be ename:VK_QUEUE_FAMILY_IGNORED - * [[VUID-VkBufferMemoryBarrier-buffer-01380]] + * [[VUID-VkBufferMemoryBarrier-buffer-01763]] If pname:buffer was created with a sharing mode of ename:VK_SHARING_MODE_CONCURRENT, and one of pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex is ename:VK_QUEUE_FAMILY_IGNORED, the - other must: be ename:VK_QUEUE_FAMILY_IGNORED or - ename:VK_QUEUE_FAMILY_EXTERNAL_KHR + other must: be ename:VK_QUEUE_FAMILY_IGNORED or a special queue family + reserved for external memory ownership transfers, as described in + <>. endif::VK_KHR_external_memory[] ifndef::VK_KHR_external_memory[] * [[VUID-VkBufferMemoryBarrier-buffer-01192]] @@ -3590,16 +3591,18 @@ ifdef::VK_KHR_external_memory[] ename:VK_SHARING_MODE_EXCLUSIVE and pname:srcQueueFamilyIndex is ename:VK_QUEUE_FAMILY_IGNORED, pname:dstQueueFamilyIndex must: also be ename:VK_QUEUE_FAMILY_IGNORED - * [[VUID-VkBufferMemoryBarrier-buffer-01194]] + * [[VUID-VkBufferMemoryBarrier-buffer-01764]] If pname:buffer was created with a sharing mode of ename:VK_SHARING_MODE_EXCLUSIVE and pname:srcQueueFamilyIndex is not - ename:VK_QUEUE_FAMILY_IGNORED, it must: be a valid queue family or - ename:VK_QUEUE_FAMILY_EXTERNAL_KHR (see <>) - * [[VUID-VkBufferMemoryBarrier-buffer-01195]] + ename:VK_QUEUE_FAMILY_IGNORED, it must: be a valid queue family or a + special queue family reserved for external memory transfers, as + described in <>. + * [[VUID-VkBufferMemoryBarrier-buffer-01765]] If pname:buffer was created with a sharing mode of ename:VK_SHARING_MODE_EXCLUSIVE and pname:dstQueueFamilyIndex is not - ename:VK_QUEUE_FAMILY_IGNORED, it must: be a valid queue family or - ename:VK_QUEUE_FAMILY_EXTERNAL_KHR (see <>) + ename:VK_QUEUE_FAMILY_IGNORED, it must: be a valid queue family or a + special queue family reserved for external memory transfers, as + described in <>. endif::VK_KHR_external_memory[] * [[VUID-VkBufferMemoryBarrier-buffer-01196]] If pname:buffer was created with a sharing mode of @@ -3746,12 +3749,13 @@ ifdef::VK_KHR_external_memory[] ename:VK_SHARING_MODE_CONCURRENT, at least one of pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex must: be ename:VK_QUEUE_FAMILY_IGNORED - * [[VUID-VkImageMemoryBarrier-image-01382]] + * [[VUID-VkImageMemoryBarrier-image-01766]] If pname:image was created with a sharing mode of ename:VK_SHARING_MODE_CONCURRENT, and one of pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex is ename:VK_QUEUE_FAMILY_IGNORED, the - other must: be ename:VK_QUEUE_FAMILY_IGNORED or - ename:VK_QUEUE_FAMILY_EXTERNAL_KHR + other must: be ename:VK_QUEUE_FAMILY_IGNORED or a special queue family + reserved for external memory transfers, as described in + <>. endif::VK_KHR_external_memory[] ifndef::VK_KHR_external_memory[] * [[VUID-VkImageMemoryBarrier-image-01200]] @@ -3767,16 +3771,18 @@ ifdef::VK_KHR_external_memory[] ename:VK_SHARING_MODE_EXCLUSIVE and pname:srcQueueFamilyIndex is ename:VK_QUEUE_FAMILY_IGNORED, pname:dstQueueFamilyIndex must: also be ename:VK_QUEUE_FAMILY_IGNORED. - * [[VUID-VkImageMemoryBarrier-image-01202]] + * [[VUID-VkImageMemoryBarrier-image-01767]] If pname:image was created with a sharing mode of ename:VK_SHARING_MODE_EXCLUSIVE and pname:srcQueueFamilyIndex is not - ename:VK_QUEUE_FAMILY_IGNORED, it must: be a valid queue family or - ename:VK_QUEUE_FAMILY_EXTERNAL_KHR (see <>). - * [[VUID-VkImageMemoryBarrier-image-01203]] + ename:VK_QUEUE_FAMILY_IGNORED, it must: be a valid queue family or a + special queue family reserved for external memory transfers, as + described in <>. + * [[VUID-VkImageMemoryBarrier-image-01768]] If pname:image was created with a sharing mode of ename:VK_SHARING_MODE_EXCLUSIVE and pname:dstQueueFamilyIndex is not - ename:VK_QUEUE_FAMILY_IGNORED, it must: be a valid queue family or - ename:VK_QUEUE_FAMILY_EXTERNAL_KHR (see <>). + ename:VK_QUEUE_FAMILY_IGNORED, it must: be a valid queue family or a + special queue family reserved for external memory transfers, as + described in <>. endif::VK_KHR_external_memory[] * [[VUID-VkImageMemoryBarrier-image-01205]] If pname:image was created with a sharing mode of @@ -3885,7 +3891,26 @@ also explicitly manage ownership transfers between local and external queues (or equivalent constructs in external APIs) regardless of the elink:VkSharingMode specified when creating them. The special queue family index ename:VK_QUEUE_FAMILY_EXTERNAL_KHR represents -any queue external to the resource's current Vulkan instance. +any queue external to the resource's current Vulkan instance, as long as the +queue uses the same underlying physical device +ifdef::VK_KHX_device_group[] +or device group +endif::VK_KHX_device_group[] +and uses the same driver version as the resource's slink:VkDevice, as +indicated by slink:VkPhysicalDeviceIDPropertiesKHR::pname:deviceUUID and +slink:VkPhysicalDeviceIDPropertiesKHR::pname:driverUUID. +ifdef::VK_EXT_queue_family_foreign[] +The special queue family index ename:VK_QUEUE_FAMILY_FOREIGN_EXT represents +any queue external to the resource's current Vulkan instance, regardless of +the queue's underlying physical device or driver version. +This includes, for example, queues for fixed-function image processing +devices, media codec devices, and display devices, as well as all queues +that use the same underlying physical device +ifdef::VK_KHX_device_group[] +(or device group) +endif::VK_KHX_device_group[] +and driver version as the resource's slink:VkDevice. +endif::VK_EXT_queue_family_foreign[] endif::VK_KHR_external_memory[] If memory dependencies are correctly expressed between uses of such a resource between two queues in different families, but no ownership transfer @@ -3900,6 +3925,16 @@ when transferring from one queue family to another, then the ownership transfer should: be skipped. ==== +ifdef::VK_EXT_queue_family_foreign[] +.Note +[NOTE] +==== +Applications should expect transfers to/from +ename:VK_QUEUE_FAMILY_FOREIGN_EXT to be more expensive than transfers +to/from ename:VK_QUEUE_FAMILY_EXTERNAL_KHR. +==== +endif::VK_EXT_queue_family_foreign[] + A queue family ownership transfer consists of two distinct parts: . Release exclusive ownership from the source queue family diff --git a/doc/specs/vulkan/reflow_count.py b/doc/specs/vulkan/reflow_count.py index 20b97f75..25bcc3f7 100644 --- a/doc/specs/vulkan/reflow_count.py +++ b/doc/specs/vulkan/reflow_count.py @@ -1,2 +1,2 @@ # The value to start tagging VU statements at, unless overridden by -nextvu -startVUID = 1727 +startVUID = 1769 diff --git a/src/ext_loader/vulkan_ext.c b/src/ext_loader/vulkan_ext.c index 509e5314..18715ec7 100644 --- a/src/ext_loader/vulkan_ext.c +++ b/src/ext_loader/vulkan_ext.c @@ -1879,6 +1879,23 @@ VkResult vkGetValidationCacheDataEXT( } #endif /* VK_EXT_validation_cache */ +#ifdef VK_EXT_external_memory_host +static PFN_vkGetMemoryHostPointerPropertiesEXT pfn_vkGetMemoryHostPointerPropertiesEXT; +VkResult vkGetMemoryHostPointerPropertiesEXT( + VkDevice device, + VkExternalMemoryHandleTypeFlagBitsKHR handleType, + const void* pHostPointer, + VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) +{ + return pfn_vkGetMemoryHostPointerPropertiesEXT( + device, + handleType, + pHostPointer, + pMemoryHostPointerProperties + ); +} + +#endif /* VK_EXT_external_memory_host */ void vkExtInitInstance(VkInstance instance) { @@ -2134,6 +2151,9 @@ void vkExtInitInstance(VkInstance instance) pfn_vkMergeValidationCachesEXT = (PFN_vkMergeValidationCachesEXT)vkGetInstanceProcAddr(instance, "vkMergeValidationCachesEXT"); pfn_vkGetValidationCacheDataEXT = (PFN_vkGetValidationCacheDataEXT)vkGetInstanceProcAddr(instance, "vkGetValidationCacheDataEXT"); #endif /* VK_EXT_validation_cache */ +#ifdef VK_EXT_external_memory_host + pfn_vkGetMemoryHostPointerPropertiesEXT = (PFN_vkGetMemoryHostPointerPropertiesEXT)vkGetInstanceProcAddr(instance, "vkGetMemoryHostPointerPropertiesEXT"); +#endif /* VK_EXT_external_memory_host */ } void vkExtInitDevice(VkDevice device) @@ -2390,5 +2410,8 @@ void vkExtInitDevice(VkDevice device) pfn_vkMergeValidationCachesEXT = (PFN_vkMergeValidationCachesEXT)vkGetDeviceProcAddr(device, "vkMergeValidationCachesEXT"); pfn_vkGetValidationCacheDataEXT = (PFN_vkGetValidationCacheDataEXT)vkGetDeviceProcAddr(device, "vkGetValidationCacheDataEXT"); #endif /* VK_EXT_validation_cache */ +#ifdef VK_EXT_external_memory_host + pfn_vkGetMemoryHostPointerPropertiesEXT = (PFN_vkGetMemoryHostPointerPropertiesEXT)vkGetDeviceProcAddr(device, "vkGetMemoryHostPointerPropertiesEXT"); +#endif /* VK_EXT_external_memory_host */ } diff --git a/src/spec/vk.xml b/src/spec/vk.xml index f2f93b2d..55818c92 100644 --- a/src/spec/vk.xml +++ b/src/spec/vk.xml @@ -107,7 +107,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. // Vulkan 1.0 version number #define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)// Patch version should always be set to 0 // Version of this file -#define VK_HEADER_VERSION 65 +#define VK_HEADER_VERSION 66 #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; @@ -2646,6 +2646,22 @@ private version is maintained in the 1.0 branch of the member gitlab server. const void* pNext VkQueueGlobalPriorityEXT globalPriority + + VkStructureType sType + const void* pNext + VkExternalMemoryHandleTypeFlagBitsKHR handleType + void* pHostPointer + + + VkStructureType sType + void* pNext + uint32_t memoryTypeBits + + + VkStructureType sType + void* pNext + VkDeviceSize minImportedHostPointerAlignment + Vulkan enumerant (token) definitions @@ -2667,6 +2683,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. + @@ -3678,10 +3695,10 @@ private version is maintained in the 1.0 branch of the member gitlab server. - - - - + + + + @@ -5434,6 +5451,13 @@ private version is maintained in the 1.0 branch of the member gitlab server. size_t* pInfoSize void* pInfo + + VkResult vkGetMemoryHostPointerPropertiesEXT + VkDevice device + VkExternalMemoryHandleTypeFlagBitsKHR handleType + const void* pHostPointer + VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties + @@ -6940,16 +6964,18 @@ private version is maintained in the 1.0 branch of the member gitlab server. - + - - + + + - + - - + + + @@ -7420,7 +7446,7 @@ private version is maintained in the 1.0 branch of the member gitlab server. - + @@ -7446,10 +7472,19 @@ private version is maintained in the 1.0 branch of the member gitlab server. - + - - + + + + + + + + + + + @@ -7518,5 +7553,11 @@ private version is maintained in the 1.0 branch of the member gitlab server. + + + + + + diff --git a/src/vulkan/vulkan.h b/src/vulkan/vulkan.h index 8e21042a..ec67abe9 100644 --- a/src/vulkan/vulkan.h +++ b/src/vulkan/vulkan.h @@ -43,7 +43,7 @@ extern "C" { #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff) #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff) // Version of this file -#define VK_HEADER_VERSION 65 +#define VK_HEADER_VERSION 66 #define VK_NULL_HANDLE 0 @@ -355,6 +355,9 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000, VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001, VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = 1000174000, + VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT = 1000178000, + VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002, 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), @@ -4195,6 +4198,9 @@ typedef enum VkExternalMemoryHandleTypeFlagBitsKHR { VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR = 0x00000010, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR = 0x00000020, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR = 0x00000040, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT = 0x00000200, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT = 0x00000080, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT = 0x00000100, VK_EXTERNAL_MEMORY_HANDLE_TYPE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkExternalMemoryHandleTypeFlagBitsKHR; typedef VkFlags VkExternalMemoryHandleTypeFlagsKHR; @@ -6616,6 +6622,17 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK( #endif #endif /* VK_USE_PLATFORM_MACOS_MVK */ +#define VK_EXT_external_memory_dma_buf 1 +#define VK_EXT_EXTERNAL_MEMORY_DMA_BUF_SPEC_VERSION 1 +#define VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME "VK_EXT_external_memory_dma_buf" + + +#define VK_EXT_queue_family_foreign 1 +#define VK_EXT_QUEUE_FAMILY_FOREIGN_SPEC_VERSION 1 +#define VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME "VK_EXT_queue_family_foreign" +#define VK_QUEUE_FAMILY_FOREIGN_EXT (~0U-2) + + #define VK_EXT_sampler_filter_minmax 1 #define VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION 1 #define VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME "VK_EXT_sampler_filter_minmax" @@ -6907,18 +6924,18 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetValidationCacheDataEXT( #define VK_EXT_global_priority 1 -#define VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION 1 +#define VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION 2 #define VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME "VK_EXT_global_priority" typedef enum VkQueueGlobalPriorityEXT { - VK_QUEUE_GLOBAL_PRIORITY_LOW = 128, - VK_QUEUE_GLOBAL_PRIORITY_MEDIUM = 256, - VK_QUEUE_GLOBAL_PRIORITY_HIGH = 512, - VK_QUEUE_GLOBAL_PRIORITY_REALTIME = 1024, - VK_QUEUE_GLOBAL_PRIORITY_BEGIN_RANGE_EXT = VK_QUEUE_GLOBAL_PRIORITY_LOW, - VK_QUEUE_GLOBAL_PRIORITY_END_RANGE_EXT = VK_QUEUE_GLOBAL_PRIORITY_REALTIME, - VK_QUEUE_GLOBAL_PRIORITY_RANGE_SIZE_EXT = (VK_QUEUE_GLOBAL_PRIORITY_REALTIME - VK_QUEUE_GLOBAL_PRIORITY_LOW + 1), + VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT = 128, + VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT = 256, + VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT = 512, + VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT = 1024, + VK_QUEUE_GLOBAL_PRIORITY_BEGIN_RANGE_EXT = VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT, + VK_QUEUE_GLOBAL_PRIORITY_END_RANGE_EXT = VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT, + VK_QUEUE_GLOBAL_PRIORITY_RANGE_SIZE_EXT = (VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT - VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT + 1), VK_QUEUE_GLOBAL_PRIORITY_MAX_ENUM_EXT = 0x7FFFFFFF } VkQueueGlobalPriorityEXT; @@ -6930,6 +6947,40 @@ typedef struct VkDeviceQueueGlobalPriorityCreateInfoEXT { +#define VK_EXT_external_memory_host 1 +#define VK_EXT_EXTERNAL_MEMORY_HOST_SPEC_VERSION 1 +#define VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME "VK_EXT_external_memory_host" + +typedef struct VkImportMemoryHostPointerInfoEXT { + VkStructureType sType; + const void* pNext; + VkExternalMemoryHandleTypeFlagBitsKHR handleType; + void* pHostPointer; +} VkImportMemoryHostPointerInfoEXT; + +typedef struct VkMemoryHostPointerPropertiesEXT { + VkStructureType sType; + void* pNext; + uint32_t memoryTypeBits; +} VkMemoryHostPointerPropertiesEXT; + +typedef struct VkPhysicalDeviceExternalMemoryHostPropertiesEXT { + VkStructureType sType; + void* pNext; + VkDeviceSize minImportedHostPointerAlignment; +} VkPhysicalDeviceExternalMemoryHostPropertiesEXT; + + +typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryHostPointerPropertiesEXT)(VkDevice device, VkExternalMemoryHandleTypeFlagBitsKHR handleType, const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryHostPointerPropertiesEXT( + VkDevice device, + VkExternalMemoryHandleTypeFlagBitsKHR handleType, + const void* pHostPointer, + VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); +#endif + #ifdef __cplusplus } #endif