Vulkan-Docs/doc/specs/vulkan/chapters/pipelines.txt

948 lines
42 KiB
Plaintext
Raw Normal View History

2016-02-16 09:53:44 +00:00
// Copyright (c) 2015-2016 The Khronos Group Inc.
// Copyright notice at https://www.khronos.org/registry/speccopyright.html
[[pipelines]]
= Pipelines
The following <<pipelines-block-diagram,figure>> shows a block diagram of
Change log for April 29, 2016 Vulkan 1.0.12 spec update: * Bump API patch number and header version number to 12 for this update. Github Issues: * Change valid usage statements intended to be "sub-points" to be actual sub-points (public issue 66). * Replace double negation in description of slink:VkRenderPassBeginInfo::pname:pClearValues (based on public merge 142). * Cleanup minor typos in spec, ref pages and XML, including those proposed in public pull requests 144, 150, 151, 167, 168, 181, and 186. * Use *strict subset* in describing the partial order of memory property types for slink:VkMemoryType, and update the style guide accordingly (public issue 190). * Fix various "a image" -> "an image" typos (public issue 191). * Note in the <<fundamentals-validusage,Valid Usage>> and <<extensions-interactions,Extension Interactions>> sections that structures defined by extensions which may be passed in structure chains using the ptext:pNext member must: include initial ptext:sType and ptext:pNext members (public issue 192). Internal Issues: * Remove duplicate language from the description of the pname:fence parameter to flink:vkQueueSubmit and improve validity language (internal issue 91). * Added documentation for "optional" attribute to XML readme.tex/pdf (internal issue 149). * Clarify the host-side data validity rules and behavior of flink:vkFlushMappedMemoryRanges and flink:vkInvalidateMappedMemoryRanges (internal issue 266). Other Commits: * Added clarification to flink:vkCmdFillBuffer regarding the use of ename:VK_WHOLE_SIZE. * Fixed and documented implementation of "validextensionstructs" attribute. in XML processing scripts and readme.tex/pdf. * Add missing validity statements to flink:vkResetEvent and flink:vkCmdResetEvent. * Fix validity for the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag. Correct all the draw/dispatch commands to mention optimally tiled images as well as linear tiled images, and say image VIEWS instead of images. Add validity statement to flink:vkCmdBlitImage * Replace the {apiname} macro with hardcoded "Vulkan", now that we've committed to that name. * Add the VK_AMD_rasterization_order extension to vk.xml.
2016-04-29 12:53:46 +00:00
the Vulkan pipelines. Some Vulkan commands specify geometric objects
2016-02-16 09:53:44 +00:00
to be drawn or computational work to be performed, while others specify
state controlling how objects are handled by the various pipeline stages, or
control data transfer between memory organized as images and buffers.
Commands are effectively sent through a processing pipeline, either a
_graphics pipeline_ or a _compute pipeline_.
The first stage of the <<pipelines-graphics,graphics pipeline>>
(<<drawing,Input Assembler>>) assembles vertices to form
geometric primitives such as points, lines, and triangles, based on a
requested primitive topology. In the next stage (<<shaders-vertex,Vertex
Shader>>) vertices can: be transformed, computing positions and attributes
for each vertex. If <<tessellation,tessellation>> and/or
<<geometry,geometry>> shaders are supported, they can: then generate
multiple primitives from a single input primitive, possibly changing the
primitive topology or generating additional attribute data in the process.
The final resulting primitives are <<vertexpostproc-clipping,clipped>> to a
clip volume in preparation for the next stage, <<primsrast,Rasterization>>.
The rasterizer produces a series of framebuffer addresses and values using a
two-dimensional description of a point, line segment, or triangle. Each
_fragment_ so produced is fed to the next stage (<<shaders-fragment,Fragment
Shader>>) that performs operations on individual fragments before they
finally alter the framebuffer. These operations include conditional updates
into the framebuffer based on incoming and previously stored depth values
(to effect <<fragops-depth,depth buffering>>),
<<framebuffer-blending,blending>> of incoming fragment colors with stored
colors, as well as <<framebuffer-blendoperations,masking>>,
<<fragops-stencil,stenciling>>, and other <<framebuffer-logicop,logical
operations>> on fragment values.
Framebuffer operations read and write the color and depth/stencil
attachments of the framebuffer for a given subpass of a
<<renderpass,render pass instance>>. The attachments can: be used as input
attachments in the fragment shader in a later subpass of the same render
pass.
The <<pipelines-compute,compute pipeline>> is a separate pipeline from the
graphics pipeline, which operates on one-, two-, or three-dimensional
Change log for March 10, 2016 Vulkan 1.0.6 spec update: * Bump API patch number and header version number to 6 for this update. Github Issues: * Define 'invocation group' for compute and graphics shaders. Cleanup definition and use of 'workgroup', and add glossary entries (public issue 1). * Various minor editorial fixes (public issue 33). * Clarify locations for block members in the &lt;&lt;interfaces-iointerfaces-locations,Location Assignment>> section (public issue 45). * Editorial fixes for &lt;&lt;commandbuffer-allocation,Command Buffer Allocation>> section (public issues 54, 59). * Clarify behavior of depth test in the &lt;&lt;fragops-depth,Depth Test&gt;&gt; section (public issues 80, 81). * Remove discussion of return codes from flink:vkGetPhysicalDeviceSparseImageFormatProperties and flink:vkGetImageSparseMemoryRequirements, which don't return values (public issue 82). * Allow flink:vkCmdDrawIndirect and flink:vkCmdDrawIndexedIndirect pname:drawCount of 0, as well as 1, when the multiDrawIndirect feature is not supported (public issue 88). * Remove confusing wording in the &lt;&lt;features-limits,Limits>> section describing the slink:VkPhysicalDeviceLimits pname:minTexelBufferOffsetAlignment, pname:minUniformBufferOffsetAlignment, and pname:minStorageBufferOffsetAlignment members as both minimums and maximums (public issue 91). * Clarified that only the RGB components should be affected in places where sRGB is referred to in the spec, such as ASTC formats. Minor re-wording to avoid "color space" when actively incorrect, now that we refer to the Data Format Spec which actually makes a distinction between color space and transfer function (public issue 94). * Treat pname:pPropertyCount == 0 consistently in flink:vkEnumerateInstanceLayerProperties and flink:vkEnumerateDeviceLayerProperties (public issue 99) * Cleanup minor editorial issues in chapters 14-17 (public issue 100). * Clarify definition of flink:vkEnumerateInstanceExtensionProperties and flink:vkEnumerateDeviceExtensionProperties (public issue 101). * Define the flink:vkEnumerateInstanceExtensionProperties and flink:vkEnumerateDeviceExtensionProperties pname:pLayerName parameter to be a pointer to a null-terminated UTF-8 string (public issue 101). * Rearrange "Missing information" references in mandatory format tables (public issue 101). * Clarify that the enumerated extensions returned by flink:vkEnumerateInstanceExtensionProperties and flink:vkEnumerateDeviceExtensionProperties will only include extensions provided by the platform or extensions implemented in implicitly enabled layers (public issue 101). * Miscellaneous editorial fixes. Include the Vulkan spec patch number in the PDF title. Fix label on &lt;&lt;fig-non-strict-lines,Non strict lines>> diagram. Use more easily distinguished symbols in tables in the &lt;&lt;features-required-format-support,Required Format Support>> section. Don't require FQDNs used as layer names be encoded in lower case if not possible, in the &lt;&lt;extensions-naming-conventions, Extension and Layer Naming Conventions>> section (public issues 101, 119, 121). Internal Issues: * Fixed excessive spacing in tables in XHTML (internal issue 18). * Clarify that ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT applies to secondary command buffers. Previously spec only referred to the members of pname:pCommandBuffers being affected by this bit. Added a separate slink:VkSubmitInfo Valid Usage restriction specifying that ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT also applies to any secondary command buffers that are recorded into the primary command buffers in pname:pCommandBuffers (internal issue 106). * Clarify that slink:VkDeviceCreateInfo::pname:pEnabledFeatures can be NULL (internal issue 117). * Remove "the value of" where it is redundant (e.g. speaking of an API parameter, struct member, or SPIR-V variable, but not when speaking of color components) (internal issue 175). * Forced patch version to always be 0 in the header. Add a "VK_API_VERSION_<major>_<minor>" macro for people to use to do the right thing. Add a VK_HEADER_VERSION which captures the header release number independent of the spec patch number (internal issue 176). * Correct description of slink:VkPipelineShaderStageCreateInfo::pname:pName to "a pointer to a null-terminated UTF-8 string" (internal issue #197). Other Commits: * Updated DataFormat spec reference to the new date for revision 5 of that spec. * Fixed KEEP option (to retain LaTeX intermediate files) in the Makefile to be included when edited there, as well as set on the command line. * Reserve and add "VK_IMG_filter_cubic" to the registry, and implement script functionality to add and remove validity from existing functions. Includes schema and readme changes. * Update GL_KHR_vulkan_glsl so push_constants do not have descriptor sets.
2016-03-11 01:33:02 +00:00
workgroups which can: read from and write to buffer and image memory.
2016-02-16 09:53:44 +00:00
Change log for April 29, 2016 Vulkan 1.0.12 spec update: * Bump API patch number and header version number to 12 for this update. Github Issues: * Change valid usage statements intended to be "sub-points" to be actual sub-points (public issue 66). * Replace double negation in description of slink:VkRenderPassBeginInfo::pname:pClearValues (based on public merge 142). * Cleanup minor typos in spec, ref pages and XML, including those proposed in public pull requests 144, 150, 151, 167, 168, 181, and 186. * Use *strict subset* in describing the partial order of memory property types for slink:VkMemoryType, and update the style guide accordingly (public issue 190). * Fix various "a image" -> "an image" typos (public issue 191). * Note in the <<fundamentals-validusage,Valid Usage>> and <<extensions-interactions,Extension Interactions>> sections that structures defined by extensions which may be passed in structure chains using the ptext:pNext member must: include initial ptext:sType and ptext:pNext members (public issue 192). Internal Issues: * Remove duplicate language from the description of the pname:fence parameter to flink:vkQueueSubmit and improve validity language (internal issue 91). * Added documentation for "optional" attribute to XML readme.tex/pdf (internal issue 149). * Clarify the host-side data validity rules and behavior of flink:vkFlushMappedMemoryRanges and flink:vkInvalidateMappedMemoryRanges (internal issue 266). Other Commits: * Added clarification to flink:vkCmdFillBuffer regarding the use of ename:VK_WHOLE_SIZE. * Fixed and documented implementation of "validextensionstructs" attribute. in XML processing scripts and readme.tex/pdf. * Add missing validity statements to flink:vkResetEvent and flink:vkCmdResetEvent. * Fix validity for the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag. Correct all the draw/dispatch commands to mention optimally tiled images as well as linear tiled images, and say image VIEWS instead of images. Add validity statement to flink:vkCmdBlitImage * Replace the {apiname} macro with hardcoded "Vulkan", now that we've committed to that name. * Add the VK_AMD_rasterization_order extension to vk.xml.
2016-04-29 12:53:46 +00:00
This ordering is meant only as a tool for describing Vulkan, not as a
strict rule of how Vulkan is implemented, and we present it only as a
2016-02-16 09:53:44 +00:00
means to organize the various operations of the pipelines.
[[pipelines-block-diagram]]
image::images/pipeline.{svgpdf}[title="Block diagram of the Vulkan pipeline",width="{svgpdf@pdf:500:800}",align="center"]
Each pipeline is controlled by a monolithic object created from a
description of all of the shader stages and any relevant fixed-function
stages. <<interfaces,Linking>> the whole pipeline together allows
the optimization of shaders based on their input/outputs and eliminates
expensive draw time state validation.
A pipeline object is bound to the device state in command buffers. Any
pipeline object state that is marked as dynamic is not applied to the device
state when the pipeline is bound. Dynamic state not set by binding the
pipeline object can: be modified at any time and persists for the lifetime
of the command buffer, or until modified by another dynamic state command or
another pipeline bind. No state, including dynamic state, is inherited from
one command buffer to another. Only dynamic state that is required: for the
operations performed in the command buffer needs to be set. For example, if
blending is disabled by the pipeline state then the dynamic color blend
constants do not need to be specified in the command buffer, even if this
state is marked as dynamic in the pipeline state object. If a new pipeline
object is bound with state not marked as dynamic after a previous pipeline
object with that same state as dynamic, the new pipeline object state will
override the dynamic state. Modifying dynamic state that is not set as
dynamic by the pipeline state object will lead to undefined results.
// refBegin VkPipeline - Opaque handle to a pipeline object
Compute and graphics pipelines are each represented by sname:VkPipeline
handles:
include::../handles/VkPipeline.txt[]
// refEnd VkPipeline
2016-02-16 09:53:44 +00:00
[[pipelines-compute]]
== Compute Pipelines
Compute pipelines consist of a single static compute shader stage and the
pipeline layout.
The compute pipeline represents a compute shader and is created by calling
2016-02-16 09:53:44 +00:00
fname:vkCreateComputePipelines with pname:module and pname:pName selecting
an entry point from a shader module, where that entry point defines a valid
compute shader, in the sname:VkPipelineShaderStageCreateInfo structure
contained within the sname:VkComputePipelineCreateInfo structure.
// refBegin vkCreateComputePipelines Creates a new compute pipeline object.
To create compute pipelines, call:
2016-02-16 09:53:44 +00:00
include::../protos/vkCreateComputePipelines.txt[]
* pname:device is the logical device that creates the compute pipelines.
* pname:pipelineCache is either dlink:VK_NULL_HANDLE, indicating that
2016-02-16 09:53:44 +00:00
pipeline caching is disabled; or the handle of a valid
<<pipelines-cache,pipeline cache>> object, in which case use of that
cache is enabled for the duration of the command.
* pname:createInfoCount is the length of the pname:pCreateInfos and
Change log for April 29, 2016 Vulkan 1.0.12 spec update: * Bump API patch number and header version number to 12 for this update. Github Issues: * Change valid usage statements intended to be "sub-points" to be actual sub-points (public issue 66). * Replace double negation in description of slink:VkRenderPassBeginInfo::pname:pClearValues (based on public merge 142). * Cleanup minor typos in spec, ref pages and XML, including those proposed in public pull requests 144, 150, 151, 167, 168, 181, and 186. * Use *strict subset* in describing the partial order of memory property types for slink:VkMemoryType, and update the style guide accordingly (public issue 190). * Fix various "a image" -> "an image" typos (public issue 191). * Note in the <<fundamentals-validusage,Valid Usage>> and <<extensions-interactions,Extension Interactions>> sections that structures defined by extensions which may be passed in structure chains using the ptext:pNext member must: include initial ptext:sType and ptext:pNext members (public issue 192). Internal Issues: * Remove duplicate language from the description of the pname:fence parameter to flink:vkQueueSubmit and improve validity language (internal issue 91). * Added documentation for "optional" attribute to XML readme.tex/pdf (internal issue 149). * Clarify the host-side data validity rules and behavior of flink:vkFlushMappedMemoryRanges and flink:vkInvalidateMappedMemoryRanges (internal issue 266). Other Commits: * Added clarification to flink:vkCmdFillBuffer regarding the use of ename:VK_WHOLE_SIZE. * Fixed and documented implementation of "validextensionstructs" attribute. in XML processing scripts and readme.tex/pdf. * Add missing validity statements to flink:vkResetEvent and flink:vkCmdResetEvent. * Fix validity for the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag. Correct all the draw/dispatch commands to mention optimally tiled images as well as linear tiled images, and say image VIEWS instead of images. Add validity statement to flink:vkCmdBlitImage * Replace the {apiname} macro with hardcoded "Vulkan", now that we've committed to that name. * Add the VK_AMD_rasterization_order extension to vk.xml.
2016-04-29 12:53:46 +00:00
pname:pPipelines arrays.
2016-02-16 09:53:44 +00:00
* pname:pCreateInfos is an array of sname:VkComputePipelineCreateInfo
structures.
* pname:pAllocator controls host memory allocation as described in the
<<memory-allocation, Memory Allocation>> chapter.
* pname:pPipelines is a pointer to an array in which the resulting compute
pipeline objects are returned.
+
--
ifdef::editing-notes[]
[NOTE]
.editing-note
====
TODO (Jon) - Should we say something like ``the i'th element of the
pname:pPipelines array is created based on the corresponding element of the
pname:pCreateInfos array''? Also for flink:vkCreateGraphicsPipelines below.
====
endif::editing-notes[]
--
include::../validity/protos/vkCreateComputePipelines.txt[]
// refBegin VkComputePipelineCreateInfo - Structure specifying parameters of a newly created compute pipeline
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
The sname:VkComputePipelineCreateInfo structure is defined as:
2016-02-16 09:53:44 +00:00
include::../structs/VkComputePipelineCreateInfo.txt[]
* pname:sType is the type of this structure.
* pname:pNext is `NULL` or a pointer to an extension-specific structure.
* pname:flags provides options for pipeline creation, and is of type
elink:VkPipelineCreateFlagBits.
* pname:stage is a slink:VkPipelineShaderStageCreateInfo describing the
compute shader.
* pname:layout is the description of binding locations used by both the
pipeline and descriptor sets used with the pipeline.
* pname:basePipelineHandle is a pipeline to derive from
* pname:basePipelineIndex is an index into the pname:pCreateInfos
parameter to use as a pipeline to derive from
The parameters pname:basePipelineHandle and pname:basePipelineIndex are
described in more detail in
<<pipelines-pipeline-derivatives,Pipeline Derivatives>>.
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
pname:stage points to a structure of type
sname:VkPipelineShaderStageCreateInfo.
2016-02-16 09:53:44 +00:00
include::../validity/structs/VkComputePipelineCreateInfo.txt[]
// refBegin VkPipelineShaderStageCreateInfo - Structure specifying parameters of a newly created pipeline shader stage
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
The sname:VkPipelineShaderStageCreateInfo structure is defined as:
2016-02-16 09:53:44 +00:00
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
include::../structs/VkPipelineShaderStageCreateInfo.txt[]
2016-02-16 09:53:44 +00:00
* pname:sType is the type of this structure.
* pname:pNext is `NULL` or a pointer to an extension-specific structure.
* pname:flags is reserved for future use.
* pname:stage names a single pipeline stage. Bits which can:
be set include:
+
--
// refBegin VkShaderStageFlagBits - Bitmask specifying a pipeline stage
include::../enums/VkShaderStageFlagBits.txt[]
--
2016-02-16 09:53:44 +00:00
* pname:module is a sname:VkShaderModule object that contains the
shader for this stage.
Change log for March 10, 2016 Vulkan 1.0.6 spec update: * Bump API patch number and header version number to 6 for this update. Github Issues: * Define 'invocation group' for compute and graphics shaders. Cleanup definition and use of 'workgroup', and add glossary entries (public issue 1). * Various minor editorial fixes (public issue 33). * Clarify locations for block members in the &lt;&lt;interfaces-iointerfaces-locations,Location Assignment>> section (public issue 45). * Editorial fixes for &lt;&lt;commandbuffer-allocation,Command Buffer Allocation>> section (public issues 54, 59). * Clarify behavior of depth test in the &lt;&lt;fragops-depth,Depth Test&gt;&gt; section (public issues 80, 81). * Remove discussion of return codes from flink:vkGetPhysicalDeviceSparseImageFormatProperties and flink:vkGetImageSparseMemoryRequirements, which don't return values (public issue 82). * Allow flink:vkCmdDrawIndirect and flink:vkCmdDrawIndexedIndirect pname:drawCount of 0, as well as 1, when the multiDrawIndirect feature is not supported (public issue 88). * Remove confusing wording in the &lt;&lt;features-limits,Limits>> section describing the slink:VkPhysicalDeviceLimits pname:minTexelBufferOffsetAlignment, pname:minUniformBufferOffsetAlignment, and pname:minStorageBufferOffsetAlignment members as both minimums and maximums (public issue 91). * Clarified that only the RGB components should be affected in places where sRGB is referred to in the spec, such as ASTC formats. Minor re-wording to avoid "color space" when actively incorrect, now that we refer to the Data Format Spec which actually makes a distinction between color space and transfer function (public issue 94). * Treat pname:pPropertyCount == 0 consistently in flink:vkEnumerateInstanceLayerProperties and flink:vkEnumerateDeviceLayerProperties (public issue 99) * Cleanup minor editorial issues in chapters 14-17 (public issue 100). * Clarify definition of flink:vkEnumerateInstanceExtensionProperties and flink:vkEnumerateDeviceExtensionProperties (public issue 101). * Define the flink:vkEnumerateInstanceExtensionProperties and flink:vkEnumerateDeviceExtensionProperties pname:pLayerName parameter to be a pointer to a null-terminated UTF-8 string (public issue 101). * Rearrange "Missing information" references in mandatory format tables (public issue 101). * Clarify that the enumerated extensions returned by flink:vkEnumerateInstanceExtensionProperties and flink:vkEnumerateDeviceExtensionProperties will only include extensions provided by the platform or extensions implemented in implicitly enabled layers (public issue 101). * Miscellaneous editorial fixes. Include the Vulkan spec patch number in the PDF title. Fix label on &lt;&lt;fig-non-strict-lines,Non strict lines>> diagram. Use more easily distinguished symbols in tables in the &lt;&lt;features-required-format-support,Required Format Support>> section. Don't require FQDNs used as layer names be encoded in lower case if not possible, in the &lt;&lt;extensions-naming-conventions, Extension and Layer Naming Conventions>> section (public issues 101, 119, 121). Internal Issues: * Fixed excessive spacing in tables in XHTML (internal issue 18). * Clarify that ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT applies to secondary command buffers. Previously spec only referred to the members of pname:pCommandBuffers being affected by this bit. Added a separate slink:VkSubmitInfo Valid Usage restriction specifying that ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT also applies to any secondary command buffers that are recorded into the primary command buffers in pname:pCommandBuffers (internal issue 106). * Clarify that slink:VkDeviceCreateInfo::pname:pEnabledFeatures can be NULL (internal issue 117). * Remove "the value of" where it is redundant (e.g. speaking of an API parameter, struct member, or SPIR-V variable, but not when speaking of color components) (internal issue 175). * Forced patch version to always be 0 in the header. Add a "VK_API_VERSION_<major>_<minor>" macro for people to use to do the right thing. Add a VK_HEADER_VERSION which captures the header release number independent of the spec patch number (internal issue 176). * Correct description of slink:VkPipelineShaderStageCreateInfo::pname:pName to "a pointer to a null-terminated UTF-8 string" (internal issue #197). Other Commits: * Updated DataFormat spec reference to the new date for revision 5 of that spec. * Fixed KEEP option (to retain LaTeX intermediate files) in the Makefile to be included when edited there, as well as set on the command line. * Reserve and add "VK_IMG_filter_cubic" to the registry, and implement script functionality to add and remove validity from existing functions. Includes schema and readme changes. * Update GL_KHR_vulkan_glsl so push_constants do not have descriptor sets.
2016-03-11 01:33:02 +00:00
* pname:pName is a pointer to a null-terminated UTF-8 string specifying
the entry point name of the shader for this stage.
2016-02-16 09:53:44 +00:00
* pname:pSpecializationInfo is a pointer to slink:VkSpecializationInfo, as
described in <<pipelines-specialization-constants,Specialization
Constants>>, and can: be `NULL`.
include::../validity/structs/VkPipelineShaderStageCreateInfo.txt[]
[[pipelines-graphics]]
== Graphics Pipelines
Graphics pipelines consist of multiple shader stages, multiple
fixed-function pipeline stages, and a pipeline layout.
// refBegin vkCreateGraphicsPipelines Create graphics pipelines.
To create graphics pipelines, call:
2016-02-16 09:53:44 +00:00
include::../protos/vkCreateGraphicsPipelines.txt[]
* pname:device is the logical device that creates the graphics pipelines.
* pname:pipelineCache is either dlink:VK_NULL_HANDLE, indicating that
2016-02-16 09:53:44 +00:00
pipeline caching is disabled; or the handle of a valid
<<pipelines-cache,pipeline cache>> object, in which case use of that
cache is enabled for the duration of the command.
* pname:createInfoCount is the length of the pname:pCreateInfos and
Change log for April 29, 2016 Vulkan 1.0.12 spec update: * Bump API patch number and header version number to 12 for this update. Github Issues: * Change valid usage statements intended to be "sub-points" to be actual sub-points (public issue 66). * Replace double negation in description of slink:VkRenderPassBeginInfo::pname:pClearValues (based on public merge 142). * Cleanup minor typos in spec, ref pages and XML, including those proposed in public pull requests 144, 150, 151, 167, 168, 181, and 186. * Use *strict subset* in describing the partial order of memory property types for slink:VkMemoryType, and update the style guide accordingly (public issue 190). * Fix various "a image" -> "an image" typos (public issue 191). * Note in the <<fundamentals-validusage,Valid Usage>> and <<extensions-interactions,Extension Interactions>> sections that structures defined by extensions which may be passed in structure chains using the ptext:pNext member must: include initial ptext:sType and ptext:pNext members (public issue 192). Internal Issues: * Remove duplicate language from the description of the pname:fence parameter to flink:vkQueueSubmit and improve validity language (internal issue 91). * Added documentation for "optional" attribute to XML readme.tex/pdf (internal issue 149). * Clarify the host-side data validity rules and behavior of flink:vkFlushMappedMemoryRanges and flink:vkInvalidateMappedMemoryRanges (internal issue 266). Other Commits: * Added clarification to flink:vkCmdFillBuffer regarding the use of ename:VK_WHOLE_SIZE. * Fixed and documented implementation of "validextensionstructs" attribute. in XML processing scripts and readme.tex/pdf. * Add missing validity statements to flink:vkResetEvent and flink:vkCmdResetEvent. * Fix validity for the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag. Correct all the draw/dispatch commands to mention optimally tiled images as well as linear tiled images, and say image VIEWS instead of images. Add validity statement to flink:vkCmdBlitImage * Replace the {apiname} macro with hardcoded "Vulkan", now that we've committed to that name. * Add the VK_AMD_rasterization_order extension to vk.xml.
2016-04-29 12:53:46 +00:00
pname:pPipelines arrays.
2016-02-16 09:53:44 +00:00
* pname:pCreateInfos is an array of sname:VkGraphicsPipelineCreateInfo
structures.
* pname:pAllocator controls host memory allocation as described in the
<<memory-allocation, Memory Allocation>> chapter.
* pname:pPipelines is a pointer to an array in which the resulting
graphics pipeline objects are returned.
The slink:VkGraphicsPipelineCreateInfo structure includes an array of shader
2016-02-16 09:53:44 +00:00
create info structures containing all the desired active shader stages, as
well as creation info to define all relevant fixed-function stages, and a
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
pipeline layout.
include::../validity/protos/vkCreateGraphicsPipelines.txt[]
// refBegin VkGraphicsPipelineCreateInfo - Structure specifying parameters of a newly created graphics pipeline
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
The sname:VkGraphicsPipelineCreateInfo structure is defined as:
2016-02-16 09:53:44 +00:00
include::../structs/VkGraphicsPipelineCreateInfo.txt[]
* pname:sType is the type of this structure.
* pname:pNext is `NULL` or a pointer to an extension-specific structure.
* pname:flags is a bitmask of elink:VkPipelineCreateFlagBits controlling
2016-02-16 09:53:44 +00:00
how the pipeline will be generated, as described below.
* pname:stageCount is the number of entries in the pname:pStages array.
* pname:pStages is an array of size pname:stageCount structures of type
slink:VkPipelineShaderStageCreateInfo describing the set of the shader
stages to be included in the graphics pipeline.
* pname:pVertexInputState is a pointer to an instance of the
slink:VkPipelineVertexInputStateCreateInfo structure.
* pname:pInputAssemblyState is a pointer to an instance of the
slink:VkPipelineInputAssemblyStateCreateInfo structure which determines
input assembly behavior, as described in <<drawing, Drawing Commands>>.
* pname:pTessellationState is a pointer to an instance of the
slink:VkPipelineTessellationStateCreateInfo structure, or `NULL` if the
pipeline does not include a tessellation control shader stage and
tessellation evaluation shader stage.
* pname:pViewportState is a pointer to an instance of the
slink:VkPipelineViewportStateCreateInfo structure, or `NULL` if the
pipeline has rasterization disabled.
Change log for March 25, 2016 Vulkan 1.0.7 spec update: * Bump API patch number and header version number to 7 for this update. Github Issues: * Fix slink:VkSpecializationMapEntry example to avoid C/C++ strict aliasing issues (public issue 14). * Clarify the meaning of "matching" in flink:vkCmdBindDescriptorSets validity language (public issue 33). * Add stub reference pages so xrefs to not-yet-written pages don't generate 404 errors. However, the actual content of these pages still needs to be filled in as time allows (public issue 44, but does not close that issue out). * Remove incorrect validity statement for flink:vkGetImageSparseMemoryRequirements (public issue 85). * Reword the <<features-limits-bufferImageGranularity,bufferImageGranularity>> feature in terms of "aliasing", and clarify that it applies to bindings in the same memory object (public issue 90). * Clarify the relationship of the slink:VkPhysicalDeviceLimits pname:maxViewportDimensions and pname:viewportBoundsRange limits (public issue 92). * Specify sparse unbound texture replacement in the <<textures-texel-replacement,Texel Replacement>> section independently of robust buffer access language (public issue 100). * Add the <<fundamentals-architecture-model,Architecture Model>> section to explain architecture constraints Vulkan has chosen to accept in order to enable portable and performant code (public issue 122). * State that an object must not be destroyed until *all* (not *any*) uses of that object have completed (public issue 123). * Minor editorial cleanup (public issues 129, 134, 146, 148). * Add validity language for layer and extension names to slink:VkDeviceCreateInfo matching that used for slink:VkInstanceCreateInfo (public issue 130). * Clean up terminology for the case when the bits set in one bitmask are a subset of the bits set in another bitmask (public issue 138). * Document that input attachments are UniformConstant not Input, in the <<interfaces-inputattachment,Fragment Input Attachment Interface>> section (public glslang bug 169). Internal Issues: * Add max enum values to "flag bits" enums (internal issue #136). * Clarify language around the various uses of the term "block" in the <<appendix-compressedtex-bc,Block Compressed Image Formats>> section (internal issue #202). * Removed "expand" dependency from <enums> groups in vk.xml and added auto-generation code in the scripts to infer it instead, to ensure consistency. This caused renaming of sname:VkColorSpaceKHR and sname:VkPresentModeKHR etext:BEGIN_RANGE (etc.) tokens, but those tokens are metadata, not part of the API, and the Vulkan WG is OK with this change. This change adds ranges to two additional enums that were missing them due to not defining the "expand" attribute (internal issue 217). * Tweak makefile to generate ref page nroff (.3) files in the right output directory, working around an a2x limitation (internal issue 223). Other Commits: * Add validity requirements for flink:vkCmdCopyQueryPoolResults pname:dstBuffer parameter. * Fix ref page build to generate .3 targets in the right output directory.
2016-03-25 09:25:04 +00:00
* pname:pRasterizationState is a pointer to an instance of the
2016-02-16 09:53:44 +00:00
slink:VkPipelineRasterizationStateCreateInfo structure.
* pname:pMultisampleState is a pointer to an instance of the
slink:VkPipelineMultisampleStateCreateInfo, or `NULL` if the pipeline
has rasterization disabled.
* pname:pDepthStencilState is a pointer to an instance of the
slink:VkPipelineDepthStencilStateCreateInfo structure, or `NULL` if the
pipeline has rasterization disabled or if the subpass of the render pass
the pipeline is created against does not use a depth/stencil attachment.
* pname:pColorBlendState is a pointer to an instance of the
slink:VkPipelineColorBlendStateCreateInfo structure, or `NULL` if the
pipeline has rasterization disabled or if the subpass of the render pass
the pipeline is created against does not use any color attachments.
* pname:pDynamicState is a pointer to
slink:VkPipelineDynamicStateCreateInfo and is used to indicate which
properties of the pipeline state object are dynamic and can: be changed
independently of the pipeline state. This can: be `NULL`, which means no
state in the pipeline is considered dynamic.
* pname:layout is the description of binding locations used by both the
pipeline and descriptor sets used with the pipeline.
* pname:renderPass is a handle to a render pass object describing the
environment in which the pipeline will be used; the pipeline can: be
used with an instance of any render pass compatible with the one
provided. See <<renderpass-compatibility,Render Pass Compatibility>> for
more information.
* pname:subpass is the index of the subpass in pname:renderPass where this
pipeline will be used.
* pname:basePipelineHandle is a pipeline to derive from.
* pname:basePipelineIndex is an index into the pname:pCreateInfos
parameter to use as a pipeline to derive from.
The parameters pname:basePipelineHandle and pname:basePipelineIndex are
described in more detail in
<<pipelines-pipeline-derivatives,Pipeline Derivatives>>.
pname:pStages points to an array of slink:VkPipelineShaderStageCreateInfo
structures, which were previously described in
<<pipelines-compute,Compute Pipelines>>.
Bits which can: be set in pname:flags are:
// refBegin VkPipelineCreateFlagBits - Bitmask controlling how a pipeline is generated
2016-02-16 09:53:44 +00:00
include::../enums/VkPipelineCreateFlagBits.txt[]
* ename:VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT specifies that the
created pipeline will not be optimized. Using this flag may: reduce
the time taken to create the pipeline.
* ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT specifies that the
pipeline to be created is allowed to be the parent of a pipeline that
will be created in a subsequent call to flink:vkCreateGraphicsPipelines.
* ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT specifies that the pipeline to
be created will be a child of a previously created parent pipeline.
It is valid to set both ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT and
ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT. This allows a pipeline to be both a
parent and possibly a child in a pipeline hierarchy. See
<<pipelines-pipeline-derivatives,Pipeline Derivatives>> for more
information.
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
pname:pDynamicState points to a structure of type
sname:VkPipelineDynamicStateCreateInfo.
2016-02-16 09:53:44 +00:00
include::../validity/structs/VkGraphicsPipelineCreateInfo.txt[]
// refBegin VkPipelineDynamicStateCreateInfo - Structure specifying parameters of a newly created pipeline dynamic state
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
The sname:VkPipelineDynamicStateCreateInfo structure is defined as:
2016-02-16 09:53:44 +00:00
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
include::../structs/VkPipelineDynamicStateCreateInfo.txt[]
2016-02-16 09:53:44 +00:00
* pname:sType is the type of this structure.
* pname:pNext is `NULL` or a pointer to an extension-specific structure.
* pname:flags is reserved for future use.
* pname:dynamicStateCount is the number of elements in the
pname:pDynamicStates array.
* pname:pDynamicStates is an array of elink:VkDynamicState enums which
indicate which pieces of pipeline state will use the values from dynamic
state commands rather than from the pipeline state creation info.
include::../validity/structs/VkPipelineDynamicStateCreateInfo.txt[]
// refBegin VkDynamicState - indicate which dynamic state is taken from dynamic state commands
The source of difference pieces of dynamic state is determined by the
slink:VkPipelineDynamicStateCreateInfo::pname:pDynamicStates property of the
currently active pipeline, which takes the following values:
2016-02-16 09:53:44 +00:00
include::../enums/VkDynamicState.txt[]
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
* ename:VK_DYNAMIC_STATE_VIEWPORT indicates that the pname:pViewports
state in sname:VkPipelineViewportStateCreateInfo will be ignored and
must: be set dynamically with flink:vkCmdSetViewport before any draw
commands. The number of viewports used by a pipeline is still
specified by the pname:viewportCount member of
sname:VkPipelineViewportStateCreateInfo.
* ename:VK_DYNAMIC_STATE_SCISSOR indicates that the pname:pScissors
state in sname:VkPipelineViewportStateCreateInfo will be ignored and
must: be set dynamically with flink:vkCmdSetScissor before any draw
commands. The number of scissor rectangles used by a pipeline is still
specified by the pname:scissorCount member of
sname:VkPipelineViewportStateCreateInfo.
* ename:VK_DYNAMIC_STATE_LINE_WIDTH indicates that the pname:lineWidth
state in sname:VkPipelineRasterizationStateCreateInfo will be ignored
and must: be set dynamically with flink:vkCmdSetLineWidth before any
draw commands that generate line primitives for the rasterizer.
* ename:VK_DYNAMIC_STATE_DEPTH_BIAS indicates that the
pname:depthBiasConstantFactor, pname:depthBiasClamp and
pname:depthBiasSlopeFactor states in
sname:VkPipelineRasterizationStateCreateInfo will be ignored and must:
be set dynamically with flink:vkCmdSetDepthBias before any draws are
performed with pname:depthBiasEnable in
sname:VkPipelineRasterizationStateCreateInfo set to ename:VK_TRUE.
* ename:VK_DYNAMIC_STATE_BLEND_CONSTANTS indicates that the
pname:blendConstants state in
sname:VkPipelineColorBlendStateCreateInfo will be ignored and must: be
set dynamically with flink:vkCmdSetBlendConstants before any draws are
performed with a pipeline state with
sname:VkPipelineColorBlendAttachmentState member pname:blendEnable set
to ename:VK_TRUE and any of the blend functions using a constant blend
color.
* ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS indicates that the
pname:minDepthBounds and pname:maxDepthBounds states of
slink:VkPipelineDepthStencilStateCreateInfo will be ignored and must:
be set dynamically with flink:vkCmdSetDepthBounds before any draws are
performed with a pipeline state with
sname:VkPipelineDepthStencilStateCreateInfo member
pname:depthBoundsTestEnable set to ename:VK_TRUE.
* ename:VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK indicates that the
pname:compareMask state in
sname:VkPipelineDepthStencilStateCreateInfo for both pname:front and
pname:back will be ignored and must: be set dynamically with
flink:vkCmdSetStencilCompareMask before any draws are performed with a
pipeline state with sname:VkPipelineDepthStencilStateCreateInfo member
pname:stencilTestEnable set to ename:VK_TRUE
* ename:VK_DYNAMIC_STATE_STENCIL_WRITE_MASK indicates that the
pname:writeMask state in sname:VkPipelineDepthStencilStateCreateInfo
for both pname:front and pname:back will be ignored and must: be set
dynamically with flink:vkCmdSetStencilWriteMask before any draws are
performed with a pipeline state with
sname:VkPipelineDepthStencilStateCreateInfo member
pname:stencilTestEnable set to ename:VK_TRUE
* ename:VK_DYNAMIC_STATE_STENCIL_REFERENCE indicates that the
pname:reference state in sname:VkPipelineDepthStencilStateCreateInfo
for both pname:front and pname:back will be ignored and must: be set
dynamically with flink:vkCmdSetStencilReference before any draws are
performed with a pipeline state with
sname:VkPipelineDepthStencilStateCreateInfo member
pname:stencilTestEnable set to ename:VK_TRUE
2016-02-16 09:53:44 +00:00
// refEnd VkDynamicState
=== Valid Combinations of Stages for Graphics Pipelines
2016-02-16 09:53:44 +00:00
If tessellation shader stages are omitted, the tessellation shading and
fixed-function stages of the pipeline are skipped.
If a geometry shader is omitted, the geometry shading stage is skipped.
If a fragment shader is omitted, the results of fragment processing are
undefined. Specifically, any fragment color outputs
are considered to have undefined values, and the fragment depth is
considered to be unmodified. This can: be useful for depth-only rendering.
Presence of a shader stage in a pipeline is indicated by including a valid
sname:VkPipelineShaderStageCreateInfo with pname:module and pname:pName
selecting an entry point from a shader module, where that entry point is
valid for the stage specified by pname:stage.
Presence of some of the fixed-function stages in the pipeline is implicitly
derived from enabled shaders and provided state. For example, the
fixed-function tessellator is always present when the pipeline has valid
Tessellation Control and Tessellation Evaluation shaders.
.For example:
* Depth/stencil-only rendering in a subpass with no color attachments
** Active Pipeline Shader Stages
*** Vertex Shader
** Required: Fixed-Function Pipeline Stages
*** slink:VkPipelineVertexInputStateCreateInfo
*** slink:VkPipelineInputAssemblyStateCreateInfo
*** slink:VkPipelineViewportStateCreateInfo
*** slink:VkPipelineRasterizationStateCreateInfo
*** slink:VkPipelineMultisampleStateCreateInfo
*** slink:VkPipelineDepthStencilStateCreateInfo
* Color-only rendering in a subpass with no depth/stencil attachment
** Active Pipeline Shader Stages
*** Vertex Shader
*** Fragment Shader
** Required: Fixed-Function Pipeline Stages
*** slink:VkPipelineVertexInputStateCreateInfo
*** slink:VkPipelineInputAssemblyStateCreateInfo
*** slink:VkPipelineViewportStateCreateInfo
*** slink:VkPipelineRasterizationStateCreateInfo
*** slink:VkPipelineMultisampleStateCreateInfo
*** slink:VkPipelineColorBlendStateCreateInfo
* Rendering pipeline with tessellation and geometry shaders
** Active Pipeline Shader Stages
*** Vertex Shader
*** Tessellation Control Shader
*** Tessellation Evaluation Shader
*** Geometry Shader
*** Fragment Shader
** Required: Fixed-Function Pipeline Stages
*** slink:VkPipelineVertexInputStateCreateInfo
*** slink:VkPipelineInputAssemblyStateCreateInfo
*** slink:VkPipelineTessellationStateCreateInfo
*** slink:VkPipelineViewportStateCreateInfo
*** slink:VkPipelineRasterizationStateCreateInfo
*** slink:VkPipelineMultisampleStateCreateInfo
*** slink:VkPipelineDepthStencilStateCreateInfo
*** slink:VkPipelineColorBlendStateCreateInfo
[[pipelines-destruction]]
== Pipeline destruction
// refBegin vkDestroyPipeline Destroy a pipeline object
2016-02-16 09:53:44 +00:00
To destroy a graphics or compute pipeline, call:
include::../protos/vkDestroyPipeline.txt[]
* pname:device is the logical device that destroys the pipeline.
* pname:pipeline is the handle of the pipeline to destroy.
* pname:pAllocator controls host memory allocation as described in the
<<memory-allocation, Memory Allocation>> chapter.
include::../validity/protos/vkDestroyPipeline.txt[]
[[pipelines-multiple]]
== Multiple Pipeline Creation
Multiple pipelines can: be created simultaneously by passing an array of
sname:VkGraphicsPipelineCreateInfo or sname:VkComputePipelineCreateInfo
structures into the flink:vkCreateGraphicsPipelines and
flink:vkCreateComputePipelines commands, respectively. Applications can:
group together similar pipelines to be created in a single call, and
implementations are encouraged to look for reuse opportunities within a
group-create.
When an application attempts to create many pipelines in a single command,
it is possible that some subset may: fail creation. In that case, the
corresponding entries in the pname:pPipelines output array will be filled
with dlink:VK_NULL_HANDLE values. If any pipeline fails creation (for
2016-02-16 09:53:44 +00:00
example, due to out of memory errors), the ftext:vkCreate*Pipelines commands
will return an error code. The implementation will attempt to create all
pipelines, and only return dlink:VK_NULL_HANDLE values for those that
2016-02-16 09:53:44 +00:00
actually failed.
[[pipelines-pipeline-derivatives]]
== Pipeline Derivatives
A pipeline derivative is a child pipeline created from a parent pipeline,
where the child and parent are expected to have much commonality. The goal
of derivative pipelines is that they be cheaper to create using the
parent as a starting point, and that it be more efficient (on either host or
device) to switch/bind between children of the same parent.
A derivative pipeline is created by setting the
ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag in the
stext:Vk*PipelineCreateInfo structure. If this is set, then exactly one of
pname:basePipelineHandle or pname:basePipelineIndex members of the structure
must: have a valid handle/index, and indicates the parent pipeline. If
pname:basePipelineHandle is used, the parent pipeline must: have already
been created. If pname:basePipelineIndex is used, then the parent is being
created in the same command. dlink:VK_NULL_HANDLE acts as the invalid handle
2016-02-16 09:53:44 +00:00
for pname:basePipelineHandle, and -1 is the invalid index for
pname:basePipelineIndex. If pname:basePipelineIndex is used, the base
pipeline must: appear earlier in the array. The base pipeline must: have
been created with the ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag
set.
[[pipelines-cache]]
== Pipeline Cache
// refBegin VkPipelineCache - Opaque handle to a pipeline cache object
2016-02-16 09:53:44 +00:00
Pipeline cache objects allow the result of pipeline construction to be
reused between pipelines and between runs of an application. Reuse between
pipelines is achieved by passing the same pipeline cache object when
creating multiple related pipelines. Reuse across runs of an application is
achieved by retrieving pipeline cache contents in one run of an application,
saving the contents, and using them to preinitialize a pipeline cache on a
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
subsequent run. The contents of the pipeline cache objects are
managed by the implementation. Applications can: manage the host memory
consumed by a pipeline cache object and control the amount of data
2016-02-16 09:53:44 +00:00
retrieved from a pipeline cache object.
Pipeline cache objects are represented by sname:VkPipelineCache handles:
include::../handles/VkPipelineCache.txt[]
// refEnd VkPipelineCache
// refBegin vkCreatePipelineCache Creates a new pipeline cache
To create pipeline cache objects, call:
2016-02-16 09:53:44 +00:00
include::../protos/vkCreatePipelineCache.txt[]
* pname:device is the logical device that creates the pipeline cache
object.
* pname:pCreateInfo is a pointer to a sname:VkPipelineCacheCreateInfo
structure that contains the initial parameters for the pipeline cache
object.
* pname:pAllocator controls host memory allocation as described in the
<<memory-allocation, Memory Allocation>> chapter.
* pname:pPipelineCache is a pointer to a sname:VkPipelineCache handle in
which the resulting pipeline cache object is returned.
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
[NOTE]
.Note
====
Applications can: track and manage the total host memory size of a pipeline
cache object using the pname:pAllocator. Applications can: limit the amount
of data retrieved from a pipeline cache object in fname:vkGetPipelineCacheData.
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
Implementations shouldnot: internally limit the total number of entries added to a
pipeline cache object or the total host memory consumed.
====
Once created, a pipeline cache can: be passed to the
fname:vkCreateGraphicsPipelines and fname:vkCreateComputePipelines commands.
If the pipeline cache passed into these commands is not
dlink:VK_NULL_HANDLE, the implementation will query it for possible reuse
opportunities and update it with new content. The use of the pipeline cache
object in these commands is internally synchronized, and the same pipeline
cache object can: be used in multiple threads simultaneously.
[NOTE]
.Note
====
Implementations should: make every effort to limit any critical sections
to the actual accesses to the cache, which is expected to be significantly
shorter than the duration of the fname:vkCreateGraphicsPipelines and
fname:vkCreateComputePipelines commands.
====
2016-02-16 09:53:44 +00:00
include::../validity/protos/vkCreatePipelineCache.txt[]
// refBegin VkPipelineCacheCreateInfo - Structure specifying parameters of a newly created pipeline cache
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
The sname:VkPipelineCacheCreateInfo structure is defined as:
2016-02-16 09:53:44 +00:00
include::../structs/VkPipelineCacheCreateInfo.txt[]
* pname:sType is the type of this structure.
* pname:pNext is `NULL` or a pointer to an extension-specific structure.
* pname:flags is reserved for future use.
* pname:initialDataSize is the number of bytes in pname:pInitialData. If
pname:initialDataSize is zero, the pipeline cache will initially be
empty.
* pname:pInitialData is a pointer to previously retrieved pipeline
cache data. If the pipeline cache data is incompatible (as defined
below) with the device, the pipeline cache will be initially empty. If
pname:initialDataSize is zero, pname:pInitialData is ignored.
include::../validity/structs/VkPipelineCacheCreateInfo.txt[]
// refBegin vkMergePipelineCaches Combine the data stores of pipeline caches.
2016-02-16 09:53:44 +00:00
Pipeline cache objects can: be merged using the command:
include::../protos/vkMergePipelineCaches.txt[]
* pname:device is the logical device that owns the pipeline cache objects.
* pname:dstCache is the handle of the pipeline cache to merge results
into.
* pname:srcCacheCount is the length of the pname:pSrcCaches array.
* pname:pSrcCaches is an array of pipeline cache handles, which will be
merged into pname:dstCache. The previous contents of pname:dstCache are
included after the merge.
[NOTE]
.Note
====
The details of the merge operation are implementation dependent, but
Change log for March 4, 2016 Vulkan 1.0.5 spec update: * Bump API patch number to 5 for this update. Github Issues: * Correctly describe slink:VkPhysicalDeviceProperties pname:deviceName member as a string, not a pointer to a string. Also one typo fix for "hetereogeneous" (public issue 4). * Replace maynot: macro with may: not, and "may: or maynot:" with "may:" (public issue 4). * Clarify that redundantly setting the state of a fence or event has no effect (public issue 4). * Minor fixes to ref pages to track descriptions of memory bits that changed in the core spec. Fix name of a member in the description of sname:sname:VkPipelineMultisampleStateCreateInfo (public issues 8, 13). * Remove redundant validity statement for sname:VkGraphicsPipelineCreateInfo::pname:stageCount (public issue 14). * Fix typos in chapters 7-9 (public issue 14). * Clarify the example demonstrating the behavior of code:OpMemoryBarrier in the &lt;&lt;shaders-execution-memory-ordering,shader memory acces ordering>> section (public issue 16). * Specify that freeing mapped memory implicitly unmaps the memory in the description of flink:vkFreeMemory (public issue 17). * Forbid allocation callbacks from calling into the API in the &lt;&lt;memory-allocation,memory allocation>> section (public issue 20). * Add missing validity rules about size being greater than 0 and offset being less than size of object. Fix flink:VkMappedMemoryRange's misinterpretation of offset (public issues 27, 31). * Add validity rule disallowing overlapping source/destination descriptors in flink:VkCopyDescriptorSet (public issue 32). * Clarify that array and matrix stride has to be a multiple of the base alignment of the array or matrix in the &lt;&lt;interfaces-resources-layout,Offset and Stride Assignment>> section (public issue 38). * Correct parenthesis floor nesting error in equation for &lt;&lt;textures-RGB-sexp,RGB to shared exponent conversion>>. Clarify case of when exp' is forced to 0, avoiding log2(0) undefined problem (public issue 40). * Remove redundant statement from the code:FragDepth description in the &lt;&lt;interfaces-builtin-variables,Built-In Variables>> section (public issue 47). * Define the clamping of the &lt;&lt;textures-level-of-detail-operation,bias added to the scale factor>> by linking to the slink:VkPhysicalDevice feature pname:maxSamplerLodBias (public issue 64). * Fix typo "optimal linear resources" and clarify the set of resources &lt;&lt;features-limits-bufferImageGranularity,the pname:bufferImageGranularity resource>> applies to (public issue 67). * Replace 'descriptor accessed by a pipeline' language for sname:VkDescriptorSetAllocateInfo with more precise phrasing about binding a descriptor set before a command that invokes work using that set (public issue 69). * tstripadj.svg contained an Inkscape tag which caused Firefox and IE 11 to fail to render it, and was illegal SVG. Generating Plain SVG from the Inkscape SVG source fixes this (public issue 70). * Fix validity for sname:VkVertexInputBindingDescription and sname:VkVertexInputAttributeDescription numbers (public issue 72). Internal Issues: * Clarify the meaning of ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT in elink:VkFormatFeatureFlagBits with respect to depth compare (internal issue 107). * Added a note explaining that ename:VK_QUEUE_TRANSFER_BIT may or may not be reported for a queue family that already supports ename:VK_QUEUE_GRAPHICS_BIT or ename:VK_QUEUE_COMPUTE_BIT as the former is a strict subset of the latter ones (internal issue 116). * Add validity language for sname:VkDescriptorSetAllocateInfo about exceeding the descriptor pool capacity (internal issue 140). * Add ename:VK_INCOMPLETE success code for flink:vkEnumeratePhysicalDevices query (internal issue 163). Other Commits: * Add the VK_NV_glsl_shader extension definitions to the API. * Update GL_KHR_vulkan_glsl with 1) origin_upper_left as default 2) specialization array constant semantics. * Corrected/updated Data Format Specification date.
2016-03-03 13:06:18 +00:00
implementations should: merge the contents of the specified pipelines and
prune duplicate entries.
2016-02-16 09:53:44 +00:00
====
include::../validity/protos/vkMergePipelineCaches.txt[]
// refBegin vkGetPipelineCacheData Get the data store from a pipeline cache
2016-02-16 09:53:44 +00:00
Data can: be retrieved from a pipeline cache object using the command:
include::../protos/vkGetPipelineCacheData.txt[]
* pname:device is the logical device that owns the pipeline cache.
* pname:pipelineCache is the pipeline cache to retrieve data from.
* pname:pDataSize is a pointer to a value related to the amount of data in
the pipeline cache, as described below.
* pname:pData is either `NULL` or a pointer to a buffer.
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
If pname:pData is `NULL`, then the maximum size of the data that can: be
2016-02-16 09:53:44 +00:00
retrieved from the pipeline cache, in bytes, is returned in pname:pDataSize.
Otherwise, pname:pDataSize must: point to a variable set by the user to the
size of the buffer, in bytes, pointed to by pname:pData, and on return the
variable is overwritten with the amount of data actually written to
pname:pData.
If pname:pDataSize is less than the maximum size that can: be
2016-02-16 09:53:44 +00:00
retrieved by the pipeline cache, at most pname:pDataSize bytes will be
written to pname:pData, and fname:vkGetPipelineCacheData will return
ename:VK_INCOMPLETE. Any data written to pname:pData is valid and can: be
provided as the pname:pInitialData member of the
sname:VkPipelineCacheCreateInfo structure passed to
fname:vkCreatePipelineCache.
[[pipelines-cache-header]]
Applications can: store the data retrieved from the pipeline cache, and use
these data, possibly in a future run of the application, to populate new
pipeline cache objects. The results of pipeline compiles, however,
may: depend on the vendor ID, device ID, driver version, and other details
of the device. To enable applications to detect when previously retrieved
data is incompatible with the device, the initial bytes written to
pname:pData must: be a header consisting of the following members:
.Layout for pipeline cache header version VK_PIPELINE_CACHE_HEADER_VERSION_ONE
[width="85%",cols="8%,21%,71%",options="header"]
|=====
| Offset | Size | Meaning
| 0 | 4 | length in bytes of the entire pipeline cache header
written as a stream of bytes, with the least
significant byte first
| 4 | 4 | a elink:VkPipelineCacheHeaderVersion value
written as a stream of bytes, with the least
significant byte first
| 8 | 4 | a vendor ID equal to
sname:VkPhysicalDeviceProperties::pname:vendorID
written as a stream of bytes, with the least
significant byte first
| 12 | 4 | a device ID equal to
sname:VkPhysicalDeviceProperties::pname:deviceID
written as a stream of bytes, with the least
significant byte first
| 16 | ename:VK_UUID_SIZE | a pipeline cache ID equal to
sname:VkPhysicalDeviceProperties::pname:pipelineCacheUUID
|=====
The first four bytes encode the length of the entire pipeline header, in
bytes. This value includes all fields in the header including the pipeline
cache version field and the size of the length field.
// refBegin VkPipelineCacheHeaderVersion Encode pipeline cache version
Change log for March 4, 2016 Vulkan 1.0.5 spec update: * Bump API patch number to 5 for this update. Github Issues: * Correctly describe slink:VkPhysicalDeviceProperties pname:deviceName member as a string, not a pointer to a string. Also one typo fix for "hetereogeneous" (public issue 4). * Replace maynot: macro with may: not, and "may: or maynot:" with "may:" (public issue 4). * Clarify that redundantly setting the state of a fence or event has no effect (public issue 4). * Minor fixes to ref pages to track descriptions of memory bits that changed in the core spec. Fix name of a member in the description of sname:sname:VkPipelineMultisampleStateCreateInfo (public issues 8, 13). * Remove redundant validity statement for sname:VkGraphicsPipelineCreateInfo::pname:stageCount (public issue 14). * Fix typos in chapters 7-9 (public issue 14). * Clarify the example demonstrating the behavior of code:OpMemoryBarrier in the &lt;&lt;shaders-execution-memory-ordering,shader memory acces ordering>> section (public issue 16). * Specify that freeing mapped memory implicitly unmaps the memory in the description of flink:vkFreeMemory (public issue 17). * Forbid allocation callbacks from calling into the API in the &lt;&lt;memory-allocation,memory allocation>> section (public issue 20). * Add missing validity rules about size being greater than 0 and offset being less than size of object. Fix flink:VkMappedMemoryRange's misinterpretation of offset (public issues 27, 31). * Add validity rule disallowing overlapping source/destination descriptors in flink:VkCopyDescriptorSet (public issue 32). * Clarify that array and matrix stride has to be a multiple of the base alignment of the array or matrix in the &lt;&lt;interfaces-resources-layout,Offset and Stride Assignment>> section (public issue 38). * Correct parenthesis floor nesting error in equation for &lt;&lt;textures-RGB-sexp,RGB to shared exponent conversion>>. Clarify case of when exp' is forced to 0, avoiding log2(0) undefined problem (public issue 40). * Remove redundant statement from the code:FragDepth description in the &lt;&lt;interfaces-builtin-variables,Built-In Variables>> section (public issue 47). * Define the clamping of the &lt;&lt;textures-level-of-detail-operation,bias added to the scale factor>> by linking to the slink:VkPhysicalDevice feature pname:maxSamplerLodBias (public issue 64). * Fix typo "optimal linear resources" and clarify the set of resources &lt;&lt;features-limits-bufferImageGranularity,the pname:bufferImageGranularity resource>> applies to (public issue 67). * Replace 'descriptor accessed by a pipeline' language for sname:VkDescriptorSetAllocateInfo with more precise phrasing about binding a descriptor set before a command that invokes work using that set (public issue 69). * tstripadj.svg contained an Inkscape tag which caused Firefox and IE 11 to fail to render it, and was illegal SVG. Generating Plain SVG from the Inkscape SVG source fixes this (public issue 70). * Fix validity for sname:VkVertexInputBindingDescription and sname:VkVertexInputAttributeDescription numbers (public issue 72). Internal Issues: * Clarify the meaning of ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT in elink:VkFormatFeatureFlagBits with respect to depth compare (internal issue 107). * Added a note explaining that ename:VK_QUEUE_TRANSFER_BIT may or may not be reported for a queue family that already supports ename:VK_QUEUE_GRAPHICS_BIT or ename:VK_QUEUE_COMPUTE_BIT as the former is a strict subset of the latter ones (internal issue 116). * Add validity language for sname:VkDescriptorSetAllocateInfo about exceeding the descriptor pool capacity (internal issue 140). * Add ename:VK_INCOMPLETE success code for flink:vkEnumeratePhysicalDevices query (internal issue 163). Other Commits: * Add the VK_NV_glsl_shader extension definitions to the API. * Update GL_KHR_vulkan_glsl with 1) origin_upper_left as default 2) specialization array constant semantics. * Corrected/updated Data Format Specification date.
2016-03-03 13:06:18 +00:00
The next four bytes encode the pipeline cache version. This field is
Change log for March 10, 2016 Vulkan 1.0.6 spec update: * Bump API patch number and header version number to 6 for this update. Github Issues: * Define 'invocation group' for compute and graphics shaders. Cleanup definition and use of 'workgroup', and add glossary entries (public issue 1). * Various minor editorial fixes (public issue 33). * Clarify locations for block members in the &lt;&lt;interfaces-iointerfaces-locations,Location Assignment>> section (public issue 45). * Editorial fixes for &lt;&lt;commandbuffer-allocation,Command Buffer Allocation>> section (public issues 54, 59). * Clarify behavior of depth test in the &lt;&lt;fragops-depth,Depth Test&gt;&gt; section (public issues 80, 81). * Remove discussion of return codes from flink:vkGetPhysicalDeviceSparseImageFormatProperties and flink:vkGetImageSparseMemoryRequirements, which don't return values (public issue 82). * Allow flink:vkCmdDrawIndirect and flink:vkCmdDrawIndexedIndirect pname:drawCount of 0, as well as 1, when the multiDrawIndirect feature is not supported (public issue 88). * Remove confusing wording in the &lt;&lt;features-limits,Limits>> section describing the slink:VkPhysicalDeviceLimits pname:minTexelBufferOffsetAlignment, pname:minUniformBufferOffsetAlignment, and pname:minStorageBufferOffsetAlignment members as both minimums and maximums (public issue 91). * Clarified that only the RGB components should be affected in places where sRGB is referred to in the spec, such as ASTC formats. Minor re-wording to avoid "color space" when actively incorrect, now that we refer to the Data Format Spec which actually makes a distinction between color space and transfer function (public issue 94). * Treat pname:pPropertyCount == 0 consistently in flink:vkEnumerateInstanceLayerProperties and flink:vkEnumerateDeviceLayerProperties (public issue 99) * Cleanup minor editorial issues in chapters 14-17 (public issue 100). * Clarify definition of flink:vkEnumerateInstanceExtensionProperties and flink:vkEnumerateDeviceExtensionProperties (public issue 101). * Define the flink:vkEnumerateInstanceExtensionProperties and flink:vkEnumerateDeviceExtensionProperties pname:pLayerName parameter to be a pointer to a null-terminated UTF-8 string (public issue 101). * Rearrange "Missing information" references in mandatory format tables (public issue 101). * Clarify that the enumerated extensions returned by flink:vkEnumerateInstanceExtensionProperties and flink:vkEnumerateDeviceExtensionProperties will only include extensions provided by the platform or extensions implemented in implicitly enabled layers (public issue 101). * Miscellaneous editorial fixes. Include the Vulkan spec patch number in the PDF title. Fix label on &lt;&lt;fig-non-strict-lines,Non strict lines>> diagram. Use more easily distinguished symbols in tables in the &lt;&lt;features-required-format-support,Required Format Support>> section. Don't require FQDNs used as layer names be encoded in lower case if not possible, in the &lt;&lt;extensions-naming-conventions, Extension and Layer Naming Conventions>> section (public issues 101, 119, 121). Internal Issues: * Fixed excessive spacing in tables in XHTML (internal issue 18). * Clarify that ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT applies to secondary command buffers. Previously spec only referred to the members of pname:pCommandBuffers being affected by this bit. Added a separate slink:VkSubmitInfo Valid Usage restriction specifying that ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT also applies to any secondary command buffers that are recorded into the primary command buffers in pname:pCommandBuffers (internal issue 106). * Clarify that slink:VkDeviceCreateInfo::pname:pEnabledFeatures can be NULL (internal issue 117). * Remove "the value of" where it is redundant (e.g. speaking of an API parameter, struct member, or SPIR-V variable, but not when speaking of color components) (internal issue 175). * Forced patch version to always be 0 in the header. Add a "VK_API_VERSION_<major>_<minor>" macro for people to use to do the right thing. Add a VK_HEADER_VERSION which captures the header release number independent of the spec patch number (internal issue 176). * Correct description of slink:VkPipelineShaderStageCreateInfo::pname:pName to "a pointer to a null-terminated UTF-8 string" (internal issue #197). Other Commits: * Updated DataFormat spec reference to the new date for revision 5 of that spec. * Fixed KEEP option (to retain LaTeX intermediate files) in the Makefile to be included when edited there, as well as set on the command line. * Reserve and add "VK_IMG_filter_cubic" to the registry, and implement script functionality to add and remove validity from existing functions. Includes schema and readme changes. * Update GL_KHR_vulkan_glsl so push_constants do not have descriptor sets.
2016-03-11 01:33:02 +00:00
interpreted as a elink:VkPipelineCacheHeaderVersion value, and must:
Change log for March 4, 2016 Vulkan 1.0.5 spec update: * Bump API patch number to 5 for this update. Github Issues: * Correctly describe slink:VkPhysicalDeviceProperties pname:deviceName member as a string, not a pointer to a string. Also one typo fix for "hetereogeneous" (public issue 4). * Replace maynot: macro with may: not, and "may: or maynot:" with "may:" (public issue 4). * Clarify that redundantly setting the state of a fence or event has no effect (public issue 4). * Minor fixes to ref pages to track descriptions of memory bits that changed in the core spec. Fix name of a member in the description of sname:sname:VkPipelineMultisampleStateCreateInfo (public issues 8, 13). * Remove redundant validity statement for sname:VkGraphicsPipelineCreateInfo::pname:stageCount (public issue 14). * Fix typos in chapters 7-9 (public issue 14). * Clarify the example demonstrating the behavior of code:OpMemoryBarrier in the &lt;&lt;shaders-execution-memory-ordering,shader memory acces ordering>> section (public issue 16). * Specify that freeing mapped memory implicitly unmaps the memory in the description of flink:vkFreeMemory (public issue 17). * Forbid allocation callbacks from calling into the API in the &lt;&lt;memory-allocation,memory allocation>> section (public issue 20). * Add missing validity rules about size being greater than 0 and offset being less than size of object. Fix flink:VkMappedMemoryRange's misinterpretation of offset (public issues 27, 31). * Add validity rule disallowing overlapping source/destination descriptors in flink:VkCopyDescriptorSet (public issue 32). * Clarify that array and matrix stride has to be a multiple of the base alignment of the array or matrix in the &lt;&lt;interfaces-resources-layout,Offset and Stride Assignment>> section (public issue 38). * Correct parenthesis floor nesting error in equation for &lt;&lt;textures-RGB-sexp,RGB to shared exponent conversion>>. Clarify case of when exp' is forced to 0, avoiding log2(0) undefined problem (public issue 40). * Remove redundant statement from the code:FragDepth description in the &lt;&lt;interfaces-builtin-variables,Built-In Variables>> section (public issue 47). * Define the clamping of the &lt;&lt;textures-level-of-detail-operation,bias added to the scale factor>> by linking to the slink:VkPhysicalDevice feature pname:maxSamplerLodBias (public issue 64). * Fix typo "optimal linear resources" and clarify the set of resources &lt;&lt;features-limits-bufferImageGranularity,the pname:bufferImageGranularity resource>> applies to (public issue 67). * Replace 'descriptor accessed by a pipeline' language for sname:VkDescriptorSetAllocateInfo with more precise phrasing about binding a descriptor set before a command that invokes work using that set (public issue 69). * tstripadj.svg contained an Inkscape tag which caused Firefox and IE 11 to fail to render it, and was illegal SVG. Generating Plain SVG from the Inkscape SVG source fixes this (public issue 70). * Fix validity for sname:VkVertexInputBindingDescription and sname:VkVertexInputAttributeDescription numbers (public issue 72). Internal Issues: * Clarify the meaning of ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT in elink:VkFormatFeatureFlagBits with respect to depth compare (internal issue 107). * Added a note explaining that ename:VK_QUEUE_TRANSFER_BIT may or may not be reported for a queue family that already supports ename:VK_QUEUE_GRAPHICS_BIT or ename:VK_QUEUE_COMPUTE_BIT as the former is a strict subset of the latter ones (internal issue 116). * Add validity language for sname:VkDescriptorSetAllocateInfo about exceeding the descriptor pool capacity (internal issue 140). * Add ename:VK_INCOMPLETE success code for flink:vkEnumeratePhysicalDevices query (internal issue 163). Other Commits: * Add the VK_NV_glsl_shader extension definitions to the API. * Update GL_KHR_vulkan_glsl with 1) origin_upper_left as default 2) specialization array constant semantics. * Corrected/updated Data Format Specification date.
2016-03-03 13:06:18 +00:00
have one of the following values:
include::../enums/VkPipelineCacheHeaderVersion.txt[]
A consumer of the pipeline cache should use the cache version to interpret
the remainder of the cache header.
2016-02-16 09:53:44 +00:00
// refEnd VkPipelineCacheHeaderVersion vkCreatePipelineCache vkGetPipelineCacheData
If pname:pDataSize is less than what is necessary to store this
2016-02-16 09:53:44 +00:00
header, nothing will be written to pname:pData and zero will be written to
pname:pDataSize.
include::../validity/protos/vkGetPipelineCacheData.txt[]
// refBegin vkDestroyPipelineCache Destroy a pipeline cache object
2016-02-16 09:53:44 +00:00
To destroy a pipeline cache, call:
include::../protos/vkDestroyPipelineCache.txt[]
* pname:device is the logical device that destroys the pipeline cache
object.
* pname:pipelineCache is the handle of the pipeline cache to destroy.
* pname:pAllocator controls host memory allocation as described in the
<<memory-allocation, Memory Allocation>> chapter.
include::../validity/protos/vkDestroyPipelineCache.txt[]
[[pipelines-specialization-constants]]
== Specialization Constants
Specialization constants are a mechanism whereby constants in a SPIR-V
module can: have their constant value specified at the time the
sname:VkPipeline is created. This allows a SPIR-V module to have constants
that can: be modified while executing an application that uses the Vulkan
API.
[NOTE]
.Note
====
Specialization constants are useful to allow a compute shader to have
Change log for March 10, 2016 Vulkan 1.0.6 spec update: * Bump API patch number and header version number to 6 for this update. Github Issues: * Define 'invocation group' for compute and graphics shaders. Cleanup definition and use of 'workgroup', and add glossary entries (public issue 1). * Various minor editorial fixes (public issue 33). * Clarify locations for block members in the &lt;&lt;interfaces-iointerfaces-locations,Location Assignment>> section (public issue 45). * Editorial fixes for &lt;&lt;commandbuffer-allocation,Command Buffer Allocation>> section (public issues 54, 59). * Clarify behavior of depth test in the &lt;&lt;fragops-depth,Depth Test&gt;&gt; section (public issues 80, 81). * Remove discussion of return codes from flink:vkGetPhysicalDeviceSparseImageFormatProperties and flink:vkGetImageSparseMemoryRequirements, which don't return values (public issue 82). * Allow flink:vkCmdDrawIndirect and flink:vkCmdDrawIndexedIndirect pname:drawCount of 0, as well as 1, when the multiDrawIndirect feature is not supported (public issue 88). * Remove confusing wording in the &lt;&lt;features-limits,Limits>> section describing the slink:VkPhysicalDeviceLimits pname:minTexelBufferOffsetAlignment, pname:minUniformBufferOffsetAlignment, and pname:minStorageBufferOffsetAlignment members as both minimums and maximums (public issue 91). * Clarified that only the RGB components should be affected in places where sRGB is referred to in the spec, such as ASTC formats. Minor re-wording to avoid "color space" when actively incorrect, now that we refer to the Data Format Spec which actually makes a distinction between color space and transfer function (public issue 94). * Treat pname:pPropertyCount == 0 consistently in flink:vkEnumerateInstanceLayerProperties and flink:vkEnumerateDeviceLayerProperties (public issue 99) * Cleanup minor editorial issues in chapters 14-17 (public issue 100). * Clarify definition of flink:vkEnumerateInstanceExtensionProperties and flink:vkEnumerateDeviceExtensionProperties (public issue 101). * Define the flink:vkEnumerateInstanceExtensionProperties and flink:vkEnumerateDeviceExtensionProperties pname:pLayerName parameter to be a pointer to a null-terminated UTF-8 string (public issue 101). * Rearrange "Missing information" references in mandatory format tables (public issue 101). * Clarify that the enumerated extensions returned by flink:vkEnumerateInstanceExtensionProperties and flink:vkEnumerateDeviceExtensionProperties will only include extensions provided by the platform or extensions implemented in implicitly enabled layers (public issue 101). * Miscellaneous editorial fixes. Include the Vulkan spec patch number in the PDF title. Fix label on &lt;&lt;fig-non-strict-lines,Non strict lines>> diagram. Use more easily distinguished symbols in tables in the &lt;&lt;features-required-format-support,Required Format Support>> section. Don't require FQDNs used as layer names be encoded in lower case if not possible, in the &lt;&lt;extensions-naming-conventions, Extension and Layer Naming Conventions>> section (public issues 101, 119, 121). Internal Issues: * Fixed excessive spacing in tables in XHTML (internal issue 18). * Clarify that ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT applies to secondary command buffers. Previously spec only referred to the members of pname:pCommandBuffers being affected by this bit. Added a separate slink:VkSubmitInfo Valid Usage restriction specifying that ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT also applies to any secondary command buffers that are recorded into the primary command buffers in pname:pCommandBuffers (internal issue 106). * Clarify that slink:VkDeviceCreateInfo::pname:pEnabledFeatures can be NULL (internal issue 117). * Remove "the value of" where it is redundant (e.g. speaking of an API parameter, struct member, or SPIR-V variable, but not when speaking of color components) (internal issue 175). * Forced patch version to always be 0 in the header. Add a "VK_API_VERSION_<major>_<minor>" macro for people to use to do the right thing. Add a VK_HEADER_VERSION which captures the header release number independent of the spec patch number (internal issue 176). * Correct description of slink:VkPipelineShaderStageCreateInfo::pname:pName to "a pointer to a null-terminated UTF-8 string" (internal issue #197). Other Commits: * Updated DataFormat spec reference to the new date for revision 5 of that spec. * Fixed KEEP option (to retain LaTeX intermediate files) in the Makefile to be included when edited there, as well as set on the command line. * Reserve and add "VK_IMG_filter_cubic" to the registry, and implement script functionality to add and remove validity from existing functions. Includes schema and readme changes. * Update GL_KHR_vulkan_glsl so push_constants do not have descriptor sets.
2016-03-11 01:33:02 +00:00
its local workgroup size changed at runtime by the user, for example.
2016-02-16 09:53:44 +00:00
====
Each instance of the sname:VkPipelineShaderStageCreateInfo structure
contains a parameter pname:pSpecializationInfo, which can: be `NULL` to
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
indicate no specialization constants, or point to a
sname:VkSpecializationInfo structure.
2016-02-16 09:53:44 +00:00
// refBegin VkSpecializationInfo - Structure specifying specialization info
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
The sname:VkSpecializationInfo structure is defined as:
2016-02-16 09:53:44 +00:00
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
include::../structs/VkSpecializationInfo.txt[]
2016-02-16 09:53:44 +00:00
* pname:mapEntryCount is the number of entries in the pname:pMapEntries
array.
* pname:pMapEntries is a pointer to an array of
sname:VkSpecializationMapEntry which maps constant IDs to offsets in
pname:pData.
* pname:dataSize is the byte size of the pname:pData buffer.
* pname:pData contains the actual constant values to specialize with.
pname:pMapEntries points to a structure of type
slink:VkSpecializationMapEntry.
2016-02-16 09:53:44 +00:00
include::../validity/structs/VkSpecializationInfo.txt[]
// refBegin VkSpecializationMapEntry - Structure specifying a specialization map entry
2016-02-16 09:53:44 +00:00
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
The sname:VkSpecializationMapEntry structure is defined as:
2016-02-16 09:53:44 +00:00
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
include::../structs/VkSpecializationMapEntry.txt[]
2016-02-16 09:53:44 +00:00
* pname:constantID is the ID of the specialization constant in SPIR-V.
* pname:offset is the byte offset of the specialization constant value within the
2016-02-16 09:53:44 +00:00
supplied data buffer.
* pname:size is the byte size of the specialization constant value within the
2016-02-16 09:53:44 +00:00
supplied data buffer.
If a pname:constantID value is not a specialization constant ID used in the
shader, that map entry does not affect the behavior of the pipeline.
include::../validity/structs/VkSpecializationMapEntry.txt[]
2016-02-16 09:53:44 +00:00
In human readable SPIR-V:
[source,glsl]
---------------------------------------------------
OpDecorate %x SpecId 13 ; decorate .x component of WorkgroupSize with ID 13
OpDecorate %y SpecId 42 ; decorate .y component of WorkgroupSize with ID 42
OpDecorate %z SpecId 3 ; decorate .z component of WorkgroupSize with ID 3
OpDecorate %wgsize BuiltIn WorkgroupSize ; decorate WorkgroupSize onto constant
%i32 = OpTypeInt 32 0 ; declare an unsigned 32-bit type
%uvec3 = OpTypeVector %i32 3 ; declare a 3 element vector type of unsigned 32-bit
%x = OpSpecConstant %i32 1 ; declare the .x component of WorkgroupSize
%y = OpSpecConstant %i32 1 ; declare the .y component of WorkgroupSize
%z = OpSpecConstant %i32 1 ; declare the .z component of WorkgroupSize
%wgsize = OpSpecConstantComposite %uvec3 %x %y %z ; declare WorkgroupSize
---------------------------------------------------
From the above we have three specialization constants, one for each of the
x, y & z elements of the WorkgroupSize vector.
Now to specialize the above via the specialization constants mechanism:
[source,{basebackend@docbook:c++:cpp}]
---------------------------------------------------
const VkSpecializationMapEntry entries[] =
{
{
13, // constantID
0 * sizeof(uint32_t), // offset
sizeof(uint32_t) // size
},
{
42, // constantID
1 * sizeof(uint32_t), // offset
sizeof(uint32_t) // size
},
{
3, // constantID
2 * sizeof(uint32_t), // offset
sizeof(uint32_t) // size
}
};
const uint32_t data[] = { 16, 8, 4 }; // our workgroup size is 16x8x4
const VkSpecializationInfo info =
{
3, // mapEntryCount
entries, // pMapEntries
3 * sizeof(uint32_t), // dataSize
data, // pData
};
---------------------------------------------------
Then when calling flink:vkCreateComputePipelines, and passing the
2016-02-16 09:53:44 +00:00
sname:VkSpecializationInfo we defined as the pname:pSpecializationInfo
parameter of slink:VkPipelineShaderStageCreateInfo, we will create a compute
Change log for March 10, 2016 Vulkan 1.0.6 spec update: * Bump API patch number and header version number to 6 for this update. Github Issues: * Define 'invocation group' for compute and graphics shaders. Cleanup definition and use of 'workgroup', and add glossary entries (public issue 1). * Various minor editorial fixes (public issue 33). * Clarify locations for block members in the &lt;&lt;interfaces-iointerfaces-locations,Location Assignment>> section (public issue 45). * Editorial fixes for &lt;&lt;commandbuffer-allocation,Command Buffer Allocation>> section (public issues 54, 59). * Clarify behavior of depth test in the &lt;&lt;fragops-depth,Depth Test&gt;&gt; section (public issues 80, 81). * Remove discussion of return codes from flink:vkGetPhysicalDeviceSparseImageFormatProperties and flink:vkGetImageSparseMemoryRequirements, which don't return values (public issue 82). * Allow flink:vkCmdDrawIndirect and flink:vkCmdDrawIndexedIndirect pname:drawCount of 0, as well as 1, when the multiDrawIndirect feature is not supported (public issue 88). * Remove confusing wording in the &lt;&lt;features-limits,Limits>> section describing the slink:VkPhysicalDeviceLimits pname:minTexelBufferOffsetAlignment, pname:minUniformBufferOffsetAlignment, and pname:minStorageBufferOffsetAlignment members as both minimums and maximums (public issue 91). * Clarified that only the RGB components should be affected in places where sRGB is referred to in the spec, such as ASTC formats. Minor re-wording to avoid "color space" when actively incorrect, now that we refer to the Data Format Spec which actually makes a distinction between color space and transfer function (public issue 94). * Treat pname:pPropertyCount == 0 consistently in flink:vkEnumerateInstanceLayerProperties and flink:vkEnumerateDeviceLayerProperties (public issue 99) * Cleanup minor editorial issues in chapters 14-17 (public issue 100). * Clarify definition of flink:vkEnumerateInstanceExtensionProperties and flink:vkEnumerateDeviceExtensionProperties (public issue 101). * Define the flink:vkEnumerateInstanceExtensionProperties and flink:vkEnumerateDeviceExtensionProperties pname:pLayerName parameter to be a pointer to a null-terminated UTF-8 string (public issue 101). * Rearrange "Missing information" references in mandatory format tables (public issue 101). * Clarify that the enumerated extensions returned by flink:vkEnumerateInstanceExtensionProperties and flink:vkEnumerateDeviceExtensionProperties will only include extensions provided by the platform or extensions implemented in implicitly enabled layers (public issue 101). * Miscellaneous editorial fixes. Include the Vulkan spec patch number in the PDF title. Fix label on &lt;&lt;fig-non-strict-lines,Non strict lines>> diagram. Use more easily distinguished symbols in tables in the &lt;&lt;features-required-format-support,Required Format Support>> section. Don't require FQDNs used as layer names be encoded in lower case if not possible, in the &lt;&lt;extensions-naming-conventions, Extension and Layer Naming Conventions>> section (public issues 101, 119, 121). Internal Issues: * Fixed excessive spacing in tables in XHTML (internal issue 18). * Clarify that ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT applies to secondary command buffers. Previously spec only referred to the members of pname:pCommandBuffers being affected by this bit. Added a separate slink:VkSubmitInfo Valid Usage restriction specifying that ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT also applies to any secondary command buffers that are recorded into the primary command buffers in pname:pCommandBuffers (internal issue 106). * Clarify that slink:VkDeviceCreateInfo::pname:pEnabledFeatures can be NULL (internal issue 117). * Remove "the value of" where it is redundant (e.g. speaking of an API parameter, struct member, or SPIR-V variable, but not when speaking of color components) (internal issue 175). * Forced patch version to always be 0 in the header. Add a "VK_API_VERSION_<major>_<minor>" macro for people to use to do the right thing. Add a VK_HEADER_VERSION which captures the header release number independent of the spec patch number (internal issue 176). * Correct description of slink:VkPipelineShaderStageCreateInfo::pname:pName to "a pointer to a null-terminated UTF-8 string" (internal issue #197). Other Commits: * Updated DataFormat spec reference to the new date for revision 5 of that spec. * Fixed KEEP option (to retain LaTeX intermediate files) in the Makefile to be included when edited there, as well as set on the command line. * Reserve and add "VK_IMG_filter_cubic" to the registry, and implement script functionality to add and remove validity from existing functions. Includes schema and readme changes. * Update GL_KHR_vulkan_glsl so push_constants do not have descriptor sets.
2016-03-11 01:33:02 +00:00
pipeline with the runtime specified local workgroup size.
2016-02-16 09:53:44 +00:00
Another example would be that an application has a SPIR-V module that has
some platform-dependent constants they wish to use.
In human readable SPIR-V:
// [source,{basebackend@docbook:c:glsl}]
[source,glsl]
---------------------------------------------------
OpDecorate %1 SpecId 0 ; decorate our signed 32-bit integer constant
OpDecorate %2 SpecId 12 ; decorate our 32-bit floating-point constant
%i32 = OpTypeInt 32 1 ; declare a signed 32-bit type
%float = OpTypeFloat 32 ; declare a 32-bit floating-point type
%1 = OpSpecConstant %i32 -1 ; some signed 32-bit integer constant
%2 = OpSpecConstant %float 0.5 ; some 32-bit floating-point constant
---------------------------------------------------
From the above we have two specialization constants, one is a signed 32-bit
integer and the second is a 32-bit floating-point.
Now to specialize the above via the specialization constants mechanism:
[source,{basebackend@docbook:c++:cpp}]
---------------------------------------------------
Change log for March 25, 2016 Vulkan 1.0.7 spec update: * Bump API patch number and header version number to 7 for this update. Github Issues: * Fix slink:VkSpecializationMapEntry example to avoid C/C++ strict aliasing issues (public issue 14). * Clarify the meaning of "matching" in flink:vkCmdBindDescriptorSets validity language (public issue 33). * Add stub reference pages so xrefs to not-yet-written pages don't generate 404 errors. However, the actual content of these pages still needs to be filled in as time allows (public issue 44, but does not close that issue out). * Remove incorrect validity statement for flink:vkGetImageSparseMemoryRequirements (public issue 85). * Reword the <<features-limits-bufferImageGranularity,bufferImageGranularity>> feature in terms of "aliasing", and clarify that it applies to bindings in the same memory object (public issue 90). * Clarify the relationship of the slink:VkPhysicalDeviceLimits pname:maxViewportDimensions and pname:viewportBoundsRange limits (public issue 92). * Specify sparse unbound texture replacement in the <<textures-texel-replacement,Texel Replacement>> section independently of robust buffer access language (public issue 100). * Add the <<fundamentals-architecture-model,Architecture Model>> section to explain architecture constraints Vulkan has chosen to accept in order to enable portable and performant code (public issue 122). * State that an object must not be destroyed until *all* (not *any*) uses of that object have completed (public issue 123). * Minor editorial cleanup (public issues 129, 134, 146, 148). * Add validity language for layer and extension names to slink:VkDeviceCreateInfo matching that used for slink:VkInstanceCreateInfo (public issue 130). * Clean up terminology for the case when the bits set in one bitmask are a subset of the bits set in another bitmask (public issue 138). * Document that input attachments are UniformConstant not Input, in the <<interfaces-inputattachment,Fragment Input Attachment Interface>> section (public glslang bug 169). Internal Issues: * Add max enum values to "flag bits" enums (internal issue #136). * Clarify language around the various uses of the term "block" in the <<appendix-compressedtex-bc,Block Compressed Image Formats>> section (internal issue #202). * Removed "expand" dependency from <enums> groups in vk.xml and added auto-generation code in the scripts to infer it instead, to ensure consistency. This caused renaming of sname:VkColorSpaceKHR and sname:VkPresentModeKHR etext:BEGIN_RANGE (etc.) tokens, but those tokens are metadata, not part of the API, and the Vulkan WG is OK with this change. This change adds ranges to two additional enums that were missing them due to not defining the "expand" attribute (internal issue 217). * Tweak makefile to generate ref page nroff (.3) files in the right output directory, working around an a2x limitation (internal issue 223). Other Commits: * Add validity requirements for flink:vkCmdCopyQueryPoolResults pname:dstBuffer parameter. * Fix ref page build to generate .3 targets in the right output directory.
2016-03-25 09:25:04 +00:00
struct SpecializationData {
int32_t data0;
float data1;
};
2016-02-16 09:53:44 +00:00
const VkSpecializationMapEntry entries[] =
{
{
Change log for March 25, 2016 Vulkan 1.0.7 spec update: * Bump API patch number and header version number to 7 for this update. Github Issues: * Fix slink:VkSpecializationMapEntry example to avoid C/C++ strict aliasing issues (public issue 14). * Clarify the meaning of "matching" in flink:vkCmdBindDescriptorSets validity language (public issue 33). * Add stub reference pages so xrefs to not-yet-written pages don't generate 404 errors. However, the actual content of these pages still needs to be filled in as time allows (public issue 44, but does not close that issue out). * Remove incorrect validity statement for flink:vkGetImageSparseMemoryRequirements (public issue 85). * Reword the <<features-limits-bufferImageGranularity,bufferImageGranularity>> feature in terms of "aliasing", and clarify that it applies to bindings in the same memory object (public issue 90). * Clarify the relationship of the slink:VkPhysicalDeviceLimits pname:maxViewportDimensions and pname:viewportBoundsRange limits (public issue 92). * Specify sparse unbound texture replacement in the <<textures-texel-replacement,Texel Replacement>> section independently of robust buffer access language (public issue 100). * Add the <<fundamentals-architecture-model,Architecture Model>> section to explain architecture constraints Vulkan has chosen to accept in order to enable portable and performant code (public issue 122). * State that an object must not be destroyed until *all* (not *any*) uses of that object have completed (public issue 123). * Minor editorial cleanup (public issues 129, 134, 146, 148). * Add validity language for layer and extension names to slink:VkDeviceCreateInfo matching that used for slink:VkInstanceCreateInfo (public issue 130). * Clean up terminology for the case when the bits set in one bitmask are a subset of the bits set in another bitmask (public issue 138). * Document that input attachments are UniformConstant not Input, in the <<interfaces-inputattachment,Fragment Input Attachment Interface>> section (public glslang bug 169). Internal Issues: * Add max enum values to "flag bits" enums (internal issue #136). * Clarify language around the various uses of the term "block" in the <<appendix-compressedtex-bc,Block Compressed Image Formats>> section (internal issue #202). * Removed "expand" dependency from <enums> groups in vk.xml and added auto-generation code in the scripts to infer it instead, to ensure consistency. This caused renaming of sname:VkColorSpaceKHR and sname:VkPresentModeKHR etext:BEGIN_RANGE (etc.) tokens, but those tokens are metadata, not part of the API, and the Vulkan WG is OK with this change. This change adds ranges to two additional enums that were missing them due to not defining the "expand" attribute (internal issue 217). * Tweak makefile to generate ref page nroff (.3) files in the right output directory, working around an a2x limitation (internal issue 223). Other Commits: * Add validity requirements for flink:vkCmdCopyQueryPoolResults pname:dstBuffer parameter. * Fix ref page build to generate .3 targets in the right output directory.
2016-03-25 09:25:04 +00:00
0, // constantID
offsetof(SpecializationData, data0), // offset
sizeof(SpecializationData::data0) // size
2016-02-16 09:53:44 +00:00
},
{
Change log for March 25, 2016 Vulkan 1.0.7 spec update: * Bump API patch number and header version number to 7 for this update. Github Issues: * Fix slink:VkSpecializationMapEntry example to avoid C/C++ strict aliasing issues (public issue 14). * Clarify the meaning of "matching" in flink:vkCmdBindDescriptorSets validity language (public issue 33). * Add stub reference pages so xrefs to not-yet-written pages don't generate 404 errors. However, the actual content of these pages still needs to be filled in as time allows (public issue 44, but does not close that issue out). * Remove incorrect validity statement for flink:vkGetImageSparseMemoryRequirements (public issue 85). * Reword the <<features-limits-bufferImageGranularity,bufferImageGranularity>> feature in terms of "aliasing", and clarify that it applies to bindings in the same memory object (public issue 90). * Clarify the relationship of the slink:VkPhysicalDeviceLimits pname:maxViewportDimensions and pname:viewportBoundsRange limits (public issue 92). * Specify sparse unbound texture replacement in the <<textures-texel-replacement,Texel Replacement>> section independently of robust buffer access language (public issue 100). * Add the <<fundamentals-architecture-model,Architecture Model>> section to explain architecture constraints Vulkan has chosen to accept in order to enable portable and performant code (public issue 122). * State that an object must not be destroyed until *all* (not *any*) uses of that object have completed (public issue 123). * Minor editorial cleanup (public issues 129, 134, 146, 148). * Add validity language for layer and extension names to slink:VkDeviceCreateInfo matching that used for slink:VkInstanceCreateInfo (public issue 130). * Clean up terminology for the case when the bits set in one bitmask are a subset of the bits set in another bitmask (public issue 138). * Document that input attachments are UniformConstant not Input, in the <<interfaces-inputattachment,Fragment Input Attachment Interface>> section (public glslang bug 169). Internal Issues: * Add max enum values to "flag bits" enums (internal issue #136). * Clarify language around the various uses of the term "block" in the <<appendix-compressedtex-bc,Block Compressed Image Formats>> section (internal issue #202). * Removed "expand" dependency from <enums> groups in vk.xml and added auto-generation code in the scripts to infer it instead, to ensure consistency. This caused renaming of sname:VkColorSpaceKHR and sname:VkPresentModeKHR etext:BEGIN_RANGE (etc.) tokens, but those tokens are metadata, not part of the API, and the Vulkan WG is OK with this change. This change adds ranges to two additional enums that were missing them due to not defining the "expand" attribute (internal issue 217). * Tweak makefile to generate ref page nroff (.3) files in the right output directory, working around an a2x limitation (internal issue 223). Other Commits: * Add validity requirements for flink:vkCmdCopyQueryPoolResults pname:dstBuffer parameter. * Fix ref page build to generate .3 targets in the right output directory.
2016-03-25 09:25:04 +00:00
12, // constantID
offsetof(SpecializationData, data1), // offset
sizeof(SpecializationData::data1) // size
2016-02-16 09:53:44 +00:00
}
};
Change log for March 25, 2016 Vulkan 1.0.7 spec update: * Bump API patch number and header version number to 7 for this update. Github Issues: * Fix slink:VkSpecializationMapEntry example to avoid C/C++ strict aliasing issues (public issue 14). * Clarify the meaning of "matching" in flink:vkCmdBindDescriptorSets validity language (public issue 33). * Add stub reference pages so xrefs to not-yet-written pages don't generate 404 errors. However, the actual content of these pages still needs to be filled in as time allows (public issue 44, but does not close that issue out). * Remove incorrect validity statement for flink:vkGetImageSparseMemoryRequirements (public issue 85). * Reword the <<features-limits-bufferImageGranularity,bufferImageGranularity>> feature in terms of "aliasing", and clarify that it applies to bindings in the same memory object (public issue 90). * Clarify the relationship of the slink:VkPhysicalDeviceLimits pname:maxViewportDimensions and pname:viewportBoundsRange limits (public issue 92). * Specify sparse unbound texture replacement in the <<textures-texel-replacement,Texel Replacement>> section independently of robust buffer access language (public issue 100). * Add the <<fundamentals-architecture-model,Architecture Model>> section to explain architecture constraints Vulkan has chosen to accept in order to enable portable and performant code (public issue 122). * State that an object must not be destroyed until *all* (not *any*) uses of that object have completed (public issue 123). * Minor editorial cleanup (public issues 129, 134, 146, 148). * Add validity language for layer and extension names to slink:VkDeviceCreateInfo matching that used for slink:VkInstanceCreateInfo (public issue 130). * Clean up terminology for the case when the bits set in one bitmask are a subset of the bits set in another bitmask (public issue 138). * Document that input attachments are UniformConstant not Input, in the <<interfaces-inputattachment,Fragment Input Attachment Interface>> section (public glslang bug 169). Internal Issues: * Add max enum values to "flag bits" enums (internal issue #136). * Clarify language around the various uses of the term "block" in the <<appendix-compressedtex-bc,Block Compressed Image Formats>> section (internal issue #202). * Removed "expand" dependency from <enums> groups in vk.xml and added auto-generation code in the scripts to infer it instead, to ensure consistency. This caused renaming of sname:VkColorSpaceKHR and sname:VkPresentModeKHR etext:BEGIN_RANGE (etc.) tokens, but those tokens are metadata, not part of the API, and the Vulkan WG is OK with this change. This change adds ranges to two additional enums that were missing them due to not defining the "expand" attribute (internal issue 217). * Tweak makefile to generate ref page nroff (.3) files in the right output directory, working around an a2x limitation (internal issue 223). Other Commits: * Add validity requirements for flink:vkCmdCopyQueryPoolResults pname:dstBuffer parameter. * Fix ref page build to generate .3 targets in the right output directory.
2016-03-25 09:25:04 +00:00
SpecializationData data;
data.data0 = -42; // set the data for the 32-bit integer
data.data1 = 42.0f; // set the data for the 32-bit floating-point
2016-02-16 09:53:44 +00:00
const VkSpecializationInfo info =
{
2, // mapEntryCount
entries, // pMapEntries
Change log for March 25, 2016 Vulkan 1.0.7 spec update: * Bump API patch number and header version number to 7 for this update. Github Issues: * Fix slink:VkSpecializationMapEntry example to avoid C/C++ strict aliasing issues (public issue 14). * Clarify the meaning of "matching" in flink:vkCmdBindDescriptorSets validity language (public issue 33). * Add stub reference pages so xrefs to not-yet-written pages don't generate 404 errors. However, the actual content of these pages still needs to be filled in as time allows (public issue 44, but does not close that issue out). * Remove incorrect validity statement for flink:vkGetImageSparseMemoryRequirements (public issue 85). * Reword the <<features-limits-bufferImageGranularity,bufferImageGranularity>> feature in terms of "aliasing", and clarify that it applies to bindings in the same memory object (public issue 90). * Clarify the relationship of the slink:VkPhysicalDeviceLimits pname:maxViewportDimensions and pname:viewportBoundsRange limits (public issue 92). * Specify sparse unbound texture replacement in the <<textures-texel-replacement,Texel Replacement>> section independently of robust buffer access language (public issue 100). * Add the <<fundamentals-architecture-model,Architecture Model>> section to explain architecture constraints Vulkan has chosen to accept in order to enable portable and performant code (public issue 122). * State that an object must not be destroyed until *all* (not *any*) uses of that object have completed (public issue 123). * Minor editorial cleanup (public issues 129, 134, 146, 148). * Add validity language for layer and extension names to slink:VkDeviceCreateInfo matching that used for slink:VkInstanceCreateInfo (public issue 130). * Clean up terminology for the case when the bits set in one bitmask are a subset of the bits set in another bitmask (public issue 138). * Document that input attachments are UniformConstant not Input, in the <<interfaces-inputattachment,Fragment Input Attachment Interface>> section (public glslang bug 169). Internal Issues: * Add max enum values to "flag bits" enums (internal issue #136). * Clarify language around the various uses of the term "block" in the <<appendix-compressedtex-bc,Block Compressed Image Formats>> section (internal issue #202). * Removed "expand" dependency from <enums> groups in vk.xml and added auto-generation code in the scripts to infer it instead, to ensure consistency. This caused renaming of sname:VkColorSpaceKHR and sname:VkPresentModeKHR etext:BEGIN_RANGE (etc.) tokens, but those tokens are metadata, not part of the API, and the Vulkan WG is OK with this change. This change adds ranges to two additional enums that were missing them due to not defining the "expand" attribute (internal issue 217). * Tweak makefile to generate ref page nroff (.3) files in the right output directory, working around an a2x limitation (internal issue 223). Other Commits: * Add validity requirements for flink:vkCmdCopyQueryPoolResults pname:dstBuffer parameter. * Fix ref page build to generate .3 targets in the right output directory.
2016-03-25 09:25:04 +00:00
sizeof(data), // dataSize
&data, // pData
2016-02-16 09:53:44 +00:00
};
---------------------------------------------------
It is legal for a SPIR-V module with specializations to be compiled into a
pipeline where no specialization info was provided. SPIR-V specialization
constants contain default values such that if a specialization is not
provided, the default value will be used. In the examples above, it would be
valid for an application to only specialize some of the specialization
constants within the SPIR-V module, and let the other constants use their
default values encoded within the OpSpecConstant declarations.
[[pipelines-binding]]
== Pipeline Binding
// refBegin vkCmdBindPipeline Bind a pipeline object to a command buffer.
2016-02-16 09:53:44 +00:00
Once a pipeline has been created, it can: be bound to the command buffer
using the command:
include::../protos/vkCmdBindPipeline.txt[]
* pname:commandBuffer is the command buffer that the pipeline will be
bound to.
* pname:pipelineBindPoint specifies the bind point, and must: have one of
the values
+
--
// refBegin VkPipelineBindPoint - specify the bind point of a pipeline object to a command buffer
2016-02-16 09:53:44 +00:00
include::../enums/VkPipelineBindPoint.txt[]
--
+
2016-02-16 09:53:44 +00:00
specifying whether pname:pipeline will be bound as a compute
(ename:VK_PIPELINE_BIND_POINT_COMPUTE) or graphics
(ename:VK_PIPELINE_BIND_POINT_GRAPHICS) pipeline. There are separate bind
points for each of graphics and compute, so binding one does not disturb the
other.
+
2016-02-16 09:53:44 +00:00
* pname:pipeline is the pipeline to be bound.
Once bound, a pipeline binding affects subsequent graphics or compute
commands in the command buffer until a different pipeline is bound to the
bind point. The pipeline bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE
controls the behavior of flink:vkCmdDispatch and
flink:vkCmdDispatchIndirect. The pipeline bound to
ename:VK_PIPELINE_BIND_POINT_GRAPHICS controls the behavior of
flink:vkCmdDraw, flink:vkCmdDrawIndexed, flink:vkCmdDrawIndirect, and
flink:vkCmdDrawIndexedIndirect. No other commands are affected by the
pipeline state.
include::../validity/protos/vkCmdBindPipeline.txt[]