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
|
|
|
|
|
|
|
|
|
|
[[interfaces]]
|
|
|
|
|
= Shader Interfaces
|
|
|
|
|
|
|
|
|
|
When a pipeline is created, the set of shaders specified in the
|
|
|
|
|
corresponding stext:Vk*PipelineCreateInfo structure are implicitly linked
|
|
|
|
|
at a number of different interfaces.
|
|
|
|
|
|
|
|
|
|
* <<interfaces-iointerfaces,Shader Input and Output Interface>>
|
|
|
|
|
* <<interfaces-vertexinput,Vertex Input Interface>>
|
|
|
|
|
* <<interfaces-fragmentoutput,Fragment Output Interface>>
|
|
|
|
|
* <<interfaces-inputattachment,Fragment Input Attachment Interface>>
|
|
|
|
|
* <<interfaces-resources,Shader Resource Interface>>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[interfaces-iointerfaces]]
|
|
|
|
|
== Shader Input and Output Interfaces
|
|
|
|
|
|
|
|
|
|
When multiple stages are present in a pipeline, the outputs of one
|
|
|
|
|
stage form an interface with the inputs of the next stage. When such an
|
|
|
|
|
interface involves a shader, shader outputs are matched against the inputs
|
|
|
|
|
of the next stage, and shader inputs are matched against the outputs of the
|
|
|
|
|
previous stage.
|
|
|
|
|
|
|
|
|
|
There are two classes of variables that can: be matched between shader
|
|
|
|
|
stages, built-in variables and user-defined variables. Each class has a
|
|
|
|
|
different set of matching criteria. Generally, when non-shader stages are
|
|
|
|
|
between shader stages, the user-defined variables, and most built-in
|
|
|
|
|
variables, form an interface between the shader stages.
|
|
|
|
|
|
|
|
|
|
The variables forming the input or output _interfaces_ are listed as
|
|
|
|
|
operands to the code:OpEntryPoint instruction and are declared with the
|
|
|
|
|
code:Input or code:Output storage classes, respectively, in the SPIR-V
|
|
|
|
|
module.
|
|
|
|
|
|
Change log for July 15, 2016 Vulkan 1.0.21 spec update:
* Bump API patch number and header version number to 21 for this update.
Github Issues:
* Clarify how <<features-supported-sample-counts,sample count queries>>
relate to the limits in slink:VkPhysicalDeviceLimits. (public issue
185).
* Clarify in the <<interfaces-iointerfaces,Shader Input and Output
Interfaces>> section that shader output variables have undefined values
until the shader writes to them (public issue 240).
* Specify the implicit value of image parameters that cannot be set in
slink:VkSwapchainCreateInfo::pname:flags, pname:imageType,
pname:mipLevels, pname:samples, pname:tiling, and pname:initialLayout
(public issue 243).
* Make use of code:NULL and code:VK_NULL_HANDLE consistent in the
VK_KHR_swapchain extension (public issue 276).
Internal Issues:
* Clarify that presenting an image to a display surface swapchain applies
the display surface's mode, and that destroying a display surface
swapchain may reset the display's mode, in the VK_KHR_display_swapchain
extension (internal issue 247).
* Better describe what a slink:VkSurfaceKHR is, and that creating one does
not set a mode, in the VK_KHR_display extension. This is a round-about
way of pointing out that mode setting is not covered by the extension,
but rather is performed as a side effect of presentation (internal issue
247).
* Add more valid usage statements to flink:vkQueuePresentKHR command when
the VK_KHR_display_swapchain extension is present (internal issue
247).
* Add more includes to the VK_KHR_swapchain extension to better document
interactions with VK_KHR_display_swapchain (internal issue 247).
* Clarify restrictions on location aliasing in the
<<fxvertex,Fixed-Function Vertex Processing>> section (internal issue
370).
* Add mathematical description of blitting to flink:vkCmdBlitImage, and
link it to the <<textures,Image Operations>> chapter. Use mathematical
notation for ranges of texel coordinates in the <<textures,Image
Operations>> chapter. Fixed miscellaneous validity statements for
flink:vkCmdBlit and slink:VkImageBlit (internal issue 382).
Other Commits:
* Added a valid usage rule to flink:VkGraphicsPipelineCreateInfo that the
ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST topology must only be used when
tessellation shaders are used.
* Expand the style guide into a formal "Procedures and Conventions"
document. Add a API Naming Conventions section, move most of the API
Specification Appendix C (Layers and Extensions) content into the new
document, and define the resulting procedures as mandatory (where
relevant). This more clearly separates use vs. specification of Vulkan
APIs.
* Update vk_platform.h to handle 32-bit ARMv8 binaries.
* Various minor cleanups to the Makefile and build process.
2016-07-16 02:05:43 +00:00
|
|
|
|
code:Output variables of a shader stage have undefined values until the shader
|
|
|
|
|
writes to them or uses the code:Initializer operand when declaring the
|
|
|
|
|
variable.
|
|
|
|
|
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
[[interfaces-iointerfaces-builtin]]
|
|
|
|
|
=== Built-in Interface Block
|
|
|
|
|
|
|
|
|
|
Shader <<interfaces-builtin-variables,built-in>> variables meeting the
|
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
<<interfaces-iointerfaces-locations,Location Assignment>>
section (public issue 45).
* Editorial fixes for <<commandbuffer-allocation,Command Buffer
Allocation>> section (public issues 54, 59).
* Clarify behavior of depth test in the <<fragops-depth,Depth
Test>> 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 <<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 <<fig-non-strict-lines,Non
strict lines>> diagram. Use more easily distinguished symbols in
tables in the <<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
<<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
|
|
|
|
following requirements define the _built-in interface block_. They must:
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
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
<<interfaces-iointerfaces-locations,Location Assignment>>
section (public issue 45).
* Editorial fixes for <<commandbuffer-allocation,Command Buffer
Allocation>> section (public issues 54, 59).
* Clarify behavior of depth test in the <<fragops-depth,Depth
Test>> 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 <<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 <<fig-non-strict-lines,Non
strict lines>> diagram. Use more easily distinguished symbols in
tables in the <<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
<<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
|
|
|
|
* be explicitly declared (there are no implicit built-ins),
|
|
|
|
|
* be identified with a code:BuiltIn decoration,
|
2016-02-16 09:53:44 +00:00
|
|
|
|
* form object types as described in the
|
|
|
|
|
<<interfaces-builtin-variables,Built-in Variables>> section, and
|
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
<<interfaces-iointerfaces-locations,Location Assignment>>
section (public issue 45).
* Editorial fixes for <<commandbuffer-allocation,Command Buffer
Allocation>> section (public issues 54, 59).
* Clarify behavior of depth test in the <<fragops-depth,Depth
Test>> 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 <<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 <<fig-non-strict-lines,Non
strict lines>> diagram. Use more easily distinguished symbols in
tables in the <<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
<<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
|
|
|
|
* be declared in a block whose top-level members are the built-ins.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
Built-ins only participate in interface matching if they are declared
|
|
|
|
|
in such a block. They mustnot: have any code:Location or code:Component
|
|
|
|
|
decorations.
|
|
|
|
|
|
|
|
|
|
There must: be no more than one built-in interface block per shader per
|
|
|
|
|
interface.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[interfaces-iointerfaces-user]]
|
|
|
|
|
=== User-defined Variable Interface
|
|
|
|
|
|
|
|
|
|
The remaining variables listed by code:OpEntryPoint with the code:Input or
|
|
|
|
|
code:Output storage class form the _user-defined variable interface_.
|
|
|
|
|
These variables must: be identified with a code:Location decoration and
|
|
|
|
|
can: also be identified with a code:Component decoration.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[interfaces-iointerfaces-matching]]
|
|
|
|
|
=== Interface Matching
|
|
|
|
|
|
|
|
|
|
A user-defined output variable is considered
|
|
|
|
|
to match an input variable in the subsequent stage if the two variables
|
|
|
|
|
are declared with the same code:Location and code:Component decoration
|
|
|
|
|
and match in type and decoration, except that
|
|
|
|
|
<<shaders-interpolation-decorations,interpolation decorations>> are not
|
|
|
|
|
required: to match. For the purposes of interface
|
|
|
|
|
matching, variables declared without a code:Component decoration are
|
|
|
|
|
considered to have a code:Component decoration of zero.
|
|
|
|
|
|
|
|
|
|
Variables or block members declared as structures are considered to match
|
|
|
|
|
in type if and only if the structure members match in type, decoration,
|
|
|
|
|
number, and declaration order. Variables or block members declared as arrays
|
|
|
|
|
are considered to match in type only if both declarations specify the
|
|
|
|
|
same element type and size.
|
|
|
|
|
|
|
|
|
|
Tessellation control shader per-vertex output variables and blocks, and
|
|
|
|
|
tessellation control, tessellation evaluation, and geometry shader
|
|
|
|
|
per-vertex input variables and blocks are required to be declared as
|
|
|
|
|
arrays, with each element representing input or output values for a
|
|
|
|
|
single vertex of a multi-vertex primitive. For the purposes of interface
|
|
|
|
|
matching, the outermost array dimension of such variables and blocks
|
|
|
|
|
is ignored.
|
|
|
|
|
|
|
|
|
|
At an interface between two non-fragment shader stages, the built-in
|
|
|
|
|
interface block must: match exactly, as described above. At an interface
|
|
|
|
|
involving the fragment shader inputs, the presence or absence of any
|
|
|
|
|
built-in output does not affect the interface matching.
|
|
|
|
|
|
2016-04-07 10:53:04 +00:00
|
|
|
|
At an interface between two shader stages, the user-defined variable
|
|
|
|
|
interface must: match exactly, as described above.
|
|
|
|
|
|
2016-02-21 20:12:54 +00:00
|
|
|
|
Any input value to a shader stage is well-defined as long as the preceding
|
2016-02-16 09:53:44 +00:00
|
|
|
|
stages writes to a matching output, as described above.
|
|
|
|
|
|
|
|
|
|
Additionally, scalar and vector inputs are well-defined if there
|
|
|
|
|
is a corresponding output satisfying all of the following conditions:
|
|
|
|
|
|
|
|
|
|
* the input and output match exactly in decoration,
|
|
|
|
|
* the output is a vector with the same basic type and has
|
|
|
|
|
at least as many components as the input, and
|
|
|
|
|
* the common component type of the input and output is
|
|
|
|
|
32-bit integer or floating-point (64-bit component types are excluded).
|
|
|
|
|
|
|
|
|
|
In this case, the components of the input will be taken from the first
|
|
|
|
|
components of the output, and any extra components of the output
|
|
|
|
|
will be ignored.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[interfaces-iointerfaces-locations]]
|
|
|
|
|
=== Location Assignment
|
|
|
|
|
|
|
|
|
|
This section describes how many locations are consumed by a given
|
|
|
|
|
type. As mentioned above, geometry shader inputs, tessellation control
|
|
|
|
|
shader inputs and outputs, and tessellation evaluation inputs all have
|
|
|
|
|
an additional level of arrayness relative to other shader inputs and
|
|
|
|
|
outputs. This outer array level is removed from the type before considering
|
|
|
|
|
how many locations the type consumes.
|
|
|
|
|
|
|
|
|
|
The code:Location value specifies an interface slot comprised of a
|
|
|
|
|
32-bit four-component vector conveyed between stages. The code:Component
|
|
|
|
|
specifies <<interfaces-iointerfaces-components,components>> within
|
|
|
|
|
these vector locations. Only types with widths of 32 or 64 are supported in
|
|
|
|
|
shader interfaces.
|
|
|
|
|
|
|
|
|
|
Inputs and outputs of the following types consume a single interface
|
|
|
|
|
location:
|
|
|
|
|
|
|
|
|
|
* 32-bit scalar and vector types, and
|
|
|
|
|
* 64-bit scalar and 2-component vector types.
|
|
|
|
|
|
|
|
|
|
64-bit three- and four-component vectors consume two consecutive locations.
|
|
|
|
|
|
|
|
|
|
If a declared input or output is an array of size _n_ and each element
|
|
|
|
|
takes _m_ locations, it will be assigned _m_ × _n_ consecutive locations
|
|
|
|
|
starting with the location specified.
|
|
|
|
|
|
|
|
|
|
If the declared input or output is an _n_ × _m_ 32- or 64-bit matrix,
|
|
|
|
|
it will be assigned multiple locations starting with the location specified.
|
|
|
|
|
The number of locations assigned for each matrix will be the same
|
|
|
|
|
as for an _n_-element array of _m_-component vectors.
|
|
|
|
|
|
|
|
|
|
The layout of a structure type used as an code:Input or code:Output depends
|
|
|
|
|
on whether it is also a code:Block (i.e. has a code:Block decoration).
|
|
|
|
|
|
|
|
|
|
If it is a not a code:Block, then the structure type must: have a
|
|
|
|
|
code:Location decoration. Its members are assigned consecutive locations
|
|
|
|
|
in their declaration order, with the first member assigned to the
|
|
|
|
|
location specified for the structure type. The members, and their nested
|
|
|
|
|
types, mustnot: themselves have code:Location decorations.
|
|
|
|
|
|
|
|
|
|
If the structure type is a code:Block but without a code:Location, then
|
|
|
|
|
each of its members must: have a code:Location decoration. If it is a
|
2016-04-07 10:53:04 +00:00
|
|
|
|
code:Block with a code:Location decoration, then its members are
|
|
|
|
|
assigned consecutive locations in declaration order, starting from the
|
|
|
|
|
first member which is initially assigned the location specified for the
|
|
|
|
|
code:Block. Any member with its own code:Location decoration is assigned
|
|
|
|
|
that location. Each remaining member is assigned the location after the
|
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
<<interfaces-iointerfaces-locations,Location Assignment>>
section (public issue 45).
* Editorial fixes for <<commandbuffer-allocation,Command Buffer
Allocation>> section (public issues 54, 59).
* Clarify behavior of depth test in the <<fragops-depth,Depth
Test>> 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 <<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 <<fig-non-strict-lines,Non
strict lines>> diagram. Use more easily distinguished symbols in
tables in the <<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
<<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
|
|
|
|
immediately preceding member in declaration order.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
The locations consumed by block and structure members are determined
|
|
|
|
|
by applying the rules above in a depth-first traversal of the instantiated
|
2016-02-21 20:12:54 +00:00
|
|
|
|
members as though the structure or block member were declared as an input or
|
2016-02-16 09:53:44 +00:00
|
|
|
|
output variable of the same type.
|
|
|
|
|
|
|
|
|
|
Any two inputs listed as operands on the same code:OpEntryPoint mustnot: be
|
|
|
|
|
assigned the same location, either explicitly or implicitly.
|
|
|
|
|
Any two outputs listed as operands on the same code:OpEntryPoint mustnot:
|
|
|
|
|
be assigned the same location, either explicitly or implicitly.
|
|
|
|
|
|
|
|
|
|
The number of input and output locations available for a shader input
|
|
|
|
|
or output interface are limited, and dependent on the shader stage
|
|
|
|
|
as described in <<interfaces-iointerfaces-limits>>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[interfaces-iointerfaces-limits]]
|
|
|
|
|
.Shader Input and Output Locations
|
|
|
|
|
[width="90%",cols="<6,<13",options="header"]
|
|
|
|
|
|=============================
|
|
|
|
|
| Shader Interface | Locations Available
|
|
|
|
|
| vertex input | pname:maxVertexInputAttributes
|
|
|
|
|
| vertex output | pname:maxVertexOutputComponents / 4
|
|
|
|
|
| tessellation control input | pname:maxTessellationControlPerVertexInputComponents / 4
|
|
|
|
|
| tessellation control output | pname:maxTessellationControlPerVertexOutputComponents / 4
|
|
|
|
|
| tessellation evaluation input | pname:maxTessellationEvaluationInputComponents / 4
|
|
|
|
|
| tessellation evaluation output| pname:maxTessellationEvaluationOutputComponents / 4
|
|
|
|
|
| geometry input | pname:maxGeometryInputComponents / 4
|
|
|
|
|
| geometry output | pname:maxGeometryOutputComponents / 4
|
|
|
|
|
| fragment input | pname:maxFragmentInputComponents / 4
|
|
|
|
|
| fragment output | pname:maxFragmentOutputAttachments
|
|
|
|
|
|=============================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[interfaces-iointerfaces-components]]
|
|
|
|
|
=== Component Assignment
|
|
|
|
|
|
|
|
|
|
The code:Component decoration allows the code:Location to be more
|
|
|
|
|
finely specified for scalars and vectors, down to the individual
|
|
|
|
|
components within a location that are consumed.
|
|
|
|
|
The components within a location are 0, 1, 2, and 3.
|
|
|
|
|
A variable or block member starting at component N
|
|
|
|
|
will consume components N, N+1, N+2, ... up through its size.
|
|
|
|
|
For single precision types, it is invalid if this sequence of
|
|
|
|
|
components gets larger than 3. A scalar 64-bit type will consume
|
|
|
|
|
two of these components in sequence, and a
|
|
|
|
|
two-component 64-bit vector type will consume all four components
|
|
|
|
|
available within a location. A three- or four-component 64-bit vector
|
|
|
|
|
type mustnot: specify a code:Component decoration. A three-component
|
|
|
|
|
64-bit vector type will consume all four components of the first location
|
|
|
|
|
and components 0 and 1 of the second location. This leaves components
|
|
|
|
|
2 and 3 available for other component-qualified declarations.
|
|
|
|
|
|
|
|
|
|
A scalar or two-component 64-bit data type mustnot: specify a
|
|
|
|
|
code:Component decoration of 1 or 3.
|
2016-02-21 20:12:54 +00:00
|
|
|
|
A code:Component decoration mustnot: be specified for any type that is
|
2016-02-16 09:53:44 +00:00
|
|
|
|
not a scalar or vector.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[interfaces-vertexinput]]
|
|
|
|
|
== Vertex Input Interface
|
|
|
|
|
|
|
|
|
|
When the vertex stage is present in a pipeline, the vertex shader input
|
|
|
|
|
variables form an interface with the vertex input attributes. The vertex
|
|
|
|
|
shader input variables are matched by the code:Location and
|
|
|
|
|
code:Component decorations to the vertex input attributes specified
|
|
|
|
|
in the pname:pVertexInputState member of the
|
|
|
|
|
slink:VkGraphicsPipelineCreateInfo structure.
|
|
|
|
|
|
|
|
|
|
The vertex shader input variables listed by code:OpEntryPoint with the
|
|
|
|
|
code:Input storage class form the _vertex input interface_. These variables
|
|
|
|
|
must: be identified with a code:Location decoration and can: also be
|
|
|
|
|
identified with a code:Component decoration.
|
|
|
|
|
|
|
|
|
|
For the purposes of interface
|
|
|
|
|
matching: variables declared without a code:Component decoration
|
|
|
|
|
are considered to have a code:Component decoration of zero.
|
|
|
|
|
The number of available vertex input locations is given by the
|
|
|
|
|
pname:maxVertexInputAttributes member of the sname:VkPhysicalDeviceLimits
|
|
|
|
|
structure.
|
|
|
|
|
|
|
|
|
|
See <<fxvertex-attrib-location>> for details.
|
|
|
|
|
|
|
|
|
|
All vertex shader inputs declared as above must: have a corresponding
|
|
|
|
|
attribute and binding in the pipeline.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[interfaces-fragmentoutput]]
|
|
|
|
|
== Fragment Output Interface
|
|
|
|
|
|
|
|
|
|
When the fragment stage is present in a pipeline, the fragment shader
|
|
|
|
|
outputs form an interface with the output attachments of the current
|
|
|
|
|
subpass. The fragment shader output variables are matched by the
|
|
|
|
|
code:Location and code:Component decorations to the color attachments
|
|
|
|
|
specified in the pname:pColorAttachments array of the
|
|
|
|
|
slink:VkSubpassDescription structure that describes the subpass that the
|
|
|
|
|
fragment shader is executed in.
|
|
|
|
|
|
|
|
|
|
The fragment shader output variables listed by code:OpEntryPoint with the
|
|
|
|
|
code:Output storage class form the _fragment output interface_.
|
|
|
|
|
These variables must: be identified with a code:Location decoration.
|
|
|
|
|
They can: also be identified with a code:Component decoration and/or
|
|
|
|
|
an code:Index decoration. For the
|
|
|
|
|
purposes of interface matching: variables declared without a code:Component
|
|
|
|
|
decoration are considered to have a code:Component decoration of zero,
|
|
|
|
|
and variables declared without an code:Index decoration are considered
|
|
|
|
|
to have an code:Index decoration of zero.
|
|
|
|
|
|
|
|
|
|
A fragment shader output variable identified with a code:Location decoration
|
|
|
|
|
of _i_ is directed to the color attachment indicated by
|
|
|
|
|
pname:pColorAttachments[_i_], after passing through the blending unit as
|
|
|
|
|
described in <<framebuffer-blending>>, if enabled. Locations are consumed as
|
|
|
|
|
described in <<interfaces-iointerfaces-locations,Location Assignment>>. The
|
|
|
|
|
number of available fragment output locations is given by the
|
|
|
|
|
pname:maxFragmentOutputAttachments member of the
|
|
|
|
|
sname:VkPhysicalDeviceLimits structure.
|
|
|
|
|
|
|
|
|
|
Components of the output variables are assigned as described in
|
|
|
|
|
<<interfaces-iointerfaces-components,Component Assignment>>.
|
|
|
|
|
Output components identified as 0, 1, 2, and 3 will be directed
|
|
|
|
|
to the R, G, B, and A inputs to the blending unit, respectively,
|
|
|
|
|
or to the output attachment if blending is disabled.
|
2016-04-21 08:08:38 +00:00
|
|
|
|
If two variables are placed within the same location, they must:
|
Change log for June 24, 2016 Vulkan 1.0.18 spec update:
* Bump API patch number and header version number to 18 for this
update.
Github Issues:
* Added "queue operation" terminology, and modified spec to actually
use this terminology (public issue 155). The act of submitting a
piece of work to a queue now generates "operations" for the queue to
execute, including operations to wait on/signal semaphores and
fences. Synchronization waits on these operations, making execution
dependency chains more obvious for semaphores and fences (though
additional work is still needed here). These changes include:
** Overview of "queue submission" commands in chapter
<<devsandqueues-submission>>.
** Updated descriptions for fence and semaphore waits and signals in
the synchronization chapter <<synchronization-semaphores-waiting>>,
<<synchronization-semaphores-signaling>> and
<<synchronization-fences-waiting>>.
** Clarifications to semaphore and fence operation within queue
submission functions.
** New glossary terms.
** Moved device idle and queue wait idle to synchronization chapter in
order to describe them in terms of other synchronization
primitives.
** Clarifications to semaphore and fence operation allowed removal of
the "implicit ordering guarantees" section, as this information is
now wholly covered where these primitives are described.
*** The "host writes" section of this is still there for now - in its
own section. This could probably be merged into other sections
later.
*** Modified fundamentals chapter on queue ordering to make sense in
context of the new changes, and avoid duplication.
<<fundamentals-queueoperation>>
* Added "aspect" and "component" definitions to the glossary, and made
sure these terms are referenced correctly (public issue 163).
* Update valid usage for ftext:vkGet*ProcAddr to only include
conditions that must be met to get a valid result. In particular,
it's okay to call flink:vkGetDeviceProcAddr with any string and will
get a code:NULL if that string is not a core Vulkan function or an
enabled extension function (addresses but does not fully close
public issue 214).
* Change the WSI extension dependencies to refer to version 1.0 of the
Vulkan API, instead of the pre-1.0-release internal revisions
numbers (public issue 238).
* Specified that <<interfaces-fragmentoutput,undeclared fragment
shader outputs>> result in undefined values input to the blending
unit or color attachment (public issue 240).
Internal Issues:
* Better documented that the registry XML "optional" tag for values
only applies when that value is the size of an array (internal issue
335).
* Add a stronger definition for the valid usages of
VkSpecializationMapEntry.size in the
<<pipelines-specialization-constants,Specialization Constants>>
section (internal issue 345).
* Change code:OpName to code:OpDecorate (along with appropriate
syntax) for vertex shader built-ins (internal issue 368).
* Add missing ref pages (those which are not currently stubs) to
apispec.txt for the single-page version of the ref pages (internal
issue 378).
Other Commits:
* Fix example in the <<descriptorsets,Descriptor Sets>> section to use
M, N, and I, describing set, binding, and index, consistently
throughout the example code.
2016-06-23 10:18:00 +00:00
|
|
|
|
have the same underlying type (floating-point or integer). The input to
|
|
|
|
|
blending or color attachment writes is undefined for components which do not
|
|
|
|
|
correspond to a fragment shader output.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
Fragment outputs identified with an code:Index of zero are directed
|
|
|
|
|
to the first input of the blending unit associated with the
|
|
|
|
|
corresponding code:Location. Outputs identified with an code:Index
|
|
|
|
|
of one are directed to the second input of the corresponding
|
|
|
|
|
blending unit.
|
|
|
|
|
|
|
|
|
|
No _component aliasing_ of output variables is allowed, that is
|
|
|
|
|
there mustnot: be two output variables which have the same location,
|
|
|
|
|
component, and index, either explicitly declared or implied.
|
|
|
|
|
|
|
|
|
|
Output values written by a fragment shader must: be declared with
|
|
|
|
|
either code:OpTypeFloat or code:OpTypeInt, and a Width of 32.
|
|
|
|
|
Composites of these types are also permitted. If the color attachment has a
|
|
|
|
|
signed or unsigned normalized fixed-point format, color values are assumed
|
|
|
|
|
to be floating-point and are converted to fixed-point as described in
|
|
|
|
|
<<fundamentals-fixedfpconv>>; otherwise no type conversion
|
|
|
|
|
is applied. If the type of the values written by the fragment shader do
|
|
|
|
|
not match the format of the corresponding color attachment, the result is
|
|
|
|
|
undefined for those components.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[interfaces-inputattachment]]
|
|
|
|
|
== Fragment Input Attachment Interface
|
|
|
|
|
|
|
|
|
|
When a fragment stage is present in a pipeline, the fragment shader
|
|
|
|
|
subpass inputs form an interface with the input attachments of the
|
|
|
|
|
current subpass. The fragment shader subpass input variables are
|
|
|
|
|
matched by code:InputAttachmentIndex decorations to the input
|
|
|
|
|
attachments specified in the pname:pInputAttachments array of the
|
|
|
|
|
slink:VkSubpassDescription structure that describes the subpass that
|
|
|
|
|
the fragment shader is executed in.
|
|
|
|
|
|
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
|
|
|
|
The fragment shader subpass input variables with the code:UniformConstant
|
|
|
|
|
storage class and a decoration of code:InputAttachmentIndex that are
|
|
|
|
|
statically used by code:OpEntryPoint form the _fragment input
|
|
|
|
|
attachment interface_. These variables must: be declared with a type
|
|
|
|
|
of code:OpTypeImage, a code:Dim operand of code:SubpassData, and a
|
|
|
|
|
code:Sampled operand of 2.
|
|
|
|
|
|
|
|
|
|
A subpass input variable identified with an code:InputAttachmentIndex
|
2016-02-16 09:53:44 +00:00
|
|
|
|
decoration of _i_ reads from the input attachment indicated by
|
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:pInputAttachments[_i_] member of sname:VkSubpassDescription.
|
|
|
|
|
If the subpass input variable is declared
|
|
|
|
|
as an array of size N, it consumes N consecutive input attachments,
|
|
|
|
|
starting with the index specified. There mustnot: be more than one input
|
|
|
|
|
variable with the same code:InputAttachmentIndex whether explicitly declared
|
|
|
|
|
or implied by an array declaration. The number of available input attachment
|
2016-02-16 09:53:44 +00:00
|
|
|
|
indices is given by the pname:maxPerStageDescriptorInputAttachments member
|
|
|
|
|
of the sname:VkPhysicalDeviceLimits structure.
|
|
|
|
|
|
|
|
|
|
Variables identified with the code:InputAttachmentIndex must: only be
|
|
|
|
|
used by a fragment stage. The basic data type (floating-point,
|
|
|
|
|
integer, unsigned integer) of the subpass input must: match the basic
|
|
|
|
|
format of the corresponding input attachment, or the values of subpass
|
|
|
|
|
loads from these variables are undefined.
|
|
|
|
|
|
|
|
|
|
See <<descriptorsets-inputattachment>> for more details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[interfaces-resources]]
|
|
|
|
|
== Shader Resource Interface
|
|
|
|
|
|
|
|
|
|
When a shader stage accesses buffer or image resources, as described
|
|
|
|
|
in the <<descriptorsets,Resource Descriptors>> section, the shader
|
2016-04-21 08:08:38 +00:00
|
|
|
|
resource variables must: be matched with the
|
2016-02-16 09:53:44 +00:00
|
|
|
|
<<descriptorsets-pipelinelayout,pipeline layout>> that is provided
|
|
|
|
|
at pipeline creation time.
|
|
|
|
|
|
|
|
|
|
The set of shader resources that form the _shader resource interface_
|
|
|
|
|
for a stage are the variables statically used by code:OpEntryPoint
|
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
|
|
|
|
with the storage class of code:Uniform, code:UniformConstant, or
|
|
|
|
|
code:PushConstant. For the fragment shader, this includes the
|
|
|
|
|
<<interfaces-inputattachment, fragment input attachment interface>>.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-04-21 08:08:38 +00:00
|
|
|
|
The shader resource interface consists of two sub-interfaces: the push
|
|
|
|
|
constant interface and the descriptor set interface.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[interfaces-resources-pushconst]]
|
|
|
|
|
=== Push Constant Interface
|
|
|
|
|
|
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
|
|
|
|
The shader variables defined with a storage class of code:PushConstant
|
2016-08-12 11:25:36 +00:00
|
|
|
|
that are statically used by the shader entry-points for the pipeline
|
2016-02-16 09:53:44 +00:00
|
|
|
|
define the _push constant interface_. They must: be:
|
|
|
|
|
|
|
|
|
|
* typed as code:OpTypeStruct,
|
|
|
|
|
* identified with a code:Block decoration, and
|
|
|
|
|
* laid out explicitly using the code:Offset, code:ArrayStride, and
|
|
|
|
|
code:MatrixStride decorations as specified in
|
|
|
|
|
<<interfaces-resources-layout,Offset and Stride Assignment>>.
|
|
|
|
|
|
|
|
|
|
There must: be no more than one push constant block statically used per
|
2016-08-12 11:25:36 +00:00
|
|
|
|
shader entry-point.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
Each variable in a push constant block must: be placed at an code:Offset
|
|
|
|
|
such that the entire constant value is entirely contained within the
|
|
|
|
|
slink:VkPushConstantRange for each code:OpEntryPoint that uses it, and the
|
|
|
|
|
pname:stageFlags for that range must: specify the appropriate
|
|
|
|
|
elink:VkShaderStageFlagBits for that stage. The code:Offset decoration for
|
|
|
|
|
any variable in a push constant block mustnot: cause the space required for
|
|
|
|
|
that variable to extend outside the range latexmath:[$[0,
|
|
|
|
|
\mathit{maxPushConstantsSize})$].
|
|
|
|
|
|
|
|
|
|
Any variable in a push constant block that is declared as an array must:
|
|
|
|
|
only be accessed with dynamically uniform indices.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[interfaces-resources-descset]]
|
|
|
|
|
=== Descriptor Set Interface
|
|
|
|
|
|
|
|
|
|
The _descriptor set interface_ is comprised of the shader variables with the
|
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
|
|
|
|
storage class of code:Uniform or code:UniformConstant (including the variables
|
|
|
|
|
in the <<interfaces-inputattachment,fragment input attachment interface>>)
|
2016-08-12 11:25:36 +00:00
|
|
|
|
that are statically used by the shader entry-points for the pipeline.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
These variables must: have code:DescriptorSet and code:Binding decorations
|
|
|
|
|
specified, which are assigned and matched with the
|
|
|
|
|
sname:VkDescriptorSetLayout objects in the pipeline layout as described in
|
|
|
|
|
<<interfaces-resources-setandbinding,DescriptorSet and Binding Assignment>>.
|
|
|
|
|
|
|
|
|
|
Variables identified with the code:UniformConstant storage class are used
|
|
|
|
|
only as handles to refer to opaque resources. Such variables must: be typed
|
|
|
|
|
as code:OpTypeImage, code:OpTypeSampler, code:OpTypeSampledImage, or arrays
|
|
|
|
|
of only these types. Variables of type code:OpTypeImage must: have a
|
|
|
|
|
code:Sampled operand of 1 (sampled image) or 2 (storage image).
|
|
|
|
|
|
|
|
|
|
Any array of these types must: only be indexed with constant integral
|
|
|
|
|
expressions, except under the following conditions:
|
|
|
|
|
|
|
|
|
|
* For arrays of code:OpTypeImage variables with code:Sampled operand of 2,
|
|
|
|
|
if the pname:shaderStorageImageArrayDynamicIndexing feature is enabled
|
|
|
|
|
and the shader module declares the code:StorageImageArrayDynamicIndexing
|
|
|
|
|
capability, the array must: only be indexed by dynamically uniform
|
|
|
|
|
expressions.
|
|
|
|
|
* For arrays of code:OpTypeSampler, code:OpTypeSampledImage variables, or
|
|
|
|
|
code:OpTypeImage variables with code:Sampled operand of 1,
|
|
|
|
|
if the pname:shaderSampledImageArrayDynamicIndexing feature is enabled
|
|
|
|
|
and the shader module declares the code:SampledImageArrayDynamicIndexing
|
|
|
|
|
capability, the array must: only be indexed by dynamically uniform
|
|
|
|
|
expressions.
|
|
|
|
|
|
|
|
|
|
The code:Sampled code:Type of an code:OpTypeImage declaration must: match
|
|
|
|
|
the same basic data type as the corresponding resource, or the values
|
|
|
|
|
obtained by reading or sampling from this image are undefined.
|
|
|
|
|
|
|
|
|
|
The code:Image code:Format of an code:OpTypeImage declaration mustnot: be
|
|
|
|
|
*Unknown*, for variables which are used for code:OpImageRead or
|
|
|
|
|
code:OpImageWrite operations, except under the following conditions:
|
|
|
|
|
|
|
|
|
|
* For code:OpImageWrite, if the pname:shaderStorageImageWriteWithoutFormat
|
|
|
|
|
feature is enabled and the shader module declares the
|
|
|
|
|
code:StorageImageWriteWithoutFormat capability.
|
|
|
|
|
* For code:OpImageRead, if the pname:shaderStorageImageReadWithoutFormat
|
|
|
|
|
feature is enabled and the shader module declares the
|
|
|
|
|
code:StorageImageReadWithoutFormat capability.
|
|
|
|
|
|
|
|
|
|
Variables identified with the code:Uniform storage class are used to access
|
|
|
|
|
transparent buffer backed resources. Such variables must: be:
|
|
|
|
|
|
|
|
|
|
* typed as code:OpTypeStruct, or arrays of only this type,
|
|
|
|
|
* identified with a code:Block or code:BufferBlock decoration, and
|
|
|
|
|
* laid out explicitly using the code:Offset, code:ArrayStride, and
|
|
|
|
|
code:MatrixStride decorations as specified in
|
|
|
|
|
<<interfaces-resources-layout,Offset and Stride Assignment>>.
|
|
|
|
|
|
|
|
|
|
Any array of these types must: only be indexed with constant integral
|
|
|
|
|
expressions, except under the following conditions.
|
|
|
|
|
|
|
|
|
|
* For arrays of code:Block variables, if the
|
|
|
|
|
pname:shaderUniformBufferArrayDynamicIndexing feature is enabled and
|
|
|
|
|
the shader module declares the code:UniformBufferArrayDynamicIndexing
|
|
|
|
|
capability, the array must: only be indexed by dynamically uniform
|
|
|
|
|
expressions.
|
|
|
|
|
* For arrays of code:BufferBlock variables, if the
|
|
|
|
|
pname:shaderStorageBufferArrayDynamicIndexing feature is enabled and
|
|
|
|
|
the shader module declares the code:StorageBufferArrayDynamicIndexing
|
|
|
|
|
capability, the array must: only be indexed by dynamically uniform
|
|
|
|
|
expressions.
|
|
|
|
|
|
|
|
|
|
The code:Offset decoration for any variable in a code:Block mustnot:
|
|
|
|
|
cause the space required for that variable to extend outside the
|
|
|
|
|
range latexmath:[$[0, \mathit{maxUniformBufferRange})$]. The code:Offset
|
|
|
|
|
decoration for any variable in a code:BufferBlock mustnot: cause the
|
|
|
|
|
space required for that variable to extend outside the range
|
|
|
|
|
latexmath:[$[0, \mathit{maxStorageBufferRange})$].
|
|
|
|
|
|
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
|
|
|
|
Variables identified with a storage class of code:UniformConstant and a
|
2016-04-21 08:08:38 +00:00
|
|
|
|
decoration of code:InputAttachmentIndex must: be declared as described in
|
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
|
|
|
|
<<interfaces-inputattachment,Fragment Input Attachment Interface>>.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
Each shader variable declaration must: refer to the same type of resource as
|
|
|
|
|
is indicated by the pname:descriptorType. See
|
|
|
|
|
<<interfaces-resources-correspondence,Shader Resource and Descriptor Type
|
|
|
|
|
Correspondence>> for the relationship between shader declarations and
|
|
|
|
|
descriptor types.
|
|
|
|
|
|
|
|
|
|
[[interfaces-resources-correspondence]]
|
|
|
|
|
.Shader Resource and Descriptor Type Correspondence
|
|
|
|
|
[width="90%",cols="<1,<2",options="header"]
|
|
|
|
|
|=============================
|
2016-08-28 10:47:19 +00:00
|
|
|
|
| Resource type | Descriptor Type
|
|
|
|
|
| sampler | ename:VK_DESCRIPTOR_TYPE_SAMPLER
|
|
|
|
|
| sampled image | ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
|
|
|
|
|
| storage image | ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE
|
|
|
|
|
| combined image sampler | ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
|
|
|
|
|
| uniform texel buffer | ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
|
|
|
|
|
| storage texel buffer | ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
|
|
|
|
|
| uniform buffer | ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER +
|
|
|
|
|
ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
|
|
|
|
|
| storage buffer | ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER +
|
|
|
|
|
ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
|
|
|
|
|
| input attachment | ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|=============================
|
|
|
|
|
|
|
|
|
|
.Shader Resource and Storage Class Correspondence
|
|
|
|
|
[width="100%",cols="<21%,<22%,<27%,<30%",options="header"]
|
|
|
|
|
|=============================
|
|
|
|
|
| Resource type | Storage Class | Type | Decoration(s)^1^
|
|
|
|
|
| sampler
|
|
|
|
|
| code:UniformConstant | code:OpTypeSampler |
|
|
|
|
|
| sampled image
|
|
|
|
|
| code:UniformConstant | code:OpTypeImage (code:Sampled=1)|
|
|
|
|
|
| storage image
|
|
|
|
|
| code:UniformConstant | code:OpTypeImage (code:Sampled=2) |
|
|
|
|
|
| combined image sampler
|
|
|
|
|
| code:UniformConstant | code:OpTypeSampledImage |
|
|
|
|
|
| uniform texel buffer
|
|
|
|
|
| code:UniformConstant | code:OpTypeImage (code:Dim=code:Buffer, code:Sampled=1) |
|
|
|
|
|
| storage texel buffer
|
|
|
|
|
| code:UniformConstant | code:OpTypeImage (code:Dim=code:Buffer, code:Sampled=2) |
|
|
|
|
|
| uniform buffer
|
|
|
|
|
| code:Uniform | code:OpTypeStruct
|
|
|
|
|
| code:Block, code:Offset, (code:ArrayStride), (code:MatrixStride)
|
|
|
|
|
| storage buffer
|
|
|
|
|
| code:Uniform | code:OpTypeStruct
|
|
|
|
|
| code:BufferBlock, code:Offset, (code:ArrayStride), (code:MatrixStride)
|
|
|
|
|
| input attachment
|
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
|
|
|
|
| code:UniformConstant | code:OpTypeImage (code:Dim=code:SubpassData, code:Sampled=2)
|
|
|
|
|
| code:InputAttachmentIndex
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|=============================
|
|
|
|
|
1:: in addition to code:DescriptorSet and code:Binding
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[interfaces-resources-setandbinding]]
|
|
|
|
|
=== DescriptorSet and Binding Assignment
|
|
|
|
|
|
|
|
|
|
A variable identified with a code:DescriptorSet decoration of
|
|
|
|
|
latexmath:[$s$] and a code:Binding decoration of latexmath:[$b$] indicates
|
|
|
|
|
that this variable is associated with the slink:VkDescriptorSetLayoutBinding
|
|
|
|
|
that has a pname:binding equal to latexmath:[$b$] in pname:pSetLayouts[_s_]
|
|
|
|
|
that was specified in slink:VkPipelineLayoutCreateInfo.
|
|
|
|
|
|
|
|
|
|
The range of descriptor sets is between zero and
|
2016-02-28 10:53:20 +00:00
|
|
|
|
pname:maxBoundDescriptorSets minus one. If a descriptor set value
|
2016-08-12 11:25:36 +00:00
|
|
|
|
is statically used by an entry-point there must: be an associated
|
2016-02-16 09:53:44 +00:00
|
|
|
|
pname:pSetLayout in the corresponding pipeline layout as described in
|
|
|
|
|
<<descriptorsets-pipelinelayout-consistency,Pipeline Layouts consistency>>.
|
|
|
|
|
|
|
|
|
|
If the code:Binding decoration is used with an array, the entire array is
|
|
|
|
|
identified with that binding value. The size of the array declaration must:
|
|
|
|
|
be no larger than the pname:descriptorCount of that
|
|
|
|
|
sname:VkDescriptorSetLayoutBinding. The index of each element of the array
|
|
|
|
|
is referred to as the _arrayElement_. For the purposes of interface matching
|
|
|
|
|
and descriptor set <<descriptorsets-updates,operations>>, if a resource
|
|
|
|
|
variable is not an array, it is treated as if it has an arrayElement of
|
|
|
|
|
zero.
|
|
|
|
|
|
2016-04-21 08:08:38 +00:00
|
|
|
|
The binding can: be any 32-bit unsigned integer value, as described in
|
2016-02-16 09:53:44 +00:00
|
|
|
|
<<descriptorsets-setlayout>>. Each descriptor set has its own binding
|
|
|
|
|
name space.
|
|
|
|
|
|
|
|
|
|
There is a limit on the number of resources of each type that can: be
|
|
|
|
|
accessed by a pipeline stage as shown in
|
|
|
|
|
<<interfaces-resources-limits,Shader Resource Limits>>.
|
|
|
|
|
The ``Resources Per Stage'' column gives the limit on the number each type
|
2016-08-12 11:25:36 +00:00
|
|
|
|
of resource that can: be statically used for an entry-point in any given
|
2016-02-16 09:53:44 +00:00
|
|
|
|
stage in a pipeline. The ``Resource Types'' column lists which resource
|
|
|
|
|
types are counted against the limit. Some resource types count against
|
|
|
|
|
multiple limits.
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
If multiple entry-points in the same pipeline refer to the same set and
|
2016-02-16 09:53:44 +00:00
|
|
|
|
binding, all variable definitions with that code:DescriptorSet and
|
2016-04-21 08:08:38 +00:00
|
|
|
|
code:Binding must: have the same basic type.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
Not all descriptor sets and bindings specified in a pipeline layout need to
|
|
|
|
|
be used in a particular shader stage or pipeline, but if a
|
|
|
|
|
code:DescriptorSet and code:Binding decoration is specified for a variable
|
|
|
|
|
that is statically used in that shader there must: be a pipeline layout
|
|
|
|
|
entry identified with that descriptor set and pname:binding and the
|
|
|
|
|
corresponding pname:stageFlags must: specify the appropriate
|
|
|
|
|
elink:VkShaderStageFlagBits for that stage.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[interfaces-resources-limits]]
|
|
|
|
|
.Shader Resource Limits
|
|
|
|
|
[width="80%",cols="<35,<23",options="header"]
|
|
|
|
|
|=============================
|
|
|
|
|
| Resources per Stage | Resource Types
|
|
|
|
|
.2+<.^| maxPerStageDescriptorSamplers
|
|
|
|
|
| sampler | combined image sampler
|
|
|
|
|
.3+<.^| maxPerStageDescriptorSampledImages
|
|
|
|
|
| sampled image | combined image sampler | uniform texel buffer
|
|
|
|
|
.2+<.^| maxPerStageDescriptorStorageImages
|
|
|
|
|
| storage image | storage texel buffer
|
|
|
|
|
.2+<.^| maxPerStageDescriptorUniformBuffers
|
|
|
|
|
| uniform buffer | uniform buffer dynamic
|
|
|
|
|
.2+<.^| maxPerStageDescriptorStorageBuffers
|
|
|
|
|
| storage buffer | storage buffer dynamic
|
|
|
|
|
| maxPerStageDescriptorInputAttachments
|
|
|
|
|
| input attachment^1^
|
|
|
|
|
|=============================
|
|
|
|
|
|
|
|
|
|
1::
|
|
|
|
|
Input attachments can: only be used in the fragment shader stage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[interfaces-resources-layout]]
|
|
|
|
|
=== Offset and Stride Assignment
|
|
|
|
|
|
2016-04-21 08:08:38 +00:00
|
|
|
|
All variables with a storage class of code:PushConstant or code:Uniform must:
|
2016-02-16 09:53:44 +00:00
|
|
|
|
be explicitly laid out using the code:Offset, code:ArrayStride, and
|
|
|
|
|
code:MatrixStride decorations. There are two different layouts requirements
|
|
|
|
|
depending on the specific resources.
|
|
|
|
|
|
|
|
|
|
[[interfaces-resources-layout-std140]]
|
|
|
|
|
*Standard Uniform Buffer Layout*
|
|
|
|
|
|
2016-02-21 23:03:51 +00:00
|
|
|
|
Member variables of an code:OpTypeStruct with storage class of
|
2016-02-16 09:53:44 +00:00
|
|
|
|
code:Uniform and a decoration of code:Block (uniform buffers) must: be laid
|
|
|
|
|
out according to the following rules.
|
|
|
|
|
|
2016-04-21 08:08:38 +00:00
|
|
|
|
* The code:Offset Decoration must: be a multiple of its base alignment,
|
2016-02-16 09:53:44 +00:00
|
|
|
|
computed recursively as follows:
|
2016-07-11 01:13:41 +00:00
|
|
|
|
** a scalar of size latexmath:[$N$] has a base alignment of
|
|
|
|
|
latexmath:[$N$]
|
|
|
|
|
** a two-component vector, with components of size latexmath:[$N$], has
|
|
|
|
|
a base alignment of latexmath:[$2N$]
|
|
|
|
|
** a three- or four-component vector, with components of size
|
|
|
|
|
latexmath:[$N$], has a base alignment of latexmath:[$4N$]
|
|
|
|
|
** an array has a base alignment equal to the base alignment of its
|
|
|
|
|
element type, rounded up to a multiple of latexmath:[$16$]
|
|
|
|
|
** a structure has a base alignment equal to the largest base alignment
|
|
|
|
|
of any of its members, rounded up to a multiple of latexmath:[$16$]
|
|
|
|
|
** a row-major matrix of latexmath:[$C$] columns has a base alignment
|
|
|
|
|
equal to the base alignment of vector of latexmath:[$C$] matrix
|
|
|
|
|
components
|
|
|
|
|
** a column-major matrix has a base alignment equal to the base
|
|
|
|
|
alignment of the matrix column type
|
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
<<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
<<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
<<interfaces-resources-layout,Offset and Stride Assignment>>
section (public issue 38).
* Correct parenthesis floor nesting error in equation for
<<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 <<interfaces-builtin-variables,Built-In Variables>>
section (public issue 47).
* Define the clamping of the
<<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
<<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
|
|
|
|
* Any code:ArrayStride or code:MatrixStride decoration must: be an integer
|
|
|
|
|
multiple of the base alignment of the array or matrix from above.
|
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
|
|
|
|
* The code:Offset Decoration of a member immediately following a structure or
|
|
|
|
|
an array must: be greater than or equal to the next multiple of the base
|
|
|
|
|
alignment of that structure or array.
|
|
|
|
|
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
[NOTE]
|
|
|
|
|
.Note
|
|
|
|
|
====
|
|
|
|
|
The *std140 layout* in GLSL satisfies these rules.
|
|
|
|
|
====
|
|
|
|
|
|
|
|
|
|
[[interfaces-resources-layout-std430]]
|
|
|
|
|
*Standard Storage Buffer Layout*
|
|
|
|
|
|
2016-02-21 23:03:51 +00:00
|
|
|
|
Member variables of an code:OpTypeStruct with a storage class of
|
2016-02-16 09:53:44 +00:00
|
|
|
|
code:PushConstant (push constants), or a storage class of code:Uniform
|
|
|
|
|
with a decoration of code:BufferBlock (storage buffers) must: be laid
|
|
|
|
|
out as <<interfaces-resources-layout-std140,above>>, except
|
|
|
|
|
for array and structure base alignment which do not need to be
|
|
|
|
|
rounded up to a multiple of latexmath:[$16$].
|
|
|
|
|
|
|
|
|
|
[NOTE]
|
|
|
|
|
.Note
|
|
|
|
|
====
|
|
|
|
|
The *std430 layout* in GLSL satisfies these rules.
|
|
|
|
|
====
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[interfaces-builtin-variables]]
|
|
|
|
|
== Built-In Variables
|
|
|
|
|
|
|
|
|
|
Built-in variables are accessed in shaders by declaring a variable decorated
|
2016-08-12 11:25:36 +00:00
|
|
|
|
with a code:BuiltIn decoration. The meaning of each code:BuiltIn decoration
|
2016-02-16 09:53:44 +00:00
|
|
|
|
is as follows. In the remainder of this section, the name of a built-in is
|
|
|
|
|
used interchangeably with a term equivalent to a variable decorated with
|
|
|
|
|
that particular built-in. Built-ins that represent integer values can: be
|
|
|
|
|
declared as either signed or unsigned 32-bit integers.
|
|
|
|
|
|
2016-08-28 10:47:19 +00:00
|
|
|
|
ifdef::VK_AMD_shader_explicit_vertex_parameter[]
|
|
|
|
|
code:BaryCoordNoPerspAMD::
|
|
|
|
|
|
|
|
|
|
The code:BaryCoordNoPerspAMD decoration can: be used to decorate a
|
|
|
|
|
fragment shader input variable. This variable will contain the (I,J) pair of
|
|
|
|
|
the barycentric coordinates corresponding to the fragment evaluated using
|
|
|
|
|
linear interpolation at the pixel's center. The K coordinate of the
|
|
|
|
|
barycentric coordinates can: be derived given the identity I + J + K = 1.0.
|
|
|
|
|
|
|
|
|
|
code:BaryCoordNoPerspCentroidAMD::
|
|
|
|
|
|
|
|
|
|
The code:BaryCoordNoPerspCentroidAMD decoration can: be used to decorate a
|
|
|
|
|
fragment shader input variable. This variable will contain the (I,J) pair of
|
|
|
|
|
the barycentric coordinates corresponding to the fragment evaluated using
|
|
|
|
|
linear interpolation at the centroid. The K coordinate of the
|
|
|
|
|
barycentric coordinates can: be derived given the identity I + J + K = 1.0.
|
|
|
|
|
|
|
|
|
|
code:BaryCoordNoPerspSampleAMD::
|
|
|
|
|
|
|
|
|
|
The code:BaryCoordNoPerspCentroidAMD decoration can: be used to decorate a
|
|
|
|
|
fragment shader input variable. This variable will contain the (I,J) pair of
|
|
|
|
|
the barycentric coordinates corresponding to the fragment evaluated using
|
|
|
|
|
linear interpolation at each covered sample. The K coordinate of the
|
|
|
|
|
barycentric coordinates can: be derived given the identity I + J + K = 1.0.
|
|
|
|
|
|
|
|
|
|
code:BaryCoordPullModelAMD::
|
|
|
|
|
|
|
|
|
|
The code:BaryCoordPullModelAMD decoration can: be used to decorate a fragment
|
|
|
|
|
shader input variable. This variable will contain (1/W, 1/I, 1/J) evaluated at
|
|
|
|
|
the pixel center and can: be used to calculate gradients and then interpolate
|
|
|
|
|
I, J, and W at any desired sample location.
|
|
|
|
|
|
|
|
|
|
code:BaryCoordSmoothAMD::
|
|
|
|
|
|
|
|
|
|
The code:BaryCoordSmoothAMD decoration can: be used to decorate a
|
|
|
|
|
fragment shader input variable. This variable will contain the (I,J) pair of
|
|
|
|
|
the barycentric coordinates corresponding to the fragment evaluated using
|
|
|
|
|
perspective interpolation at the pixel's center. The K coordinate of the
|
|
|
|
|
barycentric coordinates can: be derived given the identity I + J + K = 1.0.
|
|
|
|
|
|
|
|
|
|
code:BaryCoordSmoothCentroidAMD::
|
|
|
|
|
|
|
|
|
|
The code:BaryCoordSmoothCentroidAMD decoration can: be used to decorate a
|
|
|
|
|
fragment shader input variable. This variable will contain the (I,J) pair of
|
|
|
|
|
the barycentric coordinates corresponding to the fragment evaluated using
|
|
|
|
|
perspective interpolation at the centroid. The K coordinate of the
|
|
|
|
|
barycentric coordinates can: be derived given the identity I + J + K = 1.0.
|
|
|
|
|
|
|
|
|
|
code:BaryCoordSmoothSampleAMD::
|
|
|
|
|
|
|
|
|
|
The code:BaryCoordSmoothCentroidAMD decoration can: be used to decorate a
|
|
|
|
|
fragment shader input variable. This variable will contain the (I,J) pair of
|
|
|
|
|
the barycentric coordinates corresponding to the fragment evaluated using
|
|
|
|
|
perspective interpolation at each covered sample. The K coordinate of the
|
|
|
|
|
barycentric coordinates can: be derived given the identity I + J + K = 1.0.
|
|
|
|
|
|
|
|
|
|
endif::VK_AMD_shader_explicit_vertex_parameter[]
|
|
|
|
|
|
2016-02-16 09:53:44 +00:00
|
|
|
|
code:ClipDistance::
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:ClipDistance built-in decoration will make
|
|
|
|
|
that variable contain the mechanism for controlling user clipping.
|
|
|
|
|
code:ClipDistance is an array such that the i^th^ element of the array specifies
|
|
|
|
|
the clip distance for plane i. A clip distance of 0 means the vertex is on the
|
|
|
|
|
plane, a positive distance means the vertex is inside the clip half-space, and a
|
2016-02-16 09:53:44 +00:00
|
|
|
|
negative distance means the point is outside the clip half-space.
|
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
The code:ClipDistance decoration must: be used only within vertex, fragment,
|
|
|
|
|
tessellation control, tessellation evaluation, and geometry shaders.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
In vertex shaders, any variable decorated with code:ClipDistance must: be
|
|
|
|
|
declared using the output storage class.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
In fragment shaders, any variable decorated with code:ClipDistance must: be
|
|
|
|
|
declared using the input storage class.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
In tessellation control, tessellation evaluation, or geometry shaders, any
|
|
|
|
|
variable decorated with code:ClipDistance must: not be in a storage class other
|
|
|
|
|
than input or output.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Any variable decorated with code:ClipDistance must: be declared as an array of
|
|
|
|
|
32-bit floating-point values.
|
|
|
|
|
|
|
|
|
|
[NOTE]
|
|
|
|
|
.Note
|
|
|
|
|
====
|
|
|
|
|
The array variable decorated with code:ClipDistance is explicitly sized by the
|
|
|
|
|
shader.
|
|
|
|
|
====
|
|
|
|
|
|
|
|
|
|
[NOTE]
|
|
|
|
|
.Note
|
|
|
|
|
====
|
|
|
|
|
In the last vertex processing stage, these values will be linearly interpolated
|
|
|
|
|
across the primitive and the portion of the primitive with interpolated
|
|
|
|
|
distances less than 0 will be considered outside the clip volume. If
|
|
|
|
|
code:ClipDistance is then used by a fragment shader, code:ClipDistance contains
|
|
|
|
|
these linearly interpolated values.
|
|
|
|
|
====
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
code:CullDistance::
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:CullDistance built-in decoration will make
|
|
|
|
|
that variable contain the mechanism for controlling user culling. If any member
|
|
|
|
|
of this array is assigned a negative value for all vertices belonging to a
|
|
|
|
|
primitive, then the primitive is discarded before rasterization.
|
|
|
|
|
+
|
|
|
|
|
The code:CullDistance decoration must: be used only within vertex, fragment,
|
|
|
|
|
tessellation control, tessellation evaluation, and geometry shaders.
|
|
|
|
|
+
|
|
|
|
|
In vertex shaders, any variable decorated with code:CullDistance must: be
|
|
|
|
|
declared using the output storage class.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
In fragment shaders, any variable decorated with code:CullDistance must: be
|
|
|
|
|
declared using the input storage class.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
In tessellation control, tessellation evaluation, or geometry shaders, any
|
|
|
|
|
variable decorated with code:CullDistance must: not be declared in a storage
|
|
|
|
|
class other than input or output.
|
|
|
|
|
+
|
|
|
|
|
Any variable decorated with code:CullDistance must: be declared as an array of
|
|
|
|
|
32-bit floating-point values.
|
|
|
|
|
|
|
|
|
|
[NOTE]
|
|
|
|
|
.Note
|
|
|
|
|
====
|
2016-02-16 09:53:44 +00:00
|
|
|
|
In fragment shaders, the values of the code:CullDistance array are linearly
|
|
|
|
|
interpolated across each primitive.
|
2016-08-12 11:25:36 +00:00
|
|
|
|
====
|
|
|
|
|
|
|
|
|
|
[NOTE]
|
|
|
|
|
.Note
|
|
|
|
|
====
|
|
|
|
|
If code:CullDistance decorates an input variable, that variable will contain the
|
|
|
|
|
corresponding value from the code:CullDistance decorated output variable from
|
|
|
|
|
the previous shader stage.
|
|
|
|
|
====
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
code:FragCoord::
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:FragCoord built-in decoration will make that
|
|
|
|
|
variable contain the framebuffer coordinate latexmath:[$(x,y,z,\frac{1}{w})$] of
|
|
|
|
|
the fragment being processed. The latexmath:[$(x,y)$] coordinate
|
|
|
|
|
latexmath:[$(0,0)$] is the upper left corner of the upper left pixel in the
|
|
|
|
|
framebuffer.
|
|
|
|
|
+
|
|
|
|
|
When sample shading is enabled, the latexmath:[$x$] and latexmath:[$y$]
|
|
|
|
|
components of code:FragCoord reflect the location of the sample corresponding
|
|
|
|
|
to the shader invocation.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
When sample shading is not enabled, the x and y components of code:FragCoord
|
|
|
|
|
reflect the location of the center of the pixel, latexmath:[$(0.5,0.5)$].
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
The latexmath:[$z$] component of code:FragCoord is the interpolated depth value
|
|
|
|
|
of the primitive.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
The latexmath:[$w$] component is the interpolated latexmath:[$\frac{1}{w}$].
|
|
|
|
|
+
|
|
|
|
|
The code:FragCoord decoration must: be used only within fragment shaders.
|
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:FragCoord must: be declared using the input
|
|
|
|
|
storage class.
|
|
|
|
|
+
|
|
|
|
|
The code:Centroid interpolation decoration is ignored on code:FragCoord.
|
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:FragCoord must: be declared as a four-component
|
|
|
|
|
vector of 32-bit floating-point values.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
code:FragDepth::
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:FragDepth built-in decoration will make that
|
|
|
|
|
variable contain the new depth value for all samples covered by the fragment.
|
|
|
|
|
This value will be used for depth testing and, if the depth test passes, any
|
|
|
|
|
subsequent write to the depth/stencil attachment.
|
|
|
|
|
+
|
|
|
|
|
To write to code:FragDepth, a shader must: declare the code:DepthReplacing
|
|
|
|
|
execution mode. If a shader declares the code:DepthReplacing execution mode and
|
|
|
|
|
there is an execution path through the shader that does not set code:FragDepth,
|
|
|
|
|
then the fragment's depth value is undefined for executions of the shader that
|
|
|
|
|
take that path.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
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
|
|
|
|
The code:FragDepth decoration must: be used only within fragment shaders.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
The variable decorated with code:FragDepth must: be declared using the output
|
|
|
|
|
storage class.
|
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:FragDepth must: be declared as a scalar 32-bit
|
|
|
|
|
floating-point value.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
code:FrontFacing::
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:FrontFacing built-in decoration will make
|
|
|
|
|
that variable contain whether a primitive is front or back facing. This variable
|
|
|
|
|
is non-zero if the current fragment is considered to be part of a
|
|
|
|
|
<<primsrast-polygons-basic,front-facing>> primitive and is zero if the fragment
|
|
|
|
|
is considered to be part of a back-facing primitive.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
The code:FrontFacing decoration must: be used only within fragment shaders.
|
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:FrontFacing must: be declared using the
|
|
|
|
|
input storage class.
|
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:FrontFacing must: be declared as a boolean.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-05-19 03:07:40 +00:00
|
|
|
|
code:GlobalInvocationId::
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:GlobalInvocationId built-in decoration will
|
|
|
|
|
make that variable contain the location of the current invocation within the
|
|
|
|
|
global workgroup. Each component is equal to the index of the local workgroup
|
2016-07-01 02:34:54 +00:00
|
|
|
|
multiplied by the size of the local workgroup plus code:LocalInvocationId.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-05-19 03:07:40 +00:00
|
|
|
|
The code:GlobalInvocationId decoration must: be used only within compute
|
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
|
|
|
|
shaders.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-07-01 02:34:54 +00:00
|
|
|
|
The variable decorated with code:GlobalInvocationId must: be declared using the
|
|
|
|
|
input storage class.
|
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:GlobalInvocationId must: be declared as a
|
2016-08-12 11:25:36 +00:00
|
|
|
|
three-component vector of 32-bit integers.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
code:HelperInvocation::
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:HelperInvocation built-in decoration will
|
|
|
|
|
make that variable contain whether the current invocation is a helper
|
|
|
|
|
invocation. This variable is non-zero if the current fragment being shaded is a
|
|
|
|
|
helper invocation and zero otherwise. A helper invocation is an invocation of
|
2016-02-16 09:53:44 +00:00
|
|
|
|
the shader that is produced to satisfy internal requirements such as the
|
|
|
|
|
generation of derivatives.
|
|
|
|
|
+
|
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
|
|
|
|
The code:HelperInvocation decoration must: be used only within fragment
|
|
|
|
|
shaders.
|
2016-08-12 11:25:36 +00:00
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:HelperInvocation must: be declared using the
|
|
|
|
|
input storage class.
|
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:HelperInvocation must: be declared as a
|
|
|
|
|
boolean.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
[NOTE]
|
|
|
|
|
.Note
|
|
|
|
|
====
|
|
|
|
|
It is very likely that a helper invocation will have a value of
|
|
|
|
|
code:SampleMask fragment shader input value that is zero.
|
|
|
|
|
====
|
|
|
|
|
|
2016-05-19 03:07:40 +00:00
|
|
|
|
code:InvocationId::
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:InvocationId built-in decoration will make
|
|
|
|
|
that variable contain the index of the current shader invocation in a geometry
|
|
|
|
|
shader, or the index of the output patch vertex in a tessellation control
|
|
|
|
|
shader.
|
|
|
|
|
+
|
|
|
|
|
In a geometry shader, the index of the current shader invocation ranges
|
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
<<interfaces-iointerfaces-locations,Location Assignment>>
section (public issue 45).
* Editorial fixes for <<commandbuffer-allocation,Command Buffer
Allocation>> section (public issues 54, 59).
* Clarify behavior of depth test in the <<fragops-depth,Depth
Test>> 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 <<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 <<fig-non-strict-lines,Non
strict lines>> diagram. Use more easily distinguished symbols in
tables in the <<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
<<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
|
|
|
|
from zero to the number of <<geometry-invocations,instances>> declared in
|
|
|
|
|
the shader minus one. If the instance count of the geometry shader is one or
|
2016-05-19 03:07:40 +00:00
|
|
|
|
is not specified, then code:InvocationId will be zero.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
The code:InvocationId decoration must: be used only within tessellation control
|
|
|
|
|
and geometry shaders.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
The variable decorated with code:InvocationId must: be declared using the input
|
|
|
|
|
storage class.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
The variable decorated with code:InvocationId must: be declared as a scalar
|
|
|
|
|
32-bit integer.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
code:InstanceIndex::
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:InstanceIndex built-in decoration will make
|
|
|
|
|
that variable contain the index of the instance that is being processed by the
|
|
|
|
|
current vertex shader invocation. code:InstanceIndex begins at the
|
|
|
|
|
pname:firstInstance parameter to flink:vkCmdDraw or flink:vkCmdDrawIndexed or at
|
|
|
|
|
the pname:firstInstance member of a structure consumed by
|
|
|
|
|
flink:vkCmdDrawIndirect or flink:vkCmdDrawIndexedIndirect.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
The code:InstanceIndex decoration must: be used only within vertex shaders.
|
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:InstanceIndex must: be declared using the
|
|
|
|
|
input storage class.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
The variable decorated with code:InstanceIndex must: be declared as a
|
|
|
|
|
scalar 32-bit integer.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
code:Layer::
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:Layer built-in decoration will make that
|
|
|
|
|
variable contain the select layer of a multi-layer framebuffer attachment.
|
|
|
|
|
+
|
|
|
|
|
In a geometry shader, any variable decorated with code:Layer can be written with
|
|
|
|
|
the framebuffer layer index to which the primitive produced by the geometry
|
|
|
|
|
shader will be directed. If a geometry shader entry-point's interface does not
|
|
|
|
|
include a variable decorated with code:Layer, then the first layer is used. If
|
|
|
|
|
a geometry shader entry-point's interface includes a variable decorated with
|
2016-02-16 09:53:44 +00:00
|
|
|
|
code:Layer, it must: write the same value to code:Layer for all output
|
2016-08-12 11:25:36 +00:00
|
|
|
|
vertices of a given primitive.
|
|
|
|
|
+
|
|
|
|
|
In a fragment shader, a variable decorated with code:Layer contains the layer
|
|
|
|
|
index of the primitive that the fragment invocation belongs to.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
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
|
|
|
|
The code:Layer decoration must: be used only within geometry and fragment
|
2016-02-16 09:53:44 +00:00
|
|
|
|
shaders.
|
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
In a geometry shader, any variable decorated with code:Layer must: be declared
|
|
|
|
|
using the output storage class.
|
|
|
|
|
+
|
|
|
|
|
In a fragment shader, any variable decorated with code:Layer must: be declared
|
|
|
|
|
using the input storage class.
|
|
|
|
|
+
|
|
|
|
|
Any variable decorated with code:Layer must: be declared as a scalar 32-bit
|
|
|
|
|
integer.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-05-19 03:07:40 +00:00
|
|
|
|
code:LocalInvocationId::
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:LocalInvocationId built-in decoration will
|
|
|
|
|
make that variable contain the location of the current compute shader invocation
|
|
|
|
|
within the local workgroup. Each component ranges from zero through to the size
|
|
|
|
|
of the workgroup in that dimension minus one.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-05-19 03:07:40 +00:00
|
|
|
|
The code:LocalInvocationId decoration must: be used only within compute
|
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
|
|
|
|
shaders.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-07-01 02:34:54 +00:00
|
|
|
|
The variable decorated with code:LocalInvocationId must: be declared using the
|
|
|
|
|
input storage class.
|
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:LocalInvocationId must: be declared as a
|
2016-08-12 11:25:36 +00:00
|
|
|
|
three-component vector of 32-bit integers.
|
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
|
|
|
|
|
====
|
|
|
|
|
If the size of the workgroup in a particular dimension is one, then the
|
2016-05-19 03:07:40 +00:00
|
|
|
|
code:LocalInvocationId in that dimension will be zero. If the workgroup is
|
|
|
|
|
effectively two-dimensional, then code:LocalInvocationId.z will be zero.
|
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
|
|
|
|
If the workgroup is effectively one-dimensional, then both
|
2016-05-19 03:07:40 +00:00
|
|
|
|
code:LocalInvocationId.y and code:LocalInvocationId.z will be zero.
|
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
|
|
|
|
====
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-05-19 03:07:40 +00:00
|
|
|
|
code:NumWorkgroups::
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:NumWorkgroups built-in decoration will make
|
|
|
|
|
that variable contain the number of local workgroups that are part of the
|
|
|
|
|
dispatch that the invocation belongs to. Each component is equal to the values
|
|
|
|
|
of the parameters passed into flink:vkCmdDispatch or read from the
|
|
|
|
|
sname:VkDispatchIndirectCommand structure read through a call to
|
|
|
|
|
flink:vkCmdDispatchIndirect.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-05-19 03:07:40 +00:00
|
|
|
|
The code:NumWorkgroups decoration must: be used only within compute shaders.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-07-01 02:34:54 +00:00
|
|
|
|
The variable decorated with code:NumWorkgroups must: be declared using the input
|
|
|
|
|
storage class.
|
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:NumWorkgroups must: be declared as a
|
|
|
|
|
three-component vector of 32-bit integers.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
code:PatchVertices::
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:PatchVertices built-in decoration will make
|
|
|
|
|
that variable contain the number of vertices in the input patch being processed
|
|
|
|
|
by the shader. A single tessellation control or tessellation evaluation shader
|
|
|
|
|
can: read patches of differing sizes, so the value of the code:PatchVertices
|
|
|
|
|
variable may: differ between patches.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
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
|
|
|
|
The code:PatchVertices decoration must: be used only within tessellation
|
2016-08-12 11:25:36 +00:00
|
|
|
|
control and tessellation evaluation shaders.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
The variable decorated with code:PatchVertices must: be declared using the input
|
|
|
|
|
storage class.
|
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:PatchVertices must: be declared as scalar
|
|
|
|
|
32-bit integer.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
code:PointCoord::
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:PointCoord built-in decoration will make
|
|
|
|
|
that variable contain the coordinate of the current fragment within the point
|
|
|
|
|
being rasterized, normalized to the size of the point with origin in the upper
|
2016-02-16 09:53:44 +00:00
|
|
|
|
left corner of the point, as described in <<primsrast-points-basic,Basic
|
|
|
|
|
Point Rasterization>>. If the primitive the fragment shader invocation
|
2016-08-12 11:25:36 +00:00
|
|
|
|
belongs to is not a point, then the variable decorated with code:PointCoord
|
|
|
|
|
contains an undefined value.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
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
|
|
|
|
The code:PointCoord decoration must: be used only within fragment shaders.
|
2016-08-12 11:25:36 +00:00
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:PointCoord must: be declared using the
|
|
|
|
|
input storage class.
|
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:PointCoord must: be declared as two-component
|
|
|
|
|
vector of 32-bit floating-point values.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
[NOTE]
|
|
|
|
|
.Note
|
|
|
|
|
====
|
|
|
|
|
Depending on how the point is rasterized, code:PointCoord may: never
|
2016-08-12 11:25:36 +00:00
|
|
|
|
reach latexmath:[$(0,0)$] or latexmath:[$(1,1)$].
|
2016-02-16 09:53:44 +00:00
|
|
|
|
====
|
|
|
|
|
|
|
|
|
|
code:PointSize::
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:PointSize built-in decoration will make that
|
|
|
|
|
variable contain the size of point primitives. The value written to the variable
|
|
|
|
|
decorated with code:PointSize by the last vertex processing stage in the
|
|
|
|
|
pipeline is used as the framebuffer-space size of points produced by
|
|
|
|
|
rasterization.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
The code:PointSize decoration must: be used only within vertex, tessellation
|
|
|
|
|
control, tessellation evaluation, and geometry shaders.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
In a vertex shader, any variable decorated with code:PointSize must: be
|
|
|
|
|
declared using the output storage class.
|
|
|
|
|
+
|
2016-08-28 10:47:19 +00:00
|
|
|
|
In a tessellation control, tessellation evaluation, or geometry shader, any
|
2016-08-12 11:25:36 +00:00
|
|
|
|
variable decorated with code:PointSize must: be declared using either the
|
|
|
|
|
input or output storage class.
|
|
|
|
|
+
|
|
|
|
|
Any variable decorated with code:PointSize must: be declared as a scalar 32-bit
|
|
|
|
|
floating-point value.
|
|
|
|
|
|
|
|
|
|
[NOTE]
|
|
|
|
|
.Note
|
|
|
|
|
====
|
|
|
|
|
When code:PointSize decorates a variable in the input storage class, it contains
|
|
|
|
|
the data written to the output variable decorated with code:PointSize from the
|
|
|
|
|
previous shader stage.
|
|
|
|
|
====
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
code:Position::
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:Position built-in decoration will make that
|
|
|
|
|
variable contain the position of the current vertex. In the last vertex
|
|
|
|
|
processing stage, the value of the variable decorated with code:Position is used
|
|
|
|
|
in subsequent primitive assembly, clipping, and rasterization operations.
|
|
|
|
|
+
|
|
|
|
|
The code:Position decoration must: be used only within vertex, tessellation
|
|
|
|
|
control, tessellation evaluation, and geometry shaders.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
In a vertex shader, any variable decorated with code:Position must: be declared
|
|
|
|
|
using the output storage class.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-28 10:47:19 +00:00
|
|
|
|
In a tessellation control, tessellation evaluation, or geometry shader, any
|
2016-08-12 11:25:36 +00:00
|
|
|
|
variable decorated with code:Position must: not be declared in a storage class
|
|
|
|
|
other than input or output.
|
|
|
|
|
+
|
|
|
|
|
Any variable decorated with code:Position must: be declared as a four-component
|
|
|
|
|
vector of 32-bit floating-point values.
|
|
|
|
|
|
|
|
|
|
[NOTE]
|
|
|
|
|
.Note
|
|
|
|
|
====
|
|
|
|
|
When code:Position decorates a variable in the input storage class, it contains
|
|
|
|
|
the data written to the output variable decorated with code:Position from the
|
|
|
|
|
previous shader stage.
|
|
|
|
|
====
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-05-19 03:07:40 +00:00
|
|
|
|
code:PrimitiveId::
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:PrimitiveId built-in decoration will make
|
|
|
|
|
that variable contain the index of the current primitive.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
In tessellation control and tessellation evaluation shaders, it will contain
|
|
|
|
|
the index of the patch within the current set of rendering primitives that
|
|
|
|
|
correspond to the shader invocation.
|
|
|
|
|
+
|
|
|
|
|
In a geometry shader, it will contain the number of primitives presented as
|
|
|
|
|
input to the shader since the current set of rendering primitives was started.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
In a fragment shader, it will contain the primitive index written by the
|
|
|
|
|
geometry shader if a geometry shader is present, or with the value that would
|
|
|
|
|
have been presented as input to the geometry shader had it been present.
|
|
|
|
|
+
|
|
|
|
|
If a geometry shader is present and the fragment shader reads from an input
|
|
|
|
|
variable decorated with code:PrimitiveId, then the geometry shader must: write
|
|
|
|
|
to an output variable decorated with code:PrimitiveId in all execution paths.
|
|
|
|
|
+
|
|
|
|
|
The code:PrimitiveId decoration must: be used only within fragment, tessellation
|
|
|
|
|
control, tessellation evaluation, and geometry shaders.
|
|
|
|
|
+
|
2016-08-28 10:47:19 +00:00
|
|
|
|
In a fragment, tessellation control or tessellation evaluation shader, any
|
2016-08-12 11:25:36 +00:00
|
|
|
|
variable decorated with code:PrimitiveId must: be declared using the output
|
|
|
|
|
storage class.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
In a geometry shader, any variable decorated with code:PrimitiveId must: be
|
|
|
|
|
declared using either the input or output storage class.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Any variable decorated with code:PrimitiveId must: be declared as scalar 32-bit
|
|
|
|
|
integer.
|
|
|
|
|
|
|
|
|
|
[NOTE]
|
|
|
|
|
.Note
|
|
|
|
|
====
|
|
|
|
|
When the code:PrimitiveId decoration is applied to an output variable in the
|
|
|
|
|
geometry shader, the resulting value is seen through the code:PrimitiveId
|
|
|
|
|
decorated input variable in the fragment shader.
|
|
|
|
|
====
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-05-19 03:07:40 +00:00
|
|
|
|
code:SampleId::
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:SampleId built-in decoration will make that
|
|
|
|
|
variable contain the zero-based index of the sample the invocation corresponds to.
|
|
|
|
|
code:SampleId ranges from zero to the number of samples in the framebuffer
|
|
|
|
|
minus one. If a fragment shader entry-point's interface includes an input
|
|
|
|
|
variable decorated with code:SampleId, per-sample shading is enabled for draws
|
|
|
|
|
that use that fragment shader.
|
|
|
|
|
+
|
|
|
|
|
The code:SampleId decoration must: be used only within fragment shaders.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
The variable decorated with code:SampleId must: be declared using the input
|
|
|
|
|
storage class.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
The variable decorated with code:SampleId must: be declared as a scalar 32-bit
|
|
|
|
|
integer.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
code:SampleMask::
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:SampleMask built-in decoration will make
|
|
|
|
|
any variable contain the sample coverage mask for the current fragment shader
|
|
|
|
|
invocation.
|
|
|
|
|
+
|
|
|
|
|
A variable in the input storage class decorated with code:SampleMask will
|
|
|
|
|
contain a bitmask of the set of samples covered by the primitive generating the
|
2016-02-16 09:53:44 +00:00
|
|
|
|
fragment during rasterization. It has a sample bit set if and only if the
|
|
|
|
|
sample is considered covered for this fragment shader invocation.
|
|
|
|
|
code:SampleMask[] is an array of integers. Bits are mapped to samples in a
|
|
|
|
|
manner where bit B of mask M (`SampleMask[M]`) corresponds to sample
|
|
|
|
|
latexmath:[$32 \times M + B$].
|
|
|
|
|
+
|
|
|
|
|
When state specifies multiple fragment shader invocations for a given
|
|
|
|
|
fragment, the sample mask for any single fragment shader invocation
|
|
|
|
|
specifies the subset of the covered samples for the fragment that correspond
|
|
|
|
|
to the invocation. In this case, the bit corresponding to each covered
|
|
|
|
|
sample will be set in exactly one fragment shader invocation.
|
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
A variable in the output storage class decorated with code:SampleMask is an
|
|
|
|
|
array of integers forming a bit array in a manner similar an input variable
|
|
|
|
|
decorated with code:SampleMask, but where each bit represents coverage as
|
|
|
|
|
computed by the shader. Modifying the sample mask by writing zero to a bit of
|
2016-02-16 09:53:44 +00:00
|
|
|
|
code:SampleMask causes the sample to be considered uncovered. However,
|
|
|
|
|
setting sample mask bits to one will never enable samples not covered by the
|
|
|
|
|
original primitive. If the fragment shader is being evaluated at any
|
|
|
|
|
frequency other than per-fragment, bits of the sample mask not corresponding
|
|
|
|
|
to the current fragment shader invocation are ignored. This array must: be
|
|
|
|
|
sized in the fragment shader either implicitly or explicitly, to be no
|
|
|
|
|
larger than the implementation-dependent maximum sample-mask (as an array of
|
|
|
|
|
32-bit elements), determined by the maximum number of samples. If a fragment
|
2016-08-12 11:25:36 +00:00
|
|
|
|
shader entry-point's interface includes an output variable decorated with
|
2016-02-16 09:53:44 +00:00
|
|
|
|
code:SampleMask, the sample mask will be undefined for any array elements of
|
|
|
|
|
any fragment shader invocations that fail to assign a value. If a fragment
|
2016-08-12 11:25:36 +00:00
|
|
|
|
shader entry-point's interface does not include an output variable decorated
|
2016-02-16 09:53:44 +00:00
|
|
|
|
with code:SampleMask, the sample mask has no effect on the processing of a
|
|
|
|
|
fragment.
|
|
|
|
|
+
|
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
|
|
|
|
The code:SampleMask decoration must: be used only within fragment shaders.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Any variable decorated with code:SampleMask must: be declared using either the
|
|
|
|
|
input or output storage class.
|
|
|
|
|
+
|
|
|
|
|
Any variable decorated with code:SampleMask must: be declared as an array of
|
|
|
|
|
32-bit integers.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
code:SamplePosition::
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:SamplePosition built-in decoration will make
|
|
|
|
|
that variable contain the sub-pixel position of the sample being shaded.
|
|
|
|
|
The top left of the pixel is considered to be at coordinate latexmath:[$(0,0)$]
|
|
|
|
|
and the bottom right of the pixel is considered to be at coordinate
|
|
|
|
|
latexmath:[$(1,1)$]. If a fragment shader entry-point's interface includes an
|
|
|
|
|
input variable decorated with code:SamplePosition, per-sample shading is enabled
|
|
|
|
|
for draws that use that fragment shader.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
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
|
|
|
|
The code:SamplePosition decoration must: be used only within fragment shaders.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
The variable decorated with code:SamplePosition must: be declared using the
|
|
|
|
|
input storage class.
|
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:SamplePosition must: be declared as a
|
|
|
|
|
two-component vector of 32-bit floating-point values.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-05-19 03:07:40 +00:00
|
|
|
|
code:TessCoord::
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:TessCoord built-in decoration will make that
|
|
|
|
|
variable contain the three-dimensional latexmath:[$(u,v,w)$] barycentric
|
|
|
|
|
coordinate of the tessellated vertex within the patch. latexmath:[$u$],
|
|
|
|
|
latexmath:[$v$], and latexmath:[$w$] are in the range latexmath:[$[0,1\]$] and
|
|
|
|
|
vary linearly across the primitive being subdivided. For the tessellation modes
|
|
|
|
|
of code:Quads or code:IsoLines, the third component is always zero.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-05-19 03:07:40 +00:00
|
|
|
|
The code:TessCoord decoration must: be used only within tessellation
|
2016-02-16 09:53:44 +00:00
|
|
|
|
evaluation shaders.
|
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
The variable decorated with code:TessCoord must: be declared using the
|
|
|
|
|
input storage class.
|
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:TessCoord must: be declared as three-component
|
|
|
|
|
vector of 32-bit floating-point values.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-05-19 03:07:40 +00:00
|
|
|
|
code:TessLevelOuter::
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:TessLevelOuter built-in decoration will make
|
|
|
|
|
that variable contain the outer tessellation levels for the current patch.
|
|
|
|
|
+
|
|
|
|
|
In tessellation control shaders, the variable decorated with code:TessLevelOuter
|
|
|
|
|
can: be written to which controls the tessellation factors for the resulting
|
|
|
|
|
patch. These values are used by the tessellator to control primitive
|
|
|
|
|
tessellation and can: be read by tessellation evaluation shaders.
|
|
|
|
|
+
|
|
|
|
|
In tessellation evaluation shaders, the variable decorated with
|
|
|
|
|
code:TessLevelOuter can: read the values written by the tessellation control
|
|
|
|
|
shader.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-05-19 03:07:40 +00:00
|
|
|
|
The code:TessLevelOuter decoration must: be used only within
|
2016-08-12 11:25:36 +00:00
|
|
|
|
tessellation control and tessellation evaluation shaders.
|
|
|
|
|
+
|
|
|
|
|
In a tessellation control shader, any variable decorated with
|
|
|
|
|
code:TessLevelOuter must: be declared using the output storage class.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
In a tessellation evaluation shader, any variable decorated with
|
|
|
|
|
code:TessLevelOuter must: be declared using the input storage class.
|
|
|
|
|
+
|
|
|
|
|
Any variable decorated with code:TessLevelOuter must: be declared as an array
|
|
|
|
|
of size four, containing 32-bit floating-point values.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-05-19 03:07:40 +00:00
|
|
|
|
code:TessLevelInner::
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:TessLevelInner built-in decoration will make
|
|
|
|
|
that variable contain the inner tessellation levels for the current patch.
|
|
|
|
|
+
|
|
|
|
|
In tessellation control shaders, the variable decorated with code:TessLevelInner
|
|
|
|
|
can: be written to, which controls the tessellation factors for the resulting
|
|
|
|
|
patch. These values are used by the tessellator to control primitive
|
|
|
|
|
tessellation and can: be read by tessellation evaluation shaders.
|
|
|
|
|
+
|
|
|
|
|
In tessellation evaluation shaders, the variable decorated with
|
|
|
|
|
code:TessLevelInner can: read the values written by the tessellation control
|
|
|
|
|
shader.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-05-19 03:07:40 +00:00
|
|
|
|
The code:TessLevelInner decoration must: be used only within
|
2016-08-12 11:25:36 +00:00
|
|
|
|
tessellation control and tessellation evaluation shaders.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
In a tessellation control shader, any variable decorated with
|
|
|
|
|
code:TessLevelInner must: be declared using the output storage class.
|
|
|
|
|
+
|
|
|
|
|
In a tessellation evaluation shader, any variable decorated with
|
|
|
|
|
code:TessLevelInner must: be declared using the input storage class.
|
|
|
|
|
+
|
|
|
|
|
Any variable decorated with code:TessLevelInner must: be declared as an array
|
|
|
|
|
of size two, containing 32-bit floating-point values.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
code:VertexIndex::
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:VertexIndex built-in decoration will make
|
|
|
|
|
that variable contain the index of the vertex that is being processed by
|
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
<<interfaces-iointerfaces-locations,Location Assignment>>
section (public issue 45).
* Editorial fixes for <<commandbuffer-allocation,Command Buffer
Allocation>> section (public issues 54, 59).
* Clarify behavior of depth test in the <<fragops-depth,Depth
Test>> 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 <<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 <<fig-non-strict-lines,Non
strict lines>> diagram. Use more easily distinguished symbols in
tables in the <<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
<<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
|
|
|
|
the current vertex shader invocation. For non-indexed draws,
|
|
|
|
|
this variable begins at the pname:firstVertex parameter to
|
2016-02-16 09:53:44 +00:00
|
|
|
|
flink:vkCmdDraw or the pname:firstVertex member of a structure consumed by
|
|
|
|
|
flink:vkCmdDrawIndirect and increments by one for each vertex in the draw.
|
|
|
|
|
For indexed draws, its value is the content of the index buffer for the
|
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
<<interfaces-iointerfaces-locations,Location Assignment>>
section (public issue 45).
* Editorial fixes for <<commandbuffer-allocation,Command Buffer
Allocation>> section (public issues 54, 59).
* Clarify behavior of depth test in the <<fragops-depth,Depth
Test>> 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 <<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 <<fig-non-strict-lines,Non
strict lines>> diagram. Use more easily distinguished symbols in
tables in the <<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
<<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
|
|
|
|
vertex plus the pname:vertexOffset parameter to
|
2016-02-16 09:53:44 +00:00
|
|
|
|
flink:vkCmdDrawIndexed or the pname:vertexOffset member of the structure
|
|
|
|
|
consumed by flink:vkCmdDrawIndexedIndirect.
|
|
|
|
|
+
|
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
|
|
|
|
The code:VertexIndex decoration must: be used only within vertex shaders.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
The variable decorated with code:VertexIndex must: be declared using the
|
|
|
|
|
input storage class.
|
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:VertexIndex must: be declared as a scalar
|
|
|
|
|
32-bit integer.
|
|
|
|
|
|
|
|
|
|
[NOTE]
|
|
|
|
|
.Note
|
|
|
|
|
====
|
|
|
|
|
code:VertexIndex starts at the same starting value for each instance.
|
|
|
|
|
====
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
|
|
|
|
code:ViewportIndex::
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:ViewportIndex built-in decoration will make
|
|
|
|
|
that variable contain the index of the viewport.
|
|
|
|
|
+
|
|
|
|
|
In a geometry shader, the variable decorated with code:ViewportIndex can be
|
|
|
|
|
written to with the viewport index to which the primitive produced by the
|
|
|
|
|
geometry shader will be directed. The selected
|
2016-02-16 09:53:44 +00:00
|
|
|
|
viewport index is used to select the viewport transform and scissor
|
2016-08-12 11:25:36 +00:00
|
|
|
|
rectangle. If a geometry shader entry-point's interface does not include a
|
|
|
|
|
variable decorated with code:ViewportIndex, then the first viewport
|
|
|
|
|
is used. If a geometry shader entry-point's interface includes a variable
|
|
|
|
|
decorated with code:ViewportIndex, it must: write the same value to
|
|
|
|
|
code:ViewportIndex for all output vertices of a given primitive.
|
|
|
|
|
+
|
|
|
|
|
In a fragment shader, the variable decorated with code:ViewportIndex
|
2016-02-16 09:53:44 +00:00
|
|
|
|
contains the viewport index of the primitive that the fragment invocation
|
|
|
|
|
belongs to.
|
|
|
|
|
+
|
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
|
|
|
|
The code:ViewportIndex decoration must: be used only within geometry and
|
|
|
|
|
fragment shaders.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-08-12 11:25:36 +00:00
|
|
|
|
In a geometry shader, any variable decorated with code:ViewportIndex must: be
|
|
|
|
|
declared using the output storage class.
|
|
|
|
|
+
|
|
|
|
|
In a fragment shader, any variable decorated with code:ViewportIndex must: be
|
|
|
|
|
declared using the input storage class.
|
|
|
|
|
+
|
|
|
|
|
Any variable decorated with code:ViewportIndex must: be declared as a scalar
|
|
|
|
|
32-bit integer.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-05-19 03:07:40 +00:00
|
|
|
|
code:WorkgroupId::
|
2016-02-16 09:53:44 +00:00
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:WorkgroupId built-in decoration will make
|
|
|
|
|
that variable contain theglobal workgroup that the current invocation is a
|
|
|
|
|
member of. Each component ranges from zero to the values of the parameters
|
|
|
|
|
passed into flink:vkCmdDispatch or read from the sname:VkDispatchIndirectCommand
|
|
|
|
|
structure read through a call to flink:vkCmdDispatchIndirect.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-05-19 03:07:40 +00:00
|
|
|
|
The code:WorkgroupId decoration must: be used only within compute shaders.
|
2016-02-16 09:53:44 +00:00
|
|
|
|
+
|
2016-07-01 02:34:54 +00:00
|
|
|
|
The variable decorated with code:WorkgroupId must: be declared using the input
|
|
|
|
|
storage class.
|
|
|
|
|
+
|
|
|
|
|
The variable decorated with code:WorkgroupId must: be declared as a
|
2016-08-12 11:25:36 +00:00
|
|
|
|
three-component vector of 32-bit integers.
|
Change log for June 10, 2016 Vulkan 1.0.16 spec update:
* Bump API patch number and header version number to 16 for this
update.
Github Issues:
* Clarify that integer border values are meant to be 0/1, and that
integer texture lookups are sign-extended in the
<<textures-format-conversion,Format Conversion>> and
<<textures-texel-replacement,Texel Replacement>> sections (public
issue 52).
* Add logic to generate spec boilerplate without using the 'git'
command-line client, needed when building from a tarball or another
source of the Vulkan tree rather than a cloned git repo. Remove
boilerplate as part of 'clean' target (public issue 195).
* Document that color writes and clears to unused attachments have no
effect for slink:VkClearAttachment and
elink:VkColorComponentFlagBits (public issue 198).
* Fixed flink:vkCmdExecuteCommands validity statement for
sname:VkCommandBufferInheritanceInfo::pname:framebuffer. If used, it
must match the framebuffer in the current renderpass instance
(public issue 226).
* Added valid usage language to require for all functions that set
dynamic state that the currently bound graphics pipeline has the
corresponding dynamic state enabled (public issue 235).
Internal Issues:
* Clarify for flink:vkEnumerateInstanceExtensionProperties, in the
<<extended-functionality-instance-extensions-and-devices, Instance
Extensions and Device Extensions>> section, and in the
<<glossary,Glossary>> section when functionality should be exposed
as an instance extension, as a device extension, or as both
(internal issue 109).
* Place WorkgroupSize in alphabetical order in the
<<interfaces-builtin-variables,Built-in Variables>> section
(internal issue 323).
* Corrects valid usage in vkEndRenderPass to only affect primary
render passes, as secondaries may be entirely within a render pass,
and should be able to be ended (previous language disallowed that)
(internal issue 338).
* Fix relational operator from <= to >= in the
<<features-extentperimagetype,Allowed Extent Values>> section
(internal issue 343).
* Disallow recursion under SPIR-V entry points in the
<<spirvenv-module-validation,Validation Rules within a Module>>
section (internal SPIR-V issue 37).
Other Commits:
* Use standard Python ElementTree package instead of lxml.etree in
header / validation layer / include autogeneration from XML,
reducing platform dependencies.
2016-06-10 22:49:54 +00:00
|
|
|
|
|
|
|
|
|
code:WorkgroupSize::
|
|
|
|
|
|
2016-08-12 11:25:36 +00:00
|
|
|
|
Decorating a variable with the code:WorkgroupSize built-in decoration will make
|
|
|
|
|
that variable contain the dimensions of a local workgroup. If an object is
|
|
|
|
|
decorated with the code:WorkgroupSize decoration, this must: take precedence
|
|
|
|
|
over any execution mode set for code:LocalSize.
|
Change log for June 10, 2016 Vulkan 1.0.16 spec update:
* Bump API patch number and header version number to 16 for this
update.
Github Issues:
* Clarify that integer border values are meant to be 0/1, and that
integer texture lookups are sign-extended in the
<<textures-format-conversion,Format Conversion>> and
<<textures-texel-replacement,Texel Replacement>> sections (public
issue 52).
* Add logic to generate spec boilerplate without using the 'git'
command-line client, needed when building from a tarball or another
source of the Vulkan tree rather than a cloned git repo. Remove
boilerplate as part of 'clean' target (public issue 195).
* Document that color writes and clears to unused attachments have no
effect for slink:VkClearAttachment and
elink:VkColorComponentFlagBits (public issue 198).
* Fixed flink:vkCmdExecuteCommands validity statement for
sname:VkCommandBufferInheritanceInfo::pname:framebuffer. If used, it
must match the framebuffer in the current renderpass instance
(public issue 226).
* Added valid usage language to require for all functions that set
dynamic state that the currently bound graphics pipeline has the
corresponding dynamic state enabled (public issue 235).
Internal Issues:
* Clarify for flink:vkEnumerateInstanceExtensionProperties, in the
<<extended-functionality-instance-extensions-and-devices, Instance
Extensions and Device Extensions>> section, and in the
<<glossary,Glossary>> section when functionality should be exposed
as an instance extension, as a device extension, or as both
(internal issue 109).
* Place WorkgroupSize in alphabetical order in the
<<interfaces-builtin-variables,Built-in Variables>> section
(internal issue 323).
* Corrects valid usage in vkEndRenderPass to only affect primary
render passes, as secondaries may be entirely within a render pass,
and should be able to be ended (previous language disallowed that)
(internal issue 338).
* Fix relational operator from <= to >= in the
<<features-extentperimagetype,Allowed Extent Values>> section
(internal issue 343).
* Disallow recursion under SPIR-V entry points in the
<<spirvenv-module-validation,Validation Rules within a Module>>
section (internal SPIR-V issue 37).
Other Commits:
* Use standard Python ElementTree package instead of lxml.etree in
header / validation layer / include autogeneration from XML,
reducing platform dependencies.
2016-06-10 22:49:54 +00:00
|
|
|
|
+
|
|
|
|
|
The code:WorkgroupSize decoration must: be used only within compute shaders.
|
|
|
|
|
+
|
2016-07-01 02:34:54 +00:00
|
|
|
|
The object decorated with code:WorkgroupSize must: be a specialization constant
|
|
|
|
|
or a constant.
|
|
|
|
|
+
|
|
|
|
|
The object decorated with code:WorkgroupSize must: be declared as a
|
2016-08-12 11:25:36 +00:00
|
|
|
|
three-component vector of 32-bit integers.
|