Jon Leech 5abf83f95d Change log for April 16, 2019 Vulkan 1.1.107 spec update:
* Update release number to 107.

Public Issues:

  * Fix revision date for the `<<VK_AMD_gpu_shader_half_float>>` appendix
    (public issue 617).
  * Make <<synchronization-pipeline-barriers-subpass-self-dependencies,
    subpass self-dependencies>> less restrictive (public issue 777).
  * Fix the `<<VK_EXT_full_screen_exclusive>>` dependency on
    `<<VK_KHR_win32_surface>>` in `vk.xml` (public pull request 849).
  * Remove single-page (`apispec.html`) refpage sub-targets from the
    Makefile `allman` target and the build instructions. The target is still
    present in the Makefile, but we have not been actively maintaining the
    single-page document and do not promise it will work. The full
    Specification and the individual API reference pages are what we support
    and publish at present (public issue 949).

Internal Issues:

  * De-duplicate common valid usage statements shared by multiple commands
    or structures by using asciidoctor includes and dynamically assigning
    part of the valid usage ID based on which command or structure they're
    being applied to (internal issue 779).
  * Add reference pages for constructs not part of the formal API, such as
    platform calling convention macros, and script changes supporting them
    This required suppressing some check_spec_links warning classes in order
    to pass CI, until a more sophisticated fix can be done (internal issue
    888).
  * Change math notation for the elink:VkPrimitiveTopology descriptions to
    use short forms `v` and `p` instead of `vertex` and `primitive`,
    increasing legibility (internal issue 1611).
  * Rewrite generated file includes relative to a globally specified path,
    fixing some issues with refpage generation (internal issue 1630).
  * Update contributor list for `<<VK_EXT_calibrated_timestamps>>`.
  * Fix use of pathlin in `scripts/generator.py` so the script will work on
    Windows under Python 3.5 (internal merge request 3107).
  * Add missing conditionals around the
    <<descriptorsets-accelerationstructure, Acceleration Structure>>
    section (internal merge request 3108).
  * More script synchronization with OpenXR spec repository (internal merge
    request 3109).
  * Mark the `<<VK_AMD_gpu_shader_half_float>>` and
    `<<VK_AMD_gpu_shader_int16>>` extensions as deprecated in `vk.xml` and
    the corresponding extension appendices (internal merge request 3112).

New Extensions:

  * `<<VK_EXT_headless_surface>>`
2019-04-16 05:19:43 -07:00

171 lines
7.1 KiB
Plaintext

[[drawing-mesh-shading]]
== Programmable Mesh Shading
In this drawing approach, primitives are assembled by the mesh shader stage.
<<mesh, Mesh shading>> operates similarly to <<dispatch, dispatching
compute>> as the shaders make use of workgroups.
[open,refpage='vkCmdDrawMeshTasksNV',desc='Draw mesh task work items',type='protos']
--
:refpage: vkCmdDrawMeshTasksNV
To record a draw that uses the mesh pipeline, call:
include::{generated}/api/protos/vkCmdDrawMeshTasksNV.txt[]
* pname:commandBuffer is the command buffer into which the command will be
recorded.
* pname:taskCount is the number of local workgroups to dispatch in the X
dimension.
Y and Z dimension are implicitly set to one.
* pname:firstTask is the X component of the first workgroup ID.
When the command is executed, a global workgroup consisting of
pname:taskCount local workgroups is assembled.
.Valid Usage
****
include::{chapters}/commonvalidity/draw_common.txt[]
* [[VUID-vkCmdDrawMeshTasksNV-taskCount-02119]]
pname:taskCount must: be less than or equal to
sname:VkPhysicalDeviceMeshShaderPropertiesNV::pname:maxDrawMeshTasksCount
****
include::{generated}/validity/protos/vkCmdDrawMeshTasksNV.txt[]
--
[open,refpage='vkCmdDrawMeshTasksIndirectNV',desc='Issue an indirect mesh tasks draw into a command buffer',type='protos']
--
:refpage: vkCmdDrawMeshTasksIndirectNV
To record an indirect mesh tasks draw, call:
include::{generated}/api/protos/vkCmdDrawMeshTasksIndirectNV.txt[]
* pname:commandBuffer is the command buffer into which the command is
recorded.
* pname:buffer is the buffer containing draw parameters.
* pname:offset is the byte offset into pname:buffer where parameters
begin.
* pname:drawCount is the number of draws to execute, and can: be zero.
* pname:stride is the byte stride between successive sets of draw
parameters.
fname:vkCmdDrawMeshTasksIndirectNV behaves similarly to
flink:vkCmdDrawMeshTasksNV except that the parameters are read by the device
from a buffer during execution.
pname:drawCount draws are executed by the command, with parameters taken
from pname:buffer starting at pname:offset and increasing by pname:stride
bytes for each successive draw.
The parameters of each draw are encoded in an array of
slink:VkDrawMeshTasksIndirectCommandNV structures.
If pname:drawCount is less than or equal to one, pname:stride is ignored.
.Valid Usage
****
include::{chapters}/commonvalidity/draw_common.txt[]
include::{chapters}/commonvalidity/draw_dispatch_indirect_common.txt[]
include::{chapters}/commonvalidity/draw_indirect_drawcount.txt[]
* [[VUID-vkCmdDrawMeshTasksIndirectNV-drawCount-02146]]
If pname:drawCount is greater than `1`, pname:stride must: be a multiple
of `4` and must: be greater than or equal to
code:sizeof(sname:VkDrawMeshTasksIndirectCommandNV)
* [[VUID-vkCmdDrawMeshTasksIndirectNV-drawCount-02156]]
If pname:drawCount is equal to `1`, [eq]#(pname:offset {plus}
code:sizeof(slink:VkDrawMeshTasksIndirectCommandNV))# must: be less than
or equal to the size of pname:buffer
* [[VUID-vkCmdDrawMeshTasksIndirectNV-drawCount-02157]]
If pname:drawCount is greater than `1`, [eq]#(pname:stride {times}
(pname:drawCount - 1) {plus} pname:offset {plus}
code:sizeof(slink:VkDrawMeshTasksIndirectCommandNV))# must: be less than
or equal to the size of pname:buffer
****
include::{generated}/validity/protos/vkCmdDrawMeshTasksIndirectNV.txt[]
--
[open,refpage='VkDrawMeshTasksIndirectCommandNV',desc='Structure specifying a mesh tasks draw indirect command',type='structs',xrefs='vkCmdDrawMeshTasksIndirectNV']
--
The sname:VkDrawMeshTasksIndirectCommandNV structure is defined as:
include::{generated}/api/structs/VkDrawMeshTasksIndirectCommandNV.txt[]
* pname:taskCount is the number of local workgroups to dispatch in the X
dimension.
Y and Z dimension are implicitly set to one.
* pname:firstTask is the X component of the first workgroup ID.
The members of sname:VkDrawMeshTasksIndirectCommandNV have the same meaning
as the similarly named parameters of flink:vkCmdDrawMeshTasksNV.
.Valid Usage
****
* [[VUID-VkDrawMeshTasksIndirectCommandNV-taskCount-02175]]
pname:taskCount must: be less than or equal to
sname:VkPhysicalDeviceMeshShaderPropertiesNV::pname:maxDrawMeshTasksCount
****
include::{generated}/validity/structs/VkDrawMeshTasksIndirectCommandNV.txt[]
--
[open,refpage='vkCmdDrawMeshTasksIndirectCountNV',desc='Perform an indirect mesh tasks draw with the draw count sourced from a buffer',type='protos']
--
:refpage: vkCmdDrawMeshTasksIndirectCountNV
To record an indirect mesh tasks draw with the draw count sourced from a
buffer, call:
include::{generated}/api/protos/vkCmdDrawMeshTasksIndirectCountNV.txt[]
* pname:commandBuffer is the command buffer into which the command is
recorded.
* pname:buffer is the buffer containing draw parameters.
* pname:offset is the byte offset into pname:buffer where parameters
begin.
* pname:countBuffer is the buffer containing the draw count.
* pname:countBufferOffset is the byte offset into pname:countBuffer where
the draw count begins.
* pname:maxDrawCount specifies the maximum number of draws that will be
executed.
The actual number of executed draw calls is the minimum of the count
specified in pname:countBuffer and pname:maxDrawCount.
* pname:stride is the byte stride between successive sets of draw
parameters.
fname:vkCmdDrawMeshTasksIndirectCountNV behaves similarly to
flink:vkCmdDrawMeshTasksIndirectNV except that the draw count is read by the
device from a buffer during execution.
The command will read an unsigned 32-bit integer from pname:countBuffer
located at pname:countBufferOffset and use this as the draw count.
.Valid Usage
****
include::{chapters}/commonvalidity/draw_common.txt[]
include::{chapters}/commonvalidity/draw_dispatch_indirect_common.txt[]
include::{chapters}/commonvalidity/draw_indirect_count_common.txt[]
* [[VUID-vkCmdDrawMeshTasksIndirectCountNV-stride-02182]]
pname:stride must: be a multiple of `4` and must: be greater than or
equal to code:sizeof(sname:VkDrawMeshTasksIndirectCommandNV)
* [[VUID-vkCmdDrawMeshTasksIndirectCountNV-maxDrawCount-02183]]
If pname:maxDrawCount is greater than or equal to `1`,
[eq]#(pname:stride {times} (pname:maxDrawCount - 1) {plus} pname:offset
{plus} code:sizeof(sname:VkDrawMeshTasksIndirectCommandNV))# must: be
less than or equal to the size of pname:buffer
* [[VUID-vkCmdDrawMeshTasksIndirectCountNV-countBuffer-02191]]
If the count stored in pname:countBuffer is equal to `1`,
[eq]#(pname:offset {plus}
code:sizeof(sname:VkDrawMeshTasksIndirectCommandNV))# must: be less than
or equal to the size of pname:buffer
* [[VUID-vkCmdDrawMeshTasksIndirectCountNV-countBuffer-02192]]
If the count stored in pname:countBuffer is greater than `1`,
[eq]#(pname:stride {times} (pname:drawCount - 1) {plus} pname:offset
{plus} code:sizeof(sname:VkDrawMeshTasksIndirectCommandNV))# must: be
less than or equal to the size of pname:buffer
****
include::{generated}/validity/protos/vkCmdDrawMeshTasksIndirectCountNV.txt[]
--