Vulkan-Docs/doc/specs/vulkan/man/vkCmdWaitEvents.txt

139 lines
6.1 KiB
Plaintext
Raw Normal View History

2016-02-16 09:53:44 +00:00
vkCmdWaitEvents(3)
==================
Name
----
vkCmdWaitEvents - Wait for one or more events and insert a set of memory
barriers.
C Specification
---------------
include::../protos/vkCmdWaitEvents.txt[]
Parameters
----------
pname:commandBuffer::
The command buffer in which to wait.
pname:eventCount::
Number of event objects to wait on.
pname:pEvents::
Array of pname:eventCount number of event objects to wait on.
pname:srcStageMask::
Mask of pipeline stages used to signal all of the events in pname:pEvents.
pname:dstStageMask::
Specifies which pipeline stages must wait for the events to become
signaled (see elink:VkPipelineStageFlags for more detail).
pname:memoryBarrierCount::
Number of memory barriers to insert after waiting for the events.
pname:ppMemoryBarriers::
Array of pointers to memory barrier structures specifying the parameters
of the memory barriers to insert after waiting for the events. Each
element of the array may point to a slink:VkMemoryBarrier,
slink:VkBufferMemoryBarrier, or slink:VkImageMemoryBarrier structure.
Description
-----------
fname:vkCmdWaitEvents waits for a number of event objects to become
Change log for May 13, 2016 Vulkan 1.0.13 spec update: * Bump API patch number and header version number to 13 for this update. Github Issues: * Improve the description of ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR in the VK_KHR_surface extension (public issue 174). * Clarify use of etext:*_SIMULTANEOUS_USE_BIT for secondary command buffers (public issue 182). * Fix typos in VK_KHR_wayland_surface extension where code:wl_device was used instead of code:wl_display (public issue 193). * Replaced {apiname} with ``Vulkan'' in XML validity statements (public issue 199). * Fix dead links for WSI handle types (public issue 200). *** N.b. this needs to be done in WSI branches as well *** * Use "signaled" instead of "signalled" spelling everywhere (public issue 201). *** N.b. this needs to be done in WSI branches as well *** * Move readme.pdf target directory for XML schema documentation into the target generation directory, instead of leaving it checked into the spec source tree (public issue 203). *** N.b. need to add generated PDF to registry index/1.0 page * Fix duplicate 'which which' typo in description of elink:VkCommandPoolResetFlagBits (public issue 204). * Move the <<Programmable Primitive Shading>> section up one level, out of the <<drawing-primitive-topologies,Primitive Topologies>> section (public issue 209). Internal Issues: * Clarify in the <<pipelines-cache,Pipeline Cache>> section that implementations should not manage the size of pipeline cache (internal issue 192). * Deprecate the concept of device layers and associated commands (internal issue 255). * Remove ename:VK_INCOMPLETE from the list of possible result codes of flink:vkGetPhysicalDeviceSurfaceCapabilitiesKHR (internal issue 314). * Add missing std140/std430 rule: the base alignment of a member following a structure is a multiple of the structure's base alignment (internal issue 321). * Fixes naming of the single elink:VkColorSpaceKHR enum from ename:VK_COLORSPACE_SRGB_NONLINEAR_KHR to ename:VK_COLOR_SPACE_SRGB_NONLINEAR_KHR in XML/header and the VK_KHR_swapchain and VK_KHR_surface extensions to match the style of the typename (space and color are two words, not one) (internal issue 322). * Make it clear that code:LocalInvocationID should only be applied to an input variable and normalize the language describing code:LocalInvocationID to the language for other compute shader variables in the <<interfaces-builtin-variables,Built-in Variables>> section, and add normative language (internal issue 323). * Clarify in the <<fundamentals-returncodes,Return Codes>> section that the result pointer may be modified for specific commands, even if a runtime error is returned (internal issue 324).
2016-05-14 00:01:59 +00:00
signaled and inserts a set of memory barriers into the command buffer
2016-02-16 09:53:44 +00:00
specified by pname:commandBuffer.
fname:vkCmdWaitEvents waits for each of the pname:eventCount event object
Change log for May 13, 2016 Vulkan 1.0.13 spec update: * Bump API patch number and header version number to 13 for this update. Github Issues: * Improve the description of ename:VK_PRESENT_MODE_FIFO_RELAXED_KHR in the VK_KHR_surface extension (public issue 174). * Clarify use of etext:*_SIMULTANEOUS_USE_BIT for secondary command buffers (public issue 182). * Fix typos in VK_KHR_wayland_surface extension where code:wl_device was used instead of code:wl_display (public issue 193). * Replaced {apiname} with ``Vulkan'' in XML validity statements (public issue 199). * Fix dead links for WSI handle types (public issue 200). *** N.b. this needs to be done in WSI branches as well *** * Use "signaled" instead of "signalled" spelling everywhere (public issue 201). *** N.b. this needs to be done in WSI branches as well *** * Move readme.pdf target directory for XML schema documentation into the target generation directory, instead of leaving it checked into the spec source tree (public issue 203). *** N.b. need to add generated PDF to registry index/1.0 page * Fix duplicate 'which which' typo in description of elink:VkCommandPoolResetFlagBits (public issue 204). * Move the <<Programmable Primitive Shading>> section up one level, out of the <<drawing-primitive-topologies,Primitive Topologies>> section (public issue 209). Internal Issues: * Clarify in the <<pipelines-cache,Pipeline Cache>> section that implementations should not manage the size of pipeline cache (internal issue 192). * Deprecate the concept of device layers and associated commands (internal issue 255). * Remove ename:VK_INCOMPLETE from the list of possible result codes of flink:vkGetPhysicalDeviceSurfaceCapabilitiesKHR (internal issue 314). * Add missing std140/std430 rule: the base alignment of a member following a structure is a multiple of the structure's base alignment (internal issue 321). * Fixes naming of the single elink:VkColorSpaceKHR enum from ename:VK_COLORSPACE_SRGB_NONLINEAR_KHR to ename:VK_COLOR_SPACE_SRGB_NONLINEAR_KHR in XML/header and the VK_KHR_swapchain and VK_KHR_surface extensions to match the style of the typename (space and color are two words, not one) (internal issue 322). * Make it clear that code:LocalInvocationID should only be applied to an input variable and normalize the language describing code:LocalInvocationID to the language for other compute shader variables in the <<interfaces-builtin-variables,Built-in Variables>> section, and add normative language (internal issue 323). * Clarify in the <<fundamentals-returncodes,Return Codes>> section that the result pointer may be modified for specific commands, even if a runtime error is returned (internal issue 324).
2016-05-14 00:01:59 +00:00
specified by pname:pEvents to become signaled. The point at which each is
signaled must have been specified in the command that caused the object to
become signaled (either fname:vkSetEvent or fname:vkCmdSetEvent) and must
2016-02-16 09:53:44 +00:00
also have the corresponding bit set in pname:srcStageMask.
The pname:ppMemoryBarriers parameter is a pointer to an array of pname:memoryBarrierCount
structures defining the parameters of memory barriers to insert after waiting
for each of the events. Each element of the array may be an instance of
slink:VkMemoryBarrier, slink:VkBufferMemoryBarrier, or slink:VkImageMemoryBarrier,
the definitions of each are, respectively:
include::../structs/VkMemoryBarrier.txt[]
include::../structs/VkBufferMemoryBarrier.txt[]
include::../structs/VkImageMemoryBarrier.txt[]
The memory barriers specified by pname:ppMemoryBarriers cause writes as described by
pname:outputMask that were written by pipeline stages in pname:srcStageMask
prior to the wait to be made visible to reads as described by
pname:inputMask in pipeline stages in pname:dstStageMask subsequent to the
wait.
In case of global memory barriers inserted by passing an
slink:VkMemoryBarrier structure to the command prior writes in the requested
pipeline stages to any memory location corresponding to the set of memory
output coherency flags specified in the pname:outputMask member of the
structure are made coherent with subsequent reads in the requested pipeline
stages of any memory location corresponding to the set of memory input
coherency flags specified in the pname:inputMask member of the structure.
In case of buffer memory barriers inserted by passing an
slink:VkBufferMemoryBarrier structure to the command prior writes in the
requested pipeline stages to the specified sub-range of the buffer
corresponding to the set of memory output coherency flags specified in the
pname:outputMask member of the structure are made coherent with subsequent
reads in the requested pipeline stages of the specified sub-range of the
buffer corresponding to the set of memory input coherency flags specified in
the pname:inputMask member of the structure.
In case of image memory barriers inserted by passing an
slink:VkImageMemoryBarrier structure to the command prior writes in the
requested pipeline stages to the specified sub-range of the image
corresponding to the set of memory output coherency flags specified in the
pname:outputMask member of the structure are made coherent with subsequent
reads in the requested pipeline stages of the specified sub-range of the
image corresponding to the set of memory input coherency flags specified in
the pname:inputMask member of the structure. Additionally, if the
pname:oldLayout and pname:newLayout members of the structure don't match a
layout transition is performed on the specified sub-range of the image as
part of the memory barrier.
In case of buffer and image memory barriers the pname:srcQueueFamilyIndex
and pname:dstQueueFamilyIndex members of the corresponding memory barrier
structures can specify the parameters of a transfer of ownership between two
distinct families of queues of a shared buffer or image object created with
the ename:VK_SHARING_MODE_EXCLUSIVE sharing mode. In case of regular
resource transitions both pname:srcQueueFamilyIndex and
pname:dstQueueFamilyIndex should be set to ename:VK_QUEUE_FAMILY_IGNORED to
indicate no transfer of ownership between queue families. In case of
resource transitions involving ownership transfer of shared buffers or
images one of these two members have to match the queue family index the
command buffer specified by pname:commandBuffer was created for, while the other
should specify the queue family index the ownership transfer is released to
or acquired from. Ownership transferring resource transitions have to be
performed both on a queue from the source queue family and on a queue from
the destination queue family (see elink:VkSharingMode for more detail).
If pname:inputMask is zero in any of the memory barrier structures
then prior writes will only be coherent with any type of subsequent read
after a future resource transition command specifies a non-empty set of
memory input coherency control flags. This allows flushing device output
caches unconditionally.
If pname:outputMask is zero in any of the memory barrier
structures then subsequent reads will only be coherent with any type of
prior write if an earlier resource transition command specified a non-empty
set of memory output coherency control flags. This allows invalidating
device input caches unconditionally.
include::../validity/protos/vkCmdWaitEvents.txt[]
See Also
--------
flink:vkCmdSetEvent, flink:vkCmdResetEvent, flink:vkSetEvent, flink:vkResetEvent, flink:vkCmdPipelineBarrier,
slink:VkMemoryBarrier, slink:VkBufferMemoryBarrier, slink:VkImageMemoryBarrier, elink:VkPipelineStageFlagBits
include::footer.txt[]