commit d204ac2f6991f75fab2ebc22136fd179d692f84f Author: Jon Leech Date: Tue Feb 16 01:53:44 2016 -0800 Vulkan 1.0 branch 1.0 for release diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..09d68ba7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,56 @@ +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +# Vim temp files +*.swp + +# Python cache +__pycache__ + +# Spec build temporary files and outputs +out/checks +out/html +out/xhtml +out/vkspec* +out/apispec* +out/man +out/pdf +out/core +doc/specs/vulkan/specversion.txt + +# Header build temporary files +src/spec/diag.txt + +# OS X folder attributes +.DS_Store + +# Auto-generated files +src/spec/hostsynctable +src/spec/validity +src/spec/vulkan-docs diff --git a/README.md b/README.md new file mode 100644 index 00000000..823f05a6 --- /dev/null +++ b/README.md @@ -0,0 +1,106 @@ +Vulkan API Documentation Project +================================ + +This repository contains formal documentation of the Vulkan API. This +includes the main API Specification, the reference (man) pages, the XML API +Registry, and related tools and scripts. + +Repository Structure +-------------------- + +``` +doc/specs/ Main documentation tree + vulkan/ Vulkan specification + appendices/ Appendices - one file each + chapters/ Chapters - one file each + config/ asciidoc configuration + images/ Images (figures, diagrams, icons) + man/ Reference (manual) pages for API + enums/ Includeable snippets for enumerations from vk.xml + flags/ Includeable snippets for flags from vk.xml + protos/ Includeable snippets for prototypes from vk.xml + structs/ Includeable snippets for structures from vk.xml + validity/ Includeable validity language from vk.xml + misc/ Related specifications (GL_KHR_vulkan_glsl) +src/spec/ XML API Registry (vk.xml) and related scripts +src/vulkan/ Vulkan headers, generated from the Registry +``` + +Building the Specification and Reference Pages +---------------------------------------------- + +To build the documents, you need to install, at a minimum: + +* GNU-compatible make +* asciidoc (http://www.methods.co.nz/asciidoc/) + +On some systems/build targets you may also need: + +* dblatex +* source-highlight + +These tools are known to work on several varieties of Linux, MacOS X, and +Cygwin running under Microsoft Windows. + +There are several make targets in doc/specs/vulkan : + +* make xhtml - Build one large HTML specification document. +* make pdf - Build one large PDF specification document. +* make chunked - Build an HTML document broken into one file per chapter. +* make manhtml - Make HTML API reference (all man pages as one big file). +* make manpdf - Make a one-giant PDF API reference. +* make manhtmlpages - Make man pages as one-file-per-API. +* make manpages - Make man pages as nroff Unix-style (real) man pages. +* make allchecks - Run the validation rules on the specification. + +The outputs will be written to $(OUTDIR), which defaults to out/ at the root +of the checked-out git repository. + +To build PDF outputs (make pdf, make manpdf), you need a2x (part of the +asciidoc) package, dblatex and a LaTeX processor. The PDF builds are +currently configured to use a2x to go from asciidoc markdown to docbook, and +then run the result through dblatex to go from there to LaTeX and then +through your LaTeX processor to PDF. + +Spec Validation +--------------- + +There are a couple of validation tools which look for inconsistencies and +missing material between the specification and ref pages, and the canonical +description of the API in vk.xml : + +* checkinc +* checklinks +* allchecks - both checkinc and checklinks + +They are necessarily heuristic since they're dealing with lots of +hand-written material. To use them you'll also need to install: + +* python3 + +The '''checkinc''' target uses Unix filters to determine which autogenerated +API include files are used (and not used) in the spec. It generates several +output files, but the only one you're likely to care about is +'''actual.only'''. This is a list of the include files which are *not* +referenced anywhere in the spec, and probably correspond to undocumented +material in the spec. + +The '''checklinks''' target validates the various internal tagged links in +the man pages and spec (e.g. the '''fname:vkFuncBlah''', +'''sname:VkStructBlah''', etc.) against the canonical description of the API +in vk.xml . It generates two output files, manErrs.txt and specErrs.txt, +which report problematic tags and the filenames/lines on which those tags +were found. + + +Generating Headers and Related Files +------------------------------------ + +The header file (src/vulkan/vulkan.h) and many parts of the specification +and reference page documents are generated from descriptions in the XML API +Registry (src/spec/vk.xml). All the generated files are checked into the +repository, and should not be modified directly. If you change vk.xml, +you can regenerated these files by going to src/spec and running: + +* make clobber (get rid of all old generated files) +* make full_install (regenerate all the files) diff --git a/doc/specs/misc/GL_KHR_vulkan_glsl.txt b/doc/specs/misc/GL_KHR_vulkan_glsl.txt new file mode 100644 index 00000000..6c045d3b --- /dev/null +++ b/doc/specs/misc/GL_KHR_vulkan_glsl.txt @@ -0,0 +1,1171 @@ +Name + + KHR_vulkan_glsl + +Name Strings + + GL_KHR_vulkan_glsl + +Contact + + John Kessenich (johnkessenich 'at' google.com), Google + +Contributors + + Jeff Bolz, NVIDIA + Kerch Holt, NVIDIA + Kenneth Benzie, Codeplay + Neil Henning, Codeplay + Neil Hickey, ARM + Daniel Koch, NVIDIA + Timothy Lottes, Epic Games + David Neto, Google + +Notice + + Copyright (c) 2015 The Khronos Group Inc. Copyright terms at + http://www.khronos.org/registry/speccopyright.html + +Status + + Approved by Vulkan working group 03-Dec-2015. + Ratified by the Khronos Board of Promoters 15-Jan-2016. + +Version + + Last Modified Date: 10-Feb-2016 + Revision: 25 + +Number + + TBD. + +Dependencies + + This extension can be applied to OpenGL GLSL versions 1.40 + (#version 140) and higher. + + This extension can be applied to OpenGL ES ESSL versions 3.10 + (#version 310) and higher. + + All these versions map GLSL/ESSL semantics to the same SPIR-V 1.0 + semantics (approximating the most recent versions of GLSL/ESSL). + +Overview + + This is version 100 of the GL_KHR_vulkan_glsl extension. + + This extension modifies GLSL to be used as a high-level language for the + Vulkan API. GLSL is compiled down to SPIR-V, which the Vulkan API + consumes. + + The following features are removed: + * default uniforms (uniform variables not inside a uniform block), + except for opaque types + * atomic-counter bindings: atomic counters form a one-dimensional space + * subroutines + * shared and packed block layouts + * the already deprecated texturing functions (e.g., texture2D()) + * compatibility-mode-only features + * DepthRangeParameters + * gl_VertexID and gl_InstanceID + + The following features are added: + * push-constant buffers + * shader-combining of separate textures and samplers + * descriptor sets + * specialization constants + * gl_VertexIndex and gl_InstanceIndex + * subpass inputs + + The following features are changed: + * gl_FragColor will no longer indicate an implicit broadcast + * arrays of opaque uniforms take only one binding number for + the entire object, not one per array element + + Each of these is discussed in more detail below. + + Enabling These Features + ----------------------- + + This extension is not enabled with a #extension as other extensions are. + It is also not enabled through use of a profile or #version. The intended + level of GLSL/ESSL features, independent from Vulkan-specific usage, comes + from the traditional use of #version, profile, and #extension. + + Instead, use of this extension is an effect of using a GLSL front-end in a + mode that has it generate SPIR-V for Vulkan. Such tool use is outside the + scope of using the Vulkan API and outside the definition of GLSL and this + extension. See the documentation of the compiler to see how to request + generation of SPIR-V for Vulkan. + + When a front-end is used to accept this extension, it must error check and + reject shaders not adhering to this specification, and accept those that + do. Implementation-dependent maximums and capabilities are supplied to, or + part of, the front-end, so it can do error checking against them. + + A shader can query the level of Vulkan support available, using the + predefined + + #define VULKAN 100 + + This allows shader code to say, for example, + + #ifdef VULKAN + layout(set = 1, binding = 0) uniform sampler s; + layout(set = 1, binding = 1) uniform texture2D t; + #if VULKAN > 100 + ... + #endif + #else + layout(binding = 0) uniform sampler2D ts; + #endif + + Push Constants + -------------- + + Push constants reside in a uniform block declared using the new + layout-qualifier-id "push_constant" applied to a uniform-block declaration. + The API writes a set of constants to a push-constant buffer, and the shader + reads them from a push_constant block: + + layout(push_constant) uniform BlockName { + int member1; + float member2; + ... + } InstanceName; + + ... = InstanceName.member2; // read a push constant + + The memory accounting used for the push_constant uniform block is different + than for other uniform blocks: There is a separate small pool of memory + it must fit within. By default, a push_constant buffer follows the std430 + packing rules. + + Combining separate samplers and textures + ---------------------------------------- + + A sampler, declared with the keyword 'sampler', contains just filtering + information, containing neither a texture nor an image: + + uniform sampler s; // a handle to filtering information + + A texture, declared with keywords like 'texture2D', contains just image + information, not filtering information: + + uniform texture2D t; // a handle to a texture (an image in SPIR-V) + + Constructors can then be used to combine a sampler and a texture at the + point of making a texture lookup call: + + texture2D(sampler2D(t, s), ...); + + Note, layout() information is omitted above for clarity of this feature. + + Descriptor Sets + --------------- + + Bound objects can further declare which Vulkan descriptor set they belong + to, using 'set': + + layout(set = N, ...) ... // declared object belongs to descriptor set N + + For example, two combined texture/sampler objects can be declared in two + different descriptor sets as follows + + layout(set = 0, binding = 0) uniform sampler2D ts3; + layout(set = 1, binding = 0) uniform sampler2D ts4; + + See the API documentation for more detail on the operation model of + descriptor sets. + + Specialization Constants + ------------------------ + + SPIR-V specialization constants, which can be set later by the client API, + can be declared using "layout(constant_id=...)". For example, to make a + specialization constant with a default value of 12: + + layout(constant_id = 17) const int arraySize = 12; + + Above, "17" is the ID by which the API or other tools can later refer to + this specific specialization constant. The API or an intermediate tool can + then change its value to another constant integer before it is fully + lowered to executable code. If it is never changed before final lowering, + it will retain the value of 12. + + Specialization constants have const semantics, except they don't fold. + Hence, an array can be declared with 'arraySize' from above: + + vec4 data[arraySize]; // legal, even though arraySize might change + + Specialization constants can be in expressions: + + vec4 data2[arraySize + 2]; + + This will make data2 be sized by 2 more than whatever constant value + 'arraySize' has when it is time to lower the shader to executable code. + + An expression formed with specialization constants also behaves in the + shader like a specialization constant, not a like a constant. + + arraySize + 2 // a specialization constant (with no constant_id) + + Such expressions can be used in the same places as a constant. + + The constant_id can only be applied to a scalar *int*, a scalar *float* + or a scalar *bool*. + + Only basic operators and constructors can be applied to a specialization + constant and still result in a specialization constant: + + layout(constant_id = 17) const int arraySize = 12; + sin(float(arraySize)); // result is not a specialization constant + + While SPIR-V specialization constants are only for scalars, a vector + can be made by operations on scalars: + + layout(constant_id = 18) const int scX = 1; + layout(constant_id = 19) const int scZ = 1; + const vec3 scVec = vec3(scX, 1, scZ); // partially specialized vector + + A built-in variable can have a 'constant_id' attached to it: + + layout(constant_id = 18) gl_MaxImageUnits; + + This makes it behave as a specialization constant. It is not a full + redeclaration; all other characteristics are left intact from the + original built-in declaration. + + The built-in vector gl_WorkGroupSize can be specialized using special + layout local_size_{xyz}_id's applied to the "in" qualifier. For example: + + layout(local_size_x_id = 18, local_size_z_id = 19) in; + + This leaves gl_WorkGroupSize.y as a non-specialization constant, with + gl_WorkGroupSize being a partially specialized vector. Its x and z + components can be later specialized using the ID's 18 and 19. + + gl_VertexIndex and gl_InstanceIndex + ----------------------------------- + + Adds two new built-in variables, gl_VertexIndex and gl_InstanceIndex to + replace the existing built-in variables gl_VertexID and gl_InstanceID. + + In the situations where the indexing is relative to some base offset, + these built-in variables are defined, for Vulkan, to take on values as + follows: + + gl_VertexIndex base, base+1, base+2, ... + gl_InstanceIndex base, base+1, base+2, ... + + Where it depends on the situation what the base actually is. + + Subpass Inputs + -------------- + + Within a rendering pass, a subpass can write results to an output target + that can then be read by the next subpass as an input subpass. The + "Subpass Input" feature regards the ability to read an output target. + + Subpasses are read through a new set of types, available only + to fragment shaders: + + subpassInput + subpassInputMS + isubpassInput + isubpassInputMS + usubpassInput + usubpassInputMS + + Unlike sampler and image objects, subpass inputs are implicitly addressed + by the fragment's (x, y, layer) coordinate. + + A subpass input is selected by using a new layout qualifier identifier + 'input_attachment_index'. For example: + + layout(input_attachment_index = i, ...) uniform subpassInput t; + + An input_attachment_index of i selects the ith entry in the input pass + list. (See API specification for more information.) + + These objects support reading the subpass input through the following + functions: + + gvec4 subpassLoad(gsubpassInput subpass); + gvec4 subpassLoad(gsubpassInputMS subpass, int sample); + + gl_FragColor + ------------ + + The fragment-stage built-in gl_FragColor, which implies a broadcast to all + outputs, is not present in SPIR-V. Shaders where writing to gl_FragColor + is allowed can still write to it, but it only means to write to an output: + - of the same type as gl_FragColor + - decorated with location 0 + - not decorated as a built-in variable. + There is no implicit broadcast. + + Mapping to SPIR-V + ----------------- + + For informational purposes (non-specification), the following is an + expected way for an implementation to map GLSL constructs to SPIR-V + constructs: + + Mapping of storage classes: + + uniform sampler2D...; -> UniformConstant + uniform blockN { ... } ...; -> Uniform, with Block decoration + in / out variable -> Input/Output, possibly with block (below) + in / out block... -> Input/Output, with Block decoration + buffer blockN { ... } ...; -> Uniform, with BufferBlock decoration + ... uniform atomic_uint ... -> AtomicCounter + shared -> Workgroup + -> Private + + Mapping of input/output blocks or variables is the same for all versions + of GLSL or ESSL. To the extent variables or members are available in a + version, its location is as follows: + + These are mapped to SPIR-V individual variables, with similarly spelled + built-in decorations (except as noted): + + Any stage: + + in gl_NumWorkGroups + in gl_WorkGroupSize + in gl_WorkGroupID + in gl_LocalInvocationID + in gl_GlobalInvocationID + in gl_LocalInvocationIndex + + in gl_VertexIndex + in gl_InstanceIndex + in gl_InvocationID + in gl_PatchVerticesIn (PatchVertices) + in gl_PrimitiveIDIn (PrimitiveID) + in/out gl_PrimitiveID (in/out based only on storage qualifier) + in gl_TessCoord + + in/out gl_Layer + in/out gl_ViewportIndex + + patch in/out gl_TessLevelOuter (uses Patch decoration) + patch in/out gl_TessLevelInner (uses Patch decoration) + + Fragment stage only: + + in gl_FragCoord + in gl_FrontFacing + in gl_ClipDistance + in gl_CullDistance + in gl_PointCoord + in gl_SampleID + in gl_SamplePosition + in gl_HelperInvocation + out gl_FragDepth + in gl_SampleMaskIn (SampleMask) + out gl_SampleMask (in/out based only on storage qualifier) + + These are mapped to SPIR-V blocks, as implied by the pseudo code, with + the members decorated with similarly spelled built-in decorations: + + Non-fragment stage: + + in/out gl_PerVertex { + gl_Position + gl_PointSize + gl_ClipDistance + gl_CullDistance + } (name of block is for debug only) + + There is at most one input and one output block per stage in SPIR-V. + + Mapping of precision qualifiers: + + lowp -> RelaxedPrecision, on variable and operation + mediump -> RelaxedPrecision, on variable and operation + highp -> 32-bit, same as int or float + + portability tool/mode -> OpQuantizeToF16 + + Mapping of precise: + + precise -> NoContraction + + Mapping of images + + subpassInput -> OpTypeImage with 'Dim' of SubpassData + subpassLoad() -> OpImageRead + imageLoad() -> OpImageRead + imageStore() -> OpImageWrite + texelFetch() -> OpImageFetch + + imageAtomicXXX(params, data) -> %ptr = OpImageTexelPointer params + OpAtomicXXX %ptr, data + + XXXQueryXXX(combined) -> %image = OpImage combined + OpXXXQueryXXX %image + + Mapping of layouts + + std140/std430 -> explicit offsets/strides on struct + shared/packed -> not allowed + -> not shared, but std140 or std430 + + max_vertices -> OutputVertices + + Mapping of other instructions + + % -> OpUMod/OpSMod + mod() -> OpFMod + NA -> OpSRem/OpFRem + + atomicExchange() -> OpAtomicExchange + imageAtomicExchange() -> OpAtomicExchange + atomicCompSwap() -> OpAtomicCompareExchange + imageAtomicCompSwap() -> OpAtomicCompareExchange + NA -> OpAtomicCompareExchangeWeak + +Changes to Chapter 1 of the OpenGL Shading Language Specification + + Change the last paragraph of "1.3 Overview": "The OpenGL Graphics System + Specification will specify the OpenGL entry points used to manipulate and + communicate with GLSL programs and GLSL shaders." + + Add a paragraph: "The Vulkan API will specify the Vulkan entry points used + to manipulate SPIR-V shaders. Independent offline tool chains will compile + GLSL down to the SPIR-V intermediate language. Vulkan use is not enabled + with a #extension, #version, or a profile. Instead, use of GLSL for Vulkan + is determined by offline tool-chain use. See the documentation of such + tools to see how to request generation of SPIR-V for Vulkan." + + "GLSL -> SPIR-V compilers must be directed as to what SPIR-V *Capabilities* + are legal at run-time and give errors for GLSL feature use outside those + capabilities. This is also true for implementation-dependent limits that + can be error checked by the front-end against constants present in the + GLSL source: the front-end can be informed of such limits, and report + errors when they are exceeded." + +Changes to Chapter 2 of the OpenGL Shading Language Specification + + Change the name from + + "2 Overview of OpenGL Shading" + + to + + "2 Overview of OpenGL and Vulkan Shading" + + Remove the word "OpenGL" from three introductory paragraphs. + +Changes to Chapter 3 of the OpenGL Shading Language Specification + + Add a new paragraph at the end of section "3.3 Preprocessor": "When + shaders are compiled for Vulkan, the following predefined macro is + available: + + #define VULKAN 100 + + Add the following keywords to section 3.6 Keywords: + + texture1D texture2D texture3D + textureCube texture2DRect texture1DArray + texture2DArray textureBuffer texture2DMS + texture2DMSArray textureCubeArray + + itexture1D itexture2D itexture3D + itextureCube itexture2DRect itexture1DArray + itexture2DArray itextureBuffer + itexture2DMS itexture2DMSArray + itextureCubeArray + + utexture1D utexture2D utexture3D + utextureCube utexture2DRect utexture1DArray + utexture2DArray utextureBuffer utexture2DMS + utexture2DMSArray utextureCubeArray + + sampler samplerShadow + + subpassInput isubpassInput usubpassInput + subpassInputMS isubpassInputMS usubpassInputMS + +Changes to Chapter 4 of the OpenGL Shading Language Specification + + Add into the tables in section 4.1, interleaved with the existing types, + using the existing descriptions (when not supplied below): + + Floating-Point Opaque Types + + texture1D + texture2D + texture3D + textureCube + texture2DRect + texture1DArray + texture2DArray + textureBuffer + texture2DMS + texture2DMSArray + textureCubeArray + subpassInput | a handle for accessing a floating-point + | subpass input + subpassInputMS | a handle for accessing a multi-sampled + | floating-point subpass input + + Signed Integer Opaque Types + + itexture1D + itexture2D + itexture3D + itextureCube + itexture2DRect + itexture1DArray + itexture2DArray + itextureBuffer + itexture2DMS + itexture2DMSArray + itextureCubeArray + isubpassInput | a handle for accessing an integer subpass input + isubpassInputMS | a handle for accessing a multi-sampled integer + | subpass input + + Unsigned Integer Opaque Types + + utexture1D + utexture2D + utexture3D + utextureCube + utexture2DRect + utexture1DArray + utexture2DArray + utextureBuffer + utexture2DMS + utexture2DMSArray + utextureCubeArray + usubpassInput | a handle for accessing an unsigned integer + | subpass input + usubpassInputMS | a handle for accessing a multi-sampled unsigned + | integer subpass input + + Add a new category in this section + + "Sampler Opaque Types + + sampler | a handle for accessing state describing how to + | sample a texture (without comparison)" + --------------------------------------------------------------------- + samplerShadow | a handle for accessing state describing how to + | sample a depth texture with comparison" + + + + Remove "structure member selection" from 4.1.7 and instead add a sentence + "Opaque types cannot be declared or nested in a structure (struct)." + + Add a subsection to 4.1.7 Opaque Types: + + "4.1.7.x Texture, *sampler*, and *samplerShadow* Types + + "Texture (e.g., *texture2D*), *sampler*, and *samplerShadow* types are opaque + types, declared and behaving as described above for opaque types. When + aggregated into arrays within a shader, these types can only be indexed + with a dynamically uniform expression, or texture lookup will result in + undefined values. Texture variables are handles to one-, two-, and + three-dimensional textures, cube maps, etc., as enumerated in the basic + types tables. There are distinct + texture types for each texture target, and for each of float, integer, + and unsigned integer data types. Textures can be combined with a + variable of type *sampler* or *samplerShadow* to create a sampler type + (e.g., sampler2D, or sampler2DShadow). This is done with a constructor, + e.g., sampler2D(texture2D, sampler) or + sampler2DShadow(texture2D, samplerShadow), + and is described in more detail in section 5.4 "Constructors"." + + "4.1.7.x Subpass Inputs + + "Subpass input types (e.g., subpassInput) are opaque types, declared + and behaving as described above for opaque types. When aggregated into + arrays within a shader, they can only be indexed with a dynamically + uniform integral expression, otherwise results are undefined. + + "Subpass input types are handles to two-dimensional single sampled or + multi-sampled images, with distinct types for each of float, integer, + and unsigned integer data types. + + "Subpass input types are only available in fragment shaders. It is a + compile-time error to use them in any other stage." + + Change section 4.3.3 Constant Expressions: + + Add a new very first sentence to this section: + + "SPIR-V specialization constants are expressed in GLSL as const, with + a layout qualifier identifier of constant_id, as described in section + 4.4.x Specialization-Constant Qualifier." + + Add to this sentence: + + "A constant expression is one of... + * a variable declared with the const qualifier and an initializer, + where the initializer is a constant expression" + + To make it say: + + "A constant expression is one of... + * a variable declared with the const qualifier and an initializer, + where the initializer is a constant expression; this includes both + const declared with a specialization-constant layout qualifier, + e.g., 'layout(constant_id = ...)' and those declared without a + specialization-constant layout qualifier" + + Add to "including getting an element of a constant array," that + + "an array access with a specialization constant as an index does + not result in a constant expression" + + Add to this sentence: + + "A constant expression is one of... + * the value returned by a built-in function..." + + To make it say: + + "A constant expression is one of... + * for non-specialization-constants only: the value returned by a + built-in function... (when any function is called with an argument + that is a specialization constant, the result is not a constant + expression)" + + Rewrite the last half of the last paragraph to be its own paragraph + saying: + + "Non-specialization constant expressions may be evaluated by the + compiler's host platform, and are therefore not required ... + [rest of paragraph stays the same]" + + Add a paragraph + + "Specialization constant expressions are never evaluated by the + front-end, but instead retain the operations needed to evaluate them + later on the host." + + Add to the table in section 4.4 Layout Qualifiers: + + | Individual Variable | Block | Allowed Interface + ------------------------------------------------------------------------ + constant_id = | scalar only | | const + ------------------------------------------------------------------------ + push_constant | | X | uniform + ------------------------------------------------------------------------ + set = | opaque only | X | uniform + ------------------------------------------------------------------------ + input_attachment_index | subpass types only | | uniform + + (The other columns remain blank.) + + Also add to this table: + + | Qualifier Only | Allowed Interface + ------------------------------------------------------- + local_size_x_id = | X | in + local_size_y_id = | X | in + local_size_z_id = | X | in + + (The other columns remain blank.) + + Expand this sentence in section 4.4.1 Input Layout Qualifiers: + + "Where integral-constant-expression is defined in section 4.3.3 Constant + Expressions as 'integral constant expression'" + + To include the following: + + ", with it being a compile-time error for integer-constant-expression to + be a specialization constant: The constant used to set a layout + identifier X in layout(layout-qualifier-name = X) must evaluate to a + front-end constant containing no specialization constants." + + Change the rules about locations and inputs for doubles, by removing + + "If a vertex shader input is any scalar or vector type, it will consume + a single location. If a non-vertex shader input is a scalar or vector + type other than dvec3 or dvec4..." + + Replacing the above with + + "If an input is a scalar or vector type other than dvec3 or dvec4..." + + (Making all stages have the same rule that dvec3 takes two locations...) + + Add to the end of section 4.4.3 Uniform Variable Layout Qualifiers: + + The /push_constant/ identifier is used to declare an entire block, and + represents a set of "push constants", as defined by the API. It is a + compile-time error to apply this to anything other than a uniform block + declaration. The values in the block will be initialized through the + API, as per the Vulkan API specification. A block declared with + layout(push_constant) must have an /instance-name/ supplied, or a + compile-time error results. There can be only one push_constant + block per stage, or a compile-time or link-time error will result. A + push-constant array can only be indexed with dynamically uniform indexes. + Uniform blocks declared with push_constant use different resources + than those without; and are accounted for separately. See the API + specification for more detail. + + After the paragraphs about binding ("The binding identifier..."), add + + The /set/ identifier specifies the descriptor set this object belongs to. + It is a compile-time error to apply to just a qualifier or a member of a + block. Any uniform or shader storage block declared without a /set/ + identifier is assigned to descriptor set 0. Similarly, any sampler, + texture, or subpass input type declared as a uniform, but without a + /set/ identifier is also assigned to descriptor set 0. + + If applied to an object declared as an array, all elements of the array + belong to the specified /set/. + + It is a compile-time error for either the /set/ or /binding/ value + to exceed a front-end-configuration supplied maximum value. + + Change section 4.4.6 Opaque-Uniform Layout Qualifiers: + + Change + + "If the binding identifier is used with an array, the first element of + the array takes the specified unit and each subsequent element takes the + next consecutive unit." + + To + + "If the binding identifier is used with an array, the entire array + takes just the provided binding number. The next consecutive binding + number is available for a different object." + + Add a new subsection at the end of section 4.4: + + "4.4.x Specialization-Constant Qualifier + + "Specialization constants are declared using "layout(constant_id=...)". + For example: + + layout(constant_id = 17) const int arraySize = 12; + + "The above makes a specialization constant with a default value of 12. + 17 is the ID by which the API or other tools can later refer to + this specific specialization constant. If it is never changed before + final lowering, it will retain the value of 12. It is a compile-time + error to use the constant_id qualifier on anything but a scalar bool, + int, uint, float, or double. + + "Built-in constants can be declared to be specialization constants. + For example, + + layout(constant_id = 31) gl_MaxClipDistances; // add specialization id + + "The declaration uses just the name of the previously declared built-in + variable, with a constant_id layout declaration. It is a compile-time + error to do this after the constant has been used: Constants are strictly + either non-specialization constants or specialization constants, not + both. + + "The built-in constant vector gl_WorkGroupSize can be specialized using + the local_size_{xyz}_id qualifiers, to individually give the components + an id. For example: + + layout(local_size_x_id = 18, local_size_z_id = 19) in; + + "This leaves gl_WorkGroupSize.y as a non-specialization constant, with + gl_WorkGroupSize being a partially specialized vector. Its x and z + components can be later specialized using the ids 18 and 19. These ids + are declared independently from declaring the work-group size: + + layout(local_size_x = 32, local_size_y = 32) in; // size is (32,32,1) + layout(local_size_x_id = 18) in; // constant_id for x + layout(local_size_z_id = 19) in; // constant_id for z + + "Existing rules for declaring local_size_x, local_size_y, and + local_size_z are not changed by this extension. For the local-size ids, + it is a compile-time error to provide different id values for the same + local-size id, or to provide them after any use. Otherwise, order, + placement, number of statements, and replication do not cause errors. + + "Two arrays sized with specialization constants are the same type only if + sized with the same symbol, involving no operations. + + layout(constant_id = 51) const int aSize = 20; + const int pad = 2; + const int total = aSize + pad; // specialization constant + int a[total], b[total]; // a and b have the same type + int c[22]; // different type than a or b + int d[aSize + pad]; // different type than a, b, or c + int e[aSize + 2]; // different type than a, b, c, or d + + "Arrays inside a block may be sized with a specialization constant, but + the block will have a static layout. Changing the specialized size will + not re-layout the block. In the absence of explicit offsets, the layout + will be based on the default size of the array." + + Add a new subsection at the end of section 4.4: + + "4.4.y Subpass Qualifier + + "Subpasses are declared with the basic 'subpassInput' types. However, + they must have the layout qualifier "input_attachment_index" declared + with them, or a compile-time error results. For example: + + layout(input_attachment_index = 2, ...) uniform subpassInput t; + + This selects which subpass input is being read from. The value assigned + to 'input_attachment_index', say i (input_attachment_index = i), selects + that entry (ith entry) in the input list for the pass. See the API + documentation for more detail about passes and the input list. + + "If an array of size N is declared, it consume N consecutive + input_attachment_index values, starting with the one provided. + + "It is a compile-time or link-time error to have different variables + declared with the same input_attachment_index. This includes any overlap + in the implicit input_attachment_index consumed by array declarations. + + "It is a compile-time error if the value assigned to an + input_attachment_index is greater than or equal to + gl_MaxInputAttachments." + + Remove all mention of the 'shared' and 'packed' layout qualifiers. + + Change section 4.4.5 Uniform and Shader Storage Block Layout Qualifiers + + "The initial state of compilation is as if the following were declared: + + layout(std140, column_major) uniform; // without push_constant + layout(std430, column_major) buffer; + + "However, when push_constant is declared, the default layout of the + buffer will be std430. There is no method to globally set this default." + +Changes to Chapter 5 of the OpenGL Shading Language Specification + + Add a new subsection at the end of section 5.4 "Constructors": + + "5.4.x Sampler Constructors + + "Sampler types, like *sampler2D* can be declared with an initializer + that is a constructor of the same type, and consuming a texture and a + sampler. For example: + + layout(...) uniform sampler s; // handle to filtering information + layout(...) uniform texture2D t; // handle to a texture + in vec2 tCoord; + ... + texture2D(sampler2D(t, s), tCoord); + + The result of a sampler constructor cannot be assigned to a variable: + + ... sampler2D sConstruct = sampler2D(t, s); // ERROR + + Sampler constructors can only be consumed by a function parameter. + + Sampler constructors of arrays are illegal: + + layout(...) uniform texture2D tArray[6]; + ... + ... sampler2D[](tArray, s) ... // ERROR + + Formally: + * every sampler type can be used as a constructor + * the type of the constructor must match the type of the + variable being declared + * the constructor's first argument must be a texture type + * the constructor's second argument must be a scalar of type + *sampler* or *samplerShadow* + * the dimensionality (1D, 2D, 3D, Cube, Rect, Buffer, MS, and Array) + of the texture type must match that of the constructed sampler type + (that is, the suffixes of the type of the first argument and the + type of the constructor will be spelled the same way) + * the presence or absence of depth comparison (Shadow) must match + between the constructed sampler type and the type of the second argument + * there is no control flow construct (e.g., "?:") that consumes any + sampler type + + Change section 5.9 Expressions + + Add under "The sequence (,) operator..." + + "Texture and sampler types cannot be used with the sequence (,) + operator." + + Change under "The ternary selection operator (?:)..." + + "The second and third expressions can be any type, as long their types + match." + + To + + "The second and third expressions can be any type, as long their types + match, except for texture and sampler types, which result in a + compile-time error." + + Add a section at the end of section 5 + + "5.x Specialization Constant Operations" + + Only some operations discussed in this section may be applied to a + specialization constant and still yield a result that is as + specialization constant. The operations allowed are listed below. + When a specialization constant is operated on with one of these + operators and with another constant or specialization constant, the + result is implicitly a specialization constant. + + - int(), uint(), float(), and bool() constructors for type conversions + from any of the following types to any of the following types: + * int + * uint + * float + * double + * bool + - vector versions of the above conversion constructors + - allowed implicit conversions of the above + - The operators + * unary negative ( - ) + * not ( ! ) + * binary operations ( + , - , * , / , % ) + * shift ( <<, >> ) + * bitwise operations ( & , | , ^ ) + * swizzles (e.g., foo.yx) + * logical operations ( && , || , ^^ ) + * comparison ( == , != , > , >= , < , <= ) + +Changes to Chapter 7 of the OpenGL Shading Language Specification + + Changes to section 7.1 Built-In Language Variables + + Replace gl_VertexID and gl_InstanceID, for non-ES with: + + "in int gl_VertexIndex;" + "in int gl_InstanceIndex;" + + For ES, add: + + "in highp int gl_VertexIndex;" + "in highp int gl_InstanceIndex;" + + The following definition for gl_VertexIndex should replace the definition + for gl_VertexID: + + "The variable gl_VertexIndex is a vertex language input variable that + holds an integer index for the vertex, [See issue 7 regarding which + name goes with which semantics] relative to a base. While the + variable gl_VertexIndex is always present, its value is not always + defined. See XXX in the API specification." + + The following definition for gl_InstanceIndex should replace the definition + for gl_InstanceID: + + "The variable gl_InstanceIndex is a vertex language input variable that + holds the instance number of the current primitive in an instanced draw + call, relative to a base. If the current primitive does not come from + an instanced draw call, the value of gl_InstanceIndex is zero." + [See issue 7 regarding which name goes with which semantics] + + Changes to section 7.3 Built-In Constants + + Add + + "const int gl_MaxInputAttachments = 1;" + +Changes to Chapter 8 of the OpenGL Shading Language Specification + + Add a section + + "8.X Subpass Functions + + "Subpass functions are only available in a fragment shader. + + "Subpass inputs are read through the built-in functions below. The gvec... + and gsubpass... are matched, where they must both be the same floating + point, integer, or unsigned integer variants. + + Add a table with these two entries (in the same cell): + + "gvec4 subpassLoad(gsubpassInput subpass) + gvec4 subpassLoad(gsubpassInputMS subpass, int sample)" + + With the description: + + "Read from a subpass input, from the implicit location (x, y, layer) + of the current fragment coordinate." + +Changes to the grammar + + Arrays can no longer require the size to be a compile-time folded constant + expression. Change + + | LEFT_BRACKET constant_expression RIGHT_BRACKET + + to + + | LEFT_BRACKET conditional_expression RIGHT_BRACKET + + and change + + | array_specifier LEFT_BRACKET constant_expression RIGHT_BRACKET + + to + + | array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET + +Issues + +1. Can we have specialization sizes in an array in a block? That prevents + putting known offsets on subsequent members. + + RESOLUTION: Yes, but it does not affect offsets. + +2. Can a specialization-sized array be passed by value? + + RESOLUTION: Yes, if they are sized with the same specialization constant. + +3. Can a texture array be variably indexed? Dynamically uniform? + + Resolution (bug 14683): Dynamically uniform indexing. + +4. Are arrays of a descriptor set all under the same set number, or does, say, + an array of size 4 use up 4 descriptor sets? + + RESOLUTION: There is no array of descriptor sets. Arrays of resources + are in a single descriptor set and consume a single binding number. + +5. Which descriptor set arrays can be variably or non-uniformly indexed? + + RESOLUTION: There is no array of descriptor sets. + +6. Do we want an alternate way of doing composite member specialization + constants? For example, + + layout(constant_id = 18) gl_WorkGroupSize.y; + + Or + + layout(constant_id = 18, local_size_y = 16) in; + + Or + + layout(constant_id = 18) wgy = 16; + const ivec3 gl_WorkGroupSize = ivec3(1, wgy, 1); + + RESOLUTION: No. Use local_size_x_id etc. for workgroup size, and + defer any more generalized way of doing this for composites. + +7. What names do we really want to use for + gl_VertexIndex base, base+1, base+2, ... + gl_InstanceIndex base, base+1, base+2, ... + + RESOLUTION: Use the names above. + + Note that gl_VertexIndex is equivalent to OpenGL's gl_VertexID in that + it includes the value of the baseVertex parameter. gl_InstanceIndex is + NOT equivalent to OpenGL's gl_InstanceID because gl_InstanceID does NOT + include the baseInstance parameter. + +8. What should "input subpasses" really be called? + + RESOLVED: subpassInput. + +9. The spec currently does not restrict where sampler constructors can go, + but should it? E.g., can the user write a shader like the following: + + uniform texture2D t[MAX_TEXTURES]; + uniform sampler s[2]; + + uniform int textureCount; + uniform int sampleCount; + uniform bool samplerCond; + + float ShadowLookup(bool pcf, vec2 tcBase[MAX_TEXTURES]) + { + float result = 0; + + for (int textureIndex = 0; textureIndex < textureCount; ++textureIndex) + { + for (int sampleIndex = 0; sampleIndex < sampleCount; ++sampleIndex) + { + vec2 tc = tcBase[textureIndex] + offsets[sampleIndex]; + if (samplerCond) + result += texture(sampler2D(t[textureIndex], s[0]), tc).r; + else + result += texture(sampler2D(t[textureIndex], s[1]), tc).r; + } + + Or, like this? + + uniform texture2D t[MAX_TEXTURES]; + uniform sampler s[2]; + + uniform int textureCount; + uniform int sampleCount; + uniform bool samplerCond; + + sampler2D combined0[MAX_TEXTURES] = sampler2D(t, s[0]); + sampler2D combined1[MAX_TEXTURES] = sampler2D(t, s[1]); + + float ShadowLookup(bool pcf, vec2 tcBase[MAX_TEXTURES]) + { + for (int textureIndex = 0; textureIndex < textureCount; ++textureIndex) { + for (int sampleIndex = 0; sampleIndex < sampleCount; ++sampleIndex) { + vec2 tc = tcBase[textureIndex] + offsets[sampleIndex]; + if (samplerCond) + result += texture(combined0[textureIndex], tc).r; + else + result += texture(combined1[textureIndex], tc).r; + } + ... + + RESOLUTION (bug 14683): Only constructed at the point of use, where passed + as an argument to a function parameter. + +Revision History + + Rev. Date Author Changes + ---- ----------- ------- -------------------------------------------- + 25 10-Feb-2016 JohnK Incorporate resolutions from the face to face + 24 28-Jan-2016 JohnK Update the resolutions from the face to face + 23 6-Jan-2016 Piers Remove support for gl_VertexID and + gl_InstanceID since they aren't supported by + Vulkan. + 22 29-Dec-2015 JohnK support old versions and add semantic mapping + 21 09-Dec-2015 JohnK change spelling *subpass* -> *subpassInput* and + include this and other texture/sample types in + the descriptor-set-0 default scheme + 20 01-Dec-2015 JohnK push_constant default to std430, opaque types + can only aggregate as arrays + 19 25-Nov-2015 JohnK Move "Shadow" from texture types to samplerShadow + 18 23-Nov-2015 JohnK Bug 15206 - Indexing of push constant arrays + 17 18-Nov-2015 JohnK Bug 15066: std140/std43 defaults + 16 18-Nov-2015 JohnK Bug 15173: subpass inputs as arrays + 15 07-Nov-2015 JohnK Bug 14683: new rules for separate texture/sampler + 14 07-Nov-2015 JohnK Add specialization operators, local_size_*_id + rules, and input dvec3/dvec4 always use two + locations + 13 29-Oct-2015 JohnK Rules for input att. numbers, constant_id, + and no subpassLoadMS() + 12 29-Oct-2015 JohnK Explain how gl_FragColor is handled + 11 9-Oct-2015 JohnK Add issue: where can sampler constructors be + 10 7-Sep-2015 JohnK Add first draft specification language + 9 5-Sep-2015 JohnK - make specialization id's scalar only, and + add local_size_x_id... for component-level + workgroup size setting + - address several review comments + 8 2-Sep-2015 JohnK switch to using the *target* style of target + types (bug 14304) + 7 15-Aug-2015 JohnK add overview for input targets + 6 12-Aug-2015 JohnK document gl_VertexIndex and gl_InstanceIndex + 5 16-Jul-2015 JohnK push_constant is a layout qualifier + VULKAN is the only versioning macro + constantID -> constant_id + 4 12-Jul-2015 JohnK Rewrite for clarity, with proper overview, + and prepare to add full semantics + 3 14-May-2015 JohnK Minor changes from meeting discussion + 2 26-Apr-2015 JohnK Add controlling features/capabilities + 1 26-Mar-2015 JohnK Initial revision diff --git a/doc/specs/vulkan/Makefile b/doc/specs/vulkan/Makefile new file mode 100644 index 00000000..d52d6bc4 --- /dev/null +++ b/doc/specs/vulkan/Makefile @@ -0,0 +1,284 @@ +# Copyright (c) 2014-2016 The Khronos Group Inc. +# Copyright notice at https://www.khronos.org/registry/speccopyright.html + +# Vulkan Specification makefile +# +# Default targets: +# - XHTML, XHTML chunked, and PDF specs ('allspecs') +# - HTML single-document reference pages ('manhtml' and 'manpdf') +# - HTML and nroff separate reference pages ('manpages' and 'manhtmlpages') +# - Validator scripts ('allchecks') +# +# The 'html' target is deprecated but still supported, for now. It uses +# a different toolchain than XHTML/PDF outputs, isn't quite compatible, +# and will not be published, but is faster to generate for quick tests. + +all: alldocs allchecks + +alldocs: allspecs allman + +allspecs: xhtml chunked pdf + +allman: manhtml manpdf manpages manhtmlpages + +allchecks: checkinc checklinks + +# Note that the := assignments below are immediate, not deferred, and +# are therefore order-dependent in the Makefile + +APINAME=Vulkan +QUIET?=@ +ASCIIDOC ?= asciidoc.py +A2X ?= a2x.py +DBLATEX ?= dblatex +# DBLATEXPREFIX can be overriden by setting it as an environment variable if +# the not installed in the standard location on your distribution +DBLATEXPREFIX ?= /etc/asciidoc/dblatex +RM=rm -f +RMRF=rm -rf +MKDIR=mkdir -p +CP=cp +ECHO:=echo +# Target directories for output files +# HTMLDIR - 'html' target +# XHTMLDIR - 'xhtml' target +# PDFDIR - 'pdf' target +# CHECKDIR - 'allchecks' target +OUTDIR :=../../../out/core +HTMLDIR := $(OUTDIR)/html +XHTMLDIR := $(OUTDIR)/xhtml +PDFDIR := $(OUTDIR)/pdf +CHECKDIR := $(OUTDIR)/checks +# Images used in the API spec +IMAGEPATH :=images +ICONPATH :=$(IMAGEPATH)/icons +PDFXSL :=config/vkspec-dblatex.xsl +PDFSTY :=config/vkspec-dblatex.sty +PYTHON ?= python3 + +# asciidoc / a2x attributes to set. +# XMLLINT normally unset - to detect problems with intermediate files +# NOTEOPTS sets options controlling which NOTEs are generated +# ATTRIBOPTS sets {apiname} to "Vulkan" and enables MathJax generation +# VKCONF contains Vulkan-specific Asciidoc macros +# ADOCOPTS options for asciidoc->HTML output +# ADOCPDFOPTS options for asciidoc->PDF output via dblatex (not using a2x) +# A2XOPTS options for a2x->{HTML,PDF} output +XMLLINT = --no-xmllint +NOTEOPTS = -a editing-notes -a implementation-guide +ATTRIBOPTS = -a apiname=$(APINAME)@ -a mathjax +VKCONF = config/vkspec.conf +ADOCOPTS = $(ATTRIBOPTS) $(NOTEOPTS) -f config/mathjax-asciidoc.conf \ + -f $(VKCONF) $(VERBOSE) +ADOCPDFOPTS= $(ATTRIBOPTS) $(NOTEOPTS) -f config/mathjax-docbook.conf \ + -f $(VKCONF) $(VERBOSE) +A2XOPTS = $(ATTRIBOPTS) $(NOTEOPTS) \ + --asciidoc-opts="-f config/mathjax-docbook.conf -f $(VKCONF)" \ + --xsltproc-opts="--param generate.consistent.ids 1" \ + $(XMLLINT) $(VERBOSE) --icons + +# XSL customizing Asciibook XSL to pass through equations and add +# MathJax. This varies depending on target type. +XHTMLXSL = config/docbook-xsl/xhtml.xsl +CHUNKEDXSL = config/docbook-xsl/chunked.xsl + +# dblatex options passed two ways, directly to dblatex and via a2x. +DBLATEXOPTS := $(KEEP) -V -T db2latex -I. -I images -I images/icons -s $(DBLATEXPREFIX)/asciidoc-dblatex.sty +A2XDBLATEXOPTS := --dblatex-opts='$(DBLATEXOPTS)' + +# Set VERBOSE to -v to see what asciidoc is doing. +# Set KEEP to -d to retain intermediate dblatex files +VERBOSE = +KEEP = + +# Misc. files to clean up (see 'checkinc' target below) +DIRT := + +.PHONY: directories + +ICONFILES := \ + $(ICONPATH)/caution.png \ + $(ICONPATH)/example.png \ + $(ICONPATH)/home.png \ + $(ICONPATH)/important.png \ + $(ICONPATH)/next.png \ + $(ICONPATH)/note.png \ + $(ICONPATH)/prev.png \ + $(ICONPATH)/tip.png \ + $(ICONPATH)/up.png \ + $(ICONPATH)/warning.png +PNGFILES := $(ICONFILES) $(wildcard $(IMAGEPATH)/*.png) +# This is a horrible hack to avoid pulling in vulkantexture0.svg +SVGFILES := $(wildcard $(IMAGEPATH)/[A-Za-uw-z]*.svg) +PDFFILES := $(SVGFILES:.svg=.pdf) +# Some random directories and files that need to be copied into spec +# output directory +WEBIMAGES := $(SVGFILES:%=$(HTMLDIR)/%) $(PNGFILES:%=$(HTMLDIR)/%) +# File suffix for image targets for HTML and PDF Builds - Asciidoc {svgtype} attribute +SVGTYPEHTML := svg +SVGTYPEPDF := pdf +# Main (root) asciidoc spec source file +TOPDOC := vkspec.txt +# Included chapters of the API spec +CHAPTERS := $(wildcard chapters/[A-Za-z]*.txt appendices/[A-Za-z]*.txt) +INCLUDES := $(wildcard protos/*.txt structs/*.txt flags/*.txt enums/*.txt funcpointers/*.txt validity/structs/*.txt validity/protos/*.txt) +# All non-format-specific dependencies +COMMONDOCS := $(CHAPTERS) $(INCLUDES) +# A generate included file with the spec version, date, and git commit +SPECVERSION = specversion.txt +SPECREVISION = 1.0 +SPECREMARK = + +# Spec targets +# There is some complexity to try and avoid short virtual targets like 'html' +# causing specs to *always* be regenerated. + +html: $(HTMLDIR)/vkspec.html $(TOPDOC) $(COMMONDOCS) $(WEBIMAGES) + +$(HTMLDIR)/vkspec.html: $(VKCONF) $(SPECVERSION) $(TOPDOC) $(COMMONDOCS) $(WEBIMAGES) + $(QUIET)if test ! -d $(HTMLDIR) ; then $(MKDIR) $(HTMLDIR) ; fi + $(QUIET)$(ASCIIDOC) -b html5 $(ADOCOPTS) -o $(HTMLDIR)/vkspec.html -a svgpdf=$(SVGTYPEHTML) $(TOPDOC) + +xhtml: $(XHTMLDIR)/vkspec.html $(TOPDOC) $(COMMONDOCS) + +$(XHTMLDIR)/vkspec.html: $(VKCONF) $(SPECVERSION) $(TOPDOC) $(COMMONDOCS) + $(QUIET)if test ! -d $(XHTMLDIR) ; then $(MKDIR) $(XHTMLDIR) ; fi + $(QUIET)$(A2X) $(A2XOPTS) -f xhtml $(TOPDOC) \ + --xsl-file=$(XHTMLXSL) \ + -a toc2 -a toclevels=2 --destination-dir=$(XHTMLDIR) \ + -a svgpdf=$(SVGTYPEHTML) + +chunked: $(OUTDIR)/vkspec.chunked/index.html $(TOPDOC) $(COMMONDOCS) + +$(OUTDIR)/vkspec.chunked/index.html: $(VKCONF) $(SPECVERSION) $(TOPDOC) $(COMMONDOCS) + $(QUIET)if test ! -d $(OUTDIR)/chunked ; then $(MKDIR) $(OUTDIR) ; fi + $(QUIET)$(A2X) $(A2XOPTS) -f chunked $(TOPDOC) \ + --xsl-file=$(CHUNKEDXSL) \ + -a toc2 -a toclevels=2 --destination-dir=$(OUTDIR) \ + -a svgpdf=$(SVGTYPEHTML) + +pdf: $(PDFDIR)/vkspec.pdf + +$(PDFDIR)/vkspec.pdf: $(PDFXSL) $(PDFSTY) $(PDFDIR)/vkspec.xml + $(QUIET)$(DBLATEX) -b pdftex $(DBLATEXOPTS) \ + -p "$(DBLATEXPREFIX)/asciidoc-dblatex.xsl" \ + -p $(PDFXSL) -s $(PDFSTY) \ + $(PDFDIR)/vkspec.xml -O $(PDFDIR) + +$(PDFDIR)/vkspec.xml: $(VKCONF) $(SPECVERSION) $(TOPDOC) $(COMMONDOCS) $(PDFDIR) $(PDFFILES) + $(QUIET)$(ASCIIDOC) --backend docbook $(ADOCPDFOPTS) \ + -a a2x-format=pdf -a svgpdf=pdf \ + --out-file $(PDFDIR)/vkspec.xml $(TOPDOC) + +$(PDFDIR): + $(QUIET)if test ! -d $(PDFDIR) ; then $(MKDIR) $(PDFDIR) ; fi + +# Generate Asciidoc attributes for spec version / date +# Could use `git log -1 --format="%cd"` to get branch commit date +# This used to be a dependency in the spec html/chunked/pdf targets, +# but that's likely to lead to merge conflicts. Just regenerate +# when pushing a new spec for review to the sandbox. +# The dependency on HEAD is per the suggestion in +# http://neugierig.org/software/blog/2014/11/binary-revisions.html +GITHEAD := ../../../.git/logs/HEAD +$(SPECVERSION): $(GITHEAD) + $(QUIET)echo ":revnumber: $(SPECREVISION)" > $@ + $(QUIET)echo ":revdate: " `date` >> $@ + $(QUIET)echo ":revremark: $(SPECREMARK) from git branch:" \ + `git symbolic-ref --short HEAD` \ + "commit:" `git log -1 --format="%H"` >> $@ + +styleguide: $(OUTDIR)/styleguide.html + +STYLESRC = style/styleguide.txt +$(OUTDIR)/styleguide.html: $(VKCONF) $(SPECVERSION) $(STYLESRC) + $(QUIET)$(ASCIIDOC) -b html5 $(ADOCOPTS) \ + -o $(OUTDIR)/styleguide.html -a svgpdf=$(SVGTYPEHTML) \ + $(STYLESRC) + +clean: clean_html clean_pdf clean_chunked clean_checks clean_dirt + +clean_html: + $(QUIET)$(RMRF) $(HTMLDIR) $(XHTMLDIR) + $(QUIET)$(RM) $(OUTDIR)/apispec.html + +clean_pdf: + $(QUIET)$(RM) $(PDFDIR)/vkspec.pdf $(PDFDIR)/vkspec.xml $(OUTDIR)/apispec.pdf + +clean_chunked: + $(QUIET)$(RMRF) $(OUTDIR)/vkspec.chunked + +clean_checks: + $(QUIET)$(RMRF) $(CHECKDIR) + +clean_dirt: + $(QUIET)$(RM) $(DIRT) + +# Man page targets for individual pages +MANDIR:=man +-include man/manpages.mak + +# Man page targets for HTML and PDF single-file documents + +manpdf: $(OUTDIR)/apispec.pdf + +manhtml: $(OUTDIR)/apispec.html + +$(OUTDIR)/apispec.pdf: $(CONFFILE) man/apispec.txt $(MANSOURCES) $(PDFXSL) + $(QUIET)if test ! -d $(OUTDIR) ; then $(MKDIR) $(OUTDIR) ; fi + $(QUIET)$(A2X) -f pdf $(A2XDBLATEXOPTS) $(A2XOPTS) --icons man/apispec.txt --destination-dir=$(OUTDIR) + +$(OUTDIR)/apispec.html: $(CONFFILE) man/apispec.txt $(MANSOURCES) $(SVGFILES) + $(QUIET)if test ! -d $(OUTDIR) ; then $(MKDIR) $(OUTDIR) ; fi + $(QUIET)$(ASCIIDOC) $(ADOCOPTS) -d book -b html --out-file=$(OUTDIR)/apispec.html man/apispec.txt + +$(HTMLDIR)/images/%: images/% + $(QUIET)$(MKDIR) $(@D) + $(QUIET)$(CP) $< $@ + +# Automated (though heuristic) checks of consistency in the spec and +# ref page sources + +# Validate includes in spec source vs. includes actually in the tree +# Generates file in $(CHECKDIR) +# $(NOTINSPEC) notInSpec.txt - include files only found in XML, not in spec +# Intermediate files removed after the run +# $(ACTUAL) - include files generated from vk.xml +# $(INSPEC) - include files referenced from the spec (not ref page) source +# Other files which could be generated but are basically useless +# include files only found in the spec source - comm -13 $(ACTUAL) $(INSPEC) +# include files both existing and referenced by the spec - comm -12 $(ACTUAL) $(INSPEC) +INCFILES = $(CHECKDIR)/incfiles +ACTUAL = $(CHECKDIR)/actual +INSPEC = $(CHECKDIR)/inspec +NOTINSPEC = $(CHECKDIR)/notInSpec.txt +checkinc: + $(QUIET)if test ! -d $(CHECKDIR) ; then $(MKDIR) $(CHECKDIR) ; fi + $(QUIET)ls $(INCLUDES) | sort > $(ACTUAL) + $(QUIET)cat $(CHAPTERS) | \ + egrep '^include::\.\./' | tr -d '[]' | \ + sed -e 's#^include::\.\./##g' | sort > $(INCFILES) + $(QUIET)echo "List of API include files repeatedly included in the API specification" > $(NOTINSPEC) + $(QUIET)echo "----------------------------------------------------------------------" >> $(NOTINSPEC) + $(QUIET)uniq -d $(INCFILES) >> $(NOTINSPEC) + $(QUIET)(echo ; echo "List of API include files not referenced in the API specification") >> $(NOTINSPEC) + $(QUIET)echo "-----------------------------------------------------------------" >> $(NOTINSPEC) + $(QUIET)comm -23 $(ACTUAL) $(INCFILES) >> $(NOTINSPEC) + $(QUIET)echo "Include files not found in the spec source are in $(CHECKDIR)/notInSpec.txt" + $(QUIET)$(RM) $(INCFILES) $(ACTUAL) $(INSPEC) + +# Validate link tags in spec and ref page sources against vk.xml +# (represented in vkapi.py, which is autogenerated along with the +# headers and ref page includes). +# Generates files in $(CHECKDIR): +# specErrs.txt - errors & warnings in API spec +# manErrs.txt - errors & warnings in man pages +checklinks: + $(QUIET)if test ! -d $(CHECKDIR) ; then $(MKDIR) $(CHECKDIR) ; fi + $(QUIET)echo "Generating link checks for spec (specErrs.txt) and man pages (manErrs.txt)" + $(QUIET)$(PYTHON) checkLinks.py -follow man/[Vv][Kk]*.txt > $(CHECKDIR)/manErrs.txt + $(QUIET)$(PYTHON) checkLinks.py -follow $(CHAPTERS) > $(CHECKDIR)/specErrs.txt + +# README file with build instructions +README.html: README.txt + $(ASCIIDOC) -b html5 README.txt diff --git a/doc/specs/vulkan/README.html b/doc/specs/vulkan/README.html new file mode 100644 index 00000000..74de192c --- /dev/null +++ b/doc/specs/vulkan/README.html @@ -0,0 +1,1333 @@ + + + + + +Vulkan Specification Build Instructions and Notes + + + + + +
+
+
+
+
+
+
+

Introduction

+
+

This README describes important stuff for getting the Vulkan API +specification and reference pages building properly.

+
+
+
+

Building The Spec

+
+

Assuming you have all the right tools installed (see Software Dependencies below), you should be able to go to +…path-to-git-repo/vulkan/doc/specs/vulkan and:

+
+
+
$ make all
+
+

or equivalently:

+
+
+
$ make xhtml chunked pdf manhtml manpdf manpages manhtmlpages checkinc checklinks
+
+

This should generate a variety of targets under $(OUTDIR) (by default, +../../../out/). The checked-in file $(OUTDIR)/index.html links to them +all, or they can individually be found as follows:

+
    +
  • +

    +API spec: +

    +
      +
    • +

      +Single-file XHTML (from a2x) - $(OUTDIR)/xhtml/vkspec.html +

      +
    • +
    • +

      +Chunked HTML (from a2x) - $(OUTDIR)/vkspec.chunked/index.html +

      +
    • +
    • +

      +PDF (from a2x) - $(OUTDIR)/pdf/vkspec.pdf +

      +
    • +
    +
  • +
  • +

    +Man pages: +

    +
      +
    • +

      +Single-file HTML - $(OUTDIR)/apispec.html +

      +
    • +
    • +

      +File-per-entry-point HTML - $(OUTDIR)/man/html/* +

      +
    • +
    • +

      +File-per-entry-point nroff source - $(OUTDIR)/man/3/* +

      +
    • +
    +
  • +
  • +

    +Validator output: +

    +
      +
    • +

      +List of commands, structs, etc. missing from the API spec - + $(OUTDIR)/checks/notInSpec.txt +

      +
    • +
    • +

      +Validator script output for API spec - $(OUTDIR)/checks/specErrs.txt +

      +
    • +
    • +

      +Validator script output for reference pages - + $(OUTDIR)/checks/manErrs.txt +

      +
    • +
    +
  • +
+

We strongly sugges that once you have the basic build working, you use e.g. +-j 8 (or other appropriate number depending on the number of cores in your +CPU) to parallelize the reference page builds, since there are so many of +them.

+

If your asciidoc installation does not put the stylesheets and xsl files in +the standard /etc/asciidoc/dblatex directory, set the environment variable +DBLATEXPREFIX to the path to that directory (the one containing the +asciidoc-dblatex.xsl and asciidoc-dblatex.sty installed with asciidoc).

+
+

Alternate and Test Builds

+

If you are just testing asciidoc formatting, macros, stylesheets, etc., you +can edit test.txt, which is a stripped-down version of vkspec.txt, +and build an alternate version of the spec with either

+
+
+
$ make TOPDOCHTML=test.txt xhtml
+
+

or the simpler

+
+
+
tmake xhtml
+
+

This example will generate the file $(OUTDIR)/xhtml/test.html . Note that +TOPDOCHTML only applies to the xhtml and chunked targets at present.

+

In addition to the XHTML and PDF targets, there is also a single-file HTML5 +target, html, which generates output directly from asciidoc without going +through Docbook. This is somewhat quicker to generate, but formatting and +section numbers aren’t consistent with the other builds and it is not for +publication - just testing. The html target will generate the file +$(OUTDIR)/html/vkspec.html .

+
+
+

Rebuilding The Generated Images

+

There are some images in the images/ directory which are maintained in one +format but need to be converted to another format for corresponding types of +output. Most are SVG converted to PDF, some are PPT converted to PDF +converted to SVG. SVG and PDF forms are needed for the HTML and PDF output +formats, respectively.

+

These files are not automatically converted by the Makefile. Instead, all +output forms required are checked into images/ . On the rare occasions that +someone changes a source document and needs to regenerate the other forms, +go into images and make in the directory.

+
+
+
+
+

Our Asciidoc Macros

+
+

We use a bunch of custom macros in the reference pages and API spec asciidoc +sources. The validator scripts rely on these macros as part of their sanity +checks, and you should use the macros whenever referring to an API command, +struct, token, or enum name, so the documents are semantically tagged and +more easily verifiable.

+

The supported macros are defined in config/vkspec.conf (for the API spec) +and config/manpages.conf (for the reference pages).

+

Tags used in both the specification and reference pages:

+
    +
  • +

    +flink:vkBlah - the name of an API command. +

    +
  • +
  • +

    +fname:vkBlah - the name of an API command. +

    +
  • +
  • +

    +ftext:anything - the name of something that looks like an API command, but + isn’t (wildcards like ftext:vkCmd*). +

    +
  • +
  • +

    +slink:VkBlah - the name of an API C structure, handle, or scalar type. The + slink:VkBlah.membername syntax is not currently supported. +

    +
  • +
  • +

    +sname:VkBlah - the name of an API C structure, handle, or scalar type. The + notation sname:VkBlah.membername is also allowed where that makes sense + (NOTE: VkBlah.membername is not properly validated at present). +

    +
  • +
  • +

    +stext:anything - the name of something that looks like an API structure, + handle, or scalar type, but isn’t (wildcards like stext:Vk*CreateInfo). +

    +
  • +
  • +

    +elink:VkBlahFlags - the name of an API C "enum" type (bitmask or + enumeration). +

    +
  • +
  • +

    +ename:VK_BLAH - the name of an API enumeration or #define token. +

    +
  • +
  • +

    +etext:anything - the name of something that looks like an API "enum" type, + enumeration or #define token, but isn’t (wildcards or partial token names, + like etext:BC5). +

    +
  • +
  • +

    +pname:param - the name of a command parameter or struct member being + documented +

    +
  • +
  • +

    +basetype:type - the name of a base scalar type, such as basetype:VkBool32. +

    +
  • +
  • +

    +code:varname - the name of a shading language variable +

    +
  • +
+

Tags used only in the specification, at present:

+
    +
  • +

    +can:, cannot:, may:, maynot:, must:, mustnot:, optional:, recommend:, + required:, should:, and shouldnot: - used to tag places in the spec where + these terms are used in accordance with their definitions in section 1.3 + "Terminology". They do not currently do anything but expand to their names + (adding a space for e.g. mustnot: → must not), but may be used to + generate an index or some visual indicator in the future. +

    +
  • +
+

The [efs]link: macros are used for validation, and are also expanded into +xref links to the correspondingly named anchor.

+

The [efsp]name: macros are used for validation, but are not expanded into +links.

+

The [efs]text: macros are not used for validation, and are not expanded into +links.

+

We will eventually tool up the spec and ref pages to the point that anywhere +there’s a type or token referred to, you could click/hover on it in the HTML +view and be taken to the definition of that type/token. That will take some +more plumbing work to tag the stuff in the autogenerated include files, and +do something sensible in the spec (e.g. resolve links to internal +references).

+

In that light, the [fs]name: vs. [fs]link: distinction seems mostly +unneeded. Probably the only time we would not want a tag to be a link to its +definition is when tagging a function name inside its own ref page. So once +the plumbing is done, most of the [fs]name: tags can turn into [fs]link: +tags.

+

The ename: vs. elink: distinction is different since they’re referring to +different namespaces - individual enumerant names vs. "enum" type names - +rather than different ways of presenting the same command or struct name as +for the other tags.

+

Most of these macros deeply need more intuitive names.

+
+
+
+

Our stylesheets

+
+
+ + + +
+
Note
+
Section mostly TBD.
+
+

This branch introduces a Vulkan-specific XHTML CSS stylesheet +in config/vkspec-xhtml.css. Mostly it just clones the default +Asciidoc stylesheet, but adds some new features:

+
+

Marking Changes

+

There is the start of support for marking added, removed, and changed text +in the spec body. Currently this is supported only in the XHTML targets +(xhtml and chunked), and only for paragraphs and spans of words.

+

Added, removed, and changed material is marked with the asciidoc roles +named added, removed, and changed respectively. They can be used to +mark an entire paragraph, as follows:

+
+
+
[role="change"]
+This paragraph shows change markings.
+
+

Or a few words in a sentence, as follows:

+
+
+
This sentence contains [added]#some added words# and [removed]#some
+removed words#.
+
+

The formatting of these roles text depends on the stylesheet. Currently it +all three roles are red text, and the "removed" role is also strike-through +text.

+
+
+

Marking Normative Language

+

There is support for marking normative language in the document. Currently +this is supported only in the XHTML targets (xhtml and chunked).

+

Normative language is marked with the asciidoc role named normative. +It can be used to mark entire paragraphs or spans of words, in the +same fashion as change markings (described above). In addition, the +normative terminology macros, such as must: and may: and cannot:, +always use this role.

+

The formatting of normative language depends on the stylesheet. Currently it +just comes out in purple. There will be some way to turn this on or off at +build time shortly.

+
+
+
+
+

Imbedding Equations

+
+

Equations should be written using the latexmath: inline and block macros. +The contents of the latexmath: blocks should be LaTeX math notation, +surrounded by appropriate delimiters - $$, \[\], \(\), +or \begin{env}/\end{env} math environments such as {equation*} +or {align*}.

+

The asciidoc macros and configuration files, as well as the dblatex +customization layers, have been modified significantly so that LaTeX math is +passed through unmodified to all HTML output forms (using the MathJax engine +for real-time rendering of equations) and to dblatex for PDF output.

+

The following caveats apply:

+
    +
  • +

    +The special characters < > & can currently be used only in + [latexmath] block macros, not in latexmath:[] inline macros. + Instead use \lt for < and \gt for >. & is an alignment construct for + multiline equations, and should only appear in block macros anyway. +

    +
  • +
  • +

    +AMSmath environments (e.g. \begin{equation*}, {align*}, + etc.) can be used, to the extent MathJax supports them. +

    +
  • +
  • +

    +When using AMSmath environments, do not also surround the equation block + with \[\] brackets. That is not legal LaTeX math and will break the + PDF build. It is good practice to make sure all spec targets build + properly before proposing a merge to master. +

    +
  • +
  • +

    +Arbitrary LaTeX constructs cannot be used with MathJax. It is an equation + renderer, not an full LaTeX engine. So imbedding stuff like \Large or + \hbox{\tt\small VK\_FOO} does not work in any of the HTML backends + and should be avoided. +

    +
  • +
+
+
+
+

Asciidoc Anchors And Xrefs

+
+

In the API spec, sections can have anchors (labels) applied with the +following syntax. In general the anchor should immediately precede the +chapter or section title and should use the form +[[chapter-section-label]]. For example,

+

For example, in chapter synchronization.txt:

+ +Synchronization Primitives +

Cross-references to those anchors can then be generated with, for example,

+See the <> section for discussion +of fences, semaphores, and events. +

You can also add anchors on arbitrary paragraphs, using a similar naming +scheme.

+

Anything whose definition comes from one of the autogenerated API include +files ({protos,flags,enums,structs}/*.txt) has a corresponding anchor whose +name is the name of the function, struct, etc. being defined. Therefore you +can say something like:

+
+
+
Fences are used with the +++<<vkQueueSubmit>>+++ command...
+
+
+
+
+

Software Dependencies

+
+

This section describes the software components used by the Vulkan spec +toolchain. under the General Dependencies below, then +describes specific considerations for Windows environments using Cygin under +Cygwin Dependencies

+
+

General Dependencies

+

These are versions of required tools in Jon’s development environment +(Debian 8, shown as Debian package names). Earlier versions may work but +unless they are verified by someone else, there’s no way to know that. Later +versions should work.

+
    +
  • +

    +GNU make (make version: 4.0.8-1; older versions probably OK) +

    +
  • +
  • +

    +Asciidoc / a2x (asciidoc version: 8.6.9-3) +

    +
  • +
  • +

    +Python 3 (python, version: 3.4.2) +

    +
  • +
  • +

    +Python LXML library (python-lxml, version: 3.4.0-1) +

    +
  • +
  • +

    +Git command-line client (git, version: 2.1.4) + Only needed if regenerating specversion.txt. Any version supporting the + operations git symbolic-ref --short HEAD and git log -1 + --format="%H" should work). +

    +
  • +
  • +

    +Docbook LaTeX toolchain (dblatex, version: 0.3.5-2) +

    +
  • +
  • +

    +Source code highlighter (source-highlight, version: 3.1.7-1+b1) +

    +
  • +
  • +

    +LaTeX distribution (texlive, version: 2014.20141024-2) +

    +
  • +
+
+
+

Cygwin Dependencies

+

The cygwin installer is at http://www.cygwin.org. Use the 64-bit version, +because the 32-bit version does not include the latest version of asciidoc +required for this project.

+

Required Cygwin packages (current version):

+
    +
  • +

    +Devel/make (4.1-1) +

    +
  • +
  • +

    +Python/python (2.7.10-1) - Needed for asciidoc toolchain +

    +
  • +
  • +

    +Python/python3 (3.4.3-1) +

    +
  • +
  • +

    +Python/python3-lxml (3.4.4-1) - Needed for generating vulkan.h +

    +
  • +
  • +

    +Text/asciidoc (8.6.8-1) +

    +
  • +
  • +

    +Text/dblatex (0.3.4-1) +

    +
  • +
  • +

    +Text/source-highlight (3.1.8-1) +

    +
  • +
+

Optional Cygwin packages (current version):

+
    +
  • +

    +Devel/gcc-core (4.9.3-1) - Needed for validating generated headers +

    +
  • +
  • +

    +Devel/gcc-g++ (4.9.3-1) - Needed for validating generated headers +

    +
  • +
  • +

    +Devel/git (2.5.1-1) - Needed for updating specversion.txt +

    +
  • +
+
+
+
+
+

Revision History

+
+
    +
  • +

    +2015/11/11 - Add new can: etc. macros and DBLATEXPREFIX variable. +

    +
  • +
  • +

    +2015/09/21 - Convert document to asciidoc and rename to README.md + in the hope the gitlab browser will render it in some fashion. +

    +
  • +
  • +

    +2015/09/21 - Add descriptions of LaTeX+MathJax math support for all + output formats. +

    +
  • +
  • +

    +2015/09/02 - Added Cygwin package info +

    +
  • +
  • +

    +2015/09/02 - Initial version documenting macros, required toolchain + components and versions, etc. +

    +
  • +
+
+
+
+

+ + + diff --git a/doc/specs/vulkan/README.md b/doc/specs/vulkan/README.md new file mode 100644 index 00000000..db55133f --- /dev/null +++ b/doc/specs/vulkan/README.md @@ -0,0 +1,3 @@ +See README.html (asciidoc source in README.txt) for instructions and +notes about building the spec. Unfortunately gitlab won't render HTML or +Asciidoc in its web view page, so this README.md is of limited utility. diff --git a/doc/specs/vulkan/README.txt b/doc/specs/vulkan/README.txt new file mode 100644 index 00000000..be40cc07 --- /dev/null +++ b/doc/specs/vulkan/README.txt @@ -0,0 +1,342 @@ += Vulkan Specification Build Instructions and Notes = + +* <> +* <> +* <> +* <> +* <> +* <> +* <> (general and platform-specific) +* <> + +[[intro]] +== Introduction == + +This README describes important stuff for getting the Vulkan API +specification and reference pages building properly. + +[[building]] +== Building The Spec == + +Assuming you have all the right tools installed (see <> below), you should be able to go to +...path-to-git-repo/vulkan/doc/specs/vulkan and: + + $ make all + +or equivalently: + + $ make xhtml chunked pdf manhtml manpdf manpages manhtmlpages checkinc checklinks + +This should generate a variety of targets under $(OUTDIR) (by default, +../../../out/). The checked-in file $(OUTDIR)/index.html links to them +all, or they can individually be found as follows: + +* API spec: +** Single-file XHTML (from a2x) - $(OUTDIR)/xhtml/vkspec.html +** Chunked HTML (from a2x) - $(OUTDIR)/vkspec.chunked/index.html +** PDF (from a2x) - $(OUTDIR)/pdf/vkspec.pdf +* Man pages: +** Single-file HTML - $(OUTDIR)/apispec.html +** File-per-entry-point HTML - $(OUTDIR)/man/html/* +** File-per-entry-point nroff source - $(OUTDIR)/man/3/* +* Validator output: +** List of commands, structs, etc. missing from the API spec - + $(OUTDIR)/checks/notInSpec.txt +** Validator script output for API spec - $(OUTDIR)/checks/specErrs.txt +** Validator script output for reference pages - + $(OUTDIR)/checks/manErrs.txt + +We strongly sugges that once you have the basic build working, you use e.g. +'-j 8' (or other appropriate number depending on the number of cores in your +CPU) to parallelize the reference page builds, since there are so many of +them. + +If your asciidoc installation does not put the stylesheets and xsl files in +the standard /etc/asciidoc/dblatex directory, set the environment variable +DBLATEXPREFIX to the path to that directory (the one containing the +asciidoc-dblatex.xsl and asciidoc-dblatex.sty installed with asciidoc). + +[[building-test]] +=== Alternate and Test Builds === + +If you are just testing asciidoc formatting, macros, stylesheets, etc., you +can edit test.txt, which is a stripped-down version of vkspec.txt, +and build an alternate version of the spec with either + + $ make TOPDOCHTML=test.txt xhtml + +or the simpler + + tmake xhtml + +This example will generate the file $(OUTDIR)/xhtml/test.html . Note that +TOPDOCHTML only applies to the xhtml and chunked targets at present. + +In addition to the XHTML and PDF targets, there is also a single-file HTML5 +target, 'html', which generates output directly from asciidoc without going +through Docbook. This is somewhat quicker to generate, but formatting and +section numbers aren't consistent with the other builds and it is not for +publication - just testing. The 'html' target will generate the file +$(OUTDIR)/html/vkspec.html . + +=== Rebuilding The Generated Images === + +There are some images in the images/ directory which are maintained in one +format but need to be converted to another format for corresponding types of +output. Most are SVG converted to PDF, some are PPT converted to PDF +converted to SVG. SVG and PDF forms are needed for the HTML and PDF output +formats, respectively. + +These files are not automatically converted by the Makefile. Instead, all +output forms required are checked into images/ . On the rare occasions that +someone changes a source document and needs to regenerate the other forms, +go into images and 'make' in the directory. + +[[macros]] +== Our Asciidoc Macros == + +We use a bunch of custom macros in the reference pages and API spec asciidoc +sources. The validator scripts rely on these macros as part of their sanity +checks, and you should use the macros whenever referring to an API command, +struct, token, or enum name, so the documents are semantically tagged and +more easily verifiable. + +The supported macros are defined in config/vkspec.conf (for the API spec) +and config/manpages.conf (for the reference pages). + +Tags used in both the specification and reference pages: + +* flink:vkBlah - the name of an API command. +* fname:vkBlah - the name of an API command. +* ftext:anything - the name of something that looks like an API command, but + isn't (wildcards like ftext:vkCmd*). +* slink:VkBlah - the name of an API C structure, handle, or scalar type. The + slink:VkBlah.membername syntax is *not* currently supported. +* sname:VkBlah - the name of an API C structure, handle, or scalar type. The + notation sname:VkBlah.membername is also allowed where that makes sense + (NOTE: VkBlah.membername is *not* properly validated at present). +* stext:anything - the name of something that looks like an API structure, + handle, or scalar type, but isn't (wildcards like stext:Vk*CreateInfo). +* elink:VkBlahFlags - the name of an API C "enum" type (bitmask or + enumeration). +* ename:VK_BLAH - the name of an API enumeration or #define token. +* etext:anything - the name of something that looks like an API "enum" type, + enumeration or #define token, but isn't (wildcards or partial token names, + like etext:BC5). +* pname:param - the name of a command parameter or struct member being + documented +* basetype:type - the name of a base scalar type, such as basetype:VkBool32. +* code:varname - the name of a shading language variable + +Tags used only in the specification, at present: + +* can:, cannot:, may:, maynot:, must:, mustnot:, optional:, recommend:, + required:, should:, and shouldnot: - used to tag places in the spec where + these terms are used in accordance with their definitions in section 1.3 + "Terminology". They do not currently do anything but expand to their names + (adding a space for e.g. mustnot: -> must not), but may be used to + generate an index or some visual indicator in the future. + +The [efs]link: macros are used for validation, and are also expanded into +xref links to the correspondingly named anchor. + +The [efsp]name: macros are used for validation, but are *not* expanded into +links. + +The [efs]text: macros are not used for validation, and are not expanded into +links. + +We will eventually tool up the spec and ref pages to the point that anywhere +there's a type or token referred to, you could click/hover on it in the HTML +view and be taken to the definition of that type/token. That will take some +more plumbing work to tag the stuff in the autogenerated include files, and +do something sensible in the spec (e.g. resolve links to internal +references). + +In that light, the [fs]name: vs. [fs]link: distinction seems mostly +unneeded. Probably the only time we would not want a tag to be a link to its +definition is when tagging a function name inside its own ref page. So once +the plumbing is done, most of the [fs]name: tags can turn into [fs]link: +tags. + +The ename: vs. elink: distinction is different since they're referring to +different namespaces - individual enumerant names vs. "enum" type names - +rather than different ways of presenting the same command or struct name as +for the other tags. + +Most of these macros deeply need more intuitive names. + +[[styles]] +== Our stylesheets == + +NOTE: Section mostly TBD. + +This branch introduces a Vulkan-specific XHTML CSS stylesheet +in config/vkspec-xhtml.css. Mostly it just clones the default +Asciidoc stylesheet, but adds some new features: + +=== Marking Changes === + +There is the start of support for marking added, removed, and changed text +in the spec body. Currently this is supported *only* in the XHTML targets +('xhtml' and 'chunked'), and *only* for paragraphs and spans of words. + +Added, removed, and changed material is marked with the asciidoc *roles* +named _added_, _removed_, and _changed_ respectively. They can be used to +mark an entire paragraph, as follows: + + [role="change"] + This paragraph shows change markings. + +Or a few words in a sentence, as follows: + + This sentence contains [added]#some added words# and [removed]#some + removed words#. + +The formatting of these roles text depends on the stylesheet. Currently it +all three roles are red text, and the "removed" role is also strike-through +text. + +=== Marking Normative Language === + +There is support for marking normative language in the document. Currently +this is supported *only* in the XHTML targets ('xhtml' and 'chunked'). + +Normative language is marked with the asciidoc *role* named _normative_. +It can be used to mark entire paragraphs or spans of words, in the +same fashion as change markings (described above). In addition, the +normative terminology macros, such as must: and may: and cannot:, +always use this role. + +The formatting of normative language depends on the stylesheet. Currently it +just comes out in purple. There will be some way to turn this on or off at +build time shortly. + +[[equations]] +== Imbedding Equations + +Equations should be written using the latexmath: inline and block macros. +The contents of the latexmath: blocks should be LaTeX math notation, +surrounded by appropriate delimiters - pass:[$$], +++\[\\]+++, pass:[\(\)], +or pass:[\begin{env}/\end{env}] math environments such as pass:[{equation*}] +or pass:[{align*}]. + +The asciidoc macros and configuration files, as well as the dblatex +customization layers, have been modified significantly so that LaTeX math is +passed through unmodified to all HTML output forms (using the MathJax engine +for real-time rendering of equations) and to dblatex for PDF output. + +The following caveats apply: + +* The special characters < > & can currently be used only in + +++[latexmath]+++ block macros, not in +++latexmath:[]+++ inline macros. + Instead use \lt for < and \gt for >. & is an alignment construct for + multiline equations, and should only appear in block macros anyway. +* AMSmath environments (e.g. pass:[\begin{equation*}], pass:[{align*}], + etc.) can be used, to the extent MathJax supports them. +* When using AMSmath environments, do *not* also surround the equation block + with +++\[\\]+++ brackets. That is not legal LaTeX math and will break the + PDF build. It is good practice to make sure all spec targets build + properly before proposing a merge to master. +* Arbitrary LaTeX constructs cannot be used with MathJax. It is an equation + renderer, not an full LaTeX engine. So imbedding stuff like \Large or + pass:[\hbox{\tt\small VK\_FOO}] does not work in any of the HTML backends + and should be avoided. + +[[anchors]] +== Asciidoc Anchors And Xrefs + +In the API spec, sections can have anchors (labels) applied with the +following syntax. In general the anchor should immediately precede the +chapter or section title and should use the form +'+++[[chapter-section-label]]+++'. For example, + +For example, in chapter 'synchronization.txt': + +++++ +[[synchronization-primitives]] +Synchronization Primitives +++++ + +Cross-references to those anchors can then be generated with, for example, + +++++ +See the <> section for discussion +of fences, semaphores, and events. +++++ + +You can also add anchors on arbitrary paragraphs, using a similar naming +scheme. + +Anything whose definition comes from one of the autogenerated API include +files ({protos,flags,enums,structs}/*.txt) has a corresponding anchor whose +name is the name of the function, struct, etc. being defined. Therefore you +can say something like: + + Fences are used with the +++<>+++ command... + +[[depends]] +== Software Dependencies == + +This section describes the software components used by the Vulkan spec +toolchain. under the <> below, then +describes specific considerations for Windows environments using Cygin under +<> + +[[depends-general]] +=== General Dependencies === + +These are versions of required tools in Jon's development environment +(Debian 8, shown as Debian package names). Earlier versions *may* work but +unless they are verified by someone else, there's no way to know that. Later +versions should work. + + - GNU make (make version: 4.0.8-1; older versions probably OK) + - Asciidoc / a2x (asciidoc version: 8.6.9-3) + - Python 3 (python, version: 3.4.2) + - Python LXML library (python-lxml, version: 3.4.0-1) + - Git command-line client (git, version: 2.1.4) + Only needed if regenerating specversion.txt. Any version supporting the + operations 'git symbolic-ref --short HEAD' and 'git log -1 + --format="%H"' should work). + - Docbook LaTeX toolchain (dblatex, version: 0.3.5-2) + - Source code highlighter (source-highlight, version: 3.1.7-1+b1) + - LaTeX distribution (texlive, version: 2014.20141024-2) + +[[depends-cygin]] +=== Cygwin Dependencies === + +The cygwin installer is at http://www.cygwin.org. Use the 64-bit version, +because the 32-bit version does not include the latest version of asciidoc +required for this project. + +Required Cygwin packages (current version): + +* Devel/make (4.1-1) +* Python/python (2.7.10-1) - Needed for asciidoc toolchain +* Python/python3 (3.4.3-1) +* Python/python3-lxml (3.4.4-1) - Needed for generating vulkan.h +* Text/asciidoc (8.6.8-1) +* Text/dblatex (0.3.4-1) +* Text/source-highlight (3.1.8-1) + +Optional Cygwin packages (current version): + +* Devel/gcc-core (4.9.3-1) - Needed for validating generated headers +* Devel/gcc-g++ (4.9.3-1) - Needed for validating generated headers +* Devel/git (2.5.1-1) - Needed for updating specversion.txt + +[[history]] +== Revision History + +* 2015/11/11 - Add new can: etc. macros and DBLATEXPREFIX variable. +* 2015/09/21 - Convert document to asciidoc and rename to README.md + in the hope the gitlab browser will render it in some fashion. +* 2015/09/21 - Add descriptions of LaTeX+MathJax math support for all + output formats. +* 2015/09/02 - Added Cygwin package info +* 2015/09/02 - Initial version documenting macros, required toolchain + components and versions, etc. + + diff --git a/doc/specs/vulkan/appendices/compressedtex.txt b/doc/specs/vulkan/appendices/compressedtex.txt new file mode 100644 index 00000000..bf5ae251 --- /dev/null +++ b/doc/specs/vulkan/appendices/compressedtex.txt @@ -0,0 +1,118 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[appendix] += Compressed Image Formats + +The compressed texture formats used by Vulkan are described in the +specifically identified sections of the <>, version 1.1. + +Unless otherwise described, the quantities encoded in these compressed +formats are treated as normalized, unsigned values. + +<<< + +[[appendix-compressedtex-bc]] +== Block Compressed Image Formats + +Those formats listed as ``sRGB-encoded'' have in-memory representations of +_R_, _G_ and _B_ components which are nonlinearly-encoded as +latexmath:[$R'$], latexmath:[$G'$], and latexmath:[$B'$]; any alpha +component is unchanged. As part of filtering, the nonlinear +latexmath:[$R'$], latexmath:[$G'$], and latexmath:[$B'$] values are +converted to linear _R_, _G_, and _B_ components; any alpha component is +unchanged. The conversion between linear and nonlinear encoding is performed +as described in the ``KHR_DF_TRANSFER_SRGB'' section of the Khronos Data +Format Specification. + +.Mapping of {apiname} BC formats to descriptions +[width="90%",options="header",cols="5,4"] +|============================== +| VkFormat | Data Format Specification description +2+^| Formats described in the ``S3TC Compressed Texture Image Formats'' chapter +| ename:VK_FORMAT_BC1_RGB_UNORM_BLOCK |BC1 with no alpha +| ename:VK_FORMAT_BC1_RGB_SRGB_BLOCK |BC1 with no alpha, sRGB-encoded +| ename:VK_FORMAT_BC1_RGBA_UNORM_BLOCK|BC1 with alpha +| ename:VK_FORMAT_BC1_RGBA_SRGB_BLOCK |BC1 with alpha, sRGB-encoded +| ename:VK_FORMAT_BC2_UNORM_BLOCK |BC2 +| ename:VK_FORMAT_BC2_SRGB_BLOCK |BC2, sRGB-encoded +| ename:VK_FORMAT_BC3_UNORM_BLOCK |BC3 +| ename:VK_FORMAT_BC3_SRGB_BLOCK |BC3, sRGB-encoded +2+^| Formats described in the ``RGTC Compressed Texture Image Formats'' chapter +| ename:VK_FORMAT_BC4_UNORM_BLOCK |BC4 unsigned +| ename:VK_FORMAT_BC4_SNORM_BLOCK |BC4 signed +| ename:VK_FORMAT_BC5_UNORM_BLOCK |BC5 unsigned +| ename:VK_FORMAT_BC5_SNORM_BLOCK |BC5 signed +2+^| Formats described in the ``BPTC Compressed Texture Image Formats'' chapter +| ename:VK_FORMAT_BC6H_UFLOAT_BLOCK |BC6H (unsigned version) +| ename:VK_FORMAT_BC6H_SFLOAT_BLOCK |BC6H (signed version) +| ename:VK_FORMAT_BC7_UNORM_BLOCK |BC7 +| ename:VK_FORMAT_BC7_SRGB_BLOCK |BC7, sRGB-encoded +|============================= + +<<< + +[[appendix-compressedtex-etc2]] +== ETC Compressed Image Formats + +The following formats are described in the ``ETC2 Compressed Texture Image +Formats'' chapter of the Khronos Data Format Specification. + +.Mapping of {apiname} ETC formats to descriptions +[options="header",cols="1,1"] +|============================== +| VkFormat | Data Format Specification description +| ename:VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK |RGB ETC2 +| ename:VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK |RGB ETC2 with sRGB encoding +| ename:VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK |RGB ETC2 with punchthrough alpha +| ename:VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK |RGB ETC2 with punchthrough alpha and sRGB +| ename:VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK |RGBA ETC2 +| ename:VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK |RGBA ETC2 with sRGB encoding +| ename:VK_FORMAT_EAC_R11_UNORM_BLOCK |Unsigned R11 EAC +| ename:VK_FORMAT_EAC_R11_SNORM_BLOCK |Signed R11 EAC +| ename:VK_FORMAT_EAC_R11G11_UNORM_BLOCK |Unsigned RG11 EAC +| ename:VK_FORMAT_EAC_R11G11_SNORM_BLOCK |Signed RG11 EAC +|============================= + +<<< + +[[appendix-compressedtex-astc]] +== ASTC Compressed Image Formats + +ASTC formats are described in the ``ASTC Compressed Texture Image Formats'' +chapter of the Khronos Data Format Specification. + +.Mapping of {apiname} ASTC formats to descriptions +[width="80%",options="header",cols="6,1,1"] +|============================== +| VkFormat ^| Block size ^| sRGB output +| ename:VK_FORMAT_ASTC_4x4_UNORM_BLOCK ^|latexmath:[$4\times 4$] ^|No +| ename:VK_FORMAT_ASTC_4x4_SRGB_BLOCK ^|latexmath:[$4\times 4$] ^|Yes +| ename:VK_FORMAT_ASTC_5x4_UNORM_BLOCK ^|latexmath:[$5\times 4$] ^|No +| ename:VK_FORMAT_ASTC_5x4_SRGB_BLOCK ^|latexmath:[$5\times 4$] ^|Yes +| ename:VK_FORMAT_ASTC_5x5_UNORM_BLOCK ^|latexmath:[$5\times 5$] ^|No +| ename:VK_FORMAT_ASTC_5x5_SRGB_BLOCK ^|latexmath:[$5\times 5$] ^|Yes +| ename:VK_FORMAT_ASTC_6x5_UNORM_BLOCK ^|latexmath:[$6\times 5$] ^|No +| ename:VK_FORMAT_ASTC_6x5_SRGB_BLOCK ^|latexmath:[$6\times 5$] ^|Yes +| ename:VK_FORMAT_ASTC_6x6_UNORM_BLOCK ^|latexmath:[$6\times 6$] ^|No +| ename:VK_FORMAT_ASTC_6x6_SRGB_BLOCK ^|latexmath:[$6\times 6$] ^|Yes +| ename:VK_FORMAT_ASTC_8x5_UNORM_BLOCK ^|latexmath:[$8\times 5$] ^|No +| ename:VK_FORMAT_ASTC_8x5_SRGB_BLOCK ^|latexmath:[$8\times 5$] ^|Yes +| ename:VK_FORMAT_ASTC_8x6_UNORM_BLOCK ^|latexmath:[$8\times 6$] ^|No +| ename:VK_FORMAT_ASTC_8x6_SRGB_BLOCK ^|latexmath:[$8\times 6$] ^|Yes +| ename:VK_FORMAT_ASTC_8x8_UNORM_BLOCK ^|latexmath:[$8\times 8$] ^|No +| ename:VK_FORMAT_ASTC_8x8_SRGB_BLOCK ^|latexmath:[$8\times 8$] ^|Yes +| ename:VK_FORMAT_ASTC_10x5_UNORM_BLOCK ^|latexmath:[$10\times 5$] ^|No +| ename:VK_FORMAT_ASTC_10x5_SRGB_BLOCK ^|latexmath:[$10\times 5$] ^|Yes +| ename:VK_FORMAT_ASTC_10x6_UNORM_BLOCK ^|latexmath:[$10\times 6$] ^|No +| ename:VK_FORMAT_ASTC_10x6_SRGB_BLOCK ^|latexmath:[$10\times 6$] ^|Yes +| ename:VK_FORMAT_ASTC_10x8_UNORM_BLOCK ^|latexmath:[$10\times 8$] ^|No +| ename:VK_FORMAT_ASTC_10x8_SRGB_BLOCK ^|latexmath:[$10\times 8$] ^|Yes +| ename:VK_FORMAT_ASTC_10x10_UNORM_BLOCK ^|latexmath:[$10\times 10$] ^|No +| ename:VK_FORMAT_ASTC_10x10_SRGB_BLOCK ^|latexmath:[$10\times 10$] ^|Yes +| ename:VK_FORMAT_ASTC_12x10_UNORM_BLOCK ^|latexmath:[$12\times 10$] ^|No +| ename:VK_FORMAT_ASTC_12x10_SRGB_BLOCK ^|latexmath:[$12\times 10$] ^|Yes +| ename:VK_FORMAT_ASTC_12x12_UNORM_BLOCK ^|latexmath:[$12\times 12$] ^|No +| ename:VK_FORMAT_ASTC_12x12_SRGB_BLOCK ^|latexmath:[$12\times 12$] ^|Yes +|============================== diff --git a/doc/specs/vulkan/appendices/credits.txt b/doc/specs/vulkan/appendices/credits.txt new file mode 100644 index 00000000..595eb20d --- /dev/null +++ b/doc/specs/vulkan/appendices/credits.txt @@ -0,0 +1,161 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[appendix] +[[credits]] += Credits + +Vulkan 1.0 is the result of contributions from many people and companies +participating in the Khronos Vulkan Working Group, as well as input from the +Vulkan Advisory Panel. + +Members of the Working Group, including the company that they represented at +the time of their contributions, are listed below. Some specific +contributions made by individuals are listed together with their name. + + * Adam Jackson, Red Hat + * Adam Śmigielski, Mobica + * Alex Bourd, Qualcomm Technologies, Inc. + * Alexander Galazin, ARM + * Allen Hux, Intel + * Alon Or-bach, Samsung Electronics (WSI technical sub-group chair) + * Andrew Cox, Samsung Electronics + * Andrew Garrard, Samsung Electronics (format wrangler) + * Andrew Poole, Samsung Electronics + * Andrew Rafter, Samsung Electronics + * Andrew Richards, Codeplay Software Ltd. + * Andrew Woloszyn, Google + * Antoine Labour, Google + * Aras Pranckevičius, Unity + * Ashwin Kolhe, NVIDIA + * Ben Bowman, Imagination Technologies + * Benj Lipchak + * Bill Hollings, The Brenwill Workshop + * Bill Licea-Kane, Qualcomm Technologies, Inc. + * Brent E. Insko, Intel + * Brian Ellis, Qualcomm Technologies, Inc. + * Cass Everitt, Oculus VR + * Cemil Azizoglu, Canonical + * Chad Versace, Intel + * Chang-Hyo Yu, Samsung Electronics + * Chia-I Wu, LunarG + * Chris Frascati, Qualcomm Technologies, Inc. + * Christophe Riccio, Unity + * Cody Northrop, LunarG + * Courtney Goeltzenleuchter, LunarG + * Damien Leone, NVIDIA + * Dan Baker, Oxide Games + * Dan Ginsburg, Valve + * Daniel Johnston, Intel + * Daniel Koch, NVIDIA (<>; + <>) + * Daniel Rakos, AMD + * David Airlie, Red Hat + * David Neto, Google + * David Mao, AMD + * David Yu, Pixar + * Dominik Witczak, AMD + * Frank (LingJun) Chen, Qualcomm Technologies, Inc. + * Fred Liao, Mediatek + * Gabe Dagani, Freescale + * Graeme Leese, Broadcom + * Graham Connor, Imagination Technologies + * Graham Sellers, AMD + * Hwanyong Lee, Kyungpook National University + * Ian Elliott, LunarG + * Ian Romanick, Intel + * James Jones, NVIDIA + * James Hughes, Oculus VR + * Jan Hermes, Continental Corporation + * Jan-Harald Fredriksen, ARM + * Jason Ekstrand, Intel + * Jeff Bolz, NVIDIA (extensive contributions, exhaustive review and + rewrites for technical correctness) + * Jeff Juliano, NVIDIA + * Jeff Vigil, Qualcomm Technologies, Inc. + * Jens Owen, LunarG + * Jeremy Hayes, LunarG + * Jesse Barker, ARM + * Jesse Hall, Google + * Johannes van Waveren, Oculus VR + * John Kessenich, Independent (SPIR-V and GLSL for Vulkan spec author) + * John McDonald, Valve + * Jon Ashburn, LunarG + * Jon Leech, Independent (XML toolchain, normative language, release + wrangler) + * Jonas Gustavsson, Sony Mobile + * Jonathan Hamilton, Imagination Technologies + * Jungwoo Kim, Samsung Electronics + * Kenneth Benzie, Codeplay Software Ltd. + * Kerch Holt, NVIDIA (SPIR-V technical sub-group chair) + * Kristian Kristensen, Intel + * Krzysztof Iwanicki, Samsung Electronics + * Larry Seiler, Intel + * Lutz Latta, Lucasfilm + * Maria Rovatsou, Codeplay Software Ltd. + * Mark Callow + * Mark Lobodzinski, LunarG + * Mateusz Przybylski, Intel + * Mathias Heyer, NVIDIA + * Mathias Schott, NVIDIA + * Maxim Lukyanov, Samsung Electronics + * Maurice Ribble, Qualcomm Technologies, Inc. + * Michael Lentine, Google + * Michael Worcester, Imagination Technologies + * Michal Pietrasiuk, Intel + * Mika Isojarvi, Google + * Mike Stroyan, LunarG + * Minyoung Son, Samsung Electronics + * Mitch Singer, AMD + * Mythri Venugopal, Samsung Electronics + * Naveen Leekha, Google + * Neil Henning, Codeplay Software Ltd. + * Neil Trevett, NVIDIA + * Nick Penwarden, Epic Games + * Niklas Smedberg, Epic Games + * Norbert Nopper, Freescale + * Pat Brown, NVIDIA + * Patrick Doane, Blizzard Entertainment + * Peter Lohrmann, Valve + * Pierre Boudier, NVIDIA + * Pierre-Loup A. Griffais, Valve + * Piers Daniell, NVIDIA (dynamic state, copy commands, memory types) + * Piotr Bialecki, Intel + * Prabindh Sundareson, Samsung Electronics + * Pyry Haulos, Google (Vulkan conformance test subcommittee chair) + * Ray Smith, ARM + * Rob Stepinski, Transgaming + * Robert J. Simpson, Qualcomm Technologies, Inc. + * Rolando Caloca Olivares, Epic Games + * Roy Ju, Mediatek + * Rufus Hamede, Imagination Technologies + * Sean Ellis, ARM + * Sean Harmer, KDAB + * Shannon Woods, Google + * Slawomir Cygan, Intel + * Slawomir Grajewski, Intel + * Stefanus Du Toit, Google + * Steve Hill, Broadcom + * Steve Viggers, Core Avionics & Industrial Inc. + * Stuart Smith, Imagination Technologies + * Tim Foley, Intel + * Timo Suoranta, AMD + * Timothy Lottes, AMD + * Tobias Hector, Imagination Technologies (validity language and + toolchain) + * Tobin Ehlis, LunarG + * Tom Olson, ARM (working group chair) + * Tomasz Kubale, Intel + * Tony Barbour, LunarG + * Wayne Lister, Imagination Technologies + * Yanjun Zhang, Vivante + * Zhenghong Wang, Mediatek + +In addition to the Working Group, the Vulkan Advisory Panel members provided +important real-world usage information and advice that helped guide design +decisions. + +Administrative support to the Working Group was provided by members of Gold +Standard Group, including Andrew Riegel, Elizabeth Riegel, Glenn Fredericks, +Kathleen Mattson and Michelle Clark. Technical support was provided by James +Riordon, webmaster of Khronos.org and OpenGL.org. diff --git a/doc/specs/vulkan/appendices/extensions.txt b/doc/specs/vulkan/appendices/extensions.txt new file mode 100644 index 00000000..89eb723e --- /dev/null +++ b/doc/specs/vulkan/appendices/extensions.txt @@ -0,0 +1,565 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[appendix] += Layers & Extensions + +Extensions to the {apiname} API can: be defined by authors, groups of +authors, and the Khronos {apiname} Working Group. In order not to compromise +the readability of the {apiname} Specification, the core Specification does +not incorporate most extensions. The online registry of extensions is +available at URL + +http://www.khronos.org/registry/vulkan/ + +and allows generating versions of the Specification incorporating different +extensions. + +[NOTE] +.Note +==== +The mechanism and process of specifying extensions is subject to change, as +we receive feedback from authors and further requirements of documentation +tooling. This appendix will be updated as this evolves. +==== + + +== Introduction + +The Khronos extension registries and extension naming conventions serve +several purposes: + + * Avoiding naming collisions between extensions developed by mutually + unaware parties, both in the extension names themselves, as well as + their token, command, and type names. + * Allocating enumerant values for tokens added by extensions + * Creating a defined order between extensions. Extensions with higher + numbers may: have dependencies upon extensions with lower numbers, and + must: define any relevant interactions with lower-numbered extensions. + * Provides a central repository for documentation and header changes + associated with extensions + +{apiname}'s design and general software development trends introduces two +new paradigms that require rethinking the existing mechanisms: + + * Layers, and with them a focus on a more open ecosystem where non-Khronos + members are expected to extend a Khronos API using the Layer mechanism. + * Namespaced constants (enumerations) that don't necessarily draw from a + single global set of token values. + + +== General Rules/Guidelines + +Some general rules to simplify the specific rules below: + + * Extensions and layers must: each have a globally unique name. + * All commands and tokens must: have a globally unique name. + * Extensions can: expose new commands, types, and/or tokens, but layers + mustnot:. + ** However, layers can: expose their own extensions, which in turn are + allowed to expose new commands and tokens. + * All extensions must: be registered with Khronos. + * Extensions must: be strictly additive and backwards-compatible. That is, + extensions mustnot: remove existing functionality, or change existing + default behaviors. A {apiname} implementation may: support any + combination of extensions, but applications written using only the core + API, or a subset of the supported extensions, must: continue to work in + such an implementation without changes in behavior. + +== Extension and Layer Naming Conventions + + * Extensions are named with the syntax: +VK_AUTHOR_+. + * Layers are named with the syntax: +VK_LAYER_{AUTHOR|FQDN}_+. + +Both extensions and layer names include a +VK_+ prefix. In addition, layers +add a +LAYER_+ prefix. Extension and layer names also contain an _author +prefix_ identifying the author of the extension/layer. This prefix is a +short, capitalized, registered string identifying an author, such as a +Khronos member developing {apiname} implementations for their devices, or a +non-Khronos developer creating {apiname} layers. + +Some authors have platform communities they wish to distinguish between, and +can: register additional author prefixes for that purpose. For example, +Google has separate Android and Chrome communities. + +Details on how to register an author prefix are provided below. Layer +authors not wishing to register an author prefix with Khronos can: instead +use a fully-qualified domain name (FQDN) as the prefix. The FQDN should: be +a domain name owned by the author. FQDNs cannot: be used for extensions, +only for layers. + + * The following are examples of extension and layer names, demonstrating + the above syntax: + ** Extension names all use the base prefix +VK_+. + ** Khronos-ratified extensions add the special author prefix +KHR+, and + will use the prefix +VK_KHR_+. + ** The following author prefixes are reserved and mustnot: be used: + *** +VK+ - To avoid confusion with the top-level +VK_+ prefix. + *** +VULKAN+ - To avoid confusion with the name of the {apiname} API. + *** +LAYER+ - To avoid confusion with the higher-level ``LAYER'' prefix. + *** +KHRONOS+ - To avoid confusion with the Khronos organization. + ** Multi-author extensions that have not been ratified by Khronos (those + developed via cooperation between, and intended to be supported by two + or more registered authors) add the special author prefix +EXT+ to the + base prefix, and will use the prefix +VK_EXT_+. + ** Traditional author-specific extensions developed by one author (or one + author in cooperation with non-authors) add the author prefix to the + base prefix. For example, NVIDIA will use the prefix +VK_NV_+, and + Valve will use the prefix +VK_VALVE_+. Some authors can: have + additional registered author prefixes for special purposes. For + example, an Android extension developed by Google - but part of an + Android open-source community project, and so not a proprietary Google + extension - will use the prefix +VK_ANDROID_+. + ** Layer names follow the same conventions as extensions, but use the base + prefix +VK_LAYER_+. + ** Because layers need not be registered with Khronos, an alternative + prefix mechanism is needed to allow creating unique layer names without + registering an author prefix. Layer authors that prefer not to register + an author prefix can: instead use a fully-qualified domain name (FQDN) + in reverse-order as an author prefix, using all lower-case characters, + and replacing +.+ (period) with `_` (underscore) characters. For + example, a layer written by the owner of www.3dxcl.com would use the + prefix `VK_LAYER_com_3dxcl_www_`. FQDNs must: be encoded in UTF-8. + + +== Extension Command, Token, and Type Naming Conventions + +Extensions may: add new commands, tokens, and types, or collectively +``objects'' to the {apiname} API. These objects also require globally unique +names. These names shall conform to the following template: + +["source","{basebackend@docbook:c++:cpp}",title=""] +------------------------------------------------------------------------------ +vk +------------------------------------------------------------------------------ + +Where +ExtensionAuthorPrefix+ is equal to that of the prefixes defined above +for extension names with the exception that a leading `_` (underscore) is +added for non-Khronos extensions. For example, a Khronos-blessed extension +could expose the following command: + +["source","{basebackend@docbook:c++:cpp}",title=""] +------------------------------------------------------------------------------ +void vkDoSomethingKHR(void); +------------------------------------------------------------------------------ + +A Google extension could expose the following command: + +["source","{basebackend@docbook:c++:cpp}",title=""] +------------------------------------------------------------------------------ +void vkDoSomethingGOOGLE(void); +------------------------------------------------------------------------------ + +A multi-author extension could expose the following type: + +["source","{basebackend@docbook:c++:cpp}",title=""] +------------------------------------------------------------------------------ +typedef struct VkSomeDataEXT; +------------------------------------------------------------------------------ + +And a non-Khronos extension could expose this enumerant: + +["source","{basebackend@docbook:c++:cpp}",title=""] +------------------------------------------------------------------------------ +enum VkSomeValuesGRPHX { + VK_SOME_VALUE_0_GRPHX = 0, + VK_SOME_VALUE_1_GRPHX = 1, + VK_SOME_VALUE_2_GRPHX = 2, +}; +------------------------------------------------------------------------------ + + +[[extensions-api-registry]] +== The {apiname} Registry + +The canonical definition of the {apiname} APIs is kept in an XML file known +as the *{apiname} registry*. The registry is kept in +src/spec/vk.xml+ in +the branch of the vulkan project containing the most recently released core +API specification. The registry contains reserved author prefixes, core and +extension interface definitions, definitions of individual commands and +structures, and other information which must be agreed on by all +implementations. The registry is used to maintain a single, consistent +global namespace for the registered entities, to generate the +Khronos-supplied +vulkan.h+, and to create a variety of related +documentation used in generating the API specification and reference pages. + + +[[extensions-author-prefix]] +== Registering an Author Prefix with Khronos + +Previous Khronos APIs could only officially be modified by Khronos members. +In an effort to build a more flexible platform, {apiname} allows non-Khronos +developers to extend and modify the API via layers and extensions in the +same manner as Khronos members. However, extensions must: still be +registered with Khronos. A mechanism for non-members to register layers and +extensions is provided. + +Extension authors will be able to create an account on the Khronos github +project and, using this account, register an author prefix with +Khronos. This string must: be used as the author prefix in any extensions +the author registers. The same account will be used to request registration +of extensions or layers with Khronos, as described below. + +To reserve an author prefix, propose a merge request against +<>. The merge must: add a ++ XML tag +and fill in the +name+, +author+ and +contact+ attributes with the requested +author prefix, the author's formal name (e.g. company or project name), and +contact email address, respectively. The author prefix will be reserved only +once this merge request is accepted. + +Please do not try to reserve author names which clearly belong to another +existing company or software project which may: wish to develop {apiname} +extensions or layers in the future, as a matter of courtesy and respect. +Khronos may: decline to register author names that are not requested in good +faith. + + +[[extensions-vendor-id]] +== Registering a Vendor ID with Khronos + +{apiname} implementers must report a valid vendor ID for their +implementation, as reported by +<>. If +there is no valid PCI vendor ID defined for the physical device, +implementations must: obtain a Khronos vendor ID. + +Khronos vendor IDs are reserved in a similar fashion to +<>. While vendor IDs are not +directly related to API extensions, the reservation process is very similar +and so is described in this section. + +To reserve an Khronos vendor ID, you must first have a Khronos author +prefix. Propose a merge request against +<>. The merge must: add a ++ tag +and fill in the +name+ and +id+ attributes. The +name+ attribute must: be +set to the author prefix. The +id+ attribute must: be the first sequentially +available ID in the list of ++ tags. The vendor ID will be +reserved only once this merge request has been accepted. + +Please do not try to reserve vendor IDs unless you are making a good faith +effort to develop a {apiname} implementation and require one for that +purpose. + + +== Registering Extensions and Layers + +Extensions must: be registered with Khronos. Layers may: be registered, and +registration is strongly recommended. Registration means: + + * Receiving an extension number. + * Adding the extension or layer name to the list in +vk.xml+ and appearing + on the Khronos registry website, which will link to associated + documentation hosted on Khronos. + * For extensions which add to the {apiname} API, including definitions of + those additions to +vk.xml+. + +Registration for Khronos members is handled by filing a merge request in the +internal gitlab repository against the branch containing the core +specification against which the extension or layer will be written. The +merge must: modify +vk.xml+ to define extension names, API interfaces, and +related information. Registration is not complete until the registry +maintainer has validated and accepted the merge. + +Since this process could in principle be completely automated, this +suggests a scalable mechanism for accepting registration of non-Khronos +extensions. Non-Khronos members who want to create extensions must: register +with Khronos by creating a github account, and registering their author +prefix and/or FQDNs to that account. They can: then submit new extension +registration requests by proposing merges to +vk.xml+. On acceptance of the +merge, the extension will be registered, though its specification need not +be checked into the Khronos github repository at that point. + +The registration process can: be split into several steps to accommodate +extension number assignment prior to extension publication: + + * Acquire an extension number. This is done by proposing a merge request + against +vk.xml+ similarly to how <>. The merge should: add a new ++ tag + at the end of the file with attributes specifying the proposed extension + +name+, the next unused sequential extension +number+, the +author+ and + +contact+ information (if different than that already specified for the + author prefix used in the extension name), and finally, specifying + +supported="disabled"+. The extension number will be reserved only once + this merge request is accepted into the master branch. + * Develop and test the extension using the registered extension number. + * Publish the extension to Khronos using the previously registered + extension number, by creating a branch of the repository with + appropriate changes relative to the core {apiname} API branch. + * Mark the extension as enabled, by proposing a merge to master changing + the +supported+ attribute value of the ++ to + +supported="vulkan"+. This should: be completely automated and under the + control of the publishers, to allow them to align publication on Khronos + with product releases. However, complete automation might be difficult, + since steps such as regenerating and validating +vulkan.h+ are involved. + Once the merge is accepted and the corresponding updated header with the + new extension interface is committed to the master branch, publication + is complete. + +The automated process does not exist yet, and would require significant +investment in infrastructure to support the process on the Khronos servers. + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +TODO: This section is subject to change and not complete yet, but in broad +is how we expect extension registration and specifications to work. The +process will be refined as members and outside authors define further +extensions. +==== +endif::editing-notes[] + + +== Documenting Extensions + +Extensions are documented as modifications to the {apiname} specification. +These modifications will be on Git branches that are named with the +following syntax: +-+ + +For example, the VK_KHR_surface extension will be documented relative +to version 1.0 of the {apiname} specification. As such, the branch name will +be: +1.0-VK_KHR_surface+ + +If the extension modifies an existing section of the {apiname} +specification, those modifications are made in-place. Since the changes are +on a branch, the core-only specification can: be easily produced. A +specification with an extension is created by merging in the extension's +branch contents. + +Extensions should: be merged according to their registered extension number. +If two extensions both modify the same portion of the specification, the +higher-numbered extension should: take care to deal with any conflicts. + +The WSI extensions were used to help pioneer what should: be done for +extensions. This includes the following: + + * All extensions should: add to the appendix of the {apiname} + specification. This should: be modeled after what was done for the + +VK_KHR_surface+ extension, which contains some high-level information + about the extension (as well as code examples, and revision history) in + the +appendices/vk_khr_surface.txt+ file. + * Each extension's appendix file is included by adding an +include+ + statement to the +vkspec.txt+ file. Since most extensions will all put + their +include+ line at the same place in this file, they should: add + this statement on the master branch, even though the file won't actually + exist on the master branch. This will avoid merge conflicts when + multiple extensions' branches are merged in order to create the ``full'' + branch specification. + * If there are any other places where 2 or more extensions will extend the + {apiname} specification, it is best to put that content in a file, and + use an +include+ statement to put that content into the spec. Again, + this +include+ line should: be put on the master branch in order to + avoid merge conflicts. + * If an extension is more of an addition to the {apiname} specification, + the extension should: add a chapter to the {apiname} specification. + + +== Assigning Extension Token Values + +Extensions can: define their own enumeration types and assign any values to +their enumerants that they like. Each enumeration has a private namespace, +so collisions are not a problem. However, when extending existing +enumeration object with new values, care must: be taken to preserve global +uniqueness of values. Enumerations which define new bitfields are treated +specially as described in <> below. + +Each extension is assigned a range of values that can: be used to create +globally-unique enum values. Most values will be negative numbers, but +positive numbers are also reserved. The ability to create both positive and +negative extension values is necessary to enable extending enumerations such +as stext:VkResult that assign special meaning to negative and positive +values. Therefore, 1000 positive and 1000 negative values are reserved for +each extension. Extensions must: not define enum values outside their +reserved range without explicit permission from the owner of those values +(e.g. from the author of another extension whose range is infringed on, or +from the Khronos Registrar if the values do not belong to any extension's +range). + +[NOTE] +.Note +==== +Typically, extensions use a unique offset for each enumeration constant they +add, yielding 1000 distinct token values per extension. Since each +enumeration object has its own namespace, if an extension needs to add many +enumeration constant values, it can: reuse offsets on a per-type basis. +==== + +The information needed to add new values to the XML are as follows: + + * The **extension name** (e.g. +VK_KHR_swapchain+) that is adding the new + enumeration constant. + * The existing enumeration **type** being extended (e.g. + stext:VkStructureType). + * The name of the new enumeration **token** being added (e.g. + etext:VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR). + * The **offset**, which is an integer between 0 and 999 relative to the + base being used for the extension. + * The **direction** may: be specified to indicate a negative value + (+dir="-"+) when needed for negative stext:VkResult values indicating + errors, like etext:VK_ERROR_SURFACE_LOST_KHR. The default direction is + positive, if not specified. + +Implicit is the registered number of an extension, which is used to create a +block of unused values offset against a global extension base value. +Individual enumerant values are calculated as offsets in that block. Values +are calculated as follows: + + * base_value = 1000000000 + * block_size = 1000 + * enum_offset(extension_number,offset) = base_value + + (extension_number - 1) × block_size + offset + * Positive values: enum_offset(extension_number,offset) + * Negative values: -enum_offset(extension_number,offset) + +The exact syntax for specifying extension enumerant values is defined in the ++readme.pdf+ specifying the format of +vk.xml+, and extension authors can: +also refer to existing extensions for examples. + + +== Required Extension Tokens + +In addition to any tokens specific to the functionality of an extension, +all extensions must: define two additional tokens. + + * VK_EXTNAME_SPEC_VERSION is an integer constant which is the revision of + the extension named +VK_extname+ (EXTNAME is all upper-case, while + extname is the capitalization of the actual extension name) in + +vulkan.h+. This value begins at 1 with the initial version of an + extension specification, and is incremented when significant changes + (bugfixes or added functionality) are made. Note that the revision of an + extension defined in +vulkan.h+ and the revision supported by the + {apiname} implementation (the pname:specVersion field of the + slink:VkExtensionProperties structure corresponding to the extension and + returned by one of the <>) may: + differ. In such cases, only the functionality and behavior of the + lowest-numbered revision can: be used. + * VK_EXTNAME_EXTENSION_NAME is a string constant which is the name of the + extension. + +For example, for the WSI extension +VK_KHR_surface+, at the time of writing +the following definitions were in effect: + +[source,c] +--------------------------------------------------- +#define VK_KHR_SURFACE_SPEC_VERSION 24 +#define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface" +--------------------------------------------------- + + +== Extension Objects, Enums, and Typedefs + +Expanding on previous discussion, extensions can: add values to existing +enums; and can: add their own objects, enums, typedefs, etc. This is done by +adding to <>. All such additions will be +included in the +vulkan.h+ header supplied by Khronos. + +[NOTE] +.Note +==== +Application developers are encouraged to be careful when using +switch+ +statements with {apiname} API enums. This is because extensions can: add new +values to existing enums. The use of a +default:+ statement, within a ++switch+, may: avoid future compilation issues. +==== + + +[[extension-function_prototypes]] +== Extension Function Prototypes + +Function pointer declarations and function prototypes for all core {apiname} +API functions are included in the +vulkan.h+ file. These come from the +official XML specification of the {apiname} API hosted by Khronos. + +Function pointer declarations are also included in the +vulkan.h+ file for +all extension functions. Function prototypes for extensions may: be included +in +vulkan.h+. Extension functions that are part of the {apiname} ABI must: +be flagged in the XML. Prototypes will be included in +vulkan.h+ for all +extension functions that are part of the {apiname} ABI. + +An extension can: be considered platform specific, in which case, its +objects, functions, etc. are protected by #ifdefs. This is orthogonal to +whether a function is considered to be part of the {apiname} ABI. + +The initial set of WSI extension functions are considered to be part of the +{apiname} ABI. Prototypes for these WSI functions are included in the ++vulkan.h+ provided by Khronos, though the platform-specific portions of ++vulkan.h+ are protected by #ifdefs. + +[NOTE] +.Note +==== +Based on feedback from implementers, Khronos expects that the Android, +Linux, and Windows {apiname} SDKs will include our +vulkan.h+ and export +the supported WSI functions for those platforms from their loader +libraries. Other implementations can: make different choices for their +headers and loader libraries, but are encouraged to be consistent with +these implementations. +==== + + +== Accessing Extension Function from Programs + +The {apiname} API flink:vkGetInstanceProcAddr and flink:vkGetDeviceProcAddr +functions (i.e. GPA functions) can: be used in order to obtain addresses for +core and extension functions (per the description in +<>). Various +{apiname} API loaders can: be created on different platforms, which can: +statically export some or all of the core {apiname} API functions, and which +can: statically export some or all extension functions. If a loader +statically exports a function, an application can: link against that +function without needing to call a GPA function. + +[NOTE] +.Note +==== +As mentioned above, the {apiname} API loader on Android, Linux, and Windows +will export all core {apiname} API and WSI extension functions. The WSI +functions are considered special, because they are required for many +applications. +==== + +[[extensions-reserving-bitfield-values]] +=== Reserving Bitfield Values + +Enumerants which define bitfield values are a special case, since there are +only a small number of unused bits available for extensions. For core Vulkan +API and KHR extension bitfield types, reservations must: be approved by a +vote of the Vulkan Working Group. For EXT and vendor extension bitfield +types, reservations must: be approved by the listed contact of the +extension. Bits are not reserved, and mustnot: be used in a published +implementation or specification until the reservation is merged into +<> by the registry maintainer. + +[NOTE] +.Note +==== +In reality the approving authority for EXT and vendor extension bitfield +additions will probably be the owner of the github branch containing the +specification of that extension; however, until the github process is fully +defined and locked down, it's safest to refer to the listed contact. +==== + + +== Extension Interactions + +Extensions modifying the behavior of existing commands should: provide +additional parameters by using the param:pNext field of an existing +structure, pointing to a new structure defined by the extension, as +described in the <> section. Extension +structures defined by multiple extensions affecting the same structure can +be chained together in this fashion. + +It is in principle possible for extensions to provide additional parameters +through alternate means, such as passing a handle parameter to a structure +with a pname:sType defined by the extension, but this approach is +discouraged and shouldnot: be used. + +When chaining multiple extensions to a structure, the implementation will +process the chain starting with the base parameter and proceeding through +each successive chained structure in turn. Extensions should: be defined to +accept any order of chaining, and must: define their interactions with other +extensions such that the results are deterministic. If an extension needs a +specific ordering of its extension structure with respect to other +extensions in a chain to provide deterministic results, it must: define the +required ordering and expected behavior as part of its specification. diff --git a/doc/specs/vulkan/appendices/glossary.txt b/doc/specs/vulkan/appendices/glossary.txt new file mode 100644 index 00000000..51d63310 --- /dev/null +++ b/doc/specs/vulkan/appendices/glossary.txt @@ -0,0 +1,779 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +// The asciidoc [glossary] template cannot contain subsections. +// The abbreviations and prefixes probably belong in the upcoming +// API/extension-writing-guidelines appendix, anyway. + +[glossary] += Glossary + +The terms defined in this section are used consistently throughout this +Specification and may be used with or without capitalization. + +Accessible (Descriptor Binding):: + A descriptor binding is accessible to a shader stage if that stage is + included in the pname:stageFlags of the descriptor binding. Descriptors + using that binding can: only be used by stages in which they are + accessible. + +Adjacent Vertex:: + A vertex in an adjacency primitive topology that is not part of a given + primitive, but is accessible in geometry shaders. + +Aliased Range (Memory):: + A range of a device memory allocation that is bound to multiple + resources simultaneously. + +API Order:: + A set of ordering rules that govern how primitives in draw commands + affect the framebuffer. + +Attachment (Render Pass):: + A zero-based integer index name used in render pass creation to refer to + a framebuffer attachment that is accessed by one or more subpasses. The + index also refers to an attachment description which includes + information about the properties of the image view that will later be + attached. + +Available:: + See Memory Dependency. + +Back-Facing:: + See Facingness. + +Batch:: + A collection of command buffers that are submitted to a queue, and + corresponding semaphores to wait and signal. Corresponds to an instance + of the slink:VkSubmitInfo structure. + +Backwards Compatibility:: + A given version of the API is backwards compatible with an earlier + version if an application, relying only on valid behavior and + functionality defined by the earlier specification, is able to correctly + run against each version without any modification. This assumes no + active attempt by that application to not run when it detects a + different version. + +Full Compatibility:: + A given version of the API is fully compatible with another version if + an application, relying only on valid behavior and functionality defined + by either of those specifications, is able to correctly run against each + version without any modification. This assumes no active attempt by that + application to not run when it detects a different version. + +Binding (Memory):: + An association established between a range of a resource object and a + range of a memory object. These associations determine the memory + locations affected by operations performed on elements of a resource + object. Memory bindings are established using the + flink:vkBindBufferMemory command for non-sparse buffer objects, using + the flink:vkBindImageMemory command for non-sparse image objects, and + using the flink:vkQueueBindSparse command for sparse resources. + +Blend Constant:: + Four floating point (RGBA) values used as an input to blending. + +Blending:: + Arithmetic operations between a fragment color value and a value in a + color attachment that produce a final color value to be written to the + attachment. + +Buffer:: + A resource that represents a linear array of data in device memory. + Represented by a sname:VkBuffer object. + +Buffer View:: + An object that represents a range of a specific buffer, and state that + controls how the contents are interpreted. Represented by a + sname:VkBufferView object. + +Built-In Variable:: + A variable decorated in a shader, where the decoration makes the + variable take values provided by the execution environment or values + that are generated by fixed-function pipeline stages. + +Built-In Interface Block:: + A block defined in a shader that contains only variables decorated with + built-in decorations, and is used to match against other shader + stages. + +Clip Coordinates:: + The homogeneous coordinate space that vertex positions + (code:Position decoration) are written in by vertex processing stages. + +Clip Distance:: + A built-in output from vertex processing stages that defines a clip + half-space against which the primitive is clipped. + +Clip Volume:: + The intersection of the view volume with all clip half-spaces. + +Color Attachment:: + A subpass attachment point, or image view, that is the target of + fragment color outputs and blending. + +Combined Image Sampler:: + A descriptor type that includes both a sampled image and a sampler. + +Command Buffer:: + An object that records commands to be submitted to a queue. Represented + by a sname:VkCommandBuffer object. + +Command Pool:: + An object that command buffer memory is allocated from, and that owns + that memory. Command pools aid multithreaded performance by enabling + different threads to use different allocators, without internal + synchronization on each use. Represented by a sname:VkCommandPool + object. + +Compatible Allocator:: + When allocators are compatible, allocations from each allocator can: be + freed by the other allocator. + +Compatible Image Formats:: + When formats are compatible, images created with one of the formats can: + have image views created from it using any of the compatible formats. + +Compatible Queues:: + Queues within a queue family. Compatible queues have identical + properties. + +Cull Distance:: + A built-in output from vertex processing stages that defines a cull + half-space where the primitive is rejected if all vertices have a + negative value for the same cull distance. + +Cull Volume:: + The intersection of the view volume with all cull half-spaces. + +Decoration (SPIR-V):: + Auxiliary information such as built-in variables, stream numbers, + invariance, interpolation type, relaxed precision, etc., added to + variables or structure-type members through decorations. + +Depth/Stencil Attachment:: + A subpass attachment point, or image view, that is the target of depth + and/or stencil test operations and writes. + +Depth/Stencil Format:: + A elink:VkFormat that includes depth and/or stencil components. + +Depth/Stencil Image (or ImageView):: + A sname:VkImage (or sname:VkImageView) with a depth/stencil format. + +Descriptor:: + Information about a resource or resource view written into a descriptor + set that is used to access the resource or view from a shader. + +Descriptor Binding:: + An entry in a descriptor set layout corresponding to zero or more + descriptors of a single descriptor type in a set. Defined by a + slink:VkDescriptorSetLayoutBinding structure. + +Descriptor Pool:: + An object that descriptor sets are allocated from, and that owns the + storage of those descriptor sets. Descriptor pools aid multithreaded + performance by enabling different threads to use different allocators, + without internal synchronization on each use. Represented by a + sname:VkDescriptorPool object. + +Descriptor Set:: + An object that resource descriptors are written into via the API, and + that can: be bound to a command buffer such that the descriptors + contained within it can: be accessed from shaders. Represented by a + sname:VkDescriptorSet object. + +Descriptor Set Layout:: + An object that defines the set of resources (types and counts) and their + relative arrangement (in the binding namespace) within a descriptor set. + Used when allocating descriptor sets and when creating pipeline layouts. + Represented by a sname:VkDescriptorSetLayout object. + +Device:: + The processor(s) and execution environment that perform tasks requested + by the application via the Vulkan API. + +Device Memory:: + Memory accessible to the device. Represented by a sname:VkDeviceMemory + object. + +Device-Local Memory:: + Memory that is connected to the device, and may: be more performant for + device access than host-local memory. + +Dispatchable Handle:: + A handle of a pointer handle type which may: be used by layers as part + of intercepting API commands. The first argument to each {apiname} + command is a dispatchable handle type. + +Dispatching Commands:: + Commands that provoke work using a compute pipeline. Includes + flink:vkCmdDispatch and flink:vkCmdDispatchIndirect. + +Drawing Commands:: + Commands that provoke work using a graphics pipeline. Includes + flink:vkCmdDraw, flink:vkCmdDrawIndexed, flink:vkCmdDrawIndirect, and + flink:vkCmdDrawIndexedIndirect. + +Dynamic Storage Buffer:: + A storage buffer whose offset is specified each time the storage buffer + is bound to a command buffer via a descriptor set. + +Dynamic Uniform Buffer:: + A uniform buffer whose offset is specified each time the uniform buffer + is bound to a command buffer via a descriptor set. + +Explicitly-Enabled Layer:: + A layer enabled by the application by adding it to the enabled layer + list in flink:vkCmdCreateInstance or flink:vkCmdCreateDevice. + +Event:: + A synchronization primitive that is signalled when execution of previous + commands complete through a specified set of pipeline stages. Events can + be waited on by the device and polled by the host. Represented by a + sname:VkEvent object. + +Executable State (Command Buffer):: + A command buffer that has ended recording commands and can: be executed. + See also Initial State and Recording State. + +Execution Dependency:: + A dependency that guarantees that certain pipeline stages' work for a + first set of commands has completed execution before certain pipeline + stages' work for a second set of commands begins execution. This is + accomplished via pipeline barriers, subpass dependencies, events, or + implicit ordering operations. + +Execution Dependency Chain:: + A sequence of execution dependencies that transitively act as an + execution dependency. + +External synchronization:: + A type of synchronization required of the application, where parameters + defined to be externally synchronized mustnot: be used simultaneously in + multiple threads. + +Facingness (Polygon):: + A classification of a polygon as either front-facing or back-facing, + depending on the orientation (winding order) of its vertices. + +Fence:: + A synchronization primitive that is signaled when a set of batches or + sparse binding operations complete execution on a queue. Fences can: be + waited on by the host. Represented by a sname:VkFence object. + +Flatshading:: + A property of a vertex attribute that causes the value from a single + vertex (the provoking vertex) to be used for all vertices in a + primitive, and for interpolation of that attribute to return that single + value unaltered. + +Fragment Input Attachment Interface:: + A fragment shader entry point's variables with code:Input storage class + and a decoration of code:InputAttachmentIndex, which receive values from + input attachments. + +Fragment Output Interface:: + A fragment shader entry point's variables with code:Output storage + class, which output to color and/or depth/stencil attachments. + +Framebuffer:: + A collection of image views and a set of dimensions that, in conjunction + with a render pass, define the inputs and outputs used by drawing + commands. Represented by a sname:VkFramebuffer object. + +Framebuffer Attachment:: + One of the image views used in a framebuffer. + +Framebuffer Coordinates:: + A coordinate system in which adjacent pixels' coordinates differ by 1 in + x and/or y, with latexmath:[$(0,0)$] in the upper left corner and pixel + centers at half-integers. + +Front-Facing:: + See Facingness. + +Handle:: + An opaque integer or pointer value used to refer to a {apiname} object. + Each object type has a unique handle type. + +Helper Invocation:: + A fragment shader invocation that is created solely for the purposes of + evaluating derivatives for use in non-helper fragment shader + invocations, and which does not have side effects. + +Host:: + The processor(s) and execution environment that the application runs on, + and that the Vulkan API is exposed on. + +Host Memory:: + Memory not accessible to the device, used to store implementation data + structures. + +Host-Accessible Subresource:: + A buffer, or a linear image subresource in either the + ename:VK_IMAGE_LAYOUT_PREINITIALIZED or ename:VK_IMAGE_LAYOUT_GENERAL + layout. Host-accessible subresources have a well-defined addressing + scheme which can be used by the host. + +Host-Local Memory:: + Memory that is not local to the device, and may: be less performant for + device access than device-local memory. + +Host-Visible Memory:: + Device memory that can: be mapped on the host and can: be read and + written by the host. + +Image:: + A resource that represents a multi-dimensional formatted interpretation + of device memory. Represented by a sname:VkImage object. + +Image Subresource:: + A specific mipmap level and layer of an image. + +Image Subresource Range:: + A set of image subresources that are contiguous mipmap levels and + layers. + +Image View:: + An object that represents a subresource range of a specific image, and + state that controls how the contents are interpreted. Represented by a + sname:VkImageView object. + +Immutable Sampler:: + A sampler descriptor provided at descriptor set layout creation time, + and that is used for that binding in all descriptor sets created from + the layout, and cannot be changed. + +Implicitly-Enabled Layer:: + A layer enabled by a loader-defined mechanism outside the {apiname} API, + rather than explicitly by the application during instance or device + creation. + +Index Buffer:: + A buffer bound via flink:vkCmdBindIndexBuffer which is the source of + index values used to fetch vertex attributes for a + flink:vkCmdDrawIndexed or flink:vkCmdDrawIndexedIndirect command. + +Indirect Commands:: + Drawing or dispatching commands that source some of their parameters + from structures in buffer memory. Includes flink:vkCmdDrawIndirect, + flink:vkCmdDrawIndexedIndirect, and flink:vkCmdDispatchIndirect. + +Initial State (Command Buffer):: + A command buffer that has not begun recording commands. See also + Recorded State and Executable State. + +Input Attachment:: + A descriptor type that represents an image view, and supports unfiltered + read-only access in a shader, only at the fragment's location in the + view. + +Instance:: + The top-level {apiname} object, which represents the application's + connection to the implementation. Represented by a sname:VkInstance + object. + +Internal Synchronization:: + A type of synchronization required of the implementation, where + parameters not defined to be externally synchronized may: require + internal mutexing to avoid multithreaded race conditions. + +Invocation (Shader):: + A single execution of an entry point in a SPIR-V module. For example, a + single vertex's execution of a vertex shader or a single fragment's + execution of a fragment shader. + +Logical Device:: + An object that represents the application's interface to the physical + device. The logical device is the parent of most {apiname} objects. + Represented by a sname:VkDevice object. + +Logical Operation:: + Bitwise operations between a fragment color value and a value in a color + attachment, that produce a final color value to be written to the + attachment. + +Lost Device:: + A state that a logical device may: be in as a result of hardware errors + or other exceptional conditions. + +Mappable:: + See Host-Visible Memory. + +Memory Dependency:: + A sequence of operations that makes writes available, performs an + execution dependency between the writes and subsequent accesses, and + makes available writes visible to later accesses. In order for the + effects of a write to be coherent with later accesses, it must be made + available from the old access type and then made visible to the new + access type. + +Memory Heap:: + A region of memory from which device memory allocations can: be made. + +Memory Type:: + An index used to select a set of memory properties (e.g. mappable, + cached) for a device memory allocation. + +Mip Tail Region:: + The set of mipmap levels of a sparse residency texture that are too + small to fill a block, and that must all be bound to memory collectively + and opaquely. + +Non-Dispatchable Handle:: + A handle of an integer handle type. Handle values maynot: be unique, + even for two objects of the same type. + +Normalized:: + A value that is interpreted as being in the range latexmath:[$[0,1\]$] + as a result of being implicitly divided by some other value. + +Normalized Device Coordinates:: + A coordinate space after perspective division is applied to clip + coordinates, and before the viewport transformation converts to + framebuffer coordinates. + +Overlapped Range (Aliased Range):: + The aliased range of a device memory allocation that intersects a given + subresource of an image or range of a buffer. + +Packed Format:: + A format whose components are stored as a single data element in memory, + with their relative locations defined within that element. + +Physical Device:: + An object that represents a single device in the system. Represented by + a sname:VkPhysicalDevice object. + +Pipeline:: + An object that controls how graphics or compute work is executed on the + device. A pipeline includes one or more shaders, as well as state + controlling any non-programmable stages of the pipeline. Represented by + a sname:VkPipeline object. + +Pipeline Barrier:: + An execution and/or memory dependency recorded as an explicit command in + a command buffer, that forms a dependency between the previous and + subsequent commands. + +Pipeline Cache:: + An object that can: be used to collect and retrieve information from + pipelines as they are created, and can: be populated with previously + retrieved information in order to accelerate pipeline creation. + Represented by a sname:VkPipelineCache object. + +Pipeline Layout:: + An object that defines the set of resources (via a collection of + descriptor set layouts) and push constants used by pipelines that are + created using the layout. Used when creating a pipeline and when binding + descriptor sets and setting push constant values. Represented by a + sname:VkPipelineLayout object. + +Point Sampling (Rasterization):: + A rule that determines whether a fragment sample location is covered by + a polygon primitive by testing whether the sample location is in the + interior of the polygon in framebuffer-space, or on the boundary of the + polygon according to the tie-breaking rules. + +Preserve Attachment:: + One of a list of attachments in a subpass description that is not read + or written by the subpass, but that is read or written on earlier and + later subpasses and whose contents must be preserved through this + subpass. + +Primary Command Buffer:: + A command buffer that can: execute secondary command buffers, and can: + be submitted directly to a queue. + +Primitive Topology:: + State that controls how vertices are assembled into primitives, e.g. as + lists of triangles, strips of lines, etc.. + +Provoking Vertex:: + The vertex in a primitive from which flatshaded attribute values are + taken. This is generally the ``first'' vertex in the primitive, and + depends on the primitive topology. + +Push Constants:: + A small bank of values writable via the API and accessible in shaders. + Push constants allow the application to set values used in shaders + without creating buffers or modifying and binding descriptor sets for + each update. + +Push Constant Interface:: + The set of variables with code:PushConstant storage class that are + statically used by a shader entry point, and which receive values + from push constant commands. + +Query Pool:: + An object that contains a number of query entries and their associated + state and results. Represented by a sname:VkQueryPool object. + +Queue:: + An object that executes command buffers and sparse binding operations on + a device. Represented by a sname:VkQueue object. + +Queue Family:: + A set of queues that have common properties and support the same + functionality, as advertised in slink:VkQueueFamilyProperties. + +Queue Submission:: + An operation that is enqueued for execution on a queue typically as a + result of the issue of commands of the form ftext:vkQueue*. + +Recording State (Command Buffer):: + A command buffer that is ready to record commands. See also Initial + State and Executable State. + +Render Pass:: + An object that represents a set of framebuffer attachments and phases of + rendering using those attachments. Represented by a sname:VkRenderPass + object. + +Render Pass Instance:: + A use of a render pass in a command buffer. + +Reset (Command Buffer):: + Resetting a command buffer discards any previously recorded commands + and puts a command buffer in the initial state. + +Residency Code:: + An integer value returned by sparse image instructions, indicating + whether any sparse unbound texels were accessed. + +Resolve Attachment:: + A subpass attachment point, or image view, that is the target of a + multisample resolve operation from the corresponding color attachment at + the end of the subpass. + +Sampled Image:: + A descriptor type that represents an image view, and supports filtered + (sampled) and unfiltered read-only acccess in a shader. + +Sampler:: + An object that contains state that controls how sampled image data is + sampled (or filtered) when accessed in a shader. Also a descriptor type + describing the object. Represented by a sname:VkSampler object. + +Secondary Command Buffer:: + A command buffer that can: be executed by a primary command buffer, and + mustnot: be submitted directly to a queue. + +Self-Dependency:: + A subpass dependency from a subpass to itself, i.e. with + pname:srcSubpass equal to pname:dstSubpass. A self-dependency is not + automatically performed during a render pass instance, rather a subset + of it can: be performed via flink:vkCmdPipelineBarrier during the + subpass. + +Semaphore:: + A synchronization primitive that supports signal and wait operations, + and can: be used to synchronize operations within a queue or across + queues. Represented by a sname:VkSemaphore object. + +Shader:: + Instructions selected (via an entry point) from a shader module, which + are executed in a shader stage. + +Shader Code:: + A stream of instructions used to describe the operation of a shader. + +Shader Module:: + A collection of shader code, potentially including several functions and + entry points, that is used to create shaders in pipelines. Represented + by a sname:VkShaderModule object. + +Shader Stage:: + A stage of the graphics or compute pipeline that executes shader code. + +Side Effect:: + A store to memory or atomic operation on memory from a shader invocation. + +Sparse Unbound Texel:: + A texel read from a region of a sparse texture that does not have + memory bound to it. + +Static Use:: + An object in a shader is statically used by a shader entry point if any + function in the entry point's call tree contains an instruction using + the object. Static use is used to constrain the set of descriptors used + by a shader entry point. + +Storage Buffer:: + A descriptor type that represents a buffer, and supports reads, writes, + and atomics in a shader. + +Storage Image:: + A descriptor type that represents an image view, and supports unfiltered + loads, stores, and atomics in a shader. + +Storage Texel Buffer:: + A descriptor type that represents a buffer view, and supports + unfiltered, formatted reads, writes, and atomics in a shader. + +Subpass:: + A phase of rendering within a render pass, that reads and writes a + subset of the attachments. + +Subpass Dependency:: + An execution and/or memory dependency between two subpasses described as + part of render pass creation, and automatically performed between + subpasses in a render pass instance. A subpass dependency limits the + overlap of execution of the pair of subpasses, and can: provide + guarantees of memory coherence between accesses in the subpasses. + +Subpass Description:: + Lists of attachment indices for input attachments, color attachments, + depth/stencil attachment, resolve attachments, and preserve attachments + used by the subpass in a render pass. + +Subset (Self-Dependency):: + A subset of a self-dependency is a pipeline barrier performed during the + subpass of the self-dependency, and whose stage masks and access masks + each contain a subset of the bits set in the identically named mask in + the self-dependency. + +Texel Coordinate System:: + One of three coordinate systems (normalized, unnormalized, integer) that + define how texel coordinates are interpreted in an image or a specific + mipmap level of an image. + +Uniform Texel Buffer:: + A descriptor type that represents a buffer view, and supports + unfiltered, formatted, read-only access in a shader. + +Uniform Buffer:: + A descriptor type that represents a buffer, and supports read-only + access in a shader. + +Unnormalized:: + A value that is interpreted according to its conventional + interpretation, and is not normalized. + +User-Defined Variable Interface:: + A shader entry point's variables with code:Input or code:Output storage + class that are not built-in variables. + +Vertex Input Attribute:: + A graphics pipeline resource that produces input values for the vertex + shader by reading data from a vertex input binding and converting it to + the attribute's format. + +Vertex Input Binding:: + A graphics pipeline resource that is bound to a buffer and includes + state that affects addressing calculations within that buffer. + +Vertex Input Interface:: + A vertex shader entry point's variables with code:Input storage class, + which receive values from vertex input attributes. + +Vertex Processing Stages:: + A set of shader stages that comprises the vertex shader, tessellation + control shader, tessellation evaluation shader, and geometry shader + stages. + +View Volume:: + A subspace in homogeneous coordinates, corresponding to post-projection + x and y values between -1 and +1, and z values between 0 and +1. + +Viewport Transformation:: + A transformation from normalized device coordinates to framebuffer + coordinates, based on a viewport rectangle and depth range. + +Visible:: + See Memory Dependency. + +// To be added per issue 18: +// Current State <> +// Barycentric Coordinates <> +// Internal Allocations <> +// Unavailable, Available <> +// Signaled, Unsignaled <> <> +// Interior Vertices <> +// Inner Vertices <> <> +// Isolines <> +// Binding Range <> + + +[glossary] += Common Abbreviations + +Abbreviations and acronyms are sometimes used in the Specification and the +API where they are considered clear and commonplace, and are defined here: + +Src:: + Source + +Dst:: + Destination + +Min:: + Minimum + +Max:: + Maximum + +Rect:: + Rectangle + +Info:: + Information + +LOD:: + Level of Detail + +ID:: + Identifier + +UUID:: + Universally Unique Identifier + +Op:: + Operation + +R:: + Red color component + +G:: + Green color component + +B:: + Blue color component + +A:: + Alpha color component + + +[glossary] += Prefixes + +Prefixes are used in the API to denote specific semantic meaning of +{apiname} names, or as a label to avoid name clashes, and are explained +here: + +VK/Vk/vk:: + Vulkan namespace + + All types, commands, enumerants and defines in this specification are + prefixed with these two characters. + +PFN/pfn:: + Function Pointer + + Denotes that a type is a function pointer, or that a variable is of a + pointer type. + +p:: + Pointer + + Variable is a pointer. + +vkCmd:: + Commands that record commands in command buffers + + These API commands do not result in immediate processing on the device. + Instead, they record the requested action in a command buffer for + execution when the command buffer is submitted to a queue. + +s:: + Structure + + Used to denote the etext:VK_STRUCTURE_TYPE* member of each structure in + pname:sType diff --git a/doc/specs/vulkan/appendices/invariance.txt b/doc/specs/vulkan/appendices/invariance.txt new file mode 100644 index 00000000..fa0839da --- /dev/null +++ b/doc/specs/vulkan/appendices/invariance.txt @@ -0,0 +1,208 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[appendix] += Invariance + +The {apiname} specification is not pixel exact. It therefore does not +guarantee an exact match between images produced by different {apiname} +implementations. However, the specification does specify exact matches, in +some cases, for images produced by the same implementation. The purpose of +this appendix is to identify and provide justification for those cases that +require exact matches. + +== Repeatability + +The obvious and most fundamental case is repeated issuance of a series of +{apiname} commands. For any given {apiname} and framebuffer state vector, +and for any {apiname} command, the resulting {apiname} and framebuffer state +must: be identical whenever the command is executed on that initial +{apiname} and framebuffer state. This repeatability requirement doesn't +apply when using shaders containing side effects (image and buffer variable +stores and atomic operations), because these memory operations are not +guaranteed to be processed in a defined order. + +One purpose of repeatability is avoidance of visual artifacts when a +doublebuffered scene is redrawn. If rendering is not repeatable, swapping +between two buffers rendered with the same command sequence may: result in +visible changes in the image. Such false motion is distracting to the +viewer. Another reason for repeatability is testability. + +Repeatability, while important, is a weak requirement. Given only +repeatability as a requirement, two scenes rendered with one (small) polygon +changed in position might differ at every pixel. Such a difference, while +within the law of repeatability, is certainly not within its spirit. +Additional invariance rules are desirable to ensure useful operation. + + +== Multi-pass Algorithms + +Invariance is necessary for a whole set of useful multi-pass algorithms. +Such algorithms render multiple times, each time with a different {apiname} +mode vector, to eventually produce a result in the framebuffer. Examples of +these algorithms include: + + * ``Erasing'' a primitive from the framebuffer by redrawing it, either in + a different color or using the XOR logical operation. + * Using stencil operations to compute capping planes. + + +== Invariance Rules + +For a given instantiation of an {apiname} rendering context: + +*Rule 1* _For any given {apiname} and framebuffer state vector, and for any +given {apiname} command, the resulting {apiname} and framebuffer state must: +be identical each time the command is executed on that initial {apiname} and +framebuffer state._ + +*Rule 2* _Changes to the following state values have no side effects (the +use of any other state value is not affected by the change):_ + +*Required:* + + * _Framebuffer contents (all bitplanes)_ + * _The color buffers enabled for writing_ + * _Scissor parameters (other than enable)_ + * _Writemasks (color, depth, stencil)_ + * _Clear values (color, depth, stencil)_ + +*Strongly suggested:* + + * _Stencil Parameters (other than enable)_ + * _Depth test parameters (other than enable)_ + * _Blend parameters (other than enable)_ + * _Logical operation parameters (other than enable)_ + * _Pixel storage state_ + +*Corollary 1* _Fragment generation is invariant with respect to the state +values marked with * in Rule 2._ + +*Rule 3* _The arithmetic of each per-fragment operation is invariant except +with respect to parameters that directly control it._ + +*Corollary 2* _Images rendered into different color buffers sharing the same +framebuffer, either simultaneously or separately using the same command +sequence, are pixel identical._ + +*Rule 4* _The same vertex or fragment shader will produce the same result +when run multiple times with the same input. The wording ``the same shader'' +means a program object that is populated with the same SPIR-V binary, which +is used to create pipelines, possibly multiple times, and which program +object is then executed using the same {apiname} state vector. Invariance is +relaxed for shaders with side effects, such as performing stores or +atomics._ + +*Rule 5* _All fragment shaders that either conditionally or unconditionally +assign_ code:FragCoord.z _to_ code:FragDepth _are depth-invariant with +respect to each other, for those fragments where the assignment to_ +code:FragDepth _actually is done._ + +If a sequence of {apiname} commands specifies primitives to be rendered with +shaders containing side effects (image and buffer variable stores and atomic +operations), invariance rules are relaxed. In particular, rule 1, corollary +2, and rule 4 do not apply in the presence of shader side effects. + +The following weaker versions of rules 1 and 4 apply to {apiname} commands +involving shader side effects: + +*Rule 6* _For any given {apiname} and framebuffer state vector, and for any +given {apiname} command, the contents of any framebuffer state not directly +or indirectly affected by results of shader image or buffer variable stores +or atomic operations must: be identical each time the command is executed on +that initial {apiname} and framebuffer state._ + +*Rule 7* _The same vertex or fragment shader will produce the same result +when run multiple times with the same input as long as:_ + + * _shader invocations do not use image atomic operations;_ + * _no framebuffer memory is written to more than once by image stores, + unless all such stores write the same value; and_ + * _no shader invocation, or other operation performed to process the + sequence of commands, reads memory written to by an image store._ + +When any sequence of {apiname} commands triggers shader invocations that +perform image stores or atomic operations, and subsequent {apiname} commands +read the memory written by those shader invocations, these operations must: +be explicitly synchronized. + + +== Tessellation Invariance + +When using a program containing tessellation evaluation shaders, the +fixed-function tessellation primitive generator consumes the input patch +specified by an application and emits a new set of primitives. The following +invariance rules are intended to provide repeatability guarantees. +Additionally, they are intended to allow an application with a carefully +crafted tessellation evaluation shader to ensure that the sets of triangles +generated for two adjacent patches have identical vertices along shared +patch edges, avoiding ``cracks'' caused by minor differences in the +positions of vertices along shared edges. + +*Rule 1* _When processing two patches with identical outer and inner +tessellation levels, the tessellation primitive generator will emit an +identical set of point, line, or triangle primitives as long as the active +program used to process the patch primitives has tessellation evaluation +shaders specifying the same tessellation mode, spacing, vertex order, and +point mode decorations. Two sets of primitives are considered identical if +and only if they contain the same number and type of primitives and the +generated tessellation coordinates for the vertex numbered m of the +primitive numbered n are identical for all values of m and n._ + +*Rule 2* _The set of vertices generated along the outer edge of the +subdivided primitive in triangle and quad tessellation, and the tessellation +coordinates of each, depends only on the corresponding outer tessellation +level and the spacing decorations in the tessellation shaders of the +pipeline._ + +*Rule 3* _The set of vertices generated when subdividing any outer primitive +edge is always symmetric. For triangle tessellation, if the subdivision +generates a vertex with tessellation coordinates of the form (0, x, 1-x), +(x, 0, 1-x), or (x, 1-x, 0), it will also generate a vertex with coordinates +of exactly (0, 1-x, x), (1-x, 0, x), or (1-x, x, 0), respectively. For quad +tessellation, if the subdivision generates a vertex with coordinates of (x, +0) or (0, x), it will also generate a vertex with coordinates of exactly +(1-x, 0) or (0, 1-x), respectively. For isoline tessellation, if it +generates vertices at (0, x) and (1, x) where x is not zero, it will also +generate vertices at exactly (0, 1-x) and (1, 1-x), respectively._ + +*Rule 4* _The set of vertices generated when subdividing outer edges in +triangular and quad tessellation must: be independent of the specific edge +subdivided, given identical outer tessellation levels and spacing. For +example, if vertices at (x, 1 - x, 0) and (1-x, x, 0) are generated when +subdividing the w = 0 edge in triangular tessellation, vertices must: be +generated at (x, 0, 1-x) and (1-x, 0, x) when subdividing an otherwise +identical v = 0 edge. For quad tessellation, if vertices at (x, 0) and +(1-x, 0) are generated when subdividing the v = 0 edge, vertices must: be +generated at (0, x) and (0, 1-x) when subdividing an otherwise identical +u = 0 edge._ + +*Rule 5* _When processing two patches that are identical in all respects +enumerated in rule 1 except for vertex order, the set of triangles generated +for triangle and quad tessellation must: be identical except for vertex and +triangle order. For each triangle n1 produced by processing the first patch, +there must: be a triangle n2 produced when processing the second patch each +of whose vertices has the same tessellation coordinates as one of the +vertices in n1._ + +*Rule 6* _When processing two patches that are identical in all respects +enumerated in rule 1 other than matching outer tessellation levels and/or +vertex order, the set of interior triangles generated for triangle and quad +tessellation must: be identical in all respects except for vertex and +triangle order. For each interior triangle n1 produced by processing the +first patch, there must: be a triangle n2 produced when processing the +second patch each of whose vertices has the same tessellation coordinates as +one of the vertices in n1. A triangle produced by the tessellator is +considered an interior triangle if none of its vertices lie on an outer edge +of the subdivided primitive._ + +*Rule 7* _For quad and triangle tessellation, the set of triangles +connecting an inner and outer edge depends only on the inner and outer +tessellation levels corresponding to that edge and the spacing decorations._ + +*Rule 8* _The value of all defined components of_ code:TessellationCoord +_will be in the range [0, 1]. Additionally, for any defined component x of_ +code:TessellationCoord, _the results of computing 1.0-x in a tessellation +evaluation shader will be exact. If any floating-point values in the range +[0, 1] fail to satisfy this property, such values mustnot: be used as +tessellation coordinate components._ diff --git a/doc/specs/vulkan/appendices/spirvenv.txt b/doc/specs/vulkan/appendices/spirvenv.txt new file mode 100644 index 00000000..d43fdc62 --- /dev/null +++ b/doc/specs/vulkan/appendices/spirvenv.txt @@ -0,0 +1,248 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[appendix] +[[spirvenv]] += {apiname} Environment for SPIR-V + +Shaders for {apiname} are defined by the <> as +well as the <>. +This appendix defines additional SPIR-V requirements applying to {apiname} +shaders. + +== Required Versions and Formats + +A {apiname} 1.0 implementation must: support the 1.0 version of SPIR-V and +the 1.0 version of the SPIR-V Extended Instructions for GLSL. + +A SPIR-V module passed into flink:vkCreateShaderModule is interpreted as +a series of 32-bit words in host endianness, with literal strings packed +as described in section 2.2 of the SPIR-V Specification. The first few words +of the SPIR-V module must: be a magic number and a SPIR-V version number, as +described in section 2.3 of the SPIR-V Specification. + + +[[spirvenv-capabilities]] +== Capabilities + +Implementations must: support the following capability operands declared by +*OpCapability*: + + - Matrix + - Shader + - InputAttachment + - Sampled1D + - Image1D + - SampledBuffer + - ImageBuffer + - ImageQuery + - DerivativeControl + +Implementations may: support features that are not required: by the +Specification, as described in the <> chapter. +If such a feature is supported, then any capability operand(s) corresponding +to that feature must: also be supported. + +[[spirvenv-capabilities-table]] +.SPIR-V Capabilities which are not required:, and corresponding feature names +[options="header"] +|==== +| SPIR-V OpCapability | {apiname} feature name +| *Geometry* | <> +| *Tessellation* | <> +| *Float64* | <> +| *Int64* | <> +| *Int16* | <> +| *TessellationPointSize* | <> +| *GeometryPointSize* | <> +| *ImageGatherExtended* | <> +| *StorageImageMultisample* | <> +| *UniformBufferArrayDynamicIndexing* | <> +| *SampledImageArrayDynamicIndexing* | <> +| *StorageBufferArrayDynamicIndexing* | <> +| *StorageImageArrayDynamicIndexing* | <> +| *ClipDistance* | <> +| *CullDistance* | <> +| *ImageCubeArray* | <> +| *SampleRateShading* | <> +| *SparseResidency* | <> +| *MinLod* | <> +| *SampledCubeArray* | <> +| *ImageMSArray* | <> +| *StorageImageExtendedFormats* | <> +| *InterpolationFunction* | <> +| *StorageImageReadWithoutFormat* | <> +| *StorageImageWriteWithoutFormat* | <> +| *MultiViewport* | <> +|==== + +The application mustnot: pass a SPIR-V module containing any of the +following to flink:vkCreateShaderModule: + + - any OpCapability not listed above, + - an unsupported capability, or + - a capability which corresponds to a {apiname} feature which has not been + enabled. + + +[[spirvenv-module-validation]] +== Validation Rules within a Module + +A SPIR-V module passed to flink:vkCreateShaderModule must: conform to the +following rules: + + * Every entry point must: have no return value and accept no arguments. + * The *Logical* addressing model must: be selected. + * *Scope* for execution must: be limited to: + ** *Workgroup* + ** *Subgroup* + * *Scope* for memory must: be limited to: + ** *Device* + ** *Workgroup* + ** *Invocation* + * The *OriginLowerLeft* execution mode mustnot: be used; fragment entry + points must: declare *OriginUpperLeft*. + * The *PixelCenterInteger* execution mode mustnot: be used. Pixels are + always centered at half-integer coordinates. + * Images + ** *OpTypeImage* must: declare a scalar 32-bit float or 32-bit integer + type for the ``Sampled Type''. (RelaxedPrecision can: be applied to a + sampling instruction and to the variable holding the result of a + sampling instruction.) + ** *OpSampledImage* must: only consume an ``Image'' operand whose type has + its ``Sampled'' operand set to 1. + ** The ``(u, v)'' coordinates used for a *SubpassData* must: be the + of a constant vector (0, 0), or if a layer coordinate is used, must: be + a vector that was formed with constant 0 for the ``u'' and ``v'' + components. + ** The ``Depth'' operand of *OpTypeImage* is ignored. + * Decorations + ** The *GLSLShared* and *GLSLPacked* decorations mustnot: be used. + ** The code:Flat, code:NoPerspective, code:Sample, and code:Centroid + decorations mustnot: be used on variables with storage class other than + code:Input or on variables used in the interface of non-fragment shader + entry points. + ** The code:Patch decoration mustnot: be used on variables in the + interface of a vertex, geometry, or fragment shader stage's entry + point. + - *OpTypeRuntimeArray* must: only be used for the last member of an + *OpTypeStruct* in the *Uniform* storage class. + - Linkage: See <> for additional linking and + validation rules. + + +[[spirvenv-precision-operation]] +== Precision and Operation of SPIR-V Instructions + +The following rules apply to both single and double-precision floating point +instructions: + + - Positive and negative infinities and positive and negative zeros are + generated as dictated by <>, but subject to the precisions + allowed in the following table. + - Dividing a non-zero by a zero results in the appropriately signed <> infinity. + - Any denormalized value input into a shader or potentially generated by + any instruction in a shader may: be flushed to 0. + - The rounding mode cannot: be set and is undefined. + - NaNs maynot: be generated. Instructions that operate on a NaN maynot: + result in a NaN. + - Support for signaling NaNs is optional: and exceptions are never raised. + +The precision of double-precision instructions is at least that of single +precision. For single precision (32 bit) instructions, precisions are +required: to be at least as follows, unless decorated with RelaxedPrecision: + +.Precision of core SPIRV Instructions +[options="header"] +|==== +|Instruction | Precision +|*OpFAdd* | Correctly rounded. +|*OpFSub* | Correctly rounded. +|*OpFMul* | Correctly rounded. +|*OpFOrdEqual*, *OpFUnordEqual* | Correct result. +|*OpFOrdLessThan*, *OpFUnordLessThan* | Correct result. +|*OpFOrdGreaterThan*, *OpFUnordGreaterThan* | Correct result. +|*OpFOrdLessThanEqual*, *OpFUnordLessThanEqual* | Correct result. +|*OpFOrdGreaterThanEqual*, *OpFUnordGreaterThanEqual*| Correct result. +|*OpFDiv* | 2.5 ULP for b in the range [2^-126^, 2^126^]. +|conversions between types | Correctly rounded. +|==== + +Precision of GLSL.std.450 Instructions +[options="header"] +|==== +|Instruction | Precision +|*fma*() | Inherited from *OpFMul* followed by *OpFAdd*. +|*exp*(x), *exp2*(x) | latexmath:[$(3 + 2 \times \|x\|)$] ULP. +|*log*(), *log2*() | 3 ULP outside the range [0.5, 2.0]. Absolute error < 2^-21^ inside the range [0.5, 2.0]. +|*pow*(x, y) | Inherited from *exp2* (y × *log2* (x)). +|*sqrt*() | Inherited from 1.0 / *inversesqrt*(). +|*inversesqrt*() | 2 ULP. +|==== + +GLSL.std.450 extended instructions specifically defined in terms of the +above instructions inherit the above errors. GLSL.std.450 extended +instructions not listed above and not defined in terms of the above have +undefined precision. These include, for example, the trigonometric functions +and determinant. + +For the code:OpSRem and code:OpSMod instructions, if either operand is +negative the result is undefined. + +[NOTE] +.Note +==== +While the code:OpSRem and code:OpSMod instructions are supported by the +{apiname} environment, they require non-negative values and thus do not +enable additional functionality beyond what code:OpUMod provides. +==== + + +[[spirvenv-image-formats]] +Compatibility Between SPIR-V Image Formats And {apiname} Formats +---------------------------------------------------------------- + +[cols="2*", options="header"] +|=== +|SPIR-V Image Format |{apiname} Format +|code:Rgba32f |ename:VK_FORMAT_R32G32B32A32_SFLOAT +|code:Rgba16f |ename:VK_FORMAT_R16G16B16A16_SFLOAT +|code:R32f |ename:VK_FORMAT_R32_SFLOAT +|code:Rgba8 |ename:VK_FORMAT_R8G8B8A8_UNORM +|code:Rgba8Snorm |ename:VK_FORMAT_R8G8B8A8_SNORM +|code:Rg32f |ename:VK_FORMAT_R32G32_SFLOAT +|code:Rg16f |ename:VK_FORMAT_R16G16_SFLOAT +|code:R11fG11fB10f |ename:VK_FORMAT_B10G11R11_UFLOAT_PACK32 +|code:R16f |ename:VK_FORMAT_R16_SFLOAT +|code:Rgba16 |ename:VK_FORMAT_R16G16B16A16_UNORM +|code:Rgb10A2 |ename:VK_FORMAT_A2B10G10R10_UNORM_PACK32 +|code:Rg16 |ename:VK_FORMAT_R16G16_UNORM +|code:Rg8 |ename:VK_FORMAT_R8G8_UNORM +|code:R16 |ename:VK_FORMAT_R16_UNORM +|code:R8 |ename:VK_FORMAT_R8_UNORM +|code:Rgba16Snorm |ename:VK_FORMAT_R16G16B16A16_SNORM +|code:Rg16Snorm |ename:VK_FORMAT_R16G16_SNORM +|code:Rg8Snorm |ename:VK_FORMAT_R8G8_SNORM +|code:R16Snorm |ename:VK_FORMAT_R16_SNORM +|code:R8Snorm |ename:VK_FORMAT_R8_SNORM +|code:Rgba32i |ename:VK_FORMAT_R32G32B32A32_SINT +|code:Rgba16i |ename:VK_FORMAT_R16G16B16A16_SINT +|code:Rgba8i |ename:VK_FORMAT_R8G8B8A8_SINT +|code:R32i |ename:VK_FORMAT_R32_SINT +|code:Rg32i |ename:VK_FORMAT_R32G32_SINT +|code:Rg16i |ename:VK_FORMAT_R16G16_SINT +|code:Rg8i |ename:VK_FORMAT_R8G8_SINT +|code:R16i |ename:VK_FORMAT_R16_SINT +|code:R8i |ename:VK_FORMAT_R8_SINT +|code:Rgba32ui |ename:VK_FORMAT_R32G32B32A32_UINT +|code:Rgba16ui |ename:VK_FORMAT_R16G16B16A16_UINT +|code:Rgba8ui |ename:VK_FORMAT_R8G8B8A8_UINT +|code:R32ui |ename:VK_FORMAT_R32_UINT +|code:Rgb10a2ui |ename:VK_FORMAT_A2B10G10R10_UINT_PACK32 +|code:Rg32ui |ename:VK_FORMAT_R32G32_UINT +|code:Rg16ui |ename:VK_FORMAT_R16G16_UINT +|code:Rg8ui |ename:VK_FORMAT_R8G8_UINT +|code:R16ui |ename:VK_FORMAT_R16_UINT +|code:R8ui |ename:VK_FORMAT_R8_UINT +|=== diff --git a/doc/specs/vulkan/buildRelease b/doc/specs/vulkan/buildRelease new file mode 100755 index 00000000..9d62a8a0 --- /dev/null +++ b/doc/specs/vulkan/buildRelease @@ -0,0 +1,84 @@ +#!/bin/sh +# This script builds a full release package including XHTML and PDF +# versions of both master and wsi_extensions branches. Other files +# in the release directory are removed, including man pages, +# XHTML chunked, HTML, validity output, etc. +# +# Both branches must be fully committed and up to date when the +# script is run, with no outstanding un-added / un-committed +# files. Both branches must have fully regenerated all +# automatically-regeneratable files. +# +# After completing the build, the current branch is set to 'master' +# and suggestions for creating tags are printed out. +# +# Essentially replaced by genRelease + +# Root of the Vulkan git repo +root=/home/tree/git/vulkan + +# Directory with vk.xml and generation tools +xml=$root/src/spec + +# Directory with spec sources +spec=$root/doc/specs/vulkan + +# Branch name for WSI +wsibranch=wsi_extensions + +##################### master Branch ##################### + +echo "**** GENERATING MASTER BRANCH ****" +git checkout master + +echo "**** AUTOGENERATING HEADERS AND SPEC INCLUDE FILES ****" +cd $xml +make clobber +make full_install + +echo "**** CLEANING SPEC ****" +cd $spec +outdir=$root/out +rm -rf $outdir/man $outdir/xhtml $outdir/pdf $outdir/chunked $outdir/vkspec.html +rm specversion.txt + +echo "**** GENERATING SPEC ****" +make specversion.txt +make OUTDIR=$outdir xhtml pdf +rm $outdir/pdf/vkspec.xml +git checkout -- specversion.txt + +##################### wsi_extensions Branch ##################### + +echo "**** GENERATING WSI BRANCH ****" +git checkout $wsibranch + +echo "**** AUTOGENERATING WSI HEADERS AND SPEC INCLUDE FILES ****" +cd $xml +make clobber +make full_install + +echo "**** CLEANING WSI SPEC ****" +cd $spec +outdir=$root/out/wsi +rm -rf $outdir/man $outdir/xhtml $outdir/pdf $outdir/chunked $outdir/vkspec.html +rm specversion.txt + +echo "**** GENERATING WSI SPEC ****" +make specversion.txt +make OUTDIR=$outdir xhtml pdf +rm $outdir/pdf/vkspec.xml +git checkout -- specversion.txt + +##################### Post-generation cleanup ##################### + +git checkout master +echo "*** Spec generaion complete, on master branch" +echo "To tag the spec branches, do the following:" + +date=`date +%Y%m%d` +echo git checkout master +echo git tag -a -m '"Tag core API specification for' $date 'release"' v1.0-core-$date + +echo git checkout $wsibranch +echo git tag -a -m '"Tag core+WSI API specification for' $date 'release"' v1.0-core+wsi-$date diff --git a/doc/specs/vulkan/chapters/clears.txt b/doc/specs/vulkan/chapters/clears.txt new file mode 100644 index 00000000..bbe45def --- /dev/null +++ b/doc/specs/vulkan/chapters/clears.txt @@ -0,0 +1,268 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[clears]] += Clear Commands + + +[[clears-outside]] +== Clearing Images Outside A Render Pass Instance + +Color and depth/stencil images can: be cleared outside a render pass +instance using flink:vkCmdClearColorImage or +flink:vkCmdClearDepthStencilImage, respectively. These commands are only +allowed outside of a render pass instance. + +To clear one or more subranges of a color image, call: + +include::../protos/vkCmdClearColorImage.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:image is the image to be cleared. + * pname:imageLayout specifies the current layout of the image subresource + ranges to be cleared, and must: be ename:VK_IMAGE_LAYOUT_GENERAL or + ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL. + * pname:pColor is a pointer to a slink:VkClearColorValue structure that + contains the values the image subresource ranges will be cleared to (see + <> below). + * pname:rangeCount is the number of subresource range structures in + pname:pRanges. + * pname:pRanges points to an array of slink:VkImageSubresourceRange + structures that describe a range of mipmap levels, array layers, and + aspects to be cleared, as described in <>. The pname:aspectMask of all subresource ranges must: only + include ename:VK_IMAGE_ASPECT_COLOR_BIT. + +Each specified range in pname:pRanges is cleared to the value specified by +pname:pColor. + +include::../validity/protos/vkCmdClearColorImage.txt[] + +To clear one or more subranges of a depth/stencil image, call: + +include::../protos/vkCmdClearDepthStencilImage.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:image is the image to be cleared. + * pname:imageLayout specifies the current layout of the image subresource + ranges to be cleared, and must: be ename:VK_IMAGE_LAYOUT_GENERAL or + ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL. + * pname:pDepthStencil is a pointer to a slink:VkClearDepthStencilValue + structure that contains the values the depth and stencil image + subresource ranges will be cleared to (see <> below). + * pname:rangeCount is the number of subresource range structures in + pname:pRanges. + * pname:pRanges points to an array of slink:VkImageSubresourceRange + structures that describe a range of mipmap levels, array layers, and + aspects to be cleared, as described in <>. The pname:aspectMask of each subresource range in pname:pRanges + can: include ename:VK_IMAGE_ASPECT_DEPTH_BIT if the image format has a + depth component, and ename:VK_IMAGE_ASPECT_STENCIL_BIT if the image + format has a stencil component. pname:pDepthStencil is a pointer to a + sname:VkClearDepthStencilValue structure that contains the values the + image subresource ranges will be cleared to (see <> + below). + +include::../validity/protos/vkCmdClearDepthStencilImage.txt[] + +Clears outside render pass instances are treated as transfer operations for +the purposes of memory barriers. + + +[[clears-inside]] +== Clearing Images Inside A Render Pass Instance + +To clear one or more regions of color and depth/stencil attachments inside a +render pass instance, call: + +include::../protos/vkCmdClearAttachments.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:attachmentCount is the number of entries in the pname:pAttachments + array. + * pname:pAttachments is a pointer to an array of slink:VkClearAttachment + structures defining the attachments to clear and the clear values to + use. + * pname:rectCount is the number of entries in the pname:pRects array. + * pname:pRects points to an array of slink:VkClearRect structures defining + regions within each selected attachment to clear. describe these + regions. + +fname:vkCmdClearAttachments can: clear multiple regions of each attachment +used in the current subpass of a render pass instance. This command must: be +called only inside a render pass instance, and implicitly selects the images +to clear based on the current framebuffer attachments and the command +parameters. + +include::../validity/protos/vkCmdClearAttachments.txt[] + +The sname:VkClearRect struct is defined as follows: + +include::../structs/VkClearRect.txt[] + + * pname:rect is the two-dimensional region to be cleared. + * pname:baseArrayLayer is the first layer to be cleared. + * pname:layerCount is the number of layers to clear. + +The layers latexmath:[$[baseArrayLayer, baseArrayLayer+layerCount)$] +counting from the base layer of the attachment image view are cleared. + +include::../validity/structs/VkClearRect.txt[] + +The sname:VkClearAttachment struct is defined as follows: + +include::../structs/VkClearAttachment.txt[] + + * pname:aspectMask is a mask selecting the color, depth and/or stencil + aspects of the attachment to be cleared. pname:aspectMask can: include + ename:VK_IMAGE_ASPECT_COLOR_BIT for color attachments, + ename:VK_IMAGE_ASPECT_DEPTH_BIT for depth/stencil attachments with a + depth component, and ename:VK_IMAGE_ASPECT_STENCIL_BIT for depth/stencil + attachments with a stencil component. + * pname:colorAttachment is only meaningful if + ename:VK_IMAGE_ASPECT_COLOR_BIT is set in pname:aspectMask, in which + case it is an index to the pname:pColorAttachments array in the + slink:VkSubpassDescription structure of the current subpass which + selects the color attachment to clear. + * pname:clearValue is the color or depth/stencil value to clear the + attachment to, as described in <> below. + +No memory barriers are needed between fname:vkCmdClearAttachments and +preceding or subsequent draw or attachment clear commands in the same +subpass. + +The fname:vkCmdClearAttachments commands is not affected by the bound +pipeline state. + +Attachments can: also be cleared at the beginning of a render pass instance +by setting pname:loadOp (or pname:stencilLoadOp) of +slink:VkAttachmentDescription to ename:VK_ATTACHMENT_LOAD_OP_CLEAR, as +described for flink:vkCreateRenderPass. + +include::../validity/structs/VkClearAttachment.txt[] + + +[[clears-values]] +== Clear Values + +The definition of sname:VkClearColorValue is as follows: + +include::../structs/VkClearColorValue.txt[] + +Color clear values are taken from the sname:VkClearColorValue union based on +the format of the image or attachment. Floating point, unorm, snorm, +uscaled, packed float, and sRGB images use the pname:float32 member, +unsigned integer formats use the pname:uint32 member, and signed integer +formats use the pname:int32 member. Floating point values are automatically +converted to the format of the image, with the clear value being treated as +linear if the image is sRGB. + +Unsigned integer values are converted to the format of the image by casting +to the integer type with fewer bits. Signed integer values are converted to +the format of the image by casting to the smaller type (with negative 32-bit +values mapping to negative values in the smaller type). If the integer clear +value is not representable in the target type (e.g. would overflow in +conversion to that type), the clear value is undefined. + +The four array elements of the clear color map to R, G, B, and A components +of image formats, in order. + +If the image has more than one sample, the same value is written to all +samples for any pixels being cleared. The ftext:vkClear*Image commands do +not support compressed image formats. + +include::../validity/structs/VkClearColorValue.txt[] + +The definition of sname:VkClearDepthStencilValue is as follows: + +include::../structs/VkClearDepthStencilValue.txt[] + + * pname:depth is the clear value for the depth aspect of the depth/stencil + attachment. It is a floating-point value which is automatically + converted to the attachment's format. + * pname:stencil is the clear value for the stencil aspect of the + depth/stencil attachment. It is a 32-bit integer value which is + converted to the attachment's format by taking the appropriate number of + LSBs. + +include::../validity/structs/VkClearDepthStencilValue.txt[] + +Some parts of the API require either color or depth/stencil clear values, +depending on the attachment. For this the sname:VkClearValue union is +defined as follows: + +include::../structs/VkClearValue.txt[] + + * pname:color specifies the color image clear values to use when + clearing a color image or attachment. + * pname:depthStencil specifies the depth and stencil clear values to use + when clearing a depth/stencil image or attachment. + +This union is used to define the initial clear values in the +sname:VkRenderPassBeginInfo structure. + +include::../validity/structs/VkClearValue.txt[] + + +[[clears-filling-buffers]] +== Filling Buffers + +To clear buffer data, call: + +include::../protos/vkCmdFillBuffer.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:dstBuffer is the buffer to be filled. + * pname:dstOffset is the byte offset into the buffer at which to start + filling, and must: be a multiple of 4. + * pname:size is the number of bytes to fill, and must: be either a + multiple of 4, or ename:VK_WHOLE_SIZE to fill the range from + pname:offset to the end of the buffer. + * pname:data is the 4-byte word written repeatedly to the buffer to fill + pname:size bytes of data. The data word is written to memory according + to the host endianness. + +fname:vkCmdFillBuffer is treated as ``transfer'' operation for the purposes +of synchronization barriers. The ename:VK_BUFFER_USAGE_TRANSFER_DST_BIT +must: be specified in pname:usage of sname:VkBufferCreateInfo in order for +the buffer to be compatible with fname:vkCmdFillBuffer. + +include::../validity/protos/vkCmdFillBuffer.txt[] + + +[[clears-updating-buffers]] +== Updating Buffers + +To update buffer data inline in a command buffer, call: + +include::../protos/vkCmdUpdateBuffer.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:dstBuffer is a handle to the buffer to be updated. + * pname:dstOffset is the byte offset into the buffer to start updating, + and must: be a multiple of 4. + * pname:dataSize is the number of bytes to update, and must: be a multiple + of 4. + * pname:pData is a pointer to the source data for the buffer update, and + must: be at least pname:dataSize bytes in size. + +pname:dataSize must: be less than or equal to 65536 bytes. For larger +updates, applications can: use buffer to buffer <>. + +The source data is copied from the user pointer to the command buffer when +the command is called. + +fname:vkCmdUpdateBuffer is only allowed outside of a render pass. This +command is treated as ``transfer'' operation, for the purposes of +synchronization barriers. The ename:VK_BUFFER_USAGE_TRANSFER_DST_BIT must: +be specified in pname:usage of sname:VkBufferCreateInfo in order for the +buffer to be compatible with fname:vkCmdUpdateBuffer. + +include::../validity/protos/vkCmdUpdateBuffer.txt[] + +[[clears-end]] diff --git a/doc/specs/vulkan/chapters/cmdbuffers.txt b/doc/specs/vulkan/chapters/cmdbuffers.txt new file mode 100644 index 00000000..74361a1d --- /dev/null +++ b/doc/specs/vulkan/chapters/cmdbuffers.txt @@ -0,0 +1,521 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[commandbuffers]] += Command Buffers + +Command buffers are objects used to record commands which can: be +subsequently submitted to a device queue for execution. There are two levels +of command buffers - _primary command buffers_, which can: execute secondary +command buffers, and which are submitted to queues, and _secondary command +buffers_, which can: be executed by primary command buffers, and which are +not directly submitted to queues. + +Recorded commands include commands to bind pipelines and descriptor sets to +the command buffer, commands to modify dynamic state, commands to draw (for +graphics rendering), commands to dispatch (for compute), commands to execute +secondary command buffers (for primary command buffers only), commands to +copy buffers and images, and other commands. + +[[commandbuffers-statereset]] +Each command buffer manages state independently of other command buffers. +There is no inheritance of state across primary and secondary command +buffers, or between secondary command buffers. When a command buffer begins +recording, all state in that command buffer is undefined. When secondary +command buffer(s) are recorded to execute on a primary command buffer, the +secondary command buffer inherits no state from the primary command buffer, +and all state of the primary command buffer is undefined after an execute +secondary command buffer command is recorded. There is one exception to this +rule - if the primary command buffer is inside a render pass instance, then +the render pass and subpass state is not disturbed by executing secondary +command buffers. Whenever the state of a command buffer is undefined, the +application must: set all relevant state on the command buffer before any +state dependent commands such as draws and dispatches are recorded, +otherwise the behavior of executing that command buffer is undefined. + +Unless otherwise specified, and without explicit synchronization, the +various commands submitted to a queue via command buffers may: execute in +arbitrary order relative to each other, and/or concurrently. Also, the +memory side-effects of those commands maynot: be directly visible to other +commands without memory barriers. This is true within a command buffer, and +across command buffers submitted to a given queue. See +<>, <> and +<> about synchronization primitives +suitable to guarantee execution order and side-effect visibility between +commands on a given queue. + +Each command buffer is always in one of three states: + + * _Initial state_: Before flink:vkBeginCommandBuffer. Either + flink:vkBeginCommandBuffer has never been called, or the command buffer + has been reset since it last recorded commands. + * _Recording state_: Between flink:vkBeginCommandBuffer and + flink:vkEndCommandBuffer. The command buffer is in a state where it can: + record commands. + * _Executable state_: After flink:vkEndCommandBuffer. The command buffer + is in a state where it has finished recording commands and can: be + executed. + +_Resetting_ a command buffer is an operation that discards any previously +recorded commands and puts a command buffer in the initial state. Resetting +occurs as a result of flink:vkResetCommandBuffer or +flink:vkResetCommandPool, or as part of flink:vkBeginCommandBuffer (which +additionally puts the command buffer in the recording state). + + +[[commandbuffers-pools]] +== Command Pools + +Command pools are opaque objects that command buffer memory is allocated +from, and which allow the implementation to amortize the cost of resource +creation across multiple command buffers. Command pools are +application-synchronized, meaning that a command pool mustnot: be used +concurrently in multiple threads. That includes use via recording commands +on any command buffers allocated from the pool, as well as operations that +allocate, free, and reset command buffers or the pool itself. + +To create a command pool, call: + +include::../protos/vkCreateCommandPool.txt[] + + * pname:device is the logical device that creates the command pool. + * pname:pCreateInfo contains information used to create the command pool. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pCommandPool points to an sname:VkCommandPool handle in which the + created pool is returned. + +include::../validity/protos/vkCreateCommandPool.txt[] + +The sname:VkCommandPoolCreateInfo structure is defined as follows: + +include::../structs/VkCommandPoolCreateInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is a combination of bitfield flags indicating usage behavior + for the pool and command buffers allocated from it. Possible values + include: ++ +-- +include::../enums/VkCommandPoolCreateFlagBits.txt[] + +** ename:VK_COMMAND_POOL_CREATE_TRANSIENT_BIT indicates that command buffers + allocated from the pool will be short-lived, meaning that they will be + reset or freed in a relatively short timeframe. This flag may: be used by + the implementation to control memory allocation behavior within the pool. +** ename:VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT controls whether + command buffers allocated from the pool can: be individually reset. If + this flag is set, individual command buffers allocated from the pool can: + be reset either explicitly, by calling fname:vkResetCommandBuffer, or + implicitly, by calling fname:vkBeginCommandBuffer on an executable + command buffer. If this flag is not set, then fname:vkResetCommandBuffer + and fname:vkBeginCommandBuffer (on an executable command buffer) mustnot: + be called on the command buffers allocated from the pool, and they can: + only be reset in bulk by calling fname:vkResetCommandPool. +-- + * pname:queueFamilyIndex designates a queue family as described in section + <>. All command + buffers created from this command pool must: be submitted on queues + from the same queue family. + +include::../validity/structs/VkCommandPoolCreateInfo.txt[] + +Reset a command pool by calling: + +include::../protos/vkResetCommandPool.txt[] + + * pname:device is the logical device that owns the command pool. + * pname:commandPool is the command pool to reset. + * pname:flags contains additional flags controlling the behavior of the + reset. + +include::../validity/protos/vkResetCommandPool.txt[] + +Resetting a command pool recycles all of the resources from all of the +command buffers allocated from the command pool back to the command pool. +All command buffers that have been allocated from the command pool are put +in the initial state. + +pname:flags is of type elink:VkCommandPoolResetFlags, which is defined as: + +include::../enums/VkCommandPoolResetFlagBits.txt[] + +If pname:flags includes ename:VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT, +resetting a command pool recycles all of the resources from the command pool +back to the system. + +To destroy a command pool, call: + +include::../protos/vkDestroyCommandPool.txt[] + + * pname:device is the logical device that destroys the command pool. + * pname:commandPool is the handle of the command pool to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroyCommandPool.txt[] + +When a pool is destroyed, all command buffers allocated from the pool are +implicitly freed and become invalid. Command buffers allocated from a given +pool do not need to be freed before destroying that command pool. + + +[[commandbuffers-lifetime]] +== Command Buffer Lifetime + +Command buffers are allocated by calling: + +include::../protos/vkAllocateCommandBuffers.txt[] + + * pname:device is the logical device that owns the command pool. + * pname:pAllocateInfo is an instance of the + sname:VkCommandBufferAllocateInfo structure which defines additional + information about creating the pool. + * pname:pCommandBuffers points to an array in which the allocated command + buffers are returned. Each allocated command buffer begins in the + initial state. + +include::../validity/protos/vkAllocateCommandBuffers.txt[] + +The sname:VkCommandBufferAllocateInfo structure is defined as: + +include::../structs/VkCommandBufferAllocateInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:commandPool is the name of the command pool that the command + buffers allocate their memory from. + * pname:level determines whether the command buffers are primary or + secondary command buffers. Possible values include: ++ +include::../enums/VkCommandBufferLevel.txt[] + * pname:commandBufferCount is the number of command buffers to allocate + from the pool. + +include::../validity/structs/VkCommandBufferAllocateInfo.txt[] + +Command buffers are reset by calling: + +include::../protos/vkResetCommandBuffer.txt[] + + * pname:commandBuffer is the command buffer to reset. The command buffer + can: be in any state, and is put in the initial state. + * pname:flags is of type elink:VkCommandBufferResetFlags: ++ +include::../enums/VkCommandBufferResetFlagBits.txt[] ++ +If pname:flags includes ename:VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT, +then most or all memory resources currently owned by the command buffer +should: be returned to the parent command pool. If this flag is not set, +then the command buffer may: hold onto memory resources and reuse them when +recording commands. + +include::../validity/protos/vkResetCommandBuffer.txt[] + +Command buffers are freed by calling: + +include::../protos/vkFreeCommandBuffers.txt[] + + * pname:device is the logical device that owns the command pool. + * pname:commandPool is the handle of the command pool that the command + buffers were allocated from. + * pname:commandBufferCount is the length of the pname:pCommandBuffers + array. + * pname:pCommandBuffers is an array of handles of command buffers to free. + +include::../validity/protos/vkFreeCommandBuffers.txt[] + + +[[commandbuffers-recording]] +== Command Buffer Recording + +To begin recording a command buffer, call: + +include::../protos/vkBeginCommandBuffer.txt[] + + * pname:commandBuffer is the handle of the command buffer which is to be + put in the recording state. + * pname:pBeginInfo is an instance of the sname:VkCommandBufferBeginInfo + structure, which defines additional information about how the command + buffer begins recording. + +include::../validity/protos/vkBeginCommandBuffer.txt[] + +The sname:VkCommandBufferBeginInfo structure is defined as: + +include::../structs/VkCommandBufferBeginInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is a combination of bitfield flags indicating usage behavior + for the command buffer. Possible values include: ++ +-- +include::../enums/VkCommandBufferUsageFlagBits.txt[] + +** ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT indicates that each + recording of the command buffer will only be submitted once, and the + command buffer will be reset and recorded again between each submission. +** ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT indicates that + a secondary command buffer is considered to be entirely inside a render + pass. If this is a primary command buffer, then this bit is ignored. +** Setting ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT allows the + command buffer to be resubmitted to a queue or recorded into a primary + command buffer while it is pending execution. +-- + * pname:pInheritanceInfo is a pointer to a + sname:VkCommandBufferInheritanceInfo structure, which is used if + pname:commandBuffer is a secondary command buffer. If this is a primary + command buffer, then this value is ignored. + +include::../validity/structs/VkCommandBufferBeginInfo.txt[] + +If the command buffer is a secondary command buffer, then the +sname:VkCommandBufferInheritanceInfo structure defines any state that will +be inherited from the primary command buffer: + +include::../structs/VkCommandBufferInheritanceInfo.txt[] + + * pname:renderPass is a sname:VkRenderPass object that must: be + <> with the one that is bound when + the sname:VkCommandBuffer is executed if the command buffer was + allocated with the + ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT set. + * pname:subpass is the index of the subpass within pname:renderPass that + the sname:VkCommandBuffer will be rendering against if it was allocated + with the ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT set. + * pname:framebuffer refers to the sname:VkFramebuffer object that the + sname:VkCommandBuffer will be rendering to if it was allocated with + the ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT set. It can: + be sname:VK_NULL_HANDLE if the framebuffer is not known. ++ +[NOTE] +.Note +==== +Specifying the exact framebuffer that the secondary command buffer will be +executed with may: result in better performance at command buffer execution +time. +==== + * pname:occlusionQueryEnable indicates whether the command buffer can: be + executed while an occlusion query is active in the primary command + buffer. If this is ename:VK_TRUE, then this command buffer can: be + executed whether the primary command buffer has an occlusion query + active or not. If this is ename:VK_FALSE, then the primary command + buffer mustnot: have an occlusion query active. + * pname:queryFlags indicates the query flags that can: be used by an + active occlusion query in the primary command buffer when this secondary + command buffer is executed. If this value includes the + ename:VK_QUERY_CONTROL_PRECISE_BIT bit, then the active query can: + return boolean results or actual sample counts. If this bit is not set, + then the active query mustnot: use the + ename:VK_QUERY_CONTROL_PRECISE_BIT bit. If this is a primary command + buffer, then this value is ignored. + * pname:pipelineStatistics indicates the set of pipeline statistics that + can: be counted by an active query in the primary command buffer when + this secondary command buffer is executed. If this value includes a + given bit, then this command buffer can: be executed whether the primary + command buffer has a pipeline statistics query active that includes this + bit or not. If this value excludes a given bit, then the active pipeline + statistics query mustnot: be from a query pool that counts that + statistic. + +include::../validity/structs/VkCommandBufferInheritanceInfo.txt[] + +A primary command buffer is considered to be pending execution from the time +it is submitted via fname:vkQueueSubmit until that submission completes. + +A secondary command buffer is considered to be pending execution from the +time its execution is recorded into a primary buffer (via +fname:vkCmdExecuteCommands) until the final time that primary buffer's +submission to a queue completes. If, after the primary buffer completes, the +secondary command buffer is recorded to execute on a different primary +buffer, the first primary buffer mustnot: be resubmitted until after it is +reset with flink:vkResetCommandBuffer. + +If ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT is not set on a +secondary command buffer, that command buffer mustnot: be used more than +once in a given primary command buffer. Furthermore, if a secondary command +buffer without ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set is +recorded to execute in a primary command buffer with +ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set, the primary command +buffer mustnot: be pending execution more than once at a time. + +[NOTE] +.Note +==== +On some implementations, not using the +ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT bit enables command +buffers to be patched in-place if needed, rather than creating a copy of the +command buffer. +==== + +If a command buffer is in the executable state and the command buffer was +allocated from a command pool with the +ename:VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT flag set, then +fname:vkBeginCommandBuffer implicitly resets the command buffer, behaving as +if fname:vkResetCommandBuffer had been called with +ename:VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT not set. It then puts +the command buffer in the recording state. + +Once recording starts, an application records a sequence of commands +(ftext:vkCmd*) to set state in the command buffer, draw, dispatch, and other +commands. + +To complete recording of a command buffer, call: + +include::../protos/vkEndCommandBuffer.txt[] + + * pname:commandBuffer is the command buffer to complete recording. The + command buffer must: have been in the recording state, and is moved to + the executable state. + +include::../validity/protos/vkEndCommandBuffer.txt[] + +If there was an error during recording, the application will be notified by +an unsuccessful return code returned by fname:vkEndCommandBuffer. If the +application wishes to further use the command buffer, the command buffer +must: be reset. + +When a command buffer is in the executable state, it can: be submitted to a +queue for execution. + + +[[commandbuffers-submission]] +== Command Buffer Submission + +Command buffers are submitted to a queue by calling: + +include::../protos/vkQueueSubmit.txt[] + + * pname:queue is the handle of the queue that the command buffers will be + submitted to. + * pname:submitCount is the number of elements in the pname:pSubmits array. + * pname:pSubmits is a pointer to an array of slink:VkSubmitInfo structures + which describe the work to submit. All work described by pname:pSubmits + must: be submitted to the queue before the command returns. + * pname:fence is an optional handle to a fence. If pname:fence is not + sname:VK_NULL_HANDLE, the fence is signaled when execution of all + sname:VkSubmitInfo::pname:pCommandBuffers members of pname:pSubmits is + completed. If pname:submitCount is zero but pname:fence is not + sname:VK_NULL_HANDLE, the fence will still be submitted to the queue and + will become signaled when all work previously submitted to the queue has + completed. + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +(Jon) The description of pname:fence here was added from the ref page +because it was missing from the starting point of MR #1048, which is just +about cleaning up the markup of command parameters. It needs to be resolved +with the description far below of pname:fence, as noted by @jbolz, because +they're not very similar and because most of the second description belongs +in validity XML language. +==== +endif::editing-notes[] + +include::../validity/protos/vkQueueSubmit.txt[] + +Each submission of work is represented by a sequence of command buffers, +each preceded by a list of semaphores upon which to wait before beginning +execution of specific stages of commands in the command buffers, and +followed by a second list of semaphores to signal upon completion of the +work contained in the command buffers. + +[NOTE] +.Note +==== +The exact definition of a submission is platform-specific, but is considered +a relatively expensive operation. In general, applications should: attempt +to batch work together into as few calls to fname:vkQueueSubmit as possible. +==== + +Each call to fname:vkQueueSubmit submits zero or more _batches_ of work to +the queue for execution. pname:submitCount is used to specify the number of +batches to submit. Each batch includes zero or more semaphores to wait upon, +and a corresponding set of stages that will wait for the semaphore to be +signalled before executing any work, followed by a number of command buffers +that will be executed, and finally, zero or more semaphores that will be +signaled after command buffer execution completes. Each batch is represented +as an instance of the slink:VkSubmitInfo structure stored in an array, the +address of which is passed in pname:pSubmitInfo. The definition of +sname:VkSubmitInfo is: + +include::../structs/VkSubmitInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:waitSemaphoreCount is the number of semaphores upon which + to wait before executing the command buffers for the batch. + * pname:pWaitSemaphores is a pointer to an array of semaphores upon which + to wait before executing the command buffers in the batch. + * pname:pWaitDstStageMask is a pointer to an array of pipeline stages at + which each corresponding semaphore wait will occur. + * pname:commandBufferCount contains the number of command buffers to + execute in the batch. + * pname:pCommandBuffers is a pointer to an array of command buffers to + execute in the batch. The command buffers submitted in a batch begin + execution in the order they appear in pname:pCommandBuffers, but may: + complete out of order. + * pname:signalSemaphoreCount is the number of semaphores to be + signaled once the commands specified in pname:pCommandBuffers have + completed execution. + * pname:pSignalSemaphores is a pointer to an array of semaphores which + will be signaled when the command buffers for this batch have completed + execution. + +include::../validity/structs/VkSubmitInfo.txt[] + +If pname:fence is provided, it must: be in the unsignaled state (see +<>) and a fence must: only be associated with +a single submission until that submission completes, and the fence is +subsequently reset. When all command buffers in pname:pCommandBuffers have +completed execution, the status of pname:fence is set to signaled, providing +certain <>. + + +[[commandbuffers-submission-progress]] +== Queue Forward Progress + +The application must: ensure that command buffer submissions will be able to +complete without any subsequent operations by the application on any queue. +After any call to fname:vkQueueSubmit, for every queued wait on a semaphore +there must: be a prior signal of that semaphore that won't be consumed by a +different wait on the semaphore. + +Command buffers in the submission can: include flink:vkCmdWaitEvents +commands that wait on events that won't be signaled by earlier commands in +the queue. Such events must: be signaled by the application using +flink:vkSetEvent, and the fname:vkCmdWaitEvents commands that wait upon them +mustnot: be inside a render pass instance. Implementations may: have limits +on how long the command buffer will wait, in order to avoid interfering with +progress of other clients of the device. If the event isn't signaled within +these limits, results are undefined and may: include device loss. + + +[[commandbuffers-secondary]] +== Secondary Command Buffer Execution + +A secondary command buffer mustnot: be directly submitted to a queue. +Instead, secondary command buffers are recorded to execute as part of a +primary command buffer with the command: + +include::../protos/vkCmdExecuteCommands.txt[] + + * pname:commandBuffer is a handle to a primary command buffer that the + secondary command buffers are submitted to, and must: be in the + recording state. + * pname:commandBufferCount is the length of the pname:pCommandBuffers + array. + * pname:pCommandBuffers is an array of secondary command buffer handles, + which are recorded to execute in the primary command buffer in the order + they are listed in the array. + +include::../validity/protos/vkCmdExecuteCommands.txt[] + +Once fname:vkCmdExecuteCommands has been called, any prior executions of the +secondary command buffers specified by pname:pCommandBuffers in any other +primary command buffer become invalidated, unless those secondary command +buffers were recorded with +ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT. diff --git a/doc/specs/vulkan/chapters/copies.txt b/doc/specs/vulkan/chapters/copies.txt new file mode 100644 index 00000000..a896d0f4 --- /dev/null +++ b/doc/specs/vulkan/chapters/copies.txt @@ -0,0 +1,519 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[copies]] += Copy Commands + +An application can: copy buffer and image data using several methods +depending on the type of data transfer. Data can: be copied between buffer +objects with fname:vkCmdCopyBuffer and a portion of an image can: be copied +to another image with fname:vkCmdCopyImage. Image data can: also be +copied to and from buffer memory using fname:vkCmdCopyImageToBuffer and +fname:vkCmdCopyBufferToImage. Image data can: be blitted (with or without +scaling and filtering) with fname:vkCmdBlitImage. Multisampled images can: +be resolved to a non-multisampled image with fname:vkCmdResolveImage. + + +== Common Operation + +Some rules for valid operation are common to all copy commands: + + * Copy commands must: be recorded outside of a render pass instance. + * For non-sparse resources, the union of the source regions in a given + buffer or image must: not overlap the union of the destination regions + in the same buffer or image. + * For sparse resources, the set of bytes used by all the source regions + must: not intersect the set of bytes used by all the destination + regions. + * Copy regions must: be non-empty. + * Regions must: not extend outside the bounds of the buffer or image + level, except that regions of compressed images can: extend as far as + the dimension of the image level rounded up to a complete block. + * Source image subresources must: be in either the + ename:VK_IMAGE_LAYOUT_GENERAL or + ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL layout. Destination image + subresources must: be in either the ename:VK_IMAGE_LAYOUT_GENERAL or + ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL layout. As a consequence, if + an image subresource is used as both source and destination of a copy, + it must: be in the ename:VK_IMAGE_LAYOUT_GENERAL layout. + * Source images must: have been created with the + ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage bit enabled and destination + images must: have been created with the + ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage bit enabled. + * Source buffers must: have been created with the + ename:VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage bit enabled and destination + buffers must: have been created with the + ename:VK_BUFFER_USAGE_TRANSFER_DST_BIT usage bit enabled. + +All copy commands are treated as ``transfer'' operations for the purposes of +synchronization barriers. + + +[[copies-buffers]] +== Copying Data Between Buffers + +To copy data between buffer objects, call: + +include::../protos/vkCmdCopyBuffer.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:srcBuffer is the source buffer. + * pname:dstBuffer is the destination buffer. + * pname:regionCount is the number of regions to copy. + * pname:pRegions is a pointer to an array of slink:VkBufferCopy structures + specifying the regions to copy. + +Each region in pname:pRegions is copied from the source buffer to the same +region of the destination buffer. pname:srcBuffer and pname:dstBuffer can: +be the same buffer or alias the same memory, but the result is undefined if +the copy regions overlap in memory. + +include::../validity/protos/vkCmdCopyBuffer.txt[] + +Each element of pname:pRegions is a structure defined as: + +include::../structs/VkBufferCopy.txt[] + + * pname:srcOffset is the starting offset in bytes from the start of + pname:srcBuffer. + * pname:dstOffset is the starting offset in bytes from the start of + pname:dstBuffer. + * pname:size is the number of bytes to copy. + +include::../validity/structs/VkBufferCopy.txt[] + + +[[copies-images]] +== Copying Data Between Images + +fname:vkCmdCopyImage performs image copies in a similar manner to a host +memcpy. It does not perform general-purpose conversions such as scaling, +resizing, blending, color-space conversion, or format conversions. +Rather, it simply copies raw image data. fname:vkCmdCopyImage can: copy +between images with different formats, provided the formats are compatible +as defined below. + +To copy data between image objects, call: + +include::../protos/vkCmdCopyImage.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:srcImage is the source image. + * pname:srcImageLayout is the current layout of the source image + subresource. + * pname:dstImage is the destination image. + * pname:dstImageLayout is the current layout of the destination image + subresource. + * pname:regionCount is the number of regions to copy. + * pname:pRegions is a pointer to an array of slink:VkImageCopy structures + specifying the regions to copy. + +Each region in pname:pRegions is copied from the source image to the same +region of the destination image. pname:srcImage and pname:dstImage can: be +the same image or alias the same memory. + +include::../validity/protos/vkCmdCopyImage.txt[] + +Each element of pname:pRegions is a structure defined as: + +include::../structs/VkImageCopy.txt[] + + * pname:srcSubresource and pname:dstSubresource are + slink:VkImageSubresourceLayers structures specifying the subresources of + the images used for the source and destination image data, respectively. + * pname:srcOffset and pname:dstOffset select the initial x, y, and z + offsets in texels of the sub-regions of the source and destination image + data. + * pname:extent is the size in texels of the source image to copy in + pname:width, pname:height and pname:depth. 1D images use only pname:x + and pname:width. 2D images use pname:x, pname:y, pname:width and + pname:height. 3D images use pname:x, pname:y, pname:z, pname:width, + pname:height and pname:depth. + +include::../validity/structs/VkImageCopy.txt[] + +The sname:VkImageSubresourceLayers structure is defined as: + +include::../structs/VkImageSubresourceLayers.txt[] + + * pname:aspectMask is a combination of elink:VkImageAspectFlagBits, + selecting the color, depth and/or stencil aspects to be copied. + * pname:mipLevel is the mipmap level to copy from. + * pname:baseArrayLayer and pname:layerCount are the starting layer and + number of layers to copy. + +include::../validity/structs/VkImageSubresourceLayers.txt[] + +Copies are done layer by layer starting with pname:baseArrayLayer member of +pname:srcSubresource for the source and pname:dstSubresource for the +destination. pname:layerCount layers are copied to the destination image. + +[[copies-images-format-compatibility]] +The formats of pname:srcImage and pname:dstImage must: be compatible. +Formats are considered compatible if their texel size in bytes is the same +between both formats. For example, ename:VK_FORMAT_R8G8B8A8_UNORM is +compatible with ename:VK_FORMAT_R32_UINT because because both texels are 4 +bytes in size. Depth/stencil formats must: match exactly. + +fname:vkCmdCopyImage allows copying between size-compatible compressed +and uncompressed internal formats. Formats are size-compatible if the texel +size of the uncompressed format is equal to the block size in bytes of the +compressed format. Such a copy does not perform on-the-fly compression or +decompression. When copying from an uncompressed format to a compressed +format, each texel of uncompressed data becomes a single block of compressed +data. When copying from a compressed format to an uncompressed format, a +block of compressed data becomes a single texel of uncompressed data. Thus, +for example, it is legal to copy between a 128-bit uncompressed format and a +compressed format which uses 8-bit/texel 4x4 blocks, or between a 64-bit +uncompressed format and a compressed format which uses 4-bit/texel 4x4 +blocks. + +When copying between compressed and uncompressed formats the pname:extent +members represent the texel dimensions of the source image and not the +destination. When copying from a compressed image to an uncompressed image +the image texel dimensions written to the uncompressed image will be source +extent divided by the block size. When copying from an uncompressed image to +a compressed image the image texel dimensions written to the compressed +image will be the source extent multiplied by the block size. In both cases +the number of bytes read and the number of bytes written will be identical. + +Copying to or from block-compressed images is typically done in multiples of +the block. For this reason the pname:extent must: be a multiple of the +block dimension. There is one exception to this rule which is required: to +handle compressed images created with dimensions that are not a multiple +of the block dimensions. If the pname:srcImage is compressed and if +pname:extent.width is not a multiple of the block width then +(pname:extent.width + pname:srcOffset.x) must: equal the subresource width, +if pname:extent.height is not a multiple of the block height then +(pname:extent.height + pname:srcOffset.y) must: equal +the subresource height and if pname:extent.depth is not a multiple of the +block depth then (pname:extent.depth + pname:srcOffset.z) must: equal +the subresource depth. Similarily if the pname:dstImage is compressed and +if pname:extent.width is not a multiple of the block width then +(pname:extent.width + pname:dstOffset.x) must: equal the subresource width, +if pname:extent.height is not a multiple of the block height then +(pname:extent.height + pname:dstOffset.y) must: equal +the subresource height and if pname:extent.depth is not a multiple of the +block depth then (pname:extent.depth + pname:dstOffset.z) must: equal +the subresource depth. This allows the last block of the image in each +non-multiple dimension to be included as a source or target of the copy. + +fname:vkCmdCopyImage can: be used to copy image data between multisample +images, but both images must: have the same number of samples. + + +[[copies-buffers-images]] +== Copying Data Between Buffers and Images + +To copy data from a buffer object to an image object, call: + +include::../protos/vkCmdCopyBufferToImage.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:srcBuffer is the source buffer. + * pname:dstImage is the destination image. + * pname:dstImageLayout is the layout of the destination image subresources + for the copy. + * pname:regionCount is the number of regions to copy. + * pname:pRegions is a pointer to an array of slink:VkBufferImageCopy + structures specifying the regions to copy. + +Each region in pname:pRegions is copied from the specified region of the +source buffer to the specified region of the destination image. + +include::../validity/protos/vkCmdCopyBufferToImage.txt[] + +To copy data from an image object to a buffer object, call: + +include::../protos/vkCmdCopyImageToBuffer.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:srcImage is the source image. + * pname:srcImageLayout is the layout of the source image subresources for + the copy. + * pname:dstBuffer is the destination buffer. + * pname:regionCount is the number of regions to copy. + * pname:pRegions is a pointer to an array of slink:VkBufferImageCopy + structures specifying the regions to copy. + +Each region in pname:pRegions is copied from the specified region of the +source buffer to the specified region of the destination image. + +include::../validity/protos/vkCmdCopyImageToBuffer.txt[] + +For both flink:vkCmdCopyBufferToImage and flink:vkCmdCopyImageToBuffer, each +element of pname:pRegions is a structure defined as: + +include::../structs/VkBufferImageCopy.txt[] + + * pname:bufferOffset is the offset in bytes from the start of the + buffer object where the image data is copied from or to. + * pname:bufferRowLength and pname:bufferImageHeight specify the + data in buffer memory as a subregion of a larger two- or + three-dimensional image, and control the addressing calculations of data + in buffer memory. If either of these values is zero, that aspect of the + buffer memory is considered to be tightly packed according to the + pname:imageExtent. + * pname:imageSubresource is an slink:VkImageSubresourceLayers used to + specify the specific subresources of the image used for the source or + destination image data. + * pname:imageOffset selects the initial x, y, z offsets in texels of the + sub-region of the source or destination image data. + * pname:imageExtent is the size in texels of the image to copy in + pname:width, pname:height and pname:depth. 1D images use only pname:x + and pname:width. 2D images use pname:x, pname:y, pname:width and + pname:height. 3D images use pname:x, pname:y, pname:z, pname:width, + pname:height and pname:depth. + +When copying to or from a depth or stencil aspect, the data in buffer +memory uses a layout that is a (mostly) tightly packed representation of +the depth or stencil data. Specifically: + + * data copied to or from the stencil aspect of any depth/stencil format + is tightly packed with one ename:VK_FORMAT_S8_UINT value per texel. + * data copied to or from the depth aspect of a ename:VK_FORMAT_D16_UNORM + or ename:VK_FORMAT_D16_UNORM_S8_UINT format is tightly packed with one + ename:VK_FORMAT_D16_UNORM value per texel. + * data copied to or from the depth aspect of a ename:VK_FORMAT_D32_SFLOAT + or ename:VK_FORMAT_D32_SFLOAT_S8_UINT format is tightly packed with + one ename:VK_FORMAT_D32_SFLOAT value per texel. + * data copied to or from the depth aspect of a + ename:VK_FORMAT_X8_D24_UNORM_PACK32 or + ename:VK_FORMAT_D24_UNORM_S8_UINT format is packed with one 32-bit word + per texel with the D24 value in the LSBs of the word, and undefined + values in the eight MSBs. + +[NOTE] +.Note +==== +To copy both the depth and stencil aspects of a depth/stencil format, two +entries in pname:pRegions can: be used, where one specifies the depth +aspect in pname:imageSubresource, and the other specifies the stencil +aspect. +==== + +Because depth or stencil aspect buffer to image copies may: require format +conversions on some implementations, they are not supported on queues +that do not support graphics. + +Copies are done layer by layer starting with image layer +pname:baseArrayLayer member of pname:imageSubresource. pname:layerCount +layers are copied from the source image or to the destination image. + +include::../validity/structs/VkBufferImageCopy.txt[] + +Pseudocode for image/buffer addressing is: + +[source,c] +--------------------------------------------------- +rowLength = region->bufferRowLength; +if (rowLength == 0) + rowLength = region->imageExtent.width; + +imageHeight = region->bufferImageHeight; +if (imageHeight == 0) + imageHeight = region->imageExtent.height; + +texelSize = ; + +address of (x,y,z) = region->bufferOffset + (((z * imageHeight) + y) * rowLength + x) * texelSize; + +where x,y,z range from (0,0,0) to region->imageExtent.{width,height,depth}. +--------------------------------------------------- + +Note that pname:imageOffset does not affect addressing calculations for +buffer memory. Instead, pname:bufferOffset can: be used to +select the starting address in buffer memory. + +For block-compression formats, all parameters are still specified in texels +rather than blocks, but the addressing math operates on whole blocks. +Pseudocode for compressed copy addressing is: + +[source,c] +--------------------------------------------------- +rowLength = region->bufferRowLength; +if (rowLength == 0) + rowLength = region->imageExtent.width; + +imageHeight = region->bufferImageHeight; +if (imageHeight == 0) + imageHeight = region->imageExtent.height; + +blockSizeInBytes = ; +rowLength /= blockWidth; +imageHeight /= blockHeight; + +address of (x,y,z) = region->bufferOffset + (((z * imageHeight) + y) * rowLength + x) * blockSizeInBytes; + +where x,y,z range from (0,0,0) to region->imageExtent.{width/blockWidth,height/blockHeight,depth/blockDepth}. +--------------------------------------------------- + +Copying to or from block-compressed images is typically done in multiples of +the block. For this reason the pname:imageExtent must: be a multiple of the +block dimension. There is one exception to this rule which is required: to +handle compressed images created with dimensions that are not a multiple of +the block dimensions. If pname:imageExtent.width is not a multiple of the +block width then (pname:imageExtent.width + pname:imageOffset.x) must: equal +the subresource width, if pname:imageExtent.height is not a multiple of the +block height then (pname:imageExtent.height + pname:imageOffset.y) must: +equal the subresource height and if pname:imageExtent.depth is not a +multiple of the block depth then (pname:imageExtent.depth + +pname:imageOffset.z) must: equal the subresource depth. This allows the last +block of the image in each non-multiple dimension to be included as a source +or target of the copy. + + +[[copies-imagescaling]] +== Image Copies with Scaling + +To copy regions of a source image into a destination image, potentially +performing format conversion, arbitrary scaling, and filtering, call: + +include::../protos/vkCmdBlitImage.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:srcImage is the source image. + * pname:srcImageLayout is the layout of the source image subresources for + the blit. + * pname:dstImage is the destination image. + * pname:dstImageLayout is the layout of the destination image subresources + for the blit. + * pname:regionCount is the number of regions to blit. + * pname:pRegions is a pointer to an array of slink:VkImageBlit structures + specifying the regions to blit. + * pname:filter is a elink:VkFilter specifying the filter to apply if the + blits require scaling. + +include::../validity/protos/vkCmdBlitImage.txt[] + +fname:vkCmdBlitImage mustnot: be used for multisampled source or destination +images. Use flink:vkCmdResolveImage for this purpose. + +Each element of pname:pRegions is a structure defined as: + +include::../structs/VkImageBlit.txt[] + +For each element of the pname:pRegions array, a blit operation is performed +between the region of pname:srcSubresource of pname:srcImage (bounded by +pname:srcOffsets[0] and pname:srcOffsets[1]) and a region of +pname:dstSubresource of pname:dstImage (bounded by pname:dstOffsets[0] and +pname:dstOffsets[1]). + +include::../validity/structs/VkImageBlit.txt[] + +If sizes of source and destination extents do not match, scaling is +performed by applying the filtering mode specified by pname:filter +parameter. ename:VK_FILTER_LINEAR uses bilinear interpolation, and +ename:VK_FILTER_NEAREST uses point sampling. When using +ename:VK_FILTER_LINEAR, magnifying blits may: generate texel coordinates +outside of the source region. If those coordinates are outside the bounds of +the image level, the coordinates are clamped as in +ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE address mode. However, if the +coordinates are outside the source region but inside the image level, the +implementation may: clamp coordinates to the source region. + +If source and destination extents are identical, no filtering is performed. +Pixels in the axis-aligned region bounded by srcOffsets[0] and srcOffsets[1] +will be copied to the destination region bound by dstOffsets[0] and +dstOffsets[1]. In the case where dstOffsets[0].x > dstOffsets[1].x the +copied pixels are reversed in that direction. Likewise for y and z. + +Blits are done layer by layer starting with the pname:baseArrayLayer member +of pname:srcSubresource for the source and pname:dstSubresource for the +destination. pname:layerCount layers are blitted to the destination image. + +3D textures are blitted slice by slice. Slices in the source region bounded +by pname:srcOffsets[0].z and pname:srcOffsets[1].z are copied to slices in +the destination region bounded by pname:dstOffsets[0].z and +pname:dstOffsets[1].z. For each destination slice, a source z coordinate is +linearly interpolated between pname:srcOffsets[0].z and +pname:srcOffsets[1].z. If the pname:filter parameter is +ename:VK_FILTER_LINEAR then the value sampled from the source image is taken +by doing linear filtering using the interpolated z coordinate. If +pname:filter parameter is ename:VK_FILTER_NEAREST then value sampled from +the source image is taken from the single nearest slice (with undefined +rounding mode). + +If fname:vkCmdBlitImage is used on images of different formats, the +following conversion rules apply: + + * Integer formats can: only be converted to other integer formats with the + same signedness. + * No format conversion is supported between depth/stencil images - the + formats must: match. + * Format conversions on unorm, snorm, unscaled and packed float formats of + the copied aspect of the image are performed by first converting the + pixels to float values. + * In case of sRGB source format, values are converted to linear color + space prior to filtering. + * After filtering, the float values are first clamped and then cast to the + destination image format. In case of sRGB destination format, values are + converted to sRGB color space before writing the pixel to the image. + +Signed and unsigned integers are converted by first clamping to the +representable range of destination format, then casting the value. + + +[[copies-resolve]] +== Resolving Multisample Images + +To resolve a multisample image to a non-multisample image, call: + +include::../protos/vkCmdResolveImage.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:srcImage is the source image. + * pname:srcImageLayout is the layout of the source image subresources for + the blit. + * pname:dstImage is the destination image. + * pname:dstImageLayout is the layout of the destination image subresources + for the blit. + * pname:regionCount is the number of regions to blit. + * pname:pRegions is a pointer to an array of slink:VkImageResolve + structures specifying the regions to resolve. + +include::../validity/protos/vkCmdResolveImage.txt[] + +Each element of pname:pRegions is a structure defined as: + +include::../structs/VkImageResolve.txt[] + + * pname:srcSubresource and pname:dstSubresource are + slink:VkImageSubresourceLayers structures specifying the subresources of + the images used for the source and destination image data, respectively. + Resolve of depth/stencil images is not supported. + * pname:srcOffset and pname:dstOffset select the initial x, y, and z + offsets in texels of the sub-regions of the source and destination image + data. + * pname:extent is the size in texels of the source image to resolve in + pname:width, pname:height and pname:depth. 1D images use only pname:x + and pname:width. 2D images use pname:x, pname:y, pname:width and + pname:height. 3D images use pname:x, pname:y, pname:z, pname:width, + pname:height and pname:depth. + +include::../validity/structs/VkImageResolve.txt[] + +During the resolve the samples corresponding to each pixel location in the +source are converted to a single sample before being written to the +destination. If the source formats are floating-point or normalized types, +the sample values for each pixel are resolved in an implementation-dependent +manner. If the source formats are integer types, a single sample's value is +selected for each pixel. + +pname:srcOffset and pname:dstOffset select the initial x, y, and z +offsets in texels of the sub-regions of the source and destination image +data. pname:extent is the size in texels of the source +image to resolve in pname:width, pname:height and pname:depth. 1D images use +only pname:x and pname:width. 2D images use pname:x, pname:y, pname:width +and pname:height. 3D images use pname:x, pname:y, pname:z, pname:width, +pname:height and pname:depth. + +Resolves are done layer by layer starting with pname:baseArrayLayer member +of pname:srcSubresource for the source and pname:dstSubresource for the +destination. pname:layerCount layers are blitted to the destination image. diff --git a/doc/specs/vulkan/chapters/descriptorsets.txt b/doc/specs/vulkan/chapters/descriptorsets.txt new file mode 100644 index 00000000..0a52b212 --- /dev/null +++ b/doc/specs/vulkan/chapters/descriptorsets.txt @@ -0,0 +1,1495 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[descriptorsets]] += Resource Descriptors + +Shaders access buffer and image resources by using special shader variables +which are indirectly bound to buffer and image views via the API. These +variables are organized into sets, where each set of bindings is represented +by a _descriptor set_ object in the API and a descriptor set is bound all at +once. A _descriptor_ is an opaque data structure representing a shader +resource such as a buffer view, image view, sampler, or combined image +sampler. The content of each set is determined by its _descriptor set +layout_ and the sequence of set layouts that can: be used by resource +variables in shaders within a pipeline is specified in a _pipeline layout_. + +Each shader can: use up to pname:maxBoundDescriptorSets (see +<>) descriptor sets, and each descriptor set can: +include bindings for descriptors of all descriptor types. Each shader +resource variable is assigned a tuple of (set number, binding number, array +element) that defines its location within a descriptor set layout. In GLSL, +the set number and binding number are assigned via layout qualifiers, and +the array element is implicitly assigned consecutively starting with index +equal to zero for the first element of an array (and array element is zero +for non-array variables): + +.GLSL example +[source,{basebackend@docbook:c:glsl}] +--------------------------------------------------- +// Assign set number = M, binding number = N, array element = 0 +layout (set=m, binding=n) uniform sampler2D variableName; + +// Assign set number = M, binding number = N for all array elements, and +// array element = i for the i'th member of the array. +layout (set=m, binding=n) uniform sampler2D variableNameArray[L]; +--------------------------------------------------- + +.SPIR-V example +--------------------------------------------------- +// Assign set number = M, binding number = N, array element = 0 + ... + %1 = OpExtInstImport "GLSL.std.450" + ... + OpName %10 "variableName" + OpDecorate %10 DescriptorSet m + OpDecorate %10 Binding n + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeImage %6 2D 0 0 0 1 Unknown + %8 = OpTypeSampledImage %7 + %9 = OpTypePointer UniformConstant %8 + %10 = OpVariable %9 UniformConstant + ... + +// Assign set number = M, binding number = N for all array elements, and +// array element = i for the i'th member of the array. + ... + %1 = OpExtInstImport "GLSL.std.450" + ... + OpName %13 "variableNameArray" + OpDecorate %13 DescriptorSet m + OpDecorate %13 Binding n + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeImage %6 2D 0 0 0 1 Unknown + %8 = OpTypeSampledImage %7 + %9 = OpTypeInt 32 0 + %10 = OpConstant %9 L + %11 = OpTypeArray %8 %10 + %12 = OpTypePointer UniformConstant %11 + %13 = OpVariable %12 UniformConstant + ... +--------------------------------------------------- + + +[[descriptorsets-types]] +== Descriptor Types + +The following sections outline the various descriptor types supported by +{apiname}. Each section defines a descriptor type, and each descriptor type +has a manifestation in the shading language and SPIR-V as well as in +descriptor sets. There is mostly a one-to-one correspondence between +descriptor types and classes of opaque types in the shading language, where +the opaque types in the shading language must: refer to a descriptor in the +pipeline layout of the corresponding descriptor type. But there is an +exception to this rule as described in +<>. + + +[[descriptorsets-storageimage]] +=== Storage Image + +A _storage image_ (ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) is a descriptor +type that is used for load, store, and atomic operations on image memory +from within shaders bound to pipelines. + +Loads from storage images do not use samplers and are unfiltered and do not +support coordinate wrapping or clamping. Loads are supported in all shader +stages for image formats which report support for the +<> +feature bit via flink:vkGetPhysicalDeviceFormatProperties. + +Stores to storage images are supported in compute shaders for image +formats which report support for the +ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT feature. + +Storage images also support atomic operations in compute shaders for +image formats which report support for the +<> +feature. + +Load and store operations on storage images can: only be done on images in +ename:VK_IMAGE_LAYOUT_GENERAL layout. + +When the <> +feature is enabled, stores and atomic operations are also supported +for storage images in fragment shaders with the same set of image +formats as supported in compute shaders. When the +<> feature is enabled, stores and +atomic operations are also supported in vertex, tessellation, and +geometry shaders with the same set of image formats as supported +in compute shaders. + +Storage image declarations must: specify the image format in the +shader if the variable is used for atomic operations. + +If the <> feature is not enabled, +storage image declarations must: specify the image format in the +shader if the variable is used for load operations. + +If the <> feature is not enabled, +storage image declarations must: specify the image format in the +shader if the variable is used for store operations. + +Storage images are declared in GLSL shader source using uniform ``image'' +variables of the appropriate dimensionality as well as a format layout +qualifier (if necessary): + +.GLSL example +[source,{basebackend@docbook:c:glsl}] +--------------------------------------------------- +layout (set=m, binding=n, r32f) uniform image2D myStorageImage; +--------------------------------------------------- + +.SPIR-V example +--------------------------------------------------- + ... + %1 = OpExtInstImport "GLSL.std.450" + ... + OpName %9 "myStorageImage" + OpDecorate %9 DescriptorSet m + OpDecorate %9 Binding n + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeImage %6 2D 0 0 0 2 R32f + %8 = OpTypePointer UniformConstant %7 + %9 = OpVariable %8 UniformConstant + ... +--------------------------------------------------- + + +[[descriptorsets-sampler]] +=== Sampler +A _sampler_ (ename:VK_DESCRIPTOR_TYPE_SAMPLER) represents a set of +parameters which control address calculations, filtering behavior, and other +properties, that can: be used to perform filtered loads from _sampled +images_ (see <>). + +Samplers are declared in GLSL shader source using uniform ``sampler'' +variables, where the sampler type has no associated texture dimensionality: + +.GLSL Example +[source,{basebackend@docbook:c:glsl}] +--------------------------------------------------- +layout (set=m, binding=n) uniform sampler mySampler; +--------------------------------------------------- + +.SPIR-V Example +--------------------------------------------------- + ... + %1 = OpExtInstImport "GLSL.std.450" + ... + OpName %8 "mySampler" + OpDecorate %8 DescriptorSet m + OpDecorate %8 Binding n + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeSampler + %7 = OpTypePointer UniformConstant %6 + %8 = OpVariable %7 UniformConstant + ... +--------------------------------------------------- + + +[[descriptorsets-sampledimage]] +=== Sampled Image + +A _sampled image_ (ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE) +can: be used (usually in conjunction with a sampler) to retrieve sampled +image data. Shaders use a sampled image handle and a sampler handle to +sample data, where the image handle generally defines the shape and format +of the memory and the sampler generally defines how coordinate addressing is +performed. The same sampler can: be used to sample from multiple images, and +it is possible to sample from the same sampled image with multiple samplers, +each containing a different set of sampling parameters. + +Sampled images are declared in GLSL shader source using uniform ``texture'' +variables of the appropriate dimensionality: + +.GLSL example +[source,{basebackend@docbook:c:glsl}] +--------------------------------------------------- +layout (set=m, binding=n) uniform texture2D mySampledImage; +--------------------------------------------------- + +.SPIR-V example +--------------------------------------------------- + ... + %1 = OpExtInstImport "GLSL.std.450" + ... + OpName %9 "mySampledImage" + OpDecorate %9 DescriptorSet m + OpDecorate %9 Binding n + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeImage %6 2D 0 0 0 1 Unknown + %8 = OpTypePointer UniformConstant %7 + %9 = OpVariable %8 UniformConstant + ... +--------------------------------------------------- + + +[[descriptorsets-combinedimagesampler]] +=== Combined Image Sampler + +A _combined image sampler_ (ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER) +represents a sampled image along with a set of sampling parameters. It is +logically considered a sampled image and a sampler bound together. + +[NOTE] +.Note +==== +On some implementations, it may: be more efficient to sample from an image +using a combination of sampler and sampled image that are stored together in +the descriptor set in a combined descriptor. +==== + +Combined image samplers are declared in GLSL shader source using uniform +``sampler'' variables of the appropriate dimensionality: + +.GLSL example +[source,{basebackend@docbook:c:glsl}] +--------------------------------------------------- +layout (set=m, binding=n) uniform sampler2D myCombinedImageSampler; +--------------------------------------------------- + +.SPIR-V example +--------------------------------------------------- + ... + %1 = OpExtInstImport "GLSL.std.450" + ... + OpName %10 "myCombinedImageSampler" + OpDecorate %10 DescriptorSet m + OpDecorate %10 Binding n + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeImage %6 2D 0 0 0 1 Unknown + %8 = OpTypeSampledImage %7 + %9 = OpTypePointer UniformConstant %8 + %10 = OpVariable %9 UniformConstant + ... +--------------------------------------------------- + +ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptor set entries can: +also be accessed via separate sampler and sampled image shader variables. +Such variables refer exclusively to the corresponding half of the +descriptor, and can: be combined in the shader with samplers or sampled +images that can: come from the same descriptor or from other combined or +separate descriptor types. There are no additional restrictions on how a +separate sampler or sampled image variable is used due to it originating +from a combined descriptor. + + +[[descriptorsets-uniformtexelbuffer]] +=== Uniform Texel Buffer + +A _uniform texel buffer_ (ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER) +represents a tightly packed array of homogeneous +formatted data that is stored in a buffer and is made accessible to shaders. +Uniform texel buffers are read-only. + +Uniform texel buffers are declared in GLSL shader source using uniform +``samplerBuffer'' variables: + +.GLSL example +[source,{basebackend@docbook:c:glsl}] +--------------------------------------------------- +layout (set=m, binding=n) uniform samplerBuffer myUniformTexelBuffer; +--------------------------------------------------- + +.SPIR-V example +--------------------------------------------------- + ... + %1 = OpExtInstImport "GLSL.std.450" + ... + OpName %10 "myUniformTexelBuffer" + OpDecorate %10 DescriptorSet m + OpDecorate %10 Binding n + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeImage %6 Buffer 0 0 0 1 Unknown + %8 = OpTypeSampledImage %7 + %9 = OpTypePointer UniformConstant %8 + %10 = OpVariable %9 UniformConstant + ... +--------------------------------------------------- + + +[[descriptorsets-storagetexelbuffer]] +=== Storage Texel Buffer + +A _storage texel buffer_ (ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER) +represents a tightly packed array of homogeneous formatted data that is +stored in a buffer and is made accessible to shaders. Storage texel buffers +differ from uniform texel buffers in that they support stores and atomic +operations in shaders, may: support a different maximum length, and may: +have different performance characteristics. + +Storage texel buffers are declared in GLSL shader source using uniform +``imageBuffer'' variables: + +.GLSL example +[source,{basebackend@docbook:c:glsl}] +--------------------------------------------------- +layout (set=m, binding=n, r32f) uniform imageBuffer myStorageTexelBuffer; +--------------------------------------------------- + +.SPIR-V example +--------------------------------------------------- + ... + %1 = OpExtInstImport "GLSL.std.450" + ... + OpName %9 "myStorageTexelBuffer" + OpDecorate %9 DescriptorSet m + OpDecorate %9 Binding n + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeImage %6 Buffer 0 0 0 2 R32f + %8 = OpTypePointer UniformConstant %7 + %9 = OpVariable %8 UniformConstant + ... +--------------------------------------------------- + + +[[descriptorsets-uniformbuffer]] +=== Uniform Buffer + +A _uniform buffer_ (ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) is a region of +structured storage that is made accessible for read-only access to shaders. +It is typically used to store medium sized arrays of constants such as +shader parameters, matrices and other related data. + +Uniform buffers are declared in GLSL shader source using the uniform storage +qualifier and block syntax: + +.GLSL example +[source,{basebackend@docbook:c:glsl}] +--------------------------------------------------- +layout (set=m, binding=n) uniform myUniformBuffer +{ + vec4 myElement[32]; +}; +--------------------------------------------------- + +.SPIR-V example +--------------------------------------------------- + ... + %1 = OpExtInstImport "GLSL.std.450" + ... + OpName %11 "myUniformBuffer" + OpMemberName %11 0 "myElement" + OpName %13 "" + OpDecorate %10 ArrayStride 16 + OpMemberDecorate %11 0 Offset 0 + OpDecorate %11 Block + OpDecorate %13 DescriptorSet m + OpDecorate %13 Binding n + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 4 + %8 = OpTypeInt 32 0 + %9 = OpConstant %8 32 + %10 = OpTypeArray %7 %9 + %11 = OpTypeStruct %10 + %12 = OpTypePointer Uniform %11 + %13 = OpVariable %12 Uniform + ... +--------------------------------------------------- + + +[[descriptorsets-storagebuffer]] +=== Storage Buffer + +A _storage buffer_ (ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER) is a region of +structured storage that supports both read and write +access for shaders. In addition to general read and write operations, some +members of storage buffers can: be used as the target of atomic operations. +In general, atomic operations are only supported on members that have +unsigned integer formats. + +Storage buffers are declared in GLSL shader source using buffer storage +qualifier and block syntax: + +.GLSL example +[source,{basebackend@docbook:c:glsl}] +--------------------------------------------------- +layout (set=m, binding=n) buffer myStorageBuffer +{ + vec4 myElement[]; +}; +--------------------------------------------------- + +.SPIR-V example +--------------------------------------------------- + ... + %1 = OpExtInstImport "GLSL.std.450" + ... + OpName %9 "myStorageBuffer" + OpMemberName %9 0 "myElement" + OpName %11 "" + OpDecorate %8 ArrayStride 16 + OpMemberDecorate %9 0 Offset 0 + OpDecorate %9 BufferBlock + OpDecorate %11 DescriptorSet m + OpDecorate %11 Binding n + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 4 + %8 = OpTypeRuntimeArray %7 + %9 = OpTypeStruct %8 + %10 = OpTypePointer Uniform %9 + %11 = OpVariable %10 Uniform + ... +--------------------------------------------------- + + +[[descriptorsets-uniformbufferdynamic]] +=== Dynamic Uniform Buffer + +A _dynamic uniform buffer_ (ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC) +differs from a uniform buffer only in how its address and length are +specified. Uniform buffers bind a buffer address and length that is +specified in the descriptor set update by a buffer handle, offset and range +(see <>). With dynamic +uniform buffers the buffer handle, offset and range specified in the +descriptor set define the base address and length. The dynamic offset which +is relative to this base address is taken from the pname:pDynamicOffsets +parameter to flink:vkCmdBindDescriptorSets (see <>). The address used for a dynamic uniform buffer is +the sum of the buffer base address and the relative offset. The length is +unmodified and remains the range as specified in the descriptor update. The +shader syntax is identical for uniform buffers and dynamic uniform buffers. + + +[[descriptorsets-storagebufferdynamic]] +=== Dynamic Storage Buffer + +A _dynamic storage buffer_ (ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC) +differs from a storage buffer only in how its address and length are +specified. The difference is identical to the difference between uniform +buffers and dynamic uniform buffers (see +<>). The shader +syntax is identical for storage buffers and dynamic storage buffers. + + +[[descriptorsets-inputattachment]] +=== Input Attachment + +An _input attachment_ (ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT) is an +image view that can: be used for pixel local load operations from within +fragment shaders bound to pipelines. Loads from input attachments are +unfiltered. All image formats that are supported for color attachments +(ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) or depth/stencil attachments +(ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT) for a given image +tiling mode are also supported for input attachments. + +In the shader, input attachments must: be decorated with their input +attachment index in addition to descriptor set and binding numbers. + +.GLSL example +[source,{basebackend@docbook:c:glsl}] +--------------------------------------------------- +layout (input_attachment_index=i, set=m, binding=n) uniform subpass myInputAttachment; +--------------------------------------------------- + +.SPIR-V example +--------------------------------------------------- + ... + %1 = OpExtInstImport "GLSL.std.450" + ... + OpName %9 "myInputAttachment" + OpDecorate %9 DescriptorSet m + OpDecorate %9 Binding n + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeImage %6 SubpassData 0 0 0 2 Unknown + %8 = OpTypePointer UniformConstant %7 + %9 = OpVariable %8 UniformConstant + ... +--------------------------------------------------- + + +[[descriptorsets-sets]] +== Descriptor Sets + +Descriptors are grouped together into descriptor set objects. A descriptor +set object is an opaque object that contains storage for a set of +descriptors, where the types and number of descriptors is defined by a +descriptor set layout. The layout object may: be used to define the +association of each descriptor binding with memory or other hardware +resources. The layout is used both for determining the resources that need +to be associated with the descriptor set, and determining the interface +between shader stages and shader resources. + + +[[descriptorsets-setlayout]] +=== Descriptor Set Layout + +A descriptor set layout object is defined by an array of zero or more +descriptor bindings. Each individual descriptor binding is specified by a +descriptor type, a count (array size) of the number of descriptors in the +binding, a set of shader stages that can: access the binding, and (if using +immutable samplers) an array of sampler descriptors. + +Descriptor set layouts are represented by sname:VkDescriptorSetLayout +objects which are created by calling: + +include::../protos/vkCreateDescriptorSetLayout.txt[] + + * pname:device is the logical device that creates the descriptor set + layout. + * pname:pCreateInfo is a pointer to an instance of the + slink:VkDescriptorSetLayoutCreateInfo structure specifying the state of + the descriptor set layout object. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pSetLayout points to a sname:VkDescriptorSetLayout handle in which + the resulting descriptor set layout object is returned. + +include::../validity/protos/vkCreateDescriptorSetLayout.txt[] + +Information about the descriptor set layout is passed in an instance of the +sname:VkDescriptorSetLayoutCreateInfo structure: + +include::../structs/VkDescriptorSetLayoutCreateInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:bindingCount is the number of elements in pname:pBindings. + * pname:pBindings is a pointer to an array of + slink:VkDescriptorSetLayoutBinding structures. + +include::../validity/structs/VkDescriptorSetLayoutCreateInfo.txt[] + +The definition of the sname:VkDescriptorSetLayoutBinding structure is: + +include::../structs/VkDescriptorSetLayoutBinding.txt[] + + * pname:binding is the binding number of this entry and corresponds + to a resource of the same binding number in the shader stages. + * pname:descriptorType is an elink:VkDescriptorType specifying which type + of resource descriptors are used for this binding. + * pname:descriptorCount is the number of descriptors contained in the + binding, accessed in a shader as an array. If pname:descriptorCount is + zero this binding entry is reserved and the resource mustnot: be + accessed from any stage via this binding within any pipeline using the + set layout. + * pname:stageFlags member is a bitfield of elink:VkShaderStageFlagBits + specifying which pipeline shader stages can: access a resource for this + binding. ename:VK_SHADER_STAGE_ALL is a shorthand specifying that all + defined shader stages, including any additional stages defined by + extensions, can: access the resource. ++ +If a shader stage is not included in pname:stageFlags, then a resource +mustnot: be accessed from that stage via this binding within any pipeline +using the set layout. There are no limitations on what combinations of +stages can: be used by a descriptor binding, and in particular a binding +can: be used by both graphics stages and the compute stage. + + * pname:pImmutableSamplers affects initialization of samplers. If + pname:descriptorType specifies a ename:VK_DESCRIPTOR_TYPE_SAMPLER or + ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER type descriptor, then + pname:pImmutableSamplers can: be used to initialize a set of _immutable + samplers_. Immutable samplers are permanently bound into the set layout; + later binding a sampler into an immutable sampler slot in a descriptor + set is not allowed. If pname:pImmutableSamplers is not `NULL`, then it + is considered to be a pointer to an array of sampler handles that will + be consumed by the set layout and used for the corresponding binding. If + pname:pImmutableSamplers is `NULL`, then the sampler slots are dynamic + and sampler handles must: be bound into descriptor sets using this + layout. If pname:descriptorType is not one of these descriptor types, + then pname:pImmutableSamplers is ignored. + +The above layout definition allows the descriptor bindings to be specified +sparsely such that not all binding numbers between 0 and the maximum +binding number need to be specified in the pname:pBindings array. However, +all binding numbers between 0 and the maximum binding number may: consume +memory in the descriptor set layout even if not all descriptor bindings are +used, though it shouldnot: +consume additional memory from the descriptor pool. + +[NOTE] +.Note +==== +The maximum binding number specified should: be as compact as possible to +avoid wasted memory. +==== + +include::../validity/structs/VkDescriptorSetLayoutBinding.txt[] + +The following examples show a shader snippet using two descriptor sets, and +application code that creates corresponding descriptor set layouts. + +.GLSL example +[source,{basebackend@docbook:c:glsl}] +--------------------------------------------------- +// +// binding to a single sampled image descriptor in set 0 +// +layout (set=0, binding=0) uniform texture2D mySampledImage; + +// +// binding to an array of sampled image descriptors in set 0 +// +layout (set=0, binding=1) uniform texture2D myArrayOfSampledImages[12]; + +// +// binding to a single uniform buffer descriptor in set 1 +// +layout (set=1, binding=0) uniform myUniformBuffer +{ + vec4 myElement[32]; +}; +--------------------------------------------------- + +.SPIR-V example +--------------------------------------------------- + ... + %1 = OpExtInstImport "GLSL.std.450" + ... + OpName %9 "mySampledImage" + OpName %14 "myArrayOfSampledImages" + OpName %18 "myUniformBuffer" + OpMemberName %18 0 "myElement" + OpName %20 "" + OpDecorate %9 DescriptorSet 0 + OpDecorate %9 Binding 0 + OpDecorate %14 DescriptorSet 0 + OpDecorate %14 Binding 1 + OpDecorate %17 ArrayStride 16 + OpMemberDecorate %18 0 Offset 0 + OpDecorate %18 Block + OpDecorate %20 DescriptorSet 1 + OpDecorate %20 Binding 0 + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeImage %6 2D 0 0 0 1 Unknown + %8 = OpTypePointer UniformConstant %7 + %9 = OpVariable %8 UniformConstant + %10 = OpTypeInt 32 0 + %11 = OpConstant %10 12 + %12 = OpTypeArray %7 %11 + %13 = OpTypePointer UniformConstant %12 + %14 = OpVariable %13 UniformConstant + %15 = OpTypeVector %6 4 + %16 = OpConstant %10 32 + %17 = OpTypeArray %15 %16 + %18 = OpTypeStruct %17 + %19 = OpTypePointer Uniform %18 + %20 = OpVariable %19 Uniform + ... +--------------------------------------------------- + +.API example +[source,{basebackend@docbook:c++:cpp}] +------------------------------------------------------------------------------- +VkResult myResult; + +const VkDescriptorSetLayoutBinding myDescriptorSetLayoutBinding[] = +{ + // binding to a single image descriptor + { + 0, // binding + VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, // descriptorType + 1, // descriptorCount + VK_SHADER_STAGE_FRAGMENT_BIT, // stageFlags + NULL // pImmutableSamplers + }, + + // binding to an array of image descriptors + { + 1, // binding + VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, // descriptorType + 12, // descriptorCount + VK_SHADER_STAGE_FRAGMENT_BIT, // stageFlags + NULL // pImmutableSamplers + }, + + // binding to a single uniform buffer descriptor + { + 0, // binding + VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, // descriptorType + 1, // descriptorCount + VK_SHADER_STAGE_FRAGMENT_BIT, // stageFlags + NULL // pImmutableSamplers + } +}; + +const VkDescriptorSetLayoutCreateInfo myDescriptorSetLayoutCreateInfo[] = +{ + // Create info for first descriptor set with two descriptor bindings + { + VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, // sType + NULL, // pNext + 0, // flags + 2, // bindingCount + &myDescriptorSetLayoutBinding[0] // pBindings + }, + + // Create info for second descriptor set with one descriptor binding + { + VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, // sType + NULL, // pNext + 0, // flags + 1, // bindingCount + &myDescriptorSetLayoutBinding[2] // pBindings + } +}; + +VkDescriptorSetLayout myDescriptorSetLayout[2]; + +// +// Create first descriptor set layout +// +myResult = vkCreateDescriptorSetLayout( + myDevice, + &myDescriptorSetLayoutCreateInfo[0], + &myDescriptorSetLayout[0]); + +// +// Create second descriptor set layout +// +myResult = vkCreateDescriptorSetLayout( + myDevice, + &myDescriptorSetLayoutCreateInfo[1], + &myDescriptorSetLayout[1]); +------------------------------------------------------------------------------- + +To destroy a descriptor set layout, call: + +include::../protos/vkDestroyDescriptorSetLayout.txt[] + + * pname:device is the logical device that destroys the descriptor set + layout. + * pname:descriptorSetLayout is the descriptor set layout to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroyDescriptorSetLayout.txt[] + + +[[descriptorsets-pipelinelayout]] +=== Pipeline Layouts + +Access to descriptor sets from a pipeline is accomplished through a +_pipeline layout_. Zero or more descriptor set layouts and zero or more push +constant ranges are combined to form a +pipeline layout object which describes the complete set of resources that +can: be accessed by a pipeline. The pipeline layout represents a sequence of +descriptor sets with each having a specific layout. This sequence of layouts +is used to determine the interface between shader stages and shader +resources. Each pipeline is created using a pipeline layout. + +A pipeline layout is created by calling: + +include::../protos/vkCreatePipelineLayout.txt[] + + * pname:device is the logical device that creates the pipeline layout. + * pname:pCreateInfo is a pointer to an instance of the + slink:VkPipelineLayoutCreateInfo structure specifying the state of the + pipeline layout object. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pPipelineLayout points to a sname:VkPipelineLayout handle in which + the resulting pipeline layout object is returned. + +include::../validity/protos/vkCreatePipelineLayout.txt[] + +The definition of the slink:VkPipelineLayoutCreateInfo structure is: + +include::../structs/VkPipelineLayoutCreateInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:setLayoutCount is the number of descriptor sets included in + the pipeline layout. + * pname:pSetLayouts is a pointer to an array of + sname:VkDescriptorSetLayout objects. + * pname:pushConstantRangeCount is the number of push constant ranges + included in the pipeline layout. + * pname:pPushConstantRanges is a pointer to an array of + sname:VkPushConstantRange structures defining a set of push constant + ranges for use in a single pipeline layout. In addition to descriptor + set layouts, a pipeline layout also describes how many push constants + can: be accessed by each stage of the pipeline. ++ +[NOTE] +.Note +==== +Push constants represent a high speed path to modify constant data in +pipelines that is expected to outperform memory-backed resource updates. +==== + +include::../validity/structs/VkPipelineLayoutCreateInfo.txt[] + +The definition of sname:VkPushConstantRange is: + +include::../structs/VkPushConstantRange.txt[] + + * pname:stageFlags is a set of stage flags describing the shader + stages that will access a range of push constants. If a particular stage + is not included in the range, then accessing members of that range of + push constants from the corresponding shader stage will result in + undefined data being read. + * pname:offset and pname:size are the start offset and size, + respectively, consumed by the range. Both pname:offset and pname:size + are in units of bytes and must: be a multiple of 4. The layout of + the push constant variables is specified in the shader. + +include::../validity/structs/VkPushConstantRange.txt[] + +Once created, pipeline layouts are used as part of pipeline creation (see +<>), as part of binding descriptor sets (see +<>), and as part of setting +push constants (see <>). Pipeline creation accepts a pipeline layout as input, and the +layout may: be used to map (set, binding, arrayElement) tuples to hardware +resources or memory locations within a descriptor set. The assignment of +hardware resources depends only on the bindings defined in the descriptor +sets that comprise the pipeline layout, and not on any shader source. + +[[descriptorsets-pipelinelayout-consistency]] +All resource variables <> in all shaders +in a pipeline must: be declared with a (set,binding,arrayElement) that +exists in the corresponding descriptor set layout and is of an appropriate +descriptor type and includes the set of shader stages it is used by in +pname:stageFlags. The pipeline layout can: include entries that are not used +by a particular pipeline, or that are dead-code eliminated from any of the +shaders. The pipeline layout allows the application to provide a consistent +set of bindings across multiple pipeline compiles, which enables those +pipelines to be compiled in a way that the implementation may: cheaply +switch pipelines without reprogramming the bindings. + +Similarly, the push constant block declared in each shader (if present) +must: only place variables at offsets that are each included in a push +constant range with pname:stageFlags including the bit corresponding to the +shader stage that uses it. The pipeline layout can: include ranges or +portions of ranges that are not used by a particular pipeline, or for which +the variables have been dead-code eliminated from any of the shaders. + +There is a limit on the total number of resources of each type that can: be +included in bindings in all descriptor set layouts in a pipeline layout as +shown in <>. The ``Total Resources Available'' column gives the limit on the +number of each type of resource that can: be included in bindings in all +descriptor sets in the pipeline layout. Some resource types count against +multiple limits. Additionally, there are limits on the total number of each +type of resource that can: be used in any pipeline stage as described in +<>. + +[[descriptorsets-pipelinelayout-limits]] +.Pipeline Layout Resource Limits +[width="80%",cols="<37,<22",options="header"] +|============================= +| Total Resources Available | Resource Types +.2+<.^| maxDescriptorSetSamplers + | sampler | combined image sampler +.3+<.^| maxDescriptorSetSampledImages + | sampled image | combined image sampler | uniform texel buffer +.2+<.^| maxDescriptorSetStorageImages + | storage image | storage texel buffer +.2+<.^| maxDescriptorSetUniformBuffers + | uniform buffer | uniform buffer dynamic +| maxDescriptorSetUniformBuffersDynamic + | uniform buffer dynamic +.2+<.^| maxDescriptorSetStorageBuffers + | storage buffer | storage buffer dynamic +| maxDescriptorSetStorageBuffersDynamic + | storage buffer dynamic +| maxDescriptorSetInputAttachments + | input attachment +|============================= + + +To destroy a pipeline layout, call: + +include::../protos/vkDestroyPipelineLayout.txt[] + + * pname:device is the logical device that destroys the pipeline layout. + * pname:pipelineLayout is the pipeline layout to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroyPipelineLayout.txt[] + + +[[descriptorsets-compatibility]] +==== Pipeline Layout Compatibility + +Two pipeline layouts are defined to be ``compatible for +<>'' if they were created +with identical push constant ranges. Two pipeline layouts are defined to be +``compatible for set N'' if they were created with matching (the same, or +identically defined) descriptor set layouts for sets zero through N, and if +they were created with identical push constant ranges. + +When binding a descriptor set (see <>) to set number N, if the previously bound descriptor sets for sets +zero through N-1 were all bound using compatible pipeline layouts, then +performing this binding does not disturb any of the lower numbered sets. If, +additionally, the previous bound descriptor set for set N was bound using a +pipeline layout compatible for set N, then the bindings in sets numbered +greater than N are also not disturbed. + +Similarly, when binding a pipeline, the pipeline can: correctly access any +previously bound descriptor sets which were bound with compatible pipeline +layouts, as long as all lower numbered sets were also bound with +compatible layouts. + +Layout compatibility means that descriptor sets can: be bound to a command +buffer for use by any pipeline created with a compatible pipeline layout, +and without having bound a particular pipeline first. It also means that +descriptor sets can: remain valid across a pipeline change, and the same +resources will be accessible to the newly bound pipeline. + +ifdef::implementation-guide[] +.Implementor's Note +**** +A consequence of layout compatibility is that when the implementation +compiles a pipeline layout and assigns hardware units to resources, the +mechanism to assign hardware units for set N should: only be a function of +sets [0..N]. +**** +endif::implementation-guide[] + +[NOTE] +.Note +==== +Place the least frequently changing descriptor sets near the start of +the pipeline layout, and place the descriptor sets representing the most +frequently changing resources near the end. When pipelines are switched, +only the descriptor set bindings that have been invalidated will need to be +updated and the remainder of the descriptor set bindings will remain in +place. +==== + +The maximum number of descriptor sets that can: be bound to a pipeline +layout is queried from physical device properties (see +pname:maxBoundDescriptorSets in <>). + +.API example +[source,{basebackend@docbook:c++:cpp}] +--------------------------------------------------- +const VkDescriptorSetLayout layouts = { layout1, layout2 }; + +const VkPushConstantRange ranges[] = +{ + { + VK_PIPELINE_STAGE_VERTEX_SHADER_BIT, // stageFlags + 0, // offset + 4 // size + }, + + { + VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, // stageFlags + 4, // offset + 4 // size + }, +}; + +const VkPipelineLayoutCreateInfo createInfo = +{ + VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, // sType + NULL, // pNext + 2, // setLayoutCount + layouts, // pSetLayouts + 2, // pushConstantRangeCount + ranges // pPushConstantRanges +}; + +VkPipelineLayout myPipelineLayout; +myResult = vkCreatePipelineLayout( + myDevice, + &createInfo, + &myPipelineLayout); +--------------------------------------------------- + + +[[descriptorsets-allocation]] +=== Allocation of Descriptor Sets + +Descriptor sets are allocated from _descriptor pool_ objects. A descriptor +pool maintains a pool of descriptors, from which sets are allocated. +Descriptor pools are externally synchronized, meaning that the application +mustnot: allocate and/or free descriptor sets from the same pool in multiple +threads simultaneously. + +To create a descriptor pool object, call: + +include::../protos/vkCreateDescriptorPool.txt[] + + * pname:device is the logical device that creates the descriptor pool. + * pname:pCreateInfo is a pointer to an instance of the + slink:VkDescriptorPoolCreateInfo structure specifying the state of the + descriptor pool object. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pDescriptorPool points to a sname:VkDescriptorPool handle in which + the resulting descriptor pool object is returned. + +pname:pAllocator controls host memory allocation as described in the +<> chapter. + +The created descriptor pool is returned in pname:pDescriptorPool. + +include::../validity/protos/vkCreateDescriptorPool.txt[] + +Additional information about the pool is passed in an instance of the +sname:VkDescriptorPoolCreateInfo structure: + +include::../structs/VkDescriptorPoolCreateInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags specifies certain supported operations on the pool, with + possible values defined below. + * pname:maxSets is the maximum number of descriptor sets that can: + be allocated from the pool. + * pname:poolSizeCount is the number of elements in pname:pPoolSizes. + * pname:pPoolSizes is a pointer to an array of sname:VkDescriptorPoolSize + structures, each containing a descriptor type and number of descriptors + of that type to be allocated in the pool. + +include::../validity/structs/VkDescriptorPoolCreateInfo.txt[] + +If multiple sname:VkDescriptorPoolSize structures appear in the +pname:pPoolSizes array then the pool will be created with enough storage +for the total number of descriptors of each type. + +Fragmentation of a descriptor pool is possible and may: lead to descriptor +set allocation failures. A failure due to fragmentation is defined as +failing a descriptor set allocation despite the sum of all outstanding +descriptor set allocations from the pool plus the requested allocation +requiring no more than the total number of descriptors requested at pool +creation. Implementations provide certain guarantees of when fragmentation +mustnot: cause allocation failure, as described below. + +If a descriptor pool has not had any descriptor sets freed since it was +created or most recently reset then fragmentation mustnot: cause an +allocation failure (note that this is always the case for a pool created +without the ename:VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT bit +set). Additionally, if all sets allocated from the pool since it was created +or most recently reset use the same number of descriptors (of each type) and +the requested allocation also uses that same number of descriptors (of each +type), then fragmentation mustnot: cause an allocation failure. + +If an allocation failure occurs due to fragmentation, an application can: +create an additional descriptor pool to perform further descriptor set +allocations. + +The pname:flags member of sname:VkDescriptorPoolCreateInfo can: include the +following values: + +include::../enums/VkDescriptorPoolCreateFlagBits.txt[] + +If pname:flags includes +ename:VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT, then descriptor +sets can: return their individual allocations to the pool, i.e. all of +fname:vkAllocateDescriptorSets, fname:vkFreeDescriptorSets, and +fname:vkResetDescriptorPool are allowed. Otherwise, descriptor sets +allocated from the pool mustnot: be individually freed back to the pool, +i.e. only fname:vkAllocateDescriptorSets and fname:vkResetDescriptorPool are +allowed. + +The definition of the sname:VkDescriptorPoolSize structure is: + +include::../structs/VkDescriptorPoolSize.txt[] + + * pname:type is the type of descriptor. + * pname:descriptorCount is the number of descriptors of that type + to allocate. + +include::../validity/structs/VkDescriptorPoolSize.txt[] + +To destroy a descriptor pool, call: + +include::../protos/vkDestroyDescriptorPool.txt[] + + * pname:device is the logical device that destroys the descriptor pool. + * pname:descriptorPool is the descriptor pool to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroyDescriptorPool.txt[] + +When a pool is destroyed, all descriptor sets allocated from the pool are +implicitly freed and become invalid. Descriptor sets allocated from a given +pool do not need to be freed before destroying that descriptor pool. + +Descriptor sets are allocated from a descriptor pool by calling: + +include::../protos/vkAllocateDescriptorSets.txt[] + + * pname:device is the logical device that owns the descriptor pool. + * pname:pAllocateInfo is a pointer to an instance of the + slink:VkDescriptorSetAllocateInfo structure describing parameters of the + allocation. + * pname:pDescriptorSets is a pointer to an array of sname:VkDescriptorSet + handles in which the resulting descriptor set objects are returned. The + array must be at least the length specified by the + pname:descriptorSetCount member of pname:pAllocateInfo. + +include::../validity/protos/vkAllocateDescriptorSets.txt[] + +The sname:VkDescriptorSetAllocateInfo structure is defined as: + +include::../structs/VkDescriptorSetAllocateInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:descriptorPool is the pool which the sets will be allocated from. + * pname:descriptorSetCount determines the number descriptor sets to be + allocated from the pool. + * pname:pSetLayouts is an array of descriptor set layouts, with each + member specifying how the corresponding descriptor set is allocated. + +The allocated descriptor sets are returned in pname:pDescriptorSets. + +include::../validity/structs/VkDescriptorSetAllocateInfo.txt[] + +When a descriptor set is allocated, the initial state is largely +uninitialized and all descriptors are undefined. However, +the descriptor set can: be bound +in a command buffer without causing errors or exceptions. Entries must: be +populated before they are accessed by a pipeline, but leaving uninitialized +entries that are not accessed by a pipeline will produce well-defined +results. This means applications need not populate unused entries with dummy +descriptors. + +Allocated descriptor sets are freed by calling: + +include::../protos/vkFreeDescriptorSets.txt[] + + * pname:device is the logical device that owns the descriptor pool. + * pname:descriptorPool is the descriptor pool from which the descriptor + sets were allocated. + * pname:descriptorSetCount is the number of elements in the + pname:pDescriptorSets array. + * pname:pDescriptorSets is an array of handles to slink:VkDescriptorSet + objects. All elements of pname:pDescriptorSets must: have been allocated + from pname:descriptorPool. + +In order to free individual descriptor sets, pname:descriptorPool must: have +been created with the +ename:VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT flag. + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +(Jon) Several comments above seem like they belong in validity XML. +==== +endif::editing-notes[] + +include::../validity/protos/vkFreeDescriptorSets.txt[] + +After a successful call to fname:vkFreeDescriptorSets, all descriptor sets +in pname:pDescriptorSets are invalid. + +Rather than freeing individual descriptor sets, all descriptor sets +allocated from a given pool can: be returned to the pool by calling: + +include::../protos/vkResetDescriptorPool.txt[] + + * pname:device is the logical device that owns the descriptor pool. + * pname:descriptorPool is the descriptor pool to be reset. + * pname:flags is currently unused and must be zero. + +include::../validity/protos/vkResetDescriptorPool.txt[] + +Resetting a descriptor pool recycles all of the resources from all of the +descriptor sets allocated from the descriptor pool back to the descriptor +pool, and the descriptor sets are implicitly freed. + + +[[descriptorsets-updates]] +=== Descriptor Set Updates + +Once allocated, descriptor sets can: be updated with a combination of write +and copy operations. To update descriptor sets, call: + +include::../protos/vkUpdateDescriptorSets.txt[] + + * pname:device is the logical device that updates the descriptor sets. + * pname:descriptorWriteCount is the number of elements in the + pname:pDescriptorWrites array. + * pname:pDescriptorWrites is a pointer to an array of + slink:VkWriteDescriptorSet structures describing the descriptor sets to + write to. + * pname:descriptorCopyCount is the number of elements in the + pname:pDescriptorCopies array. + * pname:pDescriptorCopies is a pointer to an array of + slink:VkCopyDescriptorSet structures describing the descriptor sets to + copy between. + +include::../validity/protos/vkUpdateDescriptorSets.txt[] + +Each element in the pname:pDescriptorWrites array describes an operation +updating the descriptor set using descriptors for resources specified in the +structure. + +The definition of sname:VkWriteDescriptorSet is: + +include::../structs/VkWriteDescriptorSet.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:dstSet is the destination descriptor set to update. + * pname:dstBinding is the descriptor binding within that set. + * pname:dstArrayElement is the starting element in that array. + * pname:descriptorCount is the number of descriptors to update (the + number of elements in pname:pImageInfo, pname:pBufferInfo, or + pname:pTexelBufferView). + * pname:descriptorType is the type of each descriptor in pname:pImageInfo, + pname:pBufferInfo, or pname:pTexelBufferView, and must: be the same type + as what was specified in sname:VkDescriptorSetLayoutBinding for + pname:dstSet at pname:dstBinding. The type of the descriptor also + controls which array the descriptors are taken from. + pname:descriptorType can: take on values including: + +include::../enums/VkDescriptorType.txt[] + + * pname:pImageInfo points to an array of sname:VkDescriptorImageInfo + structures or is ignored, as described below. + * pname:pBufferInfo points to an array of sname:VkDescriptorBufferInfo + structures or is ignored, as described below. + * pname:pTexelBufferView points to an array of sname:VkBufferView + handles or is ignored, as described below. + +include::../validity/structs/VkWriteDescriptorSet.txt[] + +Only one of pname:pImageInfo, pname:pBufferInfo, or pname:pTexelBufferView +members is used according to the descriptor type specified in the +pname:descriptorType member of the containing sname:VkWriteDescriptorSet +structure, as specified below. + +If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, +ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, +ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, or +ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the pname:pBufferInfo array +will be used to update the descriptors, and other arrays will be ignored. +Each entry is of type sname:VkDescriptorBufferInfo and is defined as: + +include::../structs/VkDescriptorBufferInfo.txt[] + + * pname:buffer is the buffer resource. + * pname:offset is the offset in bytes from the start of pname:buffer. + Access to buffer memory via this descriptor uses addressing that is + relative to this starting offset. + * pname:range is the size in bytes that is used for this descriptor + update, or ename:VK_WHOLE_SIZE to use the range from pname:offset to the + end of the buffer. + +include::../validity/structs/VkDescriptorBufferInfo.txt[] + +For ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC and +ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC descriptor types, +pname:offset is the base offset from which the dynamic offset is applied and +pname:range is the static size used for all dynamic offsets. + +If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or +ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, the pname:pTexelBufferView +array will be used to update the descriptors, and other arrays will be +ignored. + +If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLER, +ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, +ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, +ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or +ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the members in pname:pImageInfo +array will be used to update the descriptors, and other arrays will be +ignored. pname:imageInfo is of type sname:VkDescriptorImageInfo and is +defined as: + +include::../structs/VkDescriptorImageInfo.txt[] + + * pname:sampler is a sampler handle, and is used in descriptor updates for + types ename:VK_DESCRIPTOR_TYPE_SAMPLER and + ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER if the binding being + updated does not use immutable samplers. + * pname:imageView is an image view handle, and is used in descriptor + updates for types ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, + ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, + ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and + ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT. + * pname:imageLayout is the layout that the image will be in at the time + this descriptor is accessed. pname:imageLayout is used in descriptor + updates for types ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, + ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, + ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and + ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT. + +include::../validity/structs/VkDescriptorImageInfo.txt[] + +Members of sname:VkDescriptorImageInfo that are not used in an update (as +described above) are ignored. + +[[descriptorsets-updates-consecutive, consecutive binding updates]] +If the pname:dstBinding has fewer than pname:descriptorCount array elements +remaining starting from pname:dstArrayElement, then the remainder will be +used to update the subsequent binding - pname:dstBinding+1 starting at array +element zero. This behavior applies recursively, with the update affecting +consecutive bindings as needed to update all pname:descriptorCount +descriptors. All consecutive bindings updated via a single +sname:VkWriteDescriptorSet structure must: have identical +pname:descriptorType and pname:stageFlags, and must: all either use +immutable samplers or must: all not use immutable samplers. + +Each element in the pname:pDescriptorCopies array in a +sname:VkCopyDescriptorSet structure describing an operation copying +descriptors between sets. The definition of sname:VkCopyDescriptorSet is: + +include::../structs/VkCopyDescriptorSet.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:srcSet, pname:srcBinding, and pname:srcArrayElement are the + source set, binding, and array element, respectively. + * pname:dstSet, pname:dstBinding, and pname:dstArrayElement are the + destination set, binding, and array element, respectively. + * pname:descriptorCount is the number of descriptors to copy from + the source to destination. If pname:descriptorCount is greater than the + number of remaining array elements in the source or destination binding, + those affect consecutive bindings in a manner similar to + slink:VkWriteDescriptorSet above. + +include::../validity/structs/VkCopyDescriptorSet.txt[] + + +[[descriptorsets-binding]] +=== Descriptor Set Binding + +Once descriptor sets have been allocated, one or more descriptor sets can: +be bound to the command buffer by calling: + +include::../protos/vkCmdBindDescriptorSets.txt[] + + * pname:commandbuffer is the command buffer that the descriptor sets will + be bound to. + * pname:pipelineBindPoint is a elink:VkPipelineBindPoint indicating + whether the descriptors will be used by graphics pipelines or compute + pipelines. There is a separate set of bind points for each of graphics + and compute, so binding one does not disturb the other. + * pname:layout is a sname:VkPipelineLayout object used to program the + bindings. + * pname:firstSet is the set number of the first descriptor set to be + bound. + * pname:descriptorSetCount is the number of elements in the + pname:pDescriptorSets array. + * pname:pDescriptorSets is a pointer to an array of slink:VkDescriptorSet + structures describing the descriptor sets to write to. + * pname:dynamicOffsetCount is the number of dynamic offsets + in the pname:pDynamicOffsets array. + * pname:pDynamicOffsets is a pointer to an array of basetype:uint32_t + values specifying dynamic offsets. + +If any of the sets being bound include dynamic uniform or storage buffers, +then pname:pDynamicOffsets includes one element for each array element +in each dynamic descriptor type binding in each set. Values are taken from + +fname:vkCmdBindDescriptorSets causes the sets numbered [pname:firstSet.. +pname:firstSet+pname:descriptorSetCount-1] to use the bindings stored in +pname:pDescriptorSets[0..pname:descriptorSetCount-1] for subsequent +rendering commands (either compute or graphics, according to the +pname:pipelineBindPoint). Any bindings that were previously applied via +these sets are no longer valid. + +Once bound, a descriptor set affects rendering of subsequent graphics or +compute commands in the command buffer until a different set is bound to the +same set number, or else until the set is disturbed as described in +<>. + +A compatible descriptor set must: be bound for all set numbers that any +shaders in a pipeline access, at the time that a draw or dispatch command is +recorded to execute using that pipeline. However, if none of the shaders in +a pipeline statically use any bindings with a particular set number, then no +descriptor set need be bound for that set number, even if the pipeline +layout includes a non-trivial descriptor set layout for that set number. + +If any of the sets being bound include dynamic uniform or storage buffers, +then pname:pDynamicOffsets includes one element for each array element +in each dynamic descriptor type binding in each set. Values are taken from +pname:pDynamicOffsets in an order such that all entries for set N come +before set N+1; within a set, entries are ordered by the binding numbers in +the decriptor set layouts; and within a binding array, elements are in +order. pname:dynamicOffsetCount must: equal the total number of dynamic +descriptors in the sets being bound. + +The effective offset used for dynamic uniform and storage buffer bindings is +the sum of the relative offset taken from pname:pDynamicOffsets, and the +base address of the buffer plus base offset in the descriptor set. The +length of the dynamic uniform and storage buffer bindings is the buffer +range as specified in the descriptor set. + +Each of the pname:pDescriptorSets must: be compatible with the pipeline +layout specified by pname:layout. The layout used to program the bindings +must: also be compatible with the pipeline used in subsequent graphics or +compute commands, as defined in the <> section. + +The descriptor set contents bound by a call to fname:vkCmdBindDescriptorSets +may: be consumed during host execution of the command, or during +shader execution of the resulting draws, or any time in between. Thus, the +contents mustnot: be altered (overwritten by an update command, or freed) +between when the command is recorded and when the command completes +executing on the queue. The contents of pname:pDynamicOffsets are consumed +immediately during execution of fname:vkCmdBindDescriptorSets. Once all +pending uses have completed, it is legal to update and reuse a descriptor +set. + +include::../validity/protos/vkCmdBindDescriptorSets.txt[] + + +=== Push Constant Updates + +[[descriptorsets-push-constants]] + +As described above in section <>, the pipeline layout defines shader push constants which are +updated via {apiname} commands rather than via writes to memory or copy +commands. + +[NOTE] +.Note +==== +Push constants represent a high speed path to modify constant data in +pipelines that is expected to outperform memory-backed resource updates. +==== + +The contents of the push constants are undefined at the start of a command +buffer. Push constants are updated by calling: + +include::../protos/vkCmdPushConstants.txt[] + + * pname:commandbuffer is the command buffer in which the push constant + update will be recorded. + * pname:layout is the pipeline layout used to program the push constant + updates. + * pname:stageFlags is a bitmask of elink:VkShaderStageFlagBits specifying + the shader stages that will use the push constants in the updated range. + * pname:offset is the start offset of the push constant range to update, + in units of bytes. + * pname:size is the size of the push constant range to update, in units of + bytes. + * pname:pValues is an array of pname:size bytes containing the new push + constant values. + +include::../validity/protos/vkCmdPushConstants.txt[] diff --git a/doc/specs/vulkan/chapters/devsandqueues.txt b/doc/specs/vulkan/chapters/devsandqueues.txt new file mode 100644 index 00000000..48177e41 --- /dev/null +++ b/doc/specs/vulkan/chapters/devsandqueues.txt @@ -0,0 +1,661 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[devsandqueues]] += Devices and Queues + +Once {apiname} is initialized, devices and queues are the primary objects +used to interact with a {apiname} implementation. + +{apiname} separates the concept of _physical_ and _logical_ devices. A +physical device usually represents a single device in a system (perhaps made +up of several individual hardware devices working together), of which there +are a finite number. A logical device represents an application's view of +the device. + +[[devsandqueues-physical-device-enumeration]] +== Physical Devices + +To retrieve a list of physical device objects representing the +physical devices installed in the system, call: + +include::../protos/vkEnumeratePhysicalDevices.txt[] + + * pname:instance is a handle to a {apiname} instance previously created + with fname:vkCreateInstance. + * If pname:pPhysicalDevices is `NULL`, the number of physical devices + available is returned in pname:pPhysicalDeviceCount. If + pname:pPhysicalDevices is not `NULL`, + * pname:pPhysicalDeviceCount must: point to a variable set by the user to + the size of the array pointed to by pname:pPhysicalDevices, and is + overwritten with the number of physical devices actually written to + pname:pPhysicalDevices. + +include::../validity/protos/vkEnumeratePhysicalDevices.txt[] + +Once enumerated, general properties of the physical devices are queried by +calling: + +include::../protos/vkGetPhysicalDeviceProperties.txt[] + + * pname:physicalDevice is the handle to the physical device whose + properties will be queried. + * pname:pProperties points to an instance of the + sname:VkPhysicalDeviceProperties structure, that will be filled with + returned information. + +include::../validity/protos/vkGetPhysicalDeviceProperties.txt[] + +The definition of sname:VkPhysicalDeviceProperties is: + +include::../structs/VkPhysicalDeviceProperties.txt[] + +The members of sname:VkPhysicalDeviceProperties have the following meanings: + + * pname:apiVersion is the version of {apiname} supported by the device, + encoded as described in the <> section. + * pname:driverVersion is the vendor-specified version of the driver. + * pname:vendorID is a unique identifier for the _vendor_ (see below) of + the physical device. + * pname:deviceID is a unique identifier for the physical device among + devices available from the vendor. + * pname:deviceType is a elink:VkPhysicalDeviceType specifying the type of + device. + * pname:deviceName is a pointer to a null-terminated UTF-8 string + containing the name of the device. + * pname:pipelineCacheUUID is an array of size ename:VK_UUID_SIZE, + containing 8-bit values that represent a universally unique identifier + for the device. + * pname:limits is the sname:VkPhysicalDeviceLimits structure which + specifies device-specific limits of the physical device. See + <> for details. + * pname:sparseProperties is the sname:VkPhysicalDeviceSparseProperties + structure which specifies various sparse related properties of the + physical device. See <> for + details. + +include::../validity/structs/VkPhysicalDeviceProperties.txt[] + +The pname:vendorID and pname:deviceID fields are provided to allow +applications to adapt to device characteristics that are not +adequately exposed by other Vulkan queries. These may include +performance profiles, hardware errata, or other characteristics. +In PCI-based implementations, the low sixteen bits of pname:vendorID +and pname:deviceID must: contain (respectively) the PCI vendor and +device IDs associated with the hardware device, and the remaining bits +must: be set to zero. In non-PCI implementations, the choice of what values +to return may: be dictated by operating system or platform policies. It is +otherwise at the discretion of the implementer, subject to the following +constraints and guidelines: + + * For purposes of physical device identification, the _vendor_ of a + physical device is the entity responsible for the most salient + characteristics of the hardware represented by the physical device + handle. In the case of a discrete GPU, this should: be the GPU + chipset vendor. In the case of a GPU or other accelerator integrated + into a system-on-chip (SoC), this should: be the supplier of the + silicon IP used to create the GPU or other accelerator. + * If the vendor of the physical device has a valid PCI vendor ID issued by + https://pcisig.com/[PCI-SIG], that ID should: be used to construct the + value of pname:vendorID as described above for PCI-based + implementations. Implementations that do not return a PCI vendor ID in + pname:vendorID must: return a valid Khronos vendor ID, obtained as + defined in the <> section. Khronos vendor IDs are allocated starting at 0x10000, + to distinguish them from the PCI vendor ID namespace. + * The vendor of the physical device is responsible for selecting the + value of pname:deviceID. The value selected should: uniquely + identify both the device version and any major configuration options + (for example, core count in the case of multicore devices). The same + device ID should: be used for all physical implementations of that + device version and configuration. For example, all uses of a + specific silicon IP GPU version and configuration should use the + same device ID, even if those uses occur in different SoCs. + +The physical devices types are: + +include::../enums/VkPhysicalDeviceType.txt[] + + * ename:VK_PHYSICAL_DEVICE_TYPE_OTHER The device does not match any + other available types. + * ename:VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU The device is typically + one embedded in or tightly coupled with the host. + * ename:VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU The device is typically + a separate processor connected to the host via an interlink. + * ename:VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU The device is typically + a virtual node in a virtualization environment. + * ename:VK_PHYSICAL_DEVICE_TYPE_CPU The device is typically running on the + same processors as the host. + +The physical device type is advertised for informational purposes only, and +does not directly affect the operation of the system. However, the device +type may correlate with other advertised properties or capabilities of the +system, such as how many memory heaps there are. + +Properties of queues available on a physical device are queried by calling: + +include::../protos/vkGetPhysicalDeviceQueueFamilyProperties.txt[] + + * pname:physicalDevice is the handle to the physical device whose + properties will be queried. + * pname:pQueueFamilyPropertyCount is a pointer to an integer related to + the number of queue families available or queried, as described below. + * pname:pQueueFamilyProperties is either `NULL` or a pointer to an array + of sname:VkQueueFamilyProperties structures. + +If pname:pQueueFamilyProperties is `NULL`, then the number of queue families +available is returned in pname:pQueueFamilyPropertyCount. Otherwise, +pname:pQueueFamilyPropertyCount must: point to a variable set by the user to +the number of elements in the pname:pQueueFamilyProperties array, and on +return the variable is overwritten with the number of structures actually +written to pname:pQueueFamilyProperties. If the value of +pname:pQueueFamilyPropertyCount is less than the number of queue families +available, at most pname:pQueueFamilyPropertyCount structures will be +written. + +include::../validity/protos/vkGetPhysicalDeviceQueueFamilyProperties.txt[] + +The definition of sname:VkQueueFamilyProperties is: + +include::../structs/VkQueueFamilyProperties.txt[] + +The members of sname:VkQueueFamilyProperties have the following meanings: + + * pname:queueFlags contains flags indicating the capabilities of the + queues in this queue family. + * pname:queueCount is the unsigned integer count of queues in this + queue family. + * pname:timestampValidBits is the unsigned integer count of meaningful + bits in the timestamps written via fname:vkCmdWriteTimestamp. The valid + range for the count is 36..64 bits, or a value of 0, indicating no + support for timestamps. Bits outside the valid range are guaranteed to + be zeros. + * pname:minImageTransferGranularity is the minimum granularity + supported for image transfer operations on the queues in this queue + family. + +The bits specified in pname:queueFlags are: +include::../enums/VkQueueFlagBits.txt[] + + * if ename:VK_QUEUE_GRAPHICS_BIT is set, then the queues in this queue + family support graphics operations. + * if ename:VK_QUEUE_COMPUTE_BIT is set, then the queues in this queue + family support compute operations. + * if ename:VK_QUEUE_TRANSFER_BIT is set, then the queues in this queue + family support transfer operations. + * if ename:VK_QUEUE_SPARSE_BINDING_BIT is set, then the queues in this + queue family support sparse memory management operations (see + <>). If any of the sparse resource + features are enabled, then at least one queue family must: support this + bit. + +If an implementation exposes any queue family that supports graphics +operations, at least one queue family of at least one physical device +exposed by the implementation must: support both graphics and compute +operations. + +include::../validity/structs/VkQueueFamilyProperties.txt[] + +For further details see <>. + +The value returned in pname:minImageTransferGranularity has a unit of blocks +for images having a block compressed format, and a unit of texels otherwise. + +Possible values of pname:minImageTransferGranularity are: + + * latexmath:[$(0,0,0)$] which indicates that only whole mip levels must: + be transferred using the image transfer operations on the corresponding + queues. In this case, the following restrictions apply to all offset and + extent parameters of image transfer operations: + + ** The pname:x, pname:y, and pname:z members of a sname:VkOffset3D + parameter must: always be zero. + ** The pname:width, pname:height, and pname:depth members of a + sname:VkExtent3D parameter must: always match the width, height, and + depth of the image subresource corresponding to the parameter, + respectively. + + * latexmath:[$(Ax, Ay, Az)$] where latexmath:[$Ax$], latexmath:[$Ay$], + and latexmath:[$Az$] are all integer powers of two. In this case the + following restrictions apply to all image transfer operations: + + ** pname:x, pname:y, and pname:z of a sname:VkOffset3D parameter must: be + integer multiples of latexmath:[$Ax$], latexmath:[$Ay$], and + latexmath:[$Az$], respectively. + ** pname:width of a sname:VkExtent3D parameter must: be an integer + multiple of latexmath:[$Ax$], or else latexmath:[$(x + width)$] must: + equal the width of the image subresource corresponding to the + parameter. + ** pname:height of a sname:VkExtent3D parameter must: be an integer + multiple of latexmath:[$Ay$], or else latexmath:[$(y + height)$] must: + equal the height of the image subresource corresponding to the + parameter. + ** pname:depth of a sname:VkExtent3D parameter must: be an integer + multiple of latexmath:[$Az$], or else latexmath:[$(z + depth)$] must: + equal the depth of the image subresource corresponding to the + parameter. + ** If the format of the image corresponding to the parameters is one of + the block compressed formats then for the purposes of the above + calculations the granularity must: be scaled up by the block size. + +Queues supporting graphics and/or compute operations must: report +latexmath:[$(1,1,1)$] in pname:minImageTransferGranularity, meaning that +there are no additional restrictions on the granularity of image +transfer operations for these queues. Other queues supporting image +transfer operations are only required: to support whole mip level +transfers, thus the value of pname:minImageTransferGranularity for +queues belonging to such queue families may: be latexmath:[$(0,0,0)$]. + +The <> section describes memory properties +queried from the physical device. + +For physical device feature queries see the <> chapter. + +[[devsandqueues-devices]] +== Devices + +Device objects represent logical connections to physical devices. Each +device exposes a number of _queue families_ each having one or more +_queues_. All queues in a queue family support the same operations. + +As described in <>, a {apiname} application will first query for all physical devices +in a system. Each physical device can: then be queried for its capabilities, +including its queue and queue family properties. Once an acceptable physical +device is identified, an application will create a corresponding logical +device. An application must: create a separate logical device for each +physical device it will use. The created logical device is then the primary +interface to the physical device. + +How to enumerate the physical devices in a system and query those physical +devices for their queue family properties is described in the +<> +section above. + + +[[devsandqueues-device-creation]] +=== Device Creation + +A logical device is created as a _connection_ to a physical device. To +create a logical device, call: + +include::../protos/vkCreateDevice.txt[] + + * pname:physicalDevice must: be one of the device handles returned from a + call to fname:vkEnumeratePhysicalDevices (see + <>). + * pname:pCreateInfo is a pointer to a sname:VkDeviceCreateInfo structure + containing information about how to create the device. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pDevice points to a handle in which the created sname:VkDevice is + returned. + +include::../validity/protos/vkCreateDevice.txt[] + +The definition of sname:VkDeviceCreateInfo is: + +include::../structs/VkDeviceCreateInfo.txt[] + +The members of sname:VkDeviceCreateInfo have the following meanings: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:queueCreateInfoCount is the unsigned integer size of the + pname:pQueueCreateInfos array. Refer to the + <> section below for + further details. + * pname:pQueueCreateInfos is a pointer to an array of + sname:VkDeviceQueueCreateInfo structures describing the queues that are + requested to be created along with the logical device. Refer to the + <> section below for + further details. + * pname:enabledLayerCount is the number of device layers to enable. + * pname:ppEnabledLayerNames is a pointer to an array of + pname:enabledLayerCount null-terminated UTF-8 strings containing the + names of layers to enable for the created device. See the + <> + chapter for further details. + * pname:enabledExtensionCount is the number of device extensions to + enable. + * pname:ppEnabledExtensionNames is a pointer to an array of + pname:enabledExtensionCount null-terminated UTF-8 strings containing the + names of extensions to enable for the created device. See the + <> + chapter for further details. + * pname:pEnabledFeatures is a pointer to a sname:VkPhysicalDeviceFeatures + structure that contains boolean indicators of all the features to be + enabled. Refer to the <> section for further + details. + +include::../validity/structs/VkDeviceCreateInfo.txt[] + +Multiple logical devices can: be created from the same physical device. +Logical device creation may: fail due to lack of device-specific resources +(in addition to the other errors). If that occurs, fname:vkCreateDevice will +return ename:VK_ERROR_TOO_MANY_OBJECTS. + +[[devsandqueues-use]] +=== Device Use + +The following is a high-level list of sname:VkDevice uses along with +references on where to find more information: + + * Creation of queues. See the <> section + below for further details. + * Creation and tracking of various synchronization constructs. See + <> for further + details. + * Allocating, freeing, and managing memory. See <> and <> for further details. + * Creation and destruction of command buffers and command buffer pools. + See <> for further details. + * Creation, destruction, and management of graphics state. See + <> and <>, + among others, for further details. + + +[[devsandqueues-idle]] +=== Device Idle + +A device is active while any of its queues have work to process. Once all +device queues are idle, the device is idle. To wait for this condition, +call: + +include::../protos/vkDeviceWaitIdle.txt[] + + * pname:device is the logical device to idle. + +include::../validity/protos/vkDeviceWaitIdle.txt[] + + +[[devsandqueues-lost-device]] +=== Lost Device + +A logical device may: become _lost_ because of hardware errors, execution +timeouts, power management events and/or platform-specific events. This may: +cause pending and future command execution to fail and cause hardware +resources to be corrupted. When this happens, certain commands will return +ename:VK_ERROR_DEVICE_LOST (see <> for +a list of such commands). After any such event, the logical device is +considered _lost_. It is not possible to reset the logical device to a +non-lost state, however the lost state is specific to a logical device +(sname:VkDevice), and the corresponding physical device +(sname:VkPhysicalDevice) may: be otherwise unaffected. In some cases, the +physical device may: also be lost, and attempting to create a new logical +device will fail, returning ename:VK_ERROR_DEVICE_LOST. This is usually +indicative of a problem with the underlying hardware, or its connection to +the host. If the physical device has not been lost, and a new logical device +is successfully created from that physical device, it must: be in the +non-lost state. + +[NOTE] +.Note +==== +Whilst logical device loss may: be recoverable, in the case of physical +device loss, it is unlikely that an application will be able to recover +unless additional, unaffected physical devices exist on the system. The +error is largely informational and intended only to inform the user that +their hardware has probably developed a fault or become physically +disconnected, and should: be investigated further. In many cases, physical +device loss may: cause other more serious issues such as the operating +system crashing; in which case it maynot: be reported via the {apiname} API. +==== + +[NOTE] +.Note +==== +Undefined behavior caused by an application error may: cause a device to +become lost. However, such undefined behavior may: also cause unrecoverable +damage to the process, and it is then not guaranteed that the API objects, +including the sname:VkPhysicalDevice or the sname:VkInstance are still valid +or that the error is recoverable. +==== + +When a device is lost, its child objects are not implicitly destroyed and +their handles are still valid. Those objects must: still be destroyed before +their parents or the device can: be destroyed (see +<>). The host address space corresponding to +device memory mapped using flink:vkMapMemory is still valid, and host memory +accesses to these mapped regions are still valid, but the contents are +undefined. It is still legal to call any API command on the device and child +objects. + +Once a device is lost, command execution may: fail, and commands that return +a basetype:VkResult may: return ename:VK_ERROR_DEVICE_LOST. Commands that do +not allow run-time errors must: still operate correctly for valid usage and, +if applicable, return valid data. + +Commands that wait indefinitely for device execution (namely +flink:vkDeviceWaitIdle, flink:vkQueueWaitIdle, flink:vkWaitForFences with a +maximum pname:timeout, and flink:vkGetQueryPoolResults with the +ename:VK_QUERY_RESULT_WAIT_BIT bit set in pname:flags) must: return in +finite time even in the case of a lost device, and return either +ename:VK_SUCCESS or ename:VK_ERROR_DEVICE_LOST. For any command that may: +return ename:VK_ERROR_DEVICE_LOST, for the purpose of determining whether a +command buffer is pending execution, or whether resources are considered +in-use by the device, a return value of ename:VK_ERROR_DEVICE_LOST is +equivalent to ename:VK_SUCCESS. + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +TODO (piman) - I don't think we're very clear about what ``in-use by the +device'' means. +==== +endif::editing-notes[] + + +[[devsandqueues-destruction]] +=== Device Destruction + +To destroy a device, call: + +include::../protos/vkDestroyDevice.txt[] + + * pname:device is the logical device to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroyDevice.txt[] + +To ensure that no work is active on the device, flink:vkDeviceWaitIdle +can: be used to gate the destruction of the device. Prior to destroying a +device, an application is responsible for destroying/freeing any {apiname} +objects that were created using that device as the first parameter of the +corresponding ftext:vkCreate* or ftext:vkAllocate* command. + +[NOTE] +.Note +==== +The lifetime of each of these objects is bound by the lifetime of the +sname:VkDevice object. Therefore, to avoid resource leaks, it is critical +that an application explicitly free all of these resources prior to calling +fname:vkDestroyDevice. +==== + + +[[devsandqueues-queues]] +== Queues + + +[[devsandqueues-queueprops]] +=== Queue Family Properties + +As discussed in the <> section above, the +flink:vkGetPhysicalDeviceQueueFamilyProperties command is used to retrieve +details about the queue families and queues supported by a device. + +Each index in the pname:pQueueFamilyProperties array returned by +flink:vkGetPhysicalDeviceQueueFamilyProperties describes a unique queue +family on that physical device. These indices are used when creating queues, +and they correspond directly with the pname:queueFamilyIndex that is passed +to the flink:vkCreateDevice command via the slink:VkDeviceQueueCreateInfo +structure as described in the <> section below. + +Grouping of queue families within a physical device is +implementation-dependent. + +[NOTE] +.Note +==== +The general expectation is that a physical device groups all queues of +matching capabilities into a single family. However, this is a +recommendation to implementations and it is possible that a physical device +may: return two separate queue families with the same capabilities. +==== + +Once an application has identified a physical device with the queue(s) that +it desires to use, it will create those queues in conjunction with a logical +device. This is described in the following section. + + +[[devsandqueues-queue-creation]] +=== Queue Creation + +Creating a logical device also creates the queues associated with that +device. The queues to create are described by a set of +sname:VkDeviceQueueCreateInfo structures that are passed to +flink:vkCreateDevice in pname:pQueueCreateInfos. The definition of +sname:VkDeviceQueueCreateInfo is: + +include::../structs/VkDeviceQueueCreateInfo.txt[] + +The members of sname:VkDeviceQueueCreateInfo have the following meanings: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:queueFamilyIndex is an unsigned integer indicating the index of + the queue family to create on this device. The value of this index + corresponds to the index of an element of the + pname:pQueueFamilyProperties array that was returned by + fname:vkGetPhysicalDeviceQueueFamilyProperties. + * pname:queueCount is an unsigned integer specifying the number of + queues to create in the queue family indicated by + pname:queueFamilyIndex. + * pname:pQueuePriorities is an array of pname:queueCount + normalized floating point values, specifying priorities of work that + will be submitted to each created queue. See + <> for more information. + +include::../validity/structs/VkDeviceQueueCreateInfo.txt[] + +To retrieve a handle to a VkQueue object, call: + +include::../protos/vkGetDeviceQueue.txt[] + + * pname:device is the logical device that owns the queue. + * pname:queueFamilyIndex is the index of the queue family to which the + queue belongs. + * pname:queueIndex is the index within this queue family of the queue to + retrieve. + * pname:pQueue is a pointer to a sname:VkQueue object that will be filled + with the handle for the requested queue. + +include::../validity/protos/vkGetDeviceQueue.txt[] + + +[[devsandqueues-index]] +=== Queue Family Index + +The queue family index is used in multiple places in {apiname} in order to +tie operations to a specific family of queues. + +When retrieving a handle to the queue via fname:vkGetDeviceQueue, the queue +family index is used to select which queue family to retrieve the +sname:VkQueue handle from as described in the previous section. + +When creating a sname:VkCommandPool object (see +<>), a queue family index is specified +in the sname:VkCommandPoolCreateInfo structure. Command buffers from this +pool can: only be submitted on queues corresponding to this queue family. + +When creating sname:VkImage (see <>) and +sname:VkBuffer (see <>) resources, a set of queue +families is included in the slink:VkImageCreateInfo and +slink:VkBufferCreateInfo structures to specify the queue families that can: +access the resource. + +When inserting a slink:VkBufferMemoryBarrier or slink:VkImageMemoryBarrier +(see <>) a source and destination queue family index +is specified to allow the ownership of a buffer or image to be transferred +from one queue family to another. See the <> section for details. + + +[[devsandqueues-priority]] +=== Queue Priority + +Each queue is assigned a priority, as set in the +sname:VkDeviceQueueCreateInfo structures when creating the device. The +priority of each queue is a normalized floating point value between 0.0 and +1.0, which is then translated to a discrete priority level by the +implementation. Higher values indicate a higher priority, with 0.0 being the +lowest priority and 1.0 being the highest. + +Within the same device, queues with higher priority may: be allotted more +processing time than queues with lower priority. The implementation makes no +guarantees with regards to ordering or scheduling among queues with the same +priority, other than the constraints defined by explicit scheduling +primitives. The implementation make no guarantees with regards to queues +across different devices. + +An implementation may: allow a higher-priority queue to starve a +lower-priority queue on the same sname:VkDevice until the higher-priority +queue has no further commands to execute. The relationship of queue +priorities mustnot: cause queues on one VkDevice to starve queues on another +sname:VkDevice. + +No specific guarantees are made about higher priority queues receiving more +processing time or better quality of service than lower priority queues. + + +[[devsandqueues-queuesynchronization]] +=== Queue Synchronization + +To wait on the completion of all work within a single queue, call: + +include::../protos/vkQueueWaitIdle.txt[] + + * pname:queue is the queue on which to wait. + +fname:vkQueueWaitIdle will block until all command buffers and sparse +binding operations in the queue have completed. + +include::../validity/protos/vkQueueWaitIdle.txt[] + +Synchronization between queues is done using {apiname} semaphores as +described in the <> +chapter. + + +[[devsandqueues-sparsebinding]] +=== Sparse Memory Binding + +In {apiname} it is possible to sparsely bind memory to buffers and +images as described in the <> chapter. Sparse +memory binding is a queue operation. A queue whose flags include the +ename:VK_QUEUE_SPARSE_BINDING_BIT must: be able to support the +mapping of a virtual address to a physical address on the device. This +causes an update to the page table mappings on the device. This update must: +be synchronized on a queue to avoid corrupting page table mappings during +execution of graphics commands. By binding the sparse memory resources on +queues, all commands that are dependent on the updated bindings are +synchronized to only execute after the binding is updated. See the +<> chapter for how this +synchronization is accomplished. + + +[[devsandqueues-queuedestruction]] +=== Queue Destruction + +Queues are created along with a logical device during +fname:vkCreateDevice. All queues associated with a logical device +are destroyed when fname:vkDestroyDevice is called on that device. diff --git a/doc/specs/vulkan/chapters/dispatch.txt b/doc/specs/vulkan/chapters/dispatch.txt new file mode 100644 index 00000000..256f958f --- /dev/null +++ b/doc/specs/vulkan/chapters/dispatch.txt @@ -0,0 +1,54 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[dispatch]] += Dispatching Commands + +_Dispatching commands_ (commands with ``Dispatch'' in the name) provoke work +in a compute pipeline. Dispatching commands are recorded into a command +buffer and when executed by a queue, will produce work which executes +according to the currently bound compute pipeline. A compute pipeline must: +be bound to a command buffer before any dispatch commands are recorded in +that command buffer. + +To record a dispatch, call: + +include::../protos/vkCmdDispatch.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:x is the number of workgroups to dispatch in the X dimension. + * pname:y is the number of workgroups to dispatch in the Y dimension. + * pname:z is the number of workgroups to dispatch in the Z dimension. + +When the command is executed, workgroups are assembled using pname:x, +pname:y, and pname:z. + +include::../validity/protos/vkCmdDispatch.txt[] + +An indirect dispatch is recorded by calling: + +include::../protos/vkCmdDispatchIndirect.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:buffer is the buffer containing dispatch parameters. + * pname:offset is the byte offset into pname:buffer where parameters + begin. + +fname:vkCmdDispatchIndirect behaves similarly to flink:vkCmdDispatch except +that the parameters are read by the device from a buffer during execution. +The parameters of the dispatch are encoded in a +slink:VkDispatchIndirectCommand structure taken from pname:buffer starting +at pname:offset. + +include::../validity/protos/vkCmdDispatchIndirect.txt[] + +The definition of sname:VkDispatchIndirectCommand is: + +include::../structs/VkDispatchIndirectCommand.txt[] + +The members of sname:VkDispatchIndirectCommand structure have the same +meaning as the similarly named parameters of flink:vkCmdDispatch. + +include::../validity/structs/VkDispatchIndirectCommand.txt[] diff --git a/doc/specs/vulkan/chapters/drawing.txt b/doc/specs/vulkan/chapters/drawing.txt new file mode 100644 index 00000000..16cf35b8 --- /dev/null +++ b/doc/specs/vulkan/chapters/drawing.txt @@ -0,0 +1,519 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[drawing]] += Drawing Commands + +_Drawing commands_ (command with ftext:Draw in the name) provoke work in a +graphics pipeline. Drawing commands are recorded into a command buffer and +when executed by a queue, will produce work which executes according to the +currently bound graphics pipeline. A graphics pipeline must: be bound to a +command buffer before any drawing commands are recorded in that command +buffer. + +Each draw is made up of zero or more vertices and zero or more instances, +which are processed by the device and result in the assembly of +primitives. Primitives are assembled according to the +pname:pInputAssemblyState member of the sname:VkGraphicsPipelineCreateInfo +structure, which is of type sname:VkPipelineInputAssemblyStateCreateInfo: + +include::../structs/VkPipelineInputAssemblyStateCreateInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:primitiveRestartEnable controls whether a special vertex index + value is treated as restarting the assembly of primitives. This enable + only applies to indexed draws (flink:vkCmdDrawIndexed and + flink:vkCmdDrawIndexedIndirect), and the special index value is either + 0xFFFFFFFF when the pname:indexType parameter of + fname:vkCmdBindIndexBuffer is equal to ename:VK_INDEX_TYPE_UINT32, or + 0xFFFF when pname:indexType is equal to ename:VK_INDEX_TYPE_UINT16. + Primitive restart is not allowed for ``list'' topologies. + * pname:topology is a elink:VkPrimitiveTopology defining the primitive + topology, as described below. + +include::../validity/structs/VkPipelineInputAssemblyStateCreateInfo.txt[] + +Restarting the assembly of primitives discards the most recent index values +if those elements formed an incomplete primitive, and restarts the primitive +assembly using the subsequent indices, but only assembling the immediately +following element through the end of the originally specified elements. The +primitive restart index value comparison is performed before adding the +pname:vertexOffset value to the index value. + + +[[drawing-primitive-topologies]] +== Primitive Topologies + +_Primitive topology_ determines how consecutive vertices are organized into +primitives, and determines the type of primitive that is used at the +beginning of the graphics pipeline. The effective topology for later stages +of the pipeline is altered by tessellation or geometry shading (if either is +in use) and depends on the execution modes of those shaders. Supported +topologies are defined by elink:VkPrimitiveTopology and include: + +include::../enums/VkPrimitiveTopology.txt[] + +Each primitive topology, and its construction from a list of vertices, is +summarized below. + + +=== Points + +A series of individual points are specified with pname:topology +ename:VK_PRIMITIVE_TOPOLOGY_POINT_LIST. Each vertex defines a separate +point. + + +=== Separate Lines + +Individual line segments, each defined by a pair of vertices, are specified +with pname:topology ename:VK_PRIMITIVE_TOPOLOGY_LINE_LIST. The first two +vertices define the first segment, with subsequent pairs of vertices each +defining one more segment. If the number of vertices is odd, then the last +vertex is ignored. + + +=== Line Strips + +A series of one or more connected line segments are specified with +pname:topology ename:VK_PRIMITIVE_TOPOLOGY_LINE_STRIP. In this case, the +first vertex specifies the first segment's start point while the second +vertex specifies the first segment's endpoint and the second segment's start +point. In general, the latexmath:[$i$]th vertex (for latexmath:[$i > 0$]) +specifies the beginning of the latexmath:[$i$]th segment and the end of the +latexmath:[$i-1$]st. The last vertex specifies the end of the last segment. +If only one vertex is specified, then no primitive is generated. + + +=== Triangle Strips + +A triangle strip is a series of triangles connected along shared edges, and +is specified with pname:topology ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP. +In this case, the first three vertices define the first triangle, and their +order is significant. Each subsequent vertex defines a new triangle using +that point along with the last two vertices from the previous triangle, as +shown in figure <>. If fewer than three vertices are +specified, no primitive is produced. The order of vertices in successive +triangles changes as shown in the figure, so that all triangle faces have +the same orientation. + +[[fig-triangles]] +.Triangle strips, fans, and lists +image:images/triangles.{svgpdf}["Triangle strips, fans, and lists",{fullimagewidth}] + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +TODO: Add full caption: + +* (a) A triangle strip. +* (b) A triangle fan. +* (c) Independent triangles. + +The numbers give the sequencing of the vertices in order within the vertex +arrays. Note that in (a) and (b) triangle edge ordering is determined by the +first triangle, while in (c) the order of each triangle's edges is +independent of the other triangles. +==== +endif::editing-notes[] + + +=== Triangle Fans + +A triangle fan is specified with pname:topology +ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN. It is similar to a triangle strip, +but changes the vertex replaced from the previous triangle as shown in +figure <>, so that all triangles in the fan share a common +vertex. + + +=== Separate Triangles + +Separate triangles are specified with pname:topology +ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, as shown in figure +<>. In this case, vertices latexmath:[$3i$], +latexmath:[$3i+1$], and latexmath:[$3i+2$] vertices (in that order) +determine a triangle for each latexmath:[$i=0,1,\ldots,n-1$], where there +are latexmath:[$3n+k$] vertices drawn. latexmath:[$k$] is either 0, 1, or 2; +if latexmath:[$k$] is not zero, the final latexmath:[$k$] vertices are +ignored. + + +=== Lines With Adjacency + +Lines with adjacency are specified with pname:topology +ename:VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, and are independent +line segments where each endpoint has a corresponding _adjacent_ vertex that +is accessible in a <>. +If a geometry shader is not active, the adjacent vertices are ignored. + +A line segment is drawn from the latexmath:[$4 i+1$]st vertex to the +latexmath:[$4 i+2$]nd vertex for each latexmath:[$i=0,1,\ldots, n-1$], where +there are latexmath:[$4 n+k$] vertices. latexmath:[$k$] is either 0, +1, 2, or 3; if latexmath:[$k$] is not zero, the final latexmath:[$k$] +vertices are ignored. For line segment latexmath:[$i$], the latexmath:[$4 +i$]th and latexmath:[$4 i+3$]rd vertices are considered adjacent to the +latexmath:[$4 i+1$]st and latexmath:[$4 i+2$]nd vertices, respectively, as +shown in figure <>. + +[[fig-lineadj]] +.Lines with adjacency +image:images/lineadj.{svgpdf}["Lines with adjacency",{fullimagewidth}] + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +TODO: Add full caption: + +Lines with adjacency (a) and line strips with adjacency (b). The vertices +connected with solid lines belong to the main primitives; the vertices +connected by dashed lines are the adjacent vertices that are accessible in a +geometry shader. +==== +endif::editing-notes[] + + +=== Line Strips With Adjacency + +Line strips with adjacency are specified with pname:topology +ename:VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY and are similar to +line strips, except that each line segment has a pair of adjacent vertices +that are accessible in a geometry shader. If a geometry shader is not +active, the adjacent vertices are ignored. + +A line segment is drawn from the latexmath:[$i+1$]st vertex to the +latexmath:[$i+2$]nd vertex for each latexmath:[$i=0,1,\ldots, n-1$], where +there are latexmath:[$n+3$] vertices. If there are fewer than four +vertices, all vertices are ignored. For line segment latexmath:[$i$], the +latexmath:[$i$]th and latexmath:[$i+3$]rd vertex are considered adjacent +to the latexmath:[$i+1$]st and latexmath:[$i+2$]nd vertices, respectively, +as shown in figure <>. + + +=== Triangle List With Adjacency + +Triangles with adjacency are specified with pname:topology +ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, and are similar to +separate triangles except that each triangle edge has an adjacent vertex +that is accessible in a geometry shader. If a geometry shader is not +active, the adjacent vertices are ignored. + +The latexmath:[$6i$]th, latexmath:[$6i+2$]nd, and latexmath:[$6i+4$]th +vertices (in that order) determine a triangle for each +latexmath:[$i=0,1, \ldots, n-1$], where there are latexmath:[$6 n+k$] +vertices. latexmath:[$k$] is either 0, 1, 2, 3, 4, or 5; if +latexmath:[$k$] is non-zero, the final latexmath:[$k$] vertices are ignored. +For triangle latexmath:[$i$], the latexmath:[$6 i+1$]st, latexmath:[$6 +i+3$]rd, and latexmath:[$6 i+5$]th vertices are considered adjacent to edges +from the latexmath:[$6 i$]th to the latexmath:[$6 i+2$]nd, from the +latexmath:[$6 i+2$]nd to the latexmath:[$6 i+4$]th, and from the +latexmath:[$6 i+4$]th to the latexmath:[$6 i$]th vertices, respectively, as +shown in figure <>. + +[[fig-triadj]] +.Triangles with adjacency +image:images/triadj.{svgpdf}["Triangles with adjacency",{fullimagewidth}] + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +TODO: Add full caption: + +Triangles with adjacency. The vertices connected with solid lines belong +to the main primitive; the vertices connected by dashed lines are the +adjacent vertices that are accessible in a geometry shader.} +==== +endif::editing-notes[] + + +=== Triangle Strips With Adjacency + +Triangle strips with adjacency are specified with pname:topology +ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY, and are similar +to triangle strips except that each triangle edge has an adjacent vertex +that is accessible in a geometry shader. If a geometry shader is not +active, the adjacent vertices are ignored. + +In triangle strips with adjacency, latexmath:[$n$] triangles are drawn where +there are latexmath:[$2(n+2)+k$] vertices. latexmath:[$k$] is +either 0 or 1; if latexmath:[$k$] is 1, the final vertex is ignored. If +there are fewer than 6 vertices, the entire primitive is ignored. Table +<> describes the vertices and order used to draw each triangle, +and which vertices are considered adjacent to each edge of the triangle, as +shown in figure <>. + + +[[trigenadj]] +.Triangles generated by triangle strips with adjacency. +[options="header", cols="2,1,1,1,1,1,1"] +|==== +| 3+| Primitive Vertices 3+| Adjacent Vertices +| Primitive | 1st | 2nd | 3rd | 1/2 | 2/3 | 3/1 +| only (latexmath:[$i=0$], latexmath:[$n=1$]) | 0 | 2 | 4 | 1 | 5 | 3 +| first (latexmath:[$i=0$]) | 0 | 2 | 4 | 1 | 6 | 3 +| middle (latexmath:[$i$] odd) | latexmath:[$2 i+2$] | latexmath:[$2 i $] | latexmath:[$2 i+4$] | latexmath:[$2 i-2$] | latexmath:[$2 i+3$] | latexmath:[$2 i+6$] +| middle (latexmath:[$i$] even) | latexmath:[$2 i $] | latexmath:[$2 i+2$] | latexmath:[$2 i+4$] | latexmath:[$2 i-2$] | latexmath:[$2 i+6$] | latexmath:[$2 i+3$] +| last (latexmath:[$i=n-1$], latexmath:[$i$] odd) | latexmath:[$2 i+2$] | latexmath:[$2 i $] | latexmath:[$2 i+4$] | latexmath:[$2 i-2$] | latexmath:[$2 i+3$] | latexmath:[$2 i+5$] +| last (latexmath:[$i=n-1$], latexmath:[$i$] even)| latexmath:[$2 i $] | latexmath:[$2 i+2$] | latexmath:[$2 i+4$] | latexmath:[$2 i-2$] | latexmath:[$2 i+5$] | latexmath:[$2 i+3$] +|==== + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +TODO: Add full caption: + +Triangles generated by triangle strips with adjacency. Each triangle is +drawn using the vertices whose numbers are in the *1st*, *2nd*, and *3rd* +columns under *primitive vertices*, in that order. The vertices in the 1/2, +2/3, and 3/1 columns under *adjacent vertices* are considered adjacent to +the edges from the first to the second, from the second to the third, and +from the third to the first vertex of the triangle, respectively. The six +rows correspond to six cases: the first and only triangle latexmath:[$(i=0, +n=1)$], the first triangle of several latexmath:[$(i=0, n>0)$], ``odd'' +middle triangles latexmath:[$(i=1,3,5 \ldots)$], ``even'' middle triangles +latexmath:[$(i=2,4,6,\ldots)$], and special cases for the last triangle, +when latexmath:[$i$] is either even or odd. For the purposes of this table, +both the first vertex and first triangle are numbered latexmath:[$0$]. +==== +endif::editing-notes[] + +[[fig-tstripadj]] +.Triangle strips with adjacency +image:images/tstripadj.{svgpdf}["Triangle strips with adjacency",width="{svgpdf@pdf:400:800}"] + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +TODO: Add full caption: + +Triangle strips with adjacency. The vertices connected with solid lines +belong to the main primitives; the vertices connected by dashed lines are +the adjacent vertices that are accessible in a geometry shader. +==== +endif::editing-notes[] + + +[[drawing-primitive-topologies-patches]] +=== Separate Patches + +Separate patches are specified with pname:topology +ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST. A patch is an ordered collection of +vertices used for <>. The +vertices comprising a patch have no implied geometric ordering, and are used +by tessellation shaders and the fixed-function tessellator to generate new +point, line, or triangle primitives. + +Each patch in the series has a fixed number of vertices, specified by the +pname:patchControlPoints member of the +slink:VkPipelineTessellationStateCreateInfo structure passed to +flink:vkCreateGraphicsPipelines. Once assembled and vertex shaded, these +patches are provided as input to the tessellation control shader stage. + +If the number of vertices in a patch is given by latexmath:[$v$], the +latexmath:[$v i$]th through latexmath:[$v i+v-1$]st vertices (in that +order) determine a patch for each + latexmath:[$i=0,1,\dots n-1$], +where there are latexmath:[$v n+k$] vertices. latexmath:[$k$] is in the +range latexmath:[$[0,v-1\]$]; if latexmath:[$k$] is not zero, the final +latexmath:[$k$] vertices are ignored. + + +=== General Considerations For Polygon Primitives + +Depending on the <>, a _polygon +primitive_ generated from a drawing command with pname:topology +ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN, +ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP, +ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, +ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, or +ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY is rendered in +one of several ways, such as outlining its border or filling its interior. +The order of vertices in such a primitive is significant during +<> and <>. + + +=== Programmable Primitive Shading + +Once primitives are assembled, they proceed to the vertex shading stage of +the pipeline. If the draw includes multiple instances, then the set of +primitives is sent to the vertex shading stage multiple times, once for each +instance. + +It is undefined whether vertex shading occurs on vertices that are discarded +as part of incomplete primitives, but if it does occur then it operates as +if they were vertices in complete primitives and such invocations can: have +side effects. + +Vertex shading receives two per-vertex inputs from the primitive assembly +stage - the code:vertexIndex and the code:instanceIndex. How these values +are generated is defined below, with each command. + +Drawing commands fall roughly into two categories: + + * Non-indexed drawing (fname:vkCmdDraw and fname:vkCmdDrawIndirect) + commands present a sequential code:vertexIndex to the vertex shader. The + sequential index is generated automatically by the device. + * Indexed drawing commands (fname:vkCmdDrawIndexed and + fname:vkCmdDrawIndexed) read index values from an _index buffer_ and use + this to compute the code:vertexIndex value for the vertex shader. + +An index buffer is bound to a command buffer by calling: + +include::../protos/vkCmdBindIndexBuffer.txt[] + + * pname:commandBuffer is the command buffer into which the command is + recorded. + * pname:buffer is the buffer being bound. + * pname:offset is the starting offset in bytes within pname:buffer used in + index buffer address calculations. + * pname:indexType selects whether indices are treated as 16 bits or 32 + bits. Possible values include: ++ +include::../enums/VkIndexType.txt[] + +include::../validity/protos/vkCmdBindIndexBuffer.txt[] + +The parameters for each drawing command are specified directly in the +command or read from buffer memory, depending on the command. Drawing +commands that source their parameters from buffer memory are known as +_indirect_ drawing commands. + +All drawing commands interact with the +<> feature. + +[[drawing-primitive-assembly-apiorder]] +Primitives assembled by draw commands are considered to have an +<>, which defines the order +their fragments affect the framebuffer. When a draw command includes +multiple instances, the lower numbered instances are earlier in API order. +For non-indexed draws, primitives with lower numbered code:vertexIndex +values are earlier in API order. For indexed draws, primitives assembled +from lower index buffer addresses are earlier in API order. + +To record a non-indexed draw, call: + +include::../protos/vkCmdDraw.txt[] + + * pname:commandBuffer is the command buffer into which the command is + recorded. + * pname:vertexCount is the number of vertices to draw. + * pname:instanceCount is the number of instances to draw. + * pname:firstVertex is the index of the first vertex to draw. + * pname:firstInstance is the instance ID of the first instance to draw. + +When the command is executed, primitives are assembled using the current +primitive topology and pname:vertexCount consecutive vertex indices with the +first code:vertexIndex value equal to pname:firstVertex. The primitives are +drawn pname:instanceCount times with code:instanceIndex starting with +pname:firstInstance and increasing sequentially for each instance. The +assembled primitives execute the currently bound graphics pipeline. + +include::../validity/protos/vkCmdDraw.txt[] + +To record an indexed draw, call: + +include::../protos/vkCmdDrawIndexed.txt[] + + * pname:commandBuffer is the command buffer into which the command is + recorded. + * pname:indexCount is the number of vertices to draw. + * pname:instanceCount is the number of instances to draw. + * pname:firstIndex is the base index within the index buffer. + * pname:vertexOffset is the base offset within the index buffer. + * pname:firstInstance is the instance ID of the first instance to draw. + +When the command is executed, primitives are assembled using the current +primitive topology and pname:indexCount vertices whose indices are retrieved +from the index buffer. The index buffer is treated as an array of tightly +packed unsigned integers of size defined by the +flink:vkCmdBindIndexBuffer::pname:indexType parameter with which the buffer +was bound. + +The first vertex index is at an offset of pname:firstIndex * code:indexSize ++ pname:offset within the currently bound index buffer, where pname:offset +is the offset specified by fname:vkCmdBindIndexBuffer and code:indexSize is +the byte size of the type specified by pname:indexType. Subsequent index +values are retrieved from consecutive locations in the index buffer. Indices +are first compared to the primitive restart value, then zero extended to 32 +bits (if the code:indexType is ename:VK_INDEX_TYPE_UINT16) and have +pname:vertexOffset added to them, before being supplied as the +code:vertexIndex value. + +The primitives are drawn pname:instanceCount times with code:instanceIndex +starting with pname:firstInstance and increasing sequentially for each +instance. The assembled primitives execute the currently bound graphics +pipeline. + +include::../validity/protos/vkCmdDrawIndexed.txt[] + +A non-indexed indirect draw is recorded by calling: + +include::../protos/vkCmdDrawIndirect.txt[] + + * pname:commandBuffer is the command buffer into which the command is + recorded. + * pname:buffer is the buffer containing draw parameters. + * pname:offset is the byte offset into pname:buffer where parameters + begin. + * pname:drawCount is the number of draws to execute, and can: be zero. + * pname:stride is the byte stride between successive sets of draw + parameters. + +fname:vkCmdDrawIndirect behaves similarly to flink:vkCmdDraw except that the +parameters are read by the device from a buffer during execution. +pname:drawCount draws are executed by the command, with parameters taken +from pname:buffer starting at pname:offset and increasing by pname:stride +bytes for each successive draw. The parameters of each draw are encoded in +an array of slink:VkDrawIndirectCommand structures. If pname:drawCount is +less than or equal to one, pname:stride is ignored. + +include::../validity/protos/vkCmdDrawIndirect.txt[] + +The definition of sname:VkDrawIndirectCommand is: + +include::../structs/VkDrawIndirectCommand.txt[] + +The members of sname:VkDrawIndirectCommand have the same meaning as the +similarly named parameters of flink:vkCmdDraw. + +include::../validity/structs/VkDrawIndirectCommand.txt[] + +An indexed indirect draw is recorded by calling: + +include::../protos/vkCmdDrawIndexedIndirect.txt[] + + * pname:commandBuffer is the command buffer into which the command is + recorded. + * pname:buffer is the buffer containing draw parameters. + * pname:offset is the byte offset into pname:buffer where parameters + begin. + * pname:drawCount is the number of draws to execute, and can: be zero. + * pname:stride is the byte stride between successive sets of draw + parameters. + +fname:vkCmdDrawIndexedIndirect behaves similarly to flink:vkCmdDrawIndirect +except that the parameters are read by the device from a buffer during +execution. pname:drawCount draws are executed by the command, with +parameters taken from pname:buffer starting at pname:offset and increasing +by pname:stride bytes for each successive draw. The parameters of each draw +are encoded in an array of slink:VkDrawIndexedIndirectCommand structures. If +pname:drawCount is less than or equal to one, pname:stride is ignored. + +include::../validity/protos/vkCmdDrawIndexedIndirect.txt[] + +The definition of sname:VkDrawIndexedIndirectCommand is + +include::../structs/VkDrawIndexedIndirectCommand.txt[] + +The members of sname:VkDrawIndexedIndirectCommand have the same meaning as +the similarly named parameters of flink:vkCmdDrawIndexed. + +include::../validity/structs/VkDrawIndexedIndirectCommand.txt[] diff --git a/doc/specs/vulkan/chapters/extensions.txt b/doc/specs/vulkan/chapters/extensions.txt new file mode 100644 index 00000000..434e4318 --- /dev/null +++ b/doc/specs/vulkan/chapters/extensions.txt @@ -0,0 +1,193 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[extended-functionality]] += Extended Functionality + +Additional functionality may: be provided by layers or extensions. A layer +cannot: add or modify {apiname} commands, while an extension may: do so. + +There are two kinds of layers and extensions, instance and device. Instance +layers and extensions are general purpose and do not depend on a specific +device. Device layers and extensions operate on specific devices, and +require a valid sname:VkDevice to be used. Instance extensions usually +affect the operation of the API as a whole, whereas device layers and +extensions tend to be hardware-specific. Examples of these might be: + + * Whole API validation is an example of a good instance layer. + * Debug capabilities might make a good instance extension. + * A layer that provides hardware-specific performance telemetry and + analysis could be a device layer. + * Functions to allow an application to use additional hardware features + beyond the core would be a good candidate for a device extension. + +[[extended-functionality-layers]] +== Layers + +When a layer is enabled, it inserts itself into the call chain for {apiname} +commands the layer is interested in. A common use of layers is to validate +application behavior during development. For example, the implementation +will not check that {apiname} enums used by the application fall within +allowed ranges. Instead, a validation layer would do those checks and flag +issues. This avoids a performance penalty during production use of the +application because those layers would not be enabled in production. + +To query the available instance layers, call: + +include::../protos/vkEnumerateInstanceLayerProperties.txt[] + + * pname:pPropertyCount is the number of layer properties that can be + returned in pname:pProperties. + * pname:pProperties is an array of slink:VkLayerProperties structures in + which properties of instance layers available on this implementation are + returned. + +include::../validity/protos/vkEnumerateInstanceLayerProperties.txt[] + +To enable a instance layer, the name of the layer should be added to the +pname:ppEnabledLayerNames member of slink:VkInstanceCreateInfo when creating +a slink:VkInstance. + +To query the layers available to a given physical device, call: + +include::../protos/vkEnumerateDeviceLayerProperties.txt[] + + * pname:physicalDevice is the physical device that will be queried. + * pname:pPropertyCount is the number of layer properties that can be + returned in pname:pProperties. + * pname:pProperties is an array of slink:VkLayerProperties structures in + which properties of layers available on pname:physicalDevice are + returned. + +include::../validity/protos/vkEnumerateDeviceLayerProperties.txt[] + +To enable a device layer, the name of the layer should be added to the +pname:ppEnabledLayerNames member of slink:VkDeviceCreateInfo when creating +a slink:VkDevice. + +Both commands will return an array of sname:VkLayerProperties of the +respective instance or device layers present. Calling +fname:vkEnumerateInstanceLayerProperties or +fname:vkEnumerateDeviceLayerProperties with pname:pProperties set to `NULL` +will return the number of supported layers in the basetype:uint32_t variable +pointed to by pname:pPropertyCount. If pname:pProperties is not set to +`NULL`, the query will fill the array and update pname:pPropertyCount to +indicate the number of sname:VkLayerProperties filled in. If +pname:pPropertyCount is smaller than the number of layers available, +ename:VK_INCOMPLETE will be returned instead of ename:VK_SUCCESS, to +indicate that not all the available properties were returned. + +The definition of sname:VkLayerProperties is: + +include::../structs/VkLayerProperties.txt[] + + * pname:layerName is a null-terminated string specifying the name of the + layer. Use this name in the pname:ppEnabledLayerNames array in the + sname:VkInstanceCreateInfo given to fname:vkCreateInstance to enable + this layer in the instance. + * pname:apiVersion is the {apiname} version the layer was written to, + encoded as described in the <> section. + * pname:implementationVersion is the version of this layer. It is an + integer, increasing with backward compatible changes. + * pname:description is a null-terminated string providing additional + details that can: be used by the application to identify the layer. + +include::../validity/structs/VkLayerProperties.txt[] + +Loader implementations may: provide mechanisms outside the {apiname} API for +enabling specific layers. Layers enabled through such a mechanism are +_implicitly enabled_, while layers enabled by including the layer name in +the pname:ppEnabledLayerNames member of slink:VkDeviceCreateInfo are +_explicitly enabled_. Except where otherwise specified, implicitly enabled +and explicitly enabled layers differ only in the way they are enabled. +Explicitly enabling a layer that is implicitly enabled has no additional +effect. + +[[extended-functionality-extensions]] +== Extensions + +Extensions may: define new {apiname} commands, structures, and enumerants. +For compilation purposes, the interfaces defined by registered extensions, +including new structures and enumerants as well as function pointer types +for new commands, are defined in the Khronos-supplied +vulkan.h+ together +with the core API. However, commands defined by extensions maynot: be +available for static linking - in which case function pointers to these +commands should: be queried at runtime as described in +<>. Extensions may: be provided by layers +as well as by a {apiname} implementation. + +To query the available instance extensions, call: + +include::../protos/vkEnumerateInstanceExtensionProperties.txt[] + + * pname:pLayerName is either `NULL` or the name of a instance layer to + retrieve extensions from. + * pname:pPropertyCount is the number of extension properties that can be + returned in pname:pProperties. + * pname:pProperties is an array of slink:VkExtensionProperties structures + in which properties of instance extensions available on this + implementation are returned. + +include::../validity/protos/vkEnumerateInstanceExtensionProperties.txt[] Any +instance extensions provided by the {apiname} implementation or by +implicitly enabled layers, but not by explicitly enabled layers, are +returned when pname:pLayerName parameter is `NULL`. When pname:pLayerName is +the name of a layer, the instance extensions provided by that layer are +returned. + +To enable a instance extension, the name of the extension should be added to +the pname:ppEnabledExtensionNames member of slink:VkInstanceCreateInfo when +creating a slink:VkInstance. + +To query the extensions available to a given physical device, call: + +include::../protos/vkEnumerateDeviceExtensionProperties.txt[] + + * pname:physicalDevice is the physical device that will be queried. + * pname:pLayerName is either `NULL` or the name of a device layer to + retrieve extensions from. + * pname:pPropertyCount is the number of extension properties that can be + returned in pname:pProperties. + * pname:pProperties is an array of slink:VkExtensionProperties structures + in which properties of extensions available on pname:physicalDevice are + returned. + +include::../validity/protos/vkEnumerateDeviceExtensionProperties.txt[] + +Any device extensions provided by the {apiname} implementation or by +implicitly enabled layers, but not by explicitly enabled layers, are +returned when pname:pLayerName parameter is `NULL`. When pname:pLayerName is +the name of a layer, the device extensions provided by that layer are +returned. + +To enable a device layer, the name of the layer should be added to the +pname:ppEnabledExtensionNames member of slink:VkDeviceCreateInfo when +creating a slink:VkDevice. + +Both commands return an array of sname:VkExtensionProperties +for any extensions implemented by the given pname:pLayerName. +Set pname:pLayerName to `NULL` to query for extensions not part of any +layer. Calling fname:vkEnumerateInstanceExtensionProperties or +fname:vkEnumerateDeviceExtensionProperties with pname:pProperties set to +`NULL` will return the count of extensions for the given layer in the +basetype:uint32_t variable pointed to by pname:pPropertyCount. With +pname:pProperties pointing to an array of sname:VkExtensionProperties, +fname:vkEnumerateInstanceExtensionProperties +and fname:vkEnumerateDeviceExtensionProperties will fill the array and +update the count to indicate the number of sname:VkExtensionProperties +filled in. If the provided count is smaller than the number of extensions +available, ename:VK_INCOMPLETE will be returned +instead of ename:VK_SUCCESS to indicate that not all the +available properties were returned. + +The definition of sname:VkExtensionProperties is: + +include::../structs/VkExtensionProperties.txt[] + + * pname:extensionName is a null-terminated string specifying the name of + the extension. + * pname:specVersion is the version of this extension. It is an integer, + incremented with backward compatible changes. + +include::../validity/structs/VkExtensionProperties.txt[] diff --git a/doc/specs/vulkan/chapters/features.txt b/doc/specs/vulkan/chapters/features.txt new file mode 100644 index 00000000..b1f1ce57 --- /dev/null +++ b/doc/specs/vulkan/chapters/features.txt @@ -0,0 +1,3677 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[features]] += Features, Limits, and Formats + +{apiname} is designed to support a wide range of hardware and as such there +are a number of features, limits, and formats which are not supported on all +hardware. Features describe functionality that is not required: and which +must: be explicitly enabled. Limits describe implementation-dependent +minimums, maximums, and other device characteristics that an application +may: need to be aware of. Supported buffer and image formats may: vary +across implementations. A minimum set of format features are guaranteed, but +others must: be explicitly queried before use to ensure they are supported +by the implementation. + + +[[features-features]] +== Features + +The Specification defines a set of fine-grained features that are not +required:, but may: be supported by a {apiname} implementation. Support for +features is reported and enabled on a per-feature basis. Features are +properties of the physical device. + +To query supported features, call: + +include::../protos/vkGetPhysicalDeviceFeatures.txt[] + + * pname:physicalDevice is the physical device from which to query the + supported features. + * pname:pFeatures is a pointer to a slink:VkPhysicalDeviceFeatures + structure in which the physical device features are returned. For each + feature, a value of ename:VK_TRUE indicates that the feature is + supported on this physical device, and ename:VK_FALSE indicates that the + feature is not supported. + +include::../validity/protos/vkGetPhysicalDeviceFeatures.txt[] + +Fine-grained features used by a logical device must: be enabled at +sname:VkDevice creation time. If a feature is enabled that the physical +device does not support, sname:VkDevice creation will fail. If an +application uses a feature without enabling it at sname:VkDevice creation +time, the device behaviour is undefined. The validation layer will warn if +features are used without being enabled. + +The fine-grained features are enabled by passing a pointer to the +sname:VkPhysicalDeviceFeatures structure via the pname:pEnabledFeatures +member of the sname:VkDeviceCreateInfo structure that is passed into the +fname:vkCreateDevice call. If a member of pname:pEnabledFeatures is set to +ename:VK_TRUE or ename:VK_FALSE, then the device will be created with the +indicated feature enabled or disabled, respectively. + +If an application wishes to enable all features supported by a device, it +can: simply pass in the sname:VkPhysicalDeviceFeatures structure that was +previously returned by fname:vkGetPhysicalDeviceFeatures. To disable an +individual feature, the application can: set the desired member to +ename:VK_FALSE in the same structure. To disable all features which are not +required:, set pname:pEnabledFeatures to `NULL`. + +[NOTE] +.Note +==== +Some features, such as pname:robustBufferAccess, may: incur a run-time +performance cost. Application writers should: carefully consider the +implications of enabling all supported features. +==== + +The definition of sname:VkPhysicalDeviceFeatures is: + +include::../structs/VkPhysicalDeviceFeatures.txt[] + +The members of the sname:VkPhysicalDeviceFeatures structure describe the +following features: + + * [[features-features-robustBufferAccess]] pname:robustBufferAccess + indicates that out of bounds accesses to buffers via shader operations + are well-defined. + ** When enabled, out-of-bounds buffer reads will return any of the + following values: + *** Values from anywhere within the buffer object. + *** Zero values, or (0,0,0,x) vectors for vector reads where x is a valid + value represented in the type of the vector components and may: be any + of: + **** 0, 1, or the maximum representable positive integer value, for signed + or unsigned integer components + **** 0.0 or 1.0, for floating-point components + ** When enabled, out-of-bounds writes may: modify values within the buffer + object or be ignored. + ** If not enabled, out of bounds accesses may: cause undefined behaviour + up-to and including process termination. + * [[features-features-fullDrawIndexUint32]] pname:fullDrawIndexUint32 + indicates the full 32-bit range of indices is supported for indexed draw + calls when using a elink:VkIndexType of ename:VK_INDEX_TYPE_UINT32. + pname:maxDrawIndexedIndexValue is the maximum index value that may: be + used (aside from the primitive restart index, which is always 2^32^-1 + when the elink:VkIndexType is ename:VK_INDEX_TYPE_UINT32). If this + feature is supported, pname:maxDrawIndexedIndexValue must: be 2^32^-1; + otherwise it must: be no smaller than 2^24^-1. See + <>. + * [[features-features-imageCubeArray]] pname:imageCubeArray indicates + whether image views with a elink:VkImageViewType of + ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY can: be created, and that the + corresponding *SampledCubeArray* and *ImageCubeArray* SPIR-V + capabilities can: be used in shader code. + * [[features-features-independentBlend]] pname:independentBlend indicates + whether the sname:VkPipelineColorBlendAttachmentState settings are + controlled independently per-attachment. If this feature is not enabled, + the sname:VkPipelineColorBlendAttachmentState settings for all color + attachments must: be identical. Otherwise, a different + sname:VkPipelineColorBlendAttachmentState can: be provided for each + bound color attachment. + * [[features-features-geometryShader]] pname:geometryShader indicates + whether geometry shaders are supported. If this feature is not enabled, + the ename:VK_SHADER_STAGE_GEOMETRY_BIT and + ename:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT enum values mustnot: be + used. This also indicates whether shader modules can: declare the + code:Geometry capability. + * [[features-features-tessellationShader]] pname:tessellationShader + indicates whether tessellation control and evaluation shaders are + supported. If this feature is not enabled, the + ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, + ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, + ename:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT, + ename:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT, and + ename:VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO enum + values mustnot: be used. This also indicates whether shader modules can: + declare the code:Tessellation capability. + * [[features-features-sampleRateShading]] pname:sampleRateShading + indicates whether per-sample shading and multisample interpolation are + supported. If this feature is not enabled, the pname:sampleShadingEnable + member of the sname:VkPipelineMultisampleStateCreateInfo structure must: + be set to ename:VK_FALSE and the pname:minSampleShading member is + ignored. This also indicates whether shader modules can: declare the + code:SampleRateShading capability. + * [[features-features-dualSrcBlend]] pname:dualSrcBlend indicates whether + blend operations which take two sources are supported. If this feature + is not enabled, the ename:VK_BLEND_FACTOR_SRC1_COLOR, + ename:VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, + ename:VK_BLEND_FACTOR_SRC1_ALPHA, and + ename:VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA enum values mustnot: be used + as source or destination blending factors. See <>. + * [[features-features-logicOp]] pname:logicOp indicates whether logic + operations are supported. If this feature is not enabled, the + pname:logicOpEnable member of the + sname:VkPipelineColorBlendStateCreateInfo structure must: be set to + ename:VK_FALSE, and the pname:logicOp member is ignored. + * [[features-features-multiDrawIndirect]] pname:multiDrawIndirect + indicates whether multi-draw indirect is supported. If this feature is + not enabled, the pname:drawCount parameter to the + fname:vkCmdDrawIndirect and fname:vkCmdDrawIndexedIndirect commands + must: be 1. The pname:maxDrawIndirectCount member of the + sname:VkPhysicalDeviceLimits structure must: also be 1 if this feature + is not supported. See + <>. + * [[features-features-drawIndirectFirstInstance]] + pname:drawIndirectFirstInstance indicates whether indirect draw calls + support the pname:firstInstance parameter. If this feature is not + enabled, the pname:firstInstance member of all + sname:VkDrawIndirectCommand and sname:VkDrawIndexedIndirectCommand + structures that are provided to the fname:vkCmdDrawIndirect and + fname:vkCmdDrawIndexedIndirect commands must: be 0. + * [[features-features-depthClamp]] pname:depthClamp indicates whether + depth clamping is supported. If this feature is not enabled, the + pname:depthClampEnable member of the + sname:VkPipelineRasterizationStateCreateInfo structure must: be set to + ename:VK_FALSE. Otherwise, setting pname:depthClampEnable to + ename:VK_TRUE will enable depth clamping. + * [[features-features-depthBiasClamp]] pname:depthBiasClamp indicates + whether depth bias clamping is supported. If this feature is not + enabled, the pname:depthBiasClamp member of the + sname:VkPipelineRasterizationStateCreateInfo structure must: be set to + 0.0. + * [[features-features-fillModeNonSolid]] pname:fillModeNonSolid indicates + whether point and wireframe fill modes are supported. If this feature is + not enabled, the ename:VK_POLYGON_MODE_POINT and + ename:VK_POLYGON_MODE_LINE enum values mustnot: be used. + * [[features-features-depthBounds]] pname:depthBounds indicates whether + depth bounds tests are supported. If this feature is not enabled, the + pname:depthBoundsTestEnable member of the + sname:VkPipelineDepthStencilStateCreateInfo structure must: be set to + ename:VK_FALSE. When pname:depthBoundsTestEnable is set to + ename:VK_FALSE, the values of the pname:minDepthBounds and + pname:maxDepthBounds members of the + sname:VkPipelineDepthStencilStateCreateInfo structure are ignored. + * [[features-features-wideLines]] pname:wideLines indicates whether lines + with width other than 1.0 are supported. If this feature is not enabled, + the pname:lineWidth member of the + sname:VkPipelineRasterizationStateCreateInfo structure must: be set to + 1.0. When this feature is supported, the range and granularity of + supported line widths are indicated by the pname:lineWidthRange and + pname:lineWidthGranularity members of the sname:VkPhysicalDeviceLimits + structure, respectively. + * [[features-features-largePoints]] pname:largePoints indicates whether + points with size greater than 1.0 are supported. If this feature is not + enabled, only a point size of 1.0 written by a shader is supported. The + range and granularity of supported point sizes are indicated by the + pname:pointSizeRange and pname:pointSizeGranularity members of the + sname:VkPhysicalDeviceLimits structure, respectively. + * [[features-features-alphaToOne]] pname:alphaToOne indicates whether the + implementation is able to replace the alpha value of the color fragment + output from the fragment shader with the maximum representable alpha + value for fixed-point colors or 1.0 for floating-point colors. If this + feature is not enabled, then the pname:alphaToOneEnable member of the + sname:VkPipelineMultisampleStateCreateInfo structure must: be set to + ename:VK_FALSE. Otherwise setting pname:alphaToOneEnable to + ename:VK_TRUE will enable alpha-to-one behaviour. + * [[features-features-multiViewport]] pname:multiViewport indicates + whether more than one viewport is supported. If this feature is not + enabled, the pname:viewportCount and pname:scissorCount members of the + sname:VkPipelineViewportStateCreateInfo structure must: be set to 1. + Similarly, the pname:viewportCount parameter to the + fname:vkCmdSetViewport command and the pname:scissorCount parameter to + the fname:vkCmdSetScissor command must: be 1, and the + pname:firstViewport parameter to the fname:vkCmdSetViewport command and + the pname:firstScissor parameter to the fname:vkCmdSetScissor command + must: be 0. + * [[features-features-samplerAnisotropy]] pname:samplerAnisotropy + indicates whether anisotropic filtering is supported. If this feature is + not enabled, the pname:maxAnisotropy member of the + sname:VkSamplerCreateInfo structure must: be 1.0. + * [[features-features-textureCompressionETC2]] + pname:textureCompressionETC2 indicates whether the ETC2 and EAC + compressed texture formats are supported. If this feature is not + enabled, the following formats mustnot: be used to create images: ++ +-- +* ename:VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK +* ename:VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK +* ename:VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK +* ename:VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK +* ename:VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK +* ename:VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK +* ename:VK_FORMAT_EAC_R11_UNORM_BLOCK +* ename:VK_FORMAT_EAC_R11_SNORM_BLOCK +* ename:VK_FORMAT_EAC_R11G11_UNORM_BLOCK +* ename:VK_FORMAT_EAC_R11G11_SNORM_BLOCK + +flink:vkGetPhysicalDeviceFormatProperties is used to +check for the supported properties of individual formats. +-- + * [[features-features-textureCompressionASTC_LDR]] + pname:textureCompressionASTC_LDR indicates whether the ASTC LDR + compressed texture formats are supported. If this feature is not + enabled, the following formats mustnot: be used to create images: ++ +-- +* ename:VK_FORMAT_ASTC_4x4_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_4x4_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_5x4_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_5x4_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_5x5_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_5x5_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_6x5_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_6x5_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_6x6_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_6x6_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_8x5_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_8x5_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_8x6_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_8x6_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_8x8_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_8x8_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_10x5_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_10x5_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_10x6_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_10x6_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_10x8_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_10x8_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_10x10_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_10x10_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_12x10_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_12x10_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_12x12_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_12x12_SRGB_BLOCK + +flink:vkGetPhysicalDeviceFormatProperties is used to +check for the supported properties of individual formats. +-- + * [[features-features-textureCompressionBC]] pname:textureCompressionBC + indicates whether the BC compressed texture formats are supported. If + this feature is not enabled, the following formats mustnot: be used to + create images: ++ +-- +* ename:VK_FORMAT_BC1_RGB_UNORM_BLOCK +* ename:VK_FORMAT_BC1_RGB_SRGB_BLOCK +* ename:VK_FORMAT_BC1_RGBA_UNORM_BLOCK +* ename:VK_FORMAT_BC1_RGBA_SRGB_BLOCK +* ename:VK_FORMAT_BC2_UNORM_BLOCK +* ename:VK_FORMAT_BC2_SRGB_BLOCK +* ename:VK_FORMAT_BC3_UNORM_BLOCK +* ename:VK_FORMAT_BC3_SRGB_BLOCK +* ename:VK_FORMAT_BC4_UNORM_BLOCK +* ename:VK_FORMAT_BC4_SNORM_BLOCK +* ename:VK_FORMAT_BC5_UNORM_BLOCK +* ename:VK_FORMAT_BC5_SNORM_BLOCK +* ename:VK_FORMAT_BC6H_UFLOAT_BLOCK +* ename:VK_FORMAT_BC6H_SFLOAT_BLOCK +* ename:VK_FORMAT_BC7_UNORM_BLOCK +* ename:VK_FORMAT_BC7_SRGB_BLOCK + +flink:vkGetPhysicalDeviceFormatProperties is used to +check for the supported properties of individual formats. +-- + * [[features-features-occlusionQueryPrecise]] pname:occlusionQueryPrecise + indicates whether occlusion queries returning actual sample counts are + supported. Occlusion queries are created in a sname:VkQueryPool by + specifying the pname:queryType of ename:VK_QUERY_TYPE_OCCLUSION in the + sname:VkQueryPoolCreateInfo structure which is passed to + fname:vkCreateQueryPool. If this feature is enabled, queries of this + type can: enable ename:VK_QUERY_CONTROL_PRECISE_BIT in the pname:flags + parameter to fname:vkCmdBeginQuery. If this feature is not supported, + the implementation supports only boolean occlusion queries. When any + samples are passed, boolean queries will return a non-zero result value, + otherwise a result value of zero is returned. When this feature is + enabled and ename:VK_QUERY_CONTROL_PRECISE_BIT is set, occlusion queries + will report the actual number of samples passed. + * [[features-features-pipelineStatisticsQuery]] + pname:pipelineStatisticsQuery indicates whether the pipeline statistics + queries are supported. If this feature is not enabled, queries of type + ename:VK_QUERY_TYPE_PIPELINE_STATISTICS cannot: be created, and none of + the elink:VkQueryPipelineStatisticFlagBits bits can: be set in the + pname:pipelineStatistics member of the sname:VkQueryPoolCreateInfo + structure. + * [[features-features-vertexPipelineStoresAndAtomics]] + pname:vertexPipelineStoresAndAtomics indicates whether storage buffers + and images support stores and atomic operations in the vertex, + tessellation, and geometry shader stages. If this feature is not + enabled, all storage image, storage texel buffers, and storage buffer + variables used by these stages in shader modules must: be decorated with + the code:NonWriteable decoration (or the code:readonly memory qualifier + in GLSL). + * [[features-features-fragmentStoresAndAtomics]] + pname:fragmentStoresAndAtomics indicates whether storage buffers and + images support stores and atomic operations in the fragment shader + stage. If this feature is not enabled, all storage image, storage texel + buffers, and storage buffer variables used by the fragment stage in + shader modules must: be decorated with the code:NonWriteable decoration + (or the code:readonly memory qualifier in GLSL). + * [[features-features-shaderTessellationAndGeometryPointSize]] + pname:shaderTessellationAndGeometryPointSize indicates whether the + code:PointSize built-in decoration is available in the tessellation + control, tessellation evaluation, and geometry shader stages. If this + feature is not enabled, the code:PointSize built-in decoration is not + available in these shader stages and all points written from a + tessellation or geometry shader will have a size of 1.0. This also + indicates whether shader modules can: declare the + code:TessellationPointSize capability for tessellation control and + evaluation shaders, or if the shader modules can: declare the + code:GeometryPointSize capability for geometry shaders. An + implementation supporting this feature must: also support one or both of + the <> or + <> features. + * [[features-features-shaderImageGatherExtended]] + pname:shaderImageGatherExtended indicates whether the extended set of + image gather instructions are available in shader code. If this feature + is not enabled, the code:OpImage*code:Gather instructions do not support + the code:Offset and code:ConstOffsets operands. This also indicates + whether shader modules can: declare the code:ImageGatherExtended + capability. + * [[features-features-shaderStorageImageExtendedFormats]] + pname:shaderStorageImageExtendedFormats indicates whether the extended + storage image formats are available in shader code. If this feature is + not enabled, the formats requiring the code:StorageImageExtendedFormats + capability are not supported for storage images. This also indicates + whether shader modules can: declare the code:StorageImageExtendedFormats + capability. + * [[features-features-shaderStorageImageMultisample]] + pname:shaderStorageImageMultisample indicates whether multisampled + storage images are supported. If this feature is not enabled, images + that are created with a pname:usage that includes + ename:VK_IMAGE_USAGE_STORAGE_BIT must: be created with pname:samples + equal to ename:VK_SAMPLE_COUNT_1_BIT. This also indicates whether shader + modules can: declare the code:StorageImageMultisample capability. + * [[features-features-shaderStorageImageReadWithoutFormat]] + pname:shaderStorageImageReadWithoutFormat indicates whether storage + images require a format qualifier to be specified when reading from + storage images. If this feature is not enabled, the code:OpImageRead + instruction mustnot: have an code:OpImageType of code:Unknown. This also + indicates whether shader modules can: declare the + code:StorageImageReadWithoutFormat capability. + * [[features-features-shaderStorageImageWriteWithoutFormat]] + pname:shaderStorageImageWriteWithoutFormat indicates whether storage + images require a format qualifier to be specified when writing to + storage images. If this feature is not enabled, the code:OpImageWrite + instruction mustnot: have an code:OpImageType of code:Unknown. This also + indicates whether shader modules can: declare the + code:StorageImageWriteWithoutFormat capability. + * [[features-features-shaderUniformBufferArrayDynamicIndexing]] + pname:shaderUniformBufferArrayDynamicIndexing indicates whether arrays + of uniform buffers can: be indexed by dynamically uniform integer + expressions in shader code. If this feature is not enabled, resources + with a descriptor type of ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or + ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC must: be indexed only by + constant integral expressions when aggregated into arrays in shader + code. This also indicates whether shader modules can: declare the + code:UniformBufferArrayDynamicIndexing capability. + * [[features-features-shaderSampledImageArrayDynamicIndexing]] + pname:shaderSampledImageArrayDynamicIndexing indicates whether arrays of + samplers or sampled images can: be indexed by dynamically uniform + integer expressions in shader code. If this feature is not enabled, + resources with a descriptor type of ename:VK_DESCRIPTOR_TYPE_SAMPLER, + ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, or + ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE must: be indexed only by constant + integral expressions when aggregated into arrays in shader code. This + also indicates whether shader modules can: declare the + code:SampledImageArrayDynamicIndexing capability. + * [[features-features-shaderStorageBufferArrayDynamicIndexing]] + pname:shaderStorageBufferArrayDynamicIndexing indicates whether arrays + of storage buffers can: be indexed by dynamically uniform integer + expressions in shader code. If this feature is not enabled, resources + with a descriptor type of ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or + ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC must: be indexed only by + constant integral expressions when aggregated into arrays in shader + code. This also indicates whether shader modules can: declare the + code:StorageBufferArrayDynamicIndexing capability. + * [[features-features-shaderStorageImageArrayDynamicIndexing]] + pname:shaderStorageImageArrayDynamicIndexing indicates whether arrays of + storage images can: be indexed by dynamically uniform integer + expressions in shader code. If this feature is not enabled, resources + with a descriptor type of ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE must: + be indexed only by constant integral expressions when aggregated into + arrays in shader code. This also indicates whether shader modules can: + declare the code:StorageImageArrayDynamicIndexing capability. + * [[features-features-shaderClipDistance]] pname:shaderClipDistance + indicates whether clip distances are supported in shader code. If this + feature is not enabled, the code:ClipDistance built-in decoration + mustnot: be used in shader modules. This also indicates whether shader + modules can: declare the code:ClipDistance capability. + * [[features-features-shaderCullDistance]] pname:shaderCullDistance + indicates whether cull distances are suppored in shader code. If this + feature is not enabled, the code:CullDistance built-in decoration + mustnot: be used in shader modules. This also indicates whether shader + modules can: declare the code:CullDistance capability. + * [[features-features-shaderFloat64]] pname:shaderFloat64 indicates + whether 64-bit floats (doubles) are supported in shader code. If this + feature is not enabled, 64-bit floating-point types mustnot: be used in + shader code. This also indicates whether shader modules can: declare the + code:Float64 capability. + * [[features-features-shaderInt64]] pname:shaderInt64 indicates whether + 64-bit integers (signed and unsigned) are supported in shader code. If + this feature is not enabled, 64-bit integer types mustnot: be used in + shader code. This also indicates whether shader modules can: declare the + code:Int64 capability. + * [[features-features-shaderInt16]] pname:shaderInt16 indicates whether + 16-bit integers (signed and unsigned) are supported in shader code. If + this feature is not enabled, 16-bit integer types mustnot: be used in + shader code. This also indicates whether shader modules can: declare the + code:Int16 capability. + * [[features-features-shaderResourceResidency]] + pname:shaderResourceResidency indicates whether image operations that + return resource residency information are supported in shader code. If + this feature is not enabled, the code:OpImageSparse* instructions + mustnot: be used in shader code. This also indicates whether shader + modules can: declare the op:SparseResidency capability. The feature + requires at least one of the ptext:sparseResidency* features to be + supported. + * [[features-features-shaderResourceMinLod]] pname:shaderResourceMinLod + indicates whether image operations that specify the minimum resource + level-of-detail (LOD) are supported in shader code. If this feature is + not enabled, the code:MinLod image operand mustnot: be used in shader + code. This also indicates whether shader modules can: declare the + code:MinLod capability. + * [[features-features-sparseBinding]] pname:sparseBinding indicates + whether resource memory can: be managed at opaque block level instead of + at the object level. If this feature is not enabled, resource memory + must: be bound only on a per-object basis using the + fname:vkBindBufferMemory and fname:vkBindImageMemory commands. In this + case, buffers and images mustnot: be created with + ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT and + ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT set in the pname:flags member + of the sname:VkBufferCreateInfo and sname:VkImageCreateInfo structures, + respectively. Otherwise resource memory can: be managed as described in + <>. + * [[features-features-sparseResidencyBuffer]] pname:sparseResidencyBuffer + indicates whether the device can: access partially resident buffers. If + this feature is not enabled, buffers mustnot: be created with + ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT set in the pname:flags + member of the sname:VkBufferCreateInfo structure. + * [[features-features-sparseResidencyImage2D]] + pname:sparseResidencyImage2D indicates whether the device can: access + partially resident 2D images with 1 sample per pixel. If this feature is + not enabled, images with an pname:imageType of ename:VK_IMAGE_TYPE_2D + and pname:samples set to ename:VK_SAMPLE_COUNT_1_BIT mustnot: be created + with ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the pname:flags + member of the sname:VkImageCreateInfo structure. + * [[features-features-sparseResidencyImage3D]] + pname:sparseResidencyImage3D indicates whether the device can: access + partially resident 3D images. If this feature is not enabled, images + with an pname:imageType of ename:VK_IMAGE_TYPE_3D mustnot: be created + with ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the pname:flags + member of the sname:VkImageCreateInfo structure. + * [[features-features-sparseResidency2Samples]] + pname:sparseResidency2Samples indicates whether the physical device can: + access partially resident 2D images with 2 samples per pixel. If this + feature is not enabled, images with an pname:imageType of + ename:VK_IMAGE_TYPE_2D and pname:samples set to + ename:VK_SAMPLE_COUNT_2_BIT mustnot: be created with + ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the pname:flags member + of the sname:VkImageCreateInfo structure. + * [[features-features-sparseResidency4Samples]] + pname:sparseResidency4Samples indicates whether the physical device can: + access partially resident 2D images with 4 samples per pixel. If this + feature is not enabled, images with an pname:imageType of + ename:VK_IMAGE_TYPE_2D and pname:samples set to + ename:VK_SAMPLE_COUNT_4_BIT mustnot: be created with + ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the pname:flags member + of the sname:VkImageCreateInfo structure. + * [[features-features-sparseResidency8Samples]] + pname:sparseResidency8Samples indicates whether the physical device can: + access partially resident 2D images with 8 samples per pixel. If this + feature is not enabled, images with an pname:imageType of + ename:VK_IMAGE_TYPE_2D and pname:samples set to + ename:VK_SAMPLE_COUNT_8_BIT mustnot: be created with + ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the pname:flags member + of the sname:VkImageCreateInfo structure. + * [[features-features-sparseResidency16Samples]] + pname:sparseResidency16Samples indicates whether the physical device + can: access partially resident 2D images with 16 samples per pixel. If + this feature is not enabled, images with an pname:imageType of + ename:VK_IMAGE_TYPE_2D and pname:samples set to + ename:VK_SAMPLE_COUNT_16_BIT mustnot: be created with + ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the pname:flags member + of the sname:VkImageCreateInfo structure. + * [[features-features-sparseResidencyAliased]] + pname:sparseResidencyAliased indicates whether the physical device can: + correctly access data aliased into multiple locations. If this feature + is not enabled, the ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT and + ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT enum values mustnot: be used in + pname:flags members of the sname:VkBufferCreateInfo and + sname:VkImageCreateInfo structures, respectively. + * [[features-features-variableMultisampleRate]] + pname:variableMultisampleRate indicates whether all pipelines that will + be bound to a command buffer during a subpass with no attachments must: + have the same value for + sname:VkPipelineMultisampleStateCreateInfo::pname:rasterizationSamples. + If set to ename:VK_TRUE, the implementation supports variable + multisample rates in a subpass with no attachments. If set to + ename:VK_FALSE, then all pipelines bound in such a subpass must: have + the same multisample rate. This has no effect in situations where a + subpass uses any attachments. + * [[features-features-inheritedQueries]] pname:inheritedQueries indicates + whether a secondary command buffer may be executed while a query is + active. + +include::../validity/structs/VkPhysicalDeviceFeatures.txt[] + + +[[features-features-requirements]] +=== Feature Requirements + +All {apiname} graphics implementations must: support the following features: + + * robustBufferAccess. + +All other features are not required: by the Specification. + + +[[features-limits]] +== Limits + +There are a variety of implementation-dependent limits. + +The sname:VkPhysicalDeviceLimits are properties of the physical +device. These are available in the pname:limits member of the +slink:VkPhysicalDeviceProperties structure which is returned from +flink:vkGetPhysicalDeviceProperties. + +The definition of sname:VkPhysicalDeviceLimits is: + +include::../structs/VkPhysicalDeviceLimits.txt[] + +The members of the sname:VkPhysicalDeviceLimits describe the following +properties of the physical device: + + * [[features-limits-maxImageDimension1D]] pname:maxImageDimension1D is the + maximum dimension (pname:width) of an image created with an + pname:imageType of ename:VK_IMAGE_TYPE_1D. + * [[features-limits-maxImageDimension2D]] pname:maxImageDimension2D is the + maximum dimension (pname:width or pname:height) of an image created with + an pname:imageType of ename:VK_IMAGE_TYPE_2D and without + ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT set in pname:flags. + * [[features-limits-maxImageDimension3D]] pname:maxImageDimension3D is the + maximum dimension (pname:width, pname:height, or pname:depth) of an + image created with an pname:imageType of ename:VK_IMAGE_TYPE_3D. + * [[features-limits-maxImageDimensionCube]] pname:maxImageDimensionCube is + the maximum dimension (pname:width or pname:height) of an image created + with an pname:imageType of ename:VK_IMAGE_TYPE_2D and with + ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT set in pname:flags. + * [[features-limits-maxImageArrayLayers]] pname:maxImageArrayLayers is the + maximum number of layers (pname:arrayLayers) for an image. + * [[features-limits-maxTexelBufferElements]] pname:maxTexelBufferElements + is the maximum number of addressable texels for a buffer view created on + a buffer which was created with the + ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or + ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT set in the pname:usage + member of the sname:VkBufferCreateInfo structure. + * [[features-limits-maxUniformBufferRange]] pname:maxUniformBufferRange is + the maximum value that can: be specified in the pname:range member of + any slink:VkDescriptorBufferInfo structures passed to a call to + flink:vkUpdateDescriptorSets for descriptors of type + ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or + ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC. + * [[features-limits-maxStorageBufferRange]] pname:maxStorageBufferRange is + the maximum value that can: be specified in the pname:range member of + any slink:VkDescriptorBufferInfo structures passed to a call to + flink:vkUpdateDescriptorSets for descriptors of type + ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or + ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC. + * [[features-limits-maxPushConstantsSize]] pname:maxPushConstantsSize is + the maximum size, in bytes, of the pool of push constant memory. For + each of the push constant ranges indicated by the + pname:pPushConstantRanges member of the sname:VkPipelineLayoutCreateInfo + structure, pname:offset + pname:size must: be less than or equal to this + limit. + * [[features-limits-maxMemoryAllocationCount]] + pname:maxMemoryAllocationCount is the maximum number of device memory + allocations, as created by flink:vkAllocateMemory, which can: + simultaneously exist. + * [[features-limits-maxSamplerAllocationCount]] + pname:maxSamplerAllocationCount is the maximum number of sampler + objects, as created by flink:vkCreateSampler, which can: simultaneously + exist on a device. + * [[features-limits-bufferImageGranularity]] pname:bufferImageGranularity + is the granularity, in bytes, at which buffer or linear image resources, + and optimal image resources can: be bound to adjacent memory for + simultaneous usage. See <> for more details. + * [[features-limits-sparseAddressSpaceSize]] pname:sparseAddressSpaceSize + is the total amount of address space available, in bytes, for sparse + memory resources. This is an upper bound on the sum of the size of all + sparse resources, regardless of whether any memory is bound to them. + * [[features-limits-maxBoundDescriptorSets]] pname:maxBoundDescriptorSets + is the maximum number of descriptor sets that can: be simultaneously + used by a pipeline. All code:DescriptorSet decorations in shader modules + must: have a value less than pname:maxBoundDescriptorSets. See + <>. + * [[features-limits-maxPerStageDescriptorSamplers]] + pname:maxPerStageDescriptorSamplers is the maximum number of samplers + that can: be accessible to a single shader stage in a pipeline layout. + Descriptors with a type of ename:VK_DESCRIPTOR_TYPE_SAMPLER or + ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER count against this + limit. A descriptor is accessible to a shader stage when the + pname:stageFlags member of the sname:VkDescriptorSetLayoutBinding + structure has the bit for that shader stage set. See + <> and <>. + * [[features-limits-maxPerStageDescriptorUniformBuffers]] + pname:maxPerStageDescriptorUniformBuffers is the maximum number of + uniform buffers that can: be accessible to a single shader stage in a + pipeline layout. Descriptors with a type of + ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or + ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC count against this + limit. A descriptor is accessible to a shader stage when the + pname:stageFlags member of the sname:VkDescriptorSetLayoutBinding + structure has the bit for that shader stage set. See + <> and + <>. + * [[features-limits-maxPerStageDescriptorStorageBuffers]] + pname:maxPerStageDescriptorStorageBuffers is the maximum number of + storage buffers that can: be accessible to a single shader stage in a + pipeline layout. Descriptors with a type of + ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or + ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC count against this + limit. A descriptor is accessible to a pipeline shader stage when the + pname:stageFlags member of the sname:VkDescriptorSetLayoutBinding + structure has the bit for that shader stage set. See + <> and + <>. + * [[features-limits-maxPerStageDescriptorSampledImages]] + pname:maxPerStageDescriptorSampledImages is the maximum number of + sampled images that can: be accessible to a single shader stage in a + pipeline layout. Descriptors with a type of + ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, + ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, or + ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER count against this limit. + A descriptor is accessible to a pipeline shader stage when the + pname:stageFlags member of the sname:VkDescriptorSetLayoutBinding + structure has the bit for that shader stage set. See + <>, + <>, and + <>. + * [[features-limits-maxPerStageDescriptorStorageImages]] + pname:maxPerStageDescriptorStorageImages is the maximum number of + storage images that can: be accessible to a single shader stage in a + pipeline layout. Descriptors with a type of + ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or + ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER count against this limit. + A descriptor is accessible to a pipeline shader stage when the + pname:stageFlags member of the sname:VkDescriptorSetLayoutBinding + structure has the bit for that shader stage set. See + <>, and + <>. + * [[features-limits-maxPerStageDescriptorInputAttachments]] + pname:maxPerStageDescriptorInputAttachments is the maximum number of + input attachments that can: be accessible to a single shader stage in a + pipeline layout. Descriptors with a type of + ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT count against this limit. + A descriptor is accessible to a pipeline shader stage when the + pname:stageFlags member of the sname:VkDescriptorSetLayoutBinding + structure has the bit for that shader stage set. These are only + supported for the fragment stage. See + <>. + * [[features-limits-maxPerStageResources]] pname:maxPerStageResources is + the maximum number of resources that can: be accessible to a single + shader stage in a pipeline layout. Descriptors with a type of + ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, + ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, + ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, + ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, + ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, + ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, + ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, + ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, + ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, or + enume:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT count against this limit. For + the fragment shader stage the framebuffer color attachments also count + against this limit. + * [[features-limits-maxDescriptorSetSamplers]] + pname:maxDescriptorSetSamplers is the maximum number of samplers that + can: be included in descriptor bindings in a pipeline layout across all + pipeline shader stages and descriptor set numbers. Descriptors with a + type of ename:VK_DESCRIPTOR_TYPE_SAMPLER or + ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER count against this + limit. See <> and + <>. + * [[features-limits-maxDescriptorSetUniformBuffers]] + pname:maxDescriptorSetUniformBuffers is the maximum number of uniform + buffers that can: be be included in descriptor bindings in a pipeline + layout across all pipeline shader stages and descriptor set numbers. + Descriptors with a type of ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or + ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC count against this + limit. See <> and + <>. + * [[features-limits-maxDescriptorSetUniformBuffersDynamic]] + pname:maxDescriptorSetUniformBuffersDynamic is the maximum number of + dynamic uniform buffers that can: be included in descriptor bindings in + a pipeline layout across all pipeline shader stages and descriptor set + numbers. Descriptors with a type of + ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC count against this + limit. See <>. + * [[features-limits-maxDescriptorSetStorageBuffers]] + pname:maxDescriptorSetStorageBuffers is the maximum number of storage + buffers that can: be be included in descriptor bindings in a pipeline + layout across all pipeline shader stages and descriptor set numbers. + Descriptors with a type of ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or + ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC count against this + limit. See <> and + <>. + * [[features-limits-maxDescriptorSetStorageBuffersDynamic]] + pname:maxDescriptorSetStorageBuffersDynamic is the maximum number of + dynamic storage buffers that can: be be included in descriptor bindings + in a pipeline layout across all pipeline shader stages and descriptor + set numbers. Descriptors with a type of + ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC count against this + limit. See <>. + * [[features-limits-maxDescriptorSetSampledImages]] + pname:maxDescriptorSetSampledImages is the maximum number of sampled + images that can: be be included in descriptor bindings in a pipeline + layout across all pipeline shader stages and descriptor set numbers. + Descriptors with a type of + ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, + ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, or + ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER count against this limit. + See <>, + <>, and + <>. + * [[features-limits-maxDescriptorSetStorageImages]] + pname:maxDescriptorSetStorageImages is the maximum number of storage + images that can: be be included in descriptor bindings in a pipeline + layout across all pipeline shader stages and descriptor set numbers. + Descriptors with a type of ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or + ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER count against this limit. + See <>, and + <>. + * [[features-limits-maxDescriptorSetInputAttachments]] + pname:maxDescriptorSetInputAttachments is the maximum number of input + attachments that can: be be included in descriptor bindings in a + pipeline layout across all pipeline shader stages and descriptor set + numbers. Descriptors with a type of + ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT count against this limit. See + <>. + * [[features-limits-maxVertexInputAttributes]] + pname:maxVertexInputAttributes is the maximum number of vertex input + attributes that can: be specified for a graphics pipeline. These are + described in the array of sname:VkVertexInputAttributeDescription + structures that are provided at graphics pipeline creation time via the + pname:pVertexAttributeDescriptions member of the + sname:VkPipelineVertexInputStateCreateInfo structure. See + <> and <>. + * [[features-limits-maxVertexInputBindings]] + pname:maxVertexInputBindings is the maximum number of vertex buffers + that can: be specified for providing vertex attributes to a graphics + pipeline. These are described in the array of + sname:VkVertexInputBindingDescription structures that are provided at + graphics pipeline creation time via the pname:pVertexBindingDescriptions + member of the sname:VkPipelineVertexInputStateCreateInfo structure. The + pname:binding member of sname:VkVertexInputBindingDescription must: be + less than this limit. See <>. + * [[features-limits-maxVertexInputAttributeOffset]] + pname:maxVertexInputAttributeOffset is the maximum vertex input + attribute offset that can: be added to the vertex input binding stride. + The pname:offset member of the sname:VkVertexInputAttributeDescription + structure must: be less than or equal to this limit. See + <>. + * [[features-limits-maxVertexInputBindingStride]] + pname:maxVertexInputBindingStride is the maximum vertex input binding + stride that can: be specified in a vertex input binding. The + pname:stride member of the sname:VkVertexInputBindingDescription + structure must: be less than or equal to this limit. See + <>. + * [[features-limits-maxVertexOutputComponents]] + pname:maxVertexOutputComponents is the maximum number of components of + output variables which can: be output by a vertex shader. See + <>. + * [[features-limits-maxTessellationGenerationLevel]] + pname:maxTessellationGenerationLevel is the maximum tessellation + generation level supported by the fixed-function tessellation primitive + generator. See <>. + * [[features-limits-maxTessellationPatchSize]] + pname:maxTessellationPatchSize is the maximum patch size, in vertices, + of patches that can: be processed by the tessellation control shader and + tessellation primitive generator. The value of the + pname:patchControlPoints member of the + sname:VkPipelineTessellationStateCreateInfo structure specified at + pipeline creation time and the value provided in the code:OutputVertices + execution mode of shader modules must: be less than or equal to this + limit. See <>. + * [[features-limits-maxTessellationControlPerVertexInputComponents]] + pname:maxTessellationControlPerVertexInputComponents is the maximum + number of components of input variables which can: be provided as + per-vertex inputs to the tessellation control shader stage. + * [[features-limits-maxTessellationControlPerVertexOutputComponents]] + pname:maxTessellationControlPerVertexOutputComponents is the maximum + number of components of per-vertex output variables which can: be output + from the tessellation control shader stage. + * [[features-limits-maxTessellationControlPerPatchOutputComponents]] + pname:maxTessellationControlPerPatchOutputComponents is the maximum + number of components of per-patch output variables which can: be output + from the tessellation control shader stage. + * [[features-limits-maxTessellationControlTotalOutputComponents]] + pname:maxTessellationControlTotalOutputComponents is the maximum total + number of components of per-vertex and per-patch output variables which + can: be output from the tessellation control shader stage. + * [[features-limits-maxTessellationEvaluationInputComponents]] + pname:maxTessellationEvaluationInputComponents is the maximum number of + components of input variables which can: be provided as per-vertex + inputs to the tessellation evaluation shader stage. + * [[features-limits-maxTessellationEvaluationOutputComponents]] + pname:maxTessellationEvaluationOutputComponents is the maximum number of + components of per-vertex output variables which can: be output from the + tessellation evaluation shader stage. + * [[features-limits-maxGeometryShaderInvocations]] + pname:maxGeometryShaderInvocations is the maximum invocation count + supported for instanced geometry shaders. The value provided in the + code:Invocations execution mode of shader modules must: be less than + or equal to this limit. See <>. + * [[features-limits-maxGeometryInputComponents]] + pname:maxGeometryInputComponents is the maximum number of components of + input variables which can: be provided as inputs to the geometry shader + stage. + * [[features-limits-maxGeometryOutputComponents]] + pname:maxGeometryOutputComponents is the maximum number of components of + output variables which can: be output from the geometry shader stage. + * [[features-limits-maxGeometryOutputVertices]] + pname:maxGeometryOutputVertices is the maximum number of vertices which + can: be emitted by any geometry shader. + * [[features-limits-maxGeometryTotalOutputComponents]] + pname:maxGeometryTotalOutputComponents is the maximum total number of + components of output, across all emitted vertices, which can: be output + from the geometry shader stage. + * [[features-limits-maxFragmentInputComponents]] + pname:maxFragmentInputComponents is the maximum number of components of + input variables which can: be provided as inputs to the fragment shader + stage. + * [[features-limits-maxFragmentOutputAttachments]] + pname:maxFragmentOutputAttachments is the maximum number of output + attachments which can: be written to by the fragment shader stage. + * [[features-limits-maxFragmentDualSrcAttachments]] + pname:maxFragmentDualSrcAttachments is the maximum number of output + attachments which can: be written to by the fragment shader stage when + blending is enabled and one of the dual source blend modes is in use. + See <> and + <>. + * [[features-limits-maxFragmentCombinedOutputResources]] + pname:maxFragmentCombinedOutputResources is the total number of storage + buffers, storage images, and output buffers which can: be used in the + fragment shader stage. + * [[features-limits-maxComputeSharedMemorySize]] + pname:maxComputeSharedMemorySize is the maximum total storage size, in + bytes, of all variables declared with the code:WorkgroupLocal storage + class in shader modules (or with the code:shared storage qualifier in + GLSL) in the compute shader stage. + * [[features-limits-maxComputeWorkGroupCount]] + pname:maxComputeWorkGroupCount[3] is the maximum number of work groups + that can: be dispatched by a single dispatch command. These three values + represent the maximum number of work groups for the X, Y, and Z + dimensions, respectively. The pname:x, pname:y, and pname:z parameters + to the flink:vkCmdDispatch command, or members of the + slink:VkDispatchIndirectCommand structure must: be less than or equal to + the corresponding limit. See <>. + * [[features-limits-maxComputeWorkGroupInvocations]] + pname:maxComputeWorkGroupInvocations is the maximum total number of + compute shader invocations in a single local work group. The product of + the X, Y, and Z sizes as specified by the code:LocalSize execution mode + in shader modules must: be less than or equal to this limit. + * [[features-limits-maxComputeWorkGroupSize]] + pname:maxComputeWorkGroupSize[3] is the maximum size of a local compute + work group, per dimension. These three values represent the maximum + local work group size in the X, Y, and Z dimensions, respectively. The + pname:x, pname:y, and pname:z sizes specified by the code:LocalSize + execution mode in shader modules must: be less than or equal to the + corresponding limit. + * [[features-limits-subPixelPrecisionBits]] pname:subPixelPrecisionBits is + the number of bits of subpixel precision in framebuffer coordinates + latexmath:[$x_f$] and latexmath:[$y_f$]. See <>. + * [[features-limits-subTexelPrecisionBits]] pname:subTexelPrecisionBits is + the number of bits of precision in the division along an axis of an + image used for minification and magnification filters. + latexmath[$2^\mathit{subTexelPrecisionBits}$] is the actual number of + divisions along each axis of the image represented. The filtering + hardware will snap to these locations when computing the filtered + results. + * [[features-limits-mipmapPrecisionBits]] pname:mipmapPrecisionBits is the + number of bits of division that the LOD calculation for mipmap fetching + get snapped to when determining the contribution from each miplevel to + the mip filtered results. latexmath[$2^\mathit{mipmapPrecisionBits}$] is + the actual number of divisions. ++ +-- +[NOTE] +.Note +==== +For example, if this value is 2 bits then when linearly filtering between +two levels, each level could: contribute: 0%, 33%, 66%, or 100% (this is +just an example and the amount of contribution should: be covered by +different equations in the spec). +==== +-- ++ + * [[features-limits-maxDrawIndexedIndexValue]] + pname:maxDrawIndexedIndexValue is the maximum index value that can: be + used for indexed draw calls when using 32-bit indices. This excludes the + primitive restart index value of 0xFFFFFFFF. See + <>. + * [[features-limits-maxDrawIndirectCount]] pname:maxDrawIndirectCount is + the maximum draw count that is supported for indirect draw calls. See + <>. + * [[features-limits-maxSamplerLodBias]] pname:maxSamplerLodBias is the + maximum absolute sampler level of detail bias. The sum of the + pname:mipLodBias member of the sname:VkSamplerCreateInfo structure and + the code:Bias operand of image sampling operations in shader modules (or + 0 if no code:Bias operand is provided to an image sampling operation) + are clamped to the range + latexmath[$[-\mathit{maxSamplerLodBias},+\mathit{maxSamplerLodBias}]$]. + See <>. + * [[features-limits-maxSamplerAnisotropy]] pname:maxSamplerAnisotropy is + the maximum degree of sampler anisotropy. The maximum degree of + anisotropic filtering used for an image sampling operation is the + minimum of the pname:maxAnisotropy member of the + sname:VkSamplerCreateInfo structure and this limit. See + <>. + * [[features-limits-maxViewports]] pname:maxViewports is the maximum + number of active viewports. The pname:viewportCount member of the + sname:VkPipelineViewportStateCreateInfo structure that is provided at + pipeline creation must: be less than or equal to this limit. + * [[features-limits-maxViewportDimensions]] pname:maxViewportDimensions[2] + are the maximum viewport dimensions in the X (width) and Y (height) + dimensions, respectively. The maximum viewport dimensions must: be + greater than or equal to the largest image + which can: be created and used as a framebuffer attachment. See + <>. + * [[features-limits-viewportboundsrange]] pname:viewportBoundsRange[2] is + the viewport bounds range + latexmath[$[\mathit{minimum},\mathit{maximum}]$]. See + <>. + * [[features-limits-viewportSubPixelBits]] pname:viewportSubPixelBits is + the number of bits of subpixel precision for viewport bounds. The + subpixel precision that floating-point viewport bounds are interpreted + at is given by this limit. + * [[features-limits-minMemoryMapAlignment]] pname:minMemoryMapAlignment is + the minimum required alignment, in bytes, of host-visible memory + allocations within the host address space. When mapping a memory + allocation with flink:vkMapMemory, subtracting pname:offset bytes from + the returned pointer will always produce an integer multiple of this + limit. See <>. + * [[features-limits-minTexelBufferOffsetAlignment]] + pname:minTexelBufferOffsetAlignment is the minimum required alignment, + in bytes, for the pname:offset member of the + sname:VkBufferViewCreateInfo structure for texel buffers. When a buffer + view is created for a buffer which was created with + ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or + ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT set in the pname:usage + member of the sname:VkBufferCreateInfo structure, the pname:offset must: + be an integer multiple of this limit. This limit is a maximum, not a + minimum. + * [[features-limits-minUniformBufferOffsetAlignment]] + pname:minUniformBufferOffsetAlignment is the minimum required alignment, + in bytes, for the pname:offset member of the + sname:VkDescriptorBufferInfo structure for uniform buffers. When a + descriptor of type ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or + ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC is updated, the + pname:offset must: be an integer multiple of this limit. Similarly, + dynamic offsets for uniform buffers must: be multiples of this limit. + This limit is a maximum, not a minimum. + * [[features-limits-minStorageBufferOffsetAlignment]] + pname:minStorageBufferOffsetAlignment is the minimum required alignment, + in bytes, for the pname:offset member of the + sname:VkDescriptorBufferInfo structure for storage buffers. When a + descriptor of type ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or + ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC is updated, the + pname:offset must: be an integer multiple of this limit. Similarly, + dynamic offsets for storage buffers must: be multiples of this limit. + This limit is a maximum, not a minimum. + * [[features-limits-minTexelOffset]] pname:minTexelOffset is the minimum + offset value for the code:ConstOffset image operand of any of the + code:OpImageSample* or code:OpImageFetch* image instructions. + * [[features-limits-maxTexelOffset]] pname:maxTexelOffset is the maximum + offset value for the code:ConstOffset image operand of any of the + code:OpImageSample* or code:OpImageFetch* image instructions. + * [[features-limits-minTexelGatherOffset]] pname:minTexelGatherOffset is + the minimum offset value for the code:Offset or code:ConstOffsets image + operands of any of the code:OpImage*code:Gather image instructions. + * [[features-limits-maxTexelGatherOffset]] pname:maxTexelGatherOffset is + the maximum offset value for the code:Offset or code:ConstOffsets image + operands of any of the code:OpImage*code:Gather image instructions. + * [[features-limits-minInterpolationOffset]] pname:minInterpolationOffset + is the minimum negative offset value for the code:offset operand of the + code:InterpolateAtOffset extended instruction. + * [[features-limits-maxInterpolationOffset]] pname:maxInterpolationOffset + is the maximum positive offset value for the code:offset operand of the + code:InterpolateAtOffset extended instruction. + * [[features-limits-subPixelInterpolationOffsetBits]] + pname:subPixelInterpolationOffsetBits is the number of subpixel + fractional bits that the code:x and code:y offsets to the + code:InterpolateAtOffset extended instruction may: be rounded to as + fixed-point values. + * [[features-limits-maxFramebufferWidth]] pname:maxFramebufferWidth is the + maximum width for a framebuffer. The pname:width member of the + sname:VkFramebufferCreateInfo structure must: be less than or equal to + this limit. + * [[features-limits-maxFramebufferHeight]] pname:maxFramebufferHeight is + the maximum height for a framebuffer. The pname:height member of the + sname:VkFramebufferCreateInfo structure must: be less than or equal to + this limit. + * [[features-limits-maxFramebufferLayers]] pname:maxFramebufferLayers is + the maximum layer count for a layered framebuffer. The pname:layers + member of the sname:VkFramebufferCreateInfo structure must: be less than + or equal to this limit. + * [[features-limits-framebufferColorSampleCounts]] + pname:framebufferColorSampleCounts is a bitmask^1^ of + elink:VkSampleCountFlagBits bits indicating the supported color sample + counts for a framebuffer color attachment. + * [[features-limits-framebufferDepthSampleCounts]] + pname:framebufferDepthSampleCounts is a bitmask^1^ of + elink:VkSampleCountFlagBits bits indicating the supported depth sample + counts for a framebuffer depth/stencil attachment, when the format + includes a depth component. + * pname:framebufferStencilSampleCounts is a bitmask^1^ of + elink:VkSampleCountFlagBits bits indicating the supported stencil sample + counts for a framebuffer depth/stencil attachment, when the format + includes a stencil component. + * pname:framebufferNoAttachmentsSampleCounts is a bitmask^1^ of + elink:VkSampleCountFlagBits bits indicating the supported sample counts + for a framebuffer with no attachments. + * [[features-limits-maxColorAttachments]] pname:maxColorAttachments is the + maximum number of color attachments that can: be used by a subpass in a + render pass. The pname:colorAttachmentCount member of the + sname:VkSubpassDescription structure must: be less than or equal to this + limit. + * [[features-limits-sampledImageColorSampleCounts]] + pname:sampledImageColorSampleCounts is a bitmask^1^ of + elink:VkSampleCountFlagBits bits indicating the sample counts supported + for all images with a non-integer color format. + * [[features-limits-sampledImageIntegerSampleCounts]] + pname:sampledImageIntegerSampleCounts is a bitmask^1^ of + elink:VkSampleCountFlagBits bits indicating the sample counts supported + for all images with a integer color format. + * [[features-limits-sampledImageDepthSampleCounts]] + pname:sampledImageDepthSampleCounts is a bitmask^1^ of + elink:VkSampleCountFlagBits bits indicating the sample counts supported + for all images with a depth format. + * [[features-limits-sampledImageStencilSampleCounts]] + pname:sampledImageStencilSampleCounts is a bitmask^1^ of + elink:VkSampleCountFlagBits bits indicating the sample supported for all + images with a stencil format. + * [[features-limits-storageImageSampleCounts]] + pname:storageImageSampleCounts is a bitmask^1^ of + elink:VkSampleCountFlagBits bits indicating the sample counts supported + for all images used for storage operations. + * [[features-limits-maxSampleMaskWords]] pname:maxSampleMaskWords is the + maximum number of array elements of a variable decorated with the + code:SampleMask built-in decoration. + * [[features-limits-timestampComputeAndGraphics]] + pname:timestampComputeAndGraphics indicates support for timestamps on + all graphics and compute queues. If this limit is set to ename:VK_TRUE, + all queues that advertise the ename:VK_QUEUE_GRAPHICS_BIT or + ename:VK_QUEUE_COMPUTE_BIT in the + sname:VkQueueFamilyProperties::pname:queueFlags support + sname:VkQueueFamilyProperties::pname:timestampValidBits of at least 36. + See <>. + * [[features-limits-timestampPeriod]] pname:timestampPeriod is the number + of nanoseconds required for a timestamp query to be incremented by 1. + See <>. + * [[features-limits-maxClipDistances]] pname:maxClipDistances is the + maximum number of clip distances that can: be used in a single shader + stage. The size of any array declared with the code:ClipDistance + built-in decoration in a shader module must: be less than or equal to + this limit. + * [[features-limits-maxCullDistances]] pname:maxCullDistances is the + maximum number of cull distances that can: be used in a single shader + stage. The size of any array declared with the code:CullDistance + built-in decoration in a shader module must: be less than or equal to + this limit. + * [[features-limits-maxCombinedClipAndCullDistances]] + pname:maxCombinedClipAndCullDistances is the maximum combined number of + clip and cull distances that can: be used in a single shader stage. + The sum of the sizes of any pair of arrays declared with the + code:ClipDistance and code:CullDistance built-in decoration used by + a single shader stage in a shader module must: be less than or equal to + this limit. + * [[features-limits-discreteQueuePriorities]] + pname:discreteQueuePriorities is the number of discrete priorities that + can: be assigned to a queue based on the value of each member of + sname:VkDeviceQueueCreateInfo::pname:pQueuePriorities. This must: be at + least 2, and levels must: be spread evenly over the range, with at least + one level at 1.0, and another at 0.0. See <>. + * [[features-limits-pointSizeRange]] pname:pointSizeRange[2] is the range + latexmath[$[\mathit{minimum},\mathit{maximum}]$] of supported sizes for + points. Values written to variables decorated with the code:PointSize + built-in decoration are clamped to this range. + * [[features-limits-lineWidthRange]] pname:lineWidthRange[2] is the range + latexmath[$[\mathit{minimum},\mathit{maximum}]$] of supported widths for + lines. Values specified by the pname:lineWidth member of the + sname:VkPipelineRasterizationStateCreateInfo or the pname:lineWidth + parameter to fname:vkCmdSetLineWidth are clamped to this range. + * [[features-limits-pointSizeGranularity]] pname:pointSizeGranularity is + the granularity of supported point sizes. Not all point sizes in the + range defined by pname:pointSizeRange are supported. This limit + specifies the granularity (or increment) between successive supported + point sizes. + * [[features-limits-lineWidthGranularity]] pname:lineWidthGranularity is + the granularity of supported line widths. Not all line widths in the + range defined by pname:lineWidthRange are supported. This limit + specifies the granularity (or increment) between successive supported + line widths. + * [[features-limits-strictLines]] pname:strictLines indicates whether + lines are rasterized according to the preferred method of rasterization. + If set to ename:VK_FALSE, lines may: be rasterized under a relaxed set + of rules. If set to ename:VK_TRUE, lines are rasterized as per the + strict definition. See <>. + * [[features-limits-standardSampleLocations]] + pname:standardSampleLocations indicates whether rasterization uses the + standard sample locations as documented in + <>. If set to ename:VK_TRUE, the + implementation uses the documented sample locations. If set to + ename:VK_FALSE, the implementation may: use different sample locations. + * [[features-limits-optimalBufferCopyOffsetAlignment]] + pname:optimalBufferCopyOffsetAlignment is the optimal buffer + offset alignment in bytes for fname:vkCmdCopyBufferToImage and + fname:vkCmdCopyImageToBuffer. The per texel alignment requirements are + still enforced, this is just an additional alignment recommendation for + optimal performance and power. + * [[features-limits-optimalBufferCopyRowPitchAlignment]] + pname:optimalBufferCopyRowPitchAlignment is the optimal buffer + row pitch alignment in bytes for fname:vkCmdCopyBufferToImage and + fname:vkCmdCopyImageToBuffer. Row pitch is the number of bytes between + texels with the same X coordinate in adjacent rows (Y coordinates differ + by one). The per texel alignment requirements are still enforced, this + is just an additional alignment recommendation for optimal performance + and power. + * [[features-limits-nonCoherentAtomSize]] + pname:nonCoherentAtomSize is the size and alignment in bytes that bounds + concurrent access to + <>. + +// End of list + +1:: + For all bitmasks of type elink:VkSampleCountFlags above, the bits which + can: be set include: ++ +include::../enums/VkSampleCountFlagBits.txt[] ++ +The sample count limits defined above represent the minimum +supported sample counts for each image type. Individual images may: support +additional sample counts, which are queried using +flink:vkGetPhysicalDeviceImageFormatProperties. The sample +count limits for images only apply to images created with the pname:tiling +set to ename:VK_IMAGE_TILING_OPTIMAL. For ename:VK_IMAGE_TILING_LINEAR +images the only supported sample count is ename:VK_SAMPLE_COUNT_1_BIT. + +include::../validity/structs/VkPhysicalDeviceLimits.txt[] + + +[[features-limits-minmax]] +=== Limit Requirements + +The following table specifies the required minimum/maximum for all {apiname} +graphics implementations. Where a limit corresponds to a fine-grained +device feature which is optional:, the feature name is listed with two +required limits, one when the feature is supported and one when it is not +supported. If an implementation supports a feature, the limits reported are +the same whether or not the feature is enabled. + +[[features-limits-types]] +.Required Limit Types +[width="100%",cols="<20%,<50%,<30%",options="header"] +|============================= +| Type | Limit | Feature +|uint32_t |maxImageDimension1D |- +|uint32_t |maxImageDimension2D |- +|uint32_t |maxImageDimension3D |- +|uint32_t |maxImageDimensionCube |- +|uint32_t |maxImageArrayLayers |- +|uint32_t |maxTexelBufferElements |- +|uint32_t |maxUniformBufferRange |- +|uint32_t |maxStorageBufferRange |- +|uint32_t |maxPushConstantsSize |- +|uint32_t |maxMemoryAllocationCount |- +|uint32_t |maxSamplerAllocationCount |- +|VkDeviceSize |bufferImageGranularity |- +|VkDeviceSize |sparseAddressSpaceSize |sparseBinding +|uint32_t |maxBoundDescriptorSets |- +|uint32_t |maxPerStageDescriptorSamplers |- +|uint32_t |maxPerStageDescriptorUniformBuffers|- +|uint32_t |maxPerStageDescriptorStorageBuffers|- +|uint32_t |maxPerStageDescriptorSampledImages|- +|uint32_t |maxPerStageDescriptorStorageImages|- +|uint32_t |maxPerStageDescriptorInputAttachments|- +|uint32_t |maxPerStageResources |- +|uint32_t |maxDescriptorSetSamplers |- +|uint32_t |maxDescriptorSetUniformBuffers |- +|uint32_t |maxDescriptorSetUniformBuffersDynamic|- +|uint32_t |maxDescriptorSetStorageBuffers |- +|uint32_t |maxDescriptorSetStorageBuffersDynamic|- +|uint32_t |maxDescriptorSetSampledImages |- +|uint32_t |maxDescriptorSetStorageImages |- +|uint32_t |maxDescriptorSetInputAttachments |- +|uint32_t |maxVertexInputAttributes |- +|uint32_t |maxVertexInputBindings |- +|uint32_t |maxVertexInputAttributeOffset |- +|uint32_t |maxVertexInputBindingStride |- +|uint32_t |maxVertexOutputComponents |- +|uint32_t |maxTessellationGenerationLevel |tessellationShader +|uint32_t |maxTessellationPatchSize |tessellationShader +|uint32_t |maxTessellationControlPerVertexInputComponents |tessellationShader +|uint32_t |maxTessellationControlPerVertexOutputComponents |tessellationShader +|uint32_t |maxTessellationControlPerPatchOutputComponents |tessellationShader +|uint32_t |maxTessellationControlTotalOutputComponents |tessellationShader +|uint32_t |maxTessellationEvaluationInputComponents |tessellationShader +|uint32_t |maxTessellationEvaluationOutputComponents |tessellationShader +|uint32_t |maxGeometryShaderInvocations |geometryShader +|uint32_t |maxGeometryInputComponents |geometryShader +|uint32_t |maxGeometryOutputComponents |geometryShader +|uint32_t |maxGeometryOutputVertices |geometryShader +|uint32_t |maxGeometryTotalOutputComponents |geometryShader +|uint32_t |maxFragmentInputComponents |- +|uint32_t |maxFragmentOutputAttachments |- +|uint32_t |maxFragmentDualSrcAttachments |dualSrcBlend +|uint32_t |maxFragmentCombinedOutputResources|- +|uint32_t |maxComputeSharedMemorySize |- +|3 × uint32_t |maxComputeWorkGroupCount |- +|uint32_t |maxComputeWorkGroupInvocations |- +|3 × uint32_t |maxComputeWorkGroupSize |- +|uint32_t |subPixelPrecisionBits |- +|uint32_t |subTexelPrecisionBits |- +|uint32_t |mipmapPrecisionBits |- +|uint32_t |maxDrawIndexedIndexValue |fullDrawIndexUint32 +|uint32_t |maxDrawIndirectCount |multiDrawIndirect +|float |maxSamplerLodBias |- +|float |maxSamplerAnisotropy |samplerAnisotropy +|uint32_t |maxViewports |multiViewport +|2 × uint32_t |maxViewportDimensions |- +|2 × float |viewportBoundsRange |- +|uint32_t |viewportSubPixelBits |- +|size_t |minMemoryMapAlignment |- +|VkDeviceSize |minTexelBufferOffsetAlignment |- +|VkDeviceSize |minUniformBufferOffsetAlignment |- +|VkDeviceSize |minStorageBufferOffsetAlignment |- +|int32_t |minTexelOffset |- +|uint32_t |maxTexelOffset |- +|int32_t |minTexelGatherOffset |shaderImageGatherExtended +|uint32_t |maxTexelGatherOffset |shaderImageGatherExtended +|float |minInterpolationOffset |sampleRateShading +|float |maxInterpolationOffset |sampleRateShading +|uint32_t |subPixelInterpolationOffsetBits |sampleRateShading +|uint32_t |maxFramebufferWidth |- +|uint32_t |maxFramebufferHeight |- +|uint32_t |maxFramebufferLayers |- +|VkSampleCountFlags |framebufferColorSampleCounts |- +|VkSampleCountFlags |framebufferDepthSampleCounts |- +|VkSampleCountFlags |framebufferStencilSampleCounts |- +|VkSampleCountFlags |framebufferNoAttachmentsSampleCounts |- +|uint32_t |maxColorAttachments |- +|VkSampleCountFlags |sampledImageColorSampleCounts |- +|VkSampleCountFlags |sampledImageIntegerSampleCounts |- +|VkSampleCountFlags |sampledImageDepthSampleCounts |- +|VkSampleCountFlags |sampledImageStencilSampleCounts |- +|VkSampleCountFlags |storageImageSampleCounts |shaderStorageImageMultisample +|uint32_t |maxSampleMaskWords |- +|vkBool32 |timestampComputeAndGraphics |- +|float |timestampPeriod |- +|uint32_t |maxClipDistances |shaderClipDistance +|uint32_t |maxCullDistances |shaderCullDistance +|uint32_t |maxCombinedClipAndCullDistances |shaderCullDistance +|uint32_t |discreteQueuePriorities |- +|2 × float |pointSizeRange |largePoints +|2 × float |lineWidthRange |wideLines +|float |pointSizeGranularity |largePoints +|float |lineWidthGranularity |wideLines +|VkBool32 |strictLines |- +|VkBool32 |standardSampleLocations |- +|VkDeviceSize |optimalBufferCopyOffsetAlignment |- +|VkDeviceSize |optimalBufferCopyRowPitchAlignment|- +|VkDeviceSize |nonCoherentAtomSize |- +|============================= + +[[features-limits-required]] +.Required Limits +[width="100%",cols="<35,<9,<14,<11",options="header"] +|============================= +| Limit | Unsupported Limit | Supported Limit | Limit Type^1^ +|maxImageDimension1D |- |4096 | min +|maxImageDimension2D |- |4096 | min +|maxImageDimension3D |- |256 | min +|maxImageDimensionCube |- |4096 | min +|maxImageArrayLayers |- |256 | min +|maxTexelBufferElements |- |65536 | min +|maxUniformBufferRange |- |16384 | min +|maxStorageBufferRange |- |2^27^ | min +|maxPushConstantsSize |- |128 | min +|maxMemoryAllocationCount |- |4096 | min +|maxSamplerAllocationCount |- |4000 | min +|bufferImageGranularity |- |131072 | max +|sparseAddressSpaceSize | 0 | 2 GB | min +|maxBoundDescriptorSets |- |4 | min +|maxPerStageDescriptorSamplers |- |16 | min +|maxPerStageDescriptorUniformBuffers|- |12 | min +|maxPerStageDescriptorStorageBuffers|- |4 | min +|maxPerStageDescriptorSampledImages|- |16 | min +|maxPerStageDescriptorStorageImages|- |4 | min +|maxPerStageDescriptorInputAttachments|- |4 | min +|maxPerStageResources |- |128 ^2^|min +|maxDescriptorSetSamplers |- |96 | min, 6×PerStage +|maxDescriptorSetUniformBuffers |- |72 | min, 6×PerStage +|maxDescriptorSetUniformBuffersDynamic|- |8 |min +|maxDescriptorSetStorageBuffers |- |24 | min, 6×PerStage +|maxDescriptorSetStorageBuffersDynamic|- |4 |min +|maxDescriptorSetSampledImages |- |96| min, 6×PerStage +|maxDescriptorSetStorageImages |- |24 | min, 6×PerStage +|maxDescriptorSetInputAttachments |- |4 | min +|maxVertexInputAttributes |- |16 |min +|maxVertexInputBindings |- |16 |min +|maxVertexInputAttributeOffset |- |2047 |min +|maxVertexInputBindingStride |- |2048 |min +|maxVertexOutputComponents |- |64 |min +|maxTessellationGenerationLevel |0 |64 | min +|maxTessellationPatchSize |0 |32 | min +|maxTessellationControlPerVertexInputComponents |0 |64 | min +|maxTessellationControlPerVertexOutputComponents |0 |64 | min +|maxTessellationControlPerPatchOutputComponents |0 |120 |min +|maxTessellationControlTotalOutputComponents |0 |2048 |min +|maxTessellationEvaluationInputComponents |0 |64 |min +|maxTessellationEvaluationOutputComponents |0 |64 |min +|maxGeometryShaderInvocations |0 |32 |min +|maxGeometryInputComponents |0 |64 |min +|maxGeometryOutputComponents |0 |64 |min +|maxGeometryOutputVertices |0 |256 |min +|maxGeometryTotalOutputComponents |0 |1024 |min +|maxFragmentInputComponents |- |64 |min +|maxFragmentOutputAttachments |- |4 |min +|maxFragmentDualSrcAttachments |0 |1 |min +|maxFragmentCombinedOutputResources|- |4 |min +|maxComputeSharedMemorySize |- |16384 |min +|maxComputeWorkGroupCount |- |(65535,65535,65535) |min +|maxComputeWorkGroupInvocations |- |128 |min +|maxComputeWorkGroupSize |- |(128,128,64) |min +|subPixelPrecisionBits |- |4 |min +|subTexelPrecisionBits |- |4 |min +|mipmapPrecisionBits |- |4 |min +|maxDrawIndexedIndexValue |2^24^-1 |2^32^-1 |min +|maxDrawIndirectCount |1 |2^16^-1 |min +|maxSamplerLodBias |- |2 |min +|maxSamplerAnisotropy |1 |16 |min +|maxViewports |1 |16 |min +|maxViewportDimensions |- |(4096,4096) ^3^ | min +|viewportBoundsRange |- |(-8192,8191) ^4^ |(max,min) +|viewportSubPixelBits |- |0 |min +|minMemoryMapAlignment |- |64 |min +|minTexelBufferOffsetAlignment |- |256 | max +|minUniformBufferOffsetAlignment |- |256 | max +|minStorageBufferOffsetAlignment |- |256 | max +|minTexelOffset |- |-8 |max +|maxTexelOffset |- |7 |min +|minTexelGatherOffset |0 |-8 |max +|maxTexelGatherOffset |0 |7 |min +|minInterpolationOffset |0.0 |-0.5 ^5^ |max +|maxInterpolationOffset |0.0 |0.5 - (1 ULP) ^5^ |min +|subPixelInterpolationOffsetBits |0 |4 ^5^ |min +|maxFramebufferWidth |- |4096 |min +|maxFramebufferHeight |- |4096 |min +|maxFramebufferLayers |- |256 |min +|framebufferColorSampleCounts |- |(VK_SAMPLE_COUNT_1_BIT \| VK_SAMPLE_COUNT_4_BIT) |min +|framebufferDepthSampleCounts |- |(VK_SAMPLE_COUNT_1_BIT \| VK_SAMPLE_COUNT_4_BIT) |min +|framebufferStencilSampleCounts |- |(VK_SAMPLE_COUNT_1_BIT \| VK_SAMPLE_COUNT_4_BIT) |min +|framebufferNoAttachmentsSampleCounts |- |(VK_SAMPLE_COUNT_1_BIT \| VK_SAMPLE_COUNT_4_BIT) |min +|maxColorAttachments |- |4 |min +|sampledImageColorSampleCounts |- |(VK_SAMPLE_COUNT_1_BIT \| VK_SAMPLE_COUNT_4_BIT) |min +|sampledImageIntegerSampleCounts |- |VK_SAMPLE_COUNT_1_BIT |min +|sampledImageDepthSampleCounts |- |(VK_SAMPLE_COUNT_1_BIT \| VK_SAMPLE_COUNT_4_BIT) |min +|sampledImageStencilSampleCounts |- |(VK_SAMPLE_COUNT_1_BIT \| VK_SAMPLE_COUNT_4_BIT) |min +|storageImageSampleCounts |VK_SAMPLE_COUNT_1_BIT |(VK_SAMPLE_COUNT_1_BIT \| VK_SAMPLE_COUNT_4_BIT) |min +|maxSampleMaskWords |- |1 |min +|timestampComputeAndGraphics |- |- |implementation dependent +|timestampPeriod |- |- |duration +|maxClipDistances |0 |8 |min +|maxCullDistances |0 |8 |min +|maxCombinedClipAndCullDistances |0 |8 |min +|discreteQueuePriorities |- |2 |min +|pointSizeRange |(1.0,1.0) |(1.0,64.0 - ULP)^6^| (max,min) +|lineWidthRange |(1.0,1.0)|(1.0,8.0 - ULP)^7^ |(max,min) +|pointSizeGranularity | 0.0 | 1.0 ^6^ | max, fixed point increment +|lineWidthGranularity | 0.0 | 1.0 ^7^ | max, fixed point increment +|strictLines |- |- |implementation dependent +|standardSampleLocations |- |- |implementation dependent +|optimalBufferCopyOffsetAlignment |- |- |recommendation +|optimalBufferCopyRowPitchAlignment|- |- |recommendation +|nonCoherentAtomSize |- |128 |max +|============================= + +1:: + The *Limit Type* column indicates the limit is either the minimum limit all + implementations must: support or the maximum limit all implementations + must: support. For bitfields a minimum limit is the least + bits all implementations must: set, but they may: have + additional bits set beyond this minimum. + +2:: + The pname:maxPerStageResources must: be at least the smallest of the + following: ++ +-- +* the sum of the pname:maxPerStageDescriptorUniformBuffers, + pname:maxPerStageDescriptorStorageBuffers, + pname:maxPerStageDescriptorSampledImages, + pname:maxPerStageDescriptorStorageImages, + pname:maxPerStageDescriptorInputAttachments, pname:maxColorAttachments + limits, or +* 128. +-- ++ +It maynot: be possible to reach this limit in every stage. + +3:: + Maximum image attachment size or maximum display size + +4:: + Double the pname:maxViewportDimensions + +5:: + The values pname:minInterpolationOffset and pname:maxInterpolationOffset + describe the closed interval of supported interpolation offsets: + [pname:minInterpolationOffset, pname:maxInterpolationOffset]. The ULP is + determined by pname:subPixelInterpolationOffsetBits. If + pname:subPixelInterpolationOffsetBits is 4, this provides increments of + (1/2^4^) = 0.0625, and thus the range of supported interpolation offsets + would be [-0.5, 0.4375]. + +6:: + The point size ULP is determined by pname:pointSizeGranularity. If the + pname:pointSizeGranularity is 0.125, the range of supported point sizes + must: be at least [1.0, 63.875]. + +7:: + The line width ULP is determined by pname:lineWidthGranularity. If the + pname:lineWidthGranularity is 0.0625, the range of supported line widths + must: be at least [1.0, 7.9375]. + + +[[features-formats]] +== Formats + +The features for the set of formats (elink:VkFormat) supported by the +implementation are queried individually using the +flink:vkGetPhysicalDeviceFormatProperties command. + + +[[features-formats-definition]] +=== Format Definition + +The available formats available are defined by the elink:VkFormat +enumeration: + +include::../enums/VkFormat.txt[] + +ename:VK_FORMAT_UNDEFINED:: + The format is not specified. + +ename:VK_FORMAT_R4G4_UNORM_PACK8:: + A two-component, 8-bit packed unsigned normalized format that has + a 4-bit R component in bits 4..7, and + a 4-bit G component in bits 0..3. + +ename:VK_FORMAT_R4G4B4A4_UNORM_PACK16:: + A four-component, 16-bit packed unsigned normalized format that has + a 4-bit R component in bits 12..15, + a 4-bit G component in bits 8..11, + a 4-bit B component in bits 4..7, and + a 4-bit A component in bits 0..3. + +ename:VK_FORMAT_B4G4R4A4_UNORM_PACK16:: + A four-component, 16-bit packed unsigned normalized format that has + a 4-bit B component in bits 12..15, + a 4-bit G component in bits 8..11, + a 4-bit R component in bits 4..7, and + a 4-bit A component in bits 0..3. + +ename:VK_FORMAT_R5G6B5_UNORM_PACK16:: + A three-component, 16-bit packed unsigned normalized format that has + a 5-bit R component in bits 11..15, + a 6-bit G component in bits 5..10, and + a 5-bit B component in bits 0..4. + +ename:VK_FORMAT_B5G6R5_UNORM_PACK16:: + A three-component, 16-bit packed unsigned normalized format that has + a 5-bit B component in bits 11..15, + a 6-bit G component in bits 5..10, and + a 5-bit R component in bits 0..4. + +ename:VK_FORMAT_R5G5B5A1_UNORM_PACK16:: + A four-component, 16-bit packed unsigned normalized format that has + a 5-bit R component in bits 11..15, + a 5-bit G component in bits 6..10, + a 5-bit B component in bits 1..5, and + a 1-bit A component in bit 0. + +ename:VK_FORMAT_B5G5R5A1_UNORM_PACK16:: + A four-component, 16-bit packed unsigned normalized format that has + a 5-bit B component in bits 11..15, + a 5-bit G component in bits 6..10, + a 5-bit R component in bits 1..5, and + a 1-bit A component in bit 0. + +ename:VK_FORMAT_A1R5G5B5_UNORM_PACK16:: + A four-component, 16-bit packed unsigned normalized format that has + a 1-bit A component in bit 15, + a 5-bit R component in bits 10..14, + a 5-bit G component in bits 5..9, and + a 5-bit B component in bits 0..4. + +ename:VK_FORMAT_R8_UNORM:: + A one-component, 8-bit unsigned normalized format that has + a single 8-bit R component. + +ename:VK_FORMAT_R8_SNORM:: + A one-component, 8-bit signed normalized format that has + a single 8-bit R component. + +ename:VK_FORMAT_R8_USCALED:: + A one-component, 8-bit unsigned scaled integer format that has + a single 8-bit R component. + +ename:VK_FORMAT_R8_SSCALED:: + A one-component, 8-bit signed scaled integer format that has + a single 8-bit R component. + +ename:VK_FORMAT_R8_UINT:: + A one-component, 8-bit unsigned integer format that has + a single 8-bit R component. + +ename:VK_FORMAT_R8_SINT:: + A one-component, 8-bit signed integer format that has + a single 8-bit R component. + +ename:VK_FORMAT_R8_SRGB:: + A one-component, 8-bit unsigned normalized format that has + a single 8-bit R component stored with sRGB nonlinear encoding. + +ename:VK_FORMAT_R8G8_UNORM:: + A two-component, 16-bit unsigned normalized format that has + an 8-bit R component in byte 0, and + an 8-bit G component in byte 1. + +ename:VK_FORMAT_R8G8_SNORM:: + A two-component, 16-bit signed normalized format that has + an 8-bit R component in byte 0, and + an 8-bit G component in byte 1. + +ename:VK_FORMAT_R8G8_USCALED:: + A two-component, 16-bit unsigned scaled integer format that has + an 8-bit R component in byte 0, and + an 8-bit G component in byte 1. + +ename:VK_FORMAT_R8G8_SSCALED:: + A two-component, 16-bit signed scaled integer format that has + an 8-bit R component in byte 0, and + an 8-bit G component in byte 1. + +ename:VK_FORMAT_R8G8_UINT:: + A two-component, 16-bit unsigned integer format that has + an 8-bit R component in byte 0, and + an 8-bit G component in byte 1. + +ename:VK_FORMAT_R8G8_SINT:: + A two-component, 16-bit signed integer format that has + an 8-bit R component in byte 0, and + an 8-bit G component in byte 1. + +ename:VK_FORMAT_R8G8_SRGB:: + A two-component, 16-bit unsigned normalized format that has + an 8-bit R component stored with sRGB nonlinear encoding in byte 0, and + an 8-bit G component stored with sRGB nonlinear encoding in byte 1. + +ename:VK_FORMAT_R8G8B8_UNORM:: + A three-component, 24-bit unsigned normalized format that has + an 8-bit R component in byte 0, + an 8-bit G component in byte 1, and + an 8-bit B component in byte 2. + +ename:VK_FORMAT_R8G8B8_SNORM:: + A three-component, 24-bit signed normalized format that has + an 8-bit R component in byte 0, + an 8-bit G component in byte 1, and + an 8-bit B component in byte 2. + +ename:VK_FORMAT_R8G8B8_USCALED:: + A three-component, 24-bit unsigned scaled format that has + an 8-bit R component in byte 0, + an 8-bit G component in byte 1, and + an 8-bit B component in byte 2. + +ename:VK_FORMAT_R8G8B8_SSCALED:: + A three-component, 24-bit signed scaled format that has + an 8-bit R component in byte 0, + an 8-bit G component in byte 1, and + an 8-bit B component in byte 2. + +ename:VK_FORMAT_R8G8B8_UINT:: + A three-component, 24-bit unsigned integer format that has + an 8-bit R component in byte 0, + an 8-bit G component in byte 1, and + an 8-bit B component in byte 2. + +ename:VK_FORMAT_R8G8B8_SINT:: + A three-component, 24-bit signed integer format that has + an 8-bit R component in byte 0, + an 8-bit G component in byte 1, and + an 8-bit B component in byte 2. + +ename:VK_FORMAT_R8G8B8_SRGB:: + A three-component, 24-bit unsigned normalized format that has + an 8-bit R component stored with sRGB nonlinear encoding in byte 0, + an 8-bit G component stored with sRGB nonlinear encoding in byte 1, and + an 8-bit B component stored with sRGB nonlinear encoding in byte 2. + +ename:VK_FORMAT_B8G8R8_UNORM:: + A three-component, 24-bit unsigned normalized format that has + an 8-bit B component in byte 0, + an 8-bit G component in byte 1, and + an 8-bit R component in byte 2. + +ename:VK_FORMAT_B8G8R8_SNORM:: + A three-component, 24-bit signed normalized format that has + an 8-bit B component in byte 0, + an 8-bit G component in byte 1, and + an 8-bit R component in byte 2. + +ename:VK_FORMAT_B8G8R8_USCALED:: + A three-component, 24-bit unsigned scaled format that has + an 8-bit B component in byte 0, + an 8-bit G component in byte 1, and + an 8-bit R component in byte 2. + +ename:VK_FORMAT_B8G8R8_SSCALED:: + A three-component, 24-bit signed scaled format that has + an 8-bit B component in byte 0, + an 8-bit G component in byte 1, and + an 8-bit R component in byte 2. + +ename:VK_FORMAT_B8G8R8_UINT:: + A three-component, 24-bit unsigned integer format that has + an 8-bit B component in byte 0, + an 8-bit G component in byte 1, and + an 8-bit R component in byte 2. + +ename:VK_FORMAT_B8G8R8_SINT:: + A three-component, 24-bit signed integer format that has + an 8-bit B component in byte 0, + an 8-bit G component in byte 1, and + an 8-bit R component in byte 2. + +ename:VK_FORMAT_B8G8R8_SRGB:: + A three-component, 24-bit unsigned normalized format that has + an 8-bit B component stored with sRGB nonlinear encoding in byte 0, + an 8-bit G component stored with sRGB nonlinear encoding in byte 1, and + an 8-bit R component stored with sRGB nonlinear encoding in byte 2. + +ename:VK_FORMAT_R8G8B8A8_UNORM:: + A four-component, 32-bit unsigned normalized format that has + an 8-bit R component in byte 0, + an 8-bit G component in byte 1, + an 8-bit B component in byte 2, and + an 8-bit A component in byte 3. + +ename:VK_FORMAT_R8G8B8A8_SNORM:: + A four-component, 32-bit signed normalized format that has + an 8-bit R component in byte 0, + an 8-bit G component in byte 1, + an 8-bit B component in byte 2, and + an 8-bit A component in byte 3. + +ename:VK_FORMAT_R8G8B8A8_USCALED:: + A four-component, 32-bit unsigned scaled format that has + an 8-bit R component in byte 0, + an 8-bit G component in byte 1, + an 8-bit B component in byte 2, and + an 8-bit A component in byte 3. + +ename:VK_FORMAT_R8G8B8A8_SSCALED:: + A four-component, 32-bit signed scaled format that has + an 8-bit R component in byte 0, + an 8-bit G component in byte 1, + an 8-bit B component in byte 2, and + an 8-bit A component in byte 3. + +ename:VK_FORMAT_R8G8B8A8_UINT:: + A four-component, 32-bit unsigned integer format that has + an 8-bit R component in byte 0, + an 8-bit G component in byte 1, + an 8-bit B component in byte 2, and + an 8-bit A component in byte 3. + +ename:VK_FORMAT_R8G8B8A8_SINT:: + A four-component, 32-bit signed integer format that has + an 8-bit R component in byte 0, + an 8-bit G component in byte 1, + an 8-bit B component in byte 2, and + an 8-bit A component in byte 3. + +ename:VK_FORMAT_R8G8B8A8_SRGB:: + A four-component, 32-bit unsigned normalized format that has + an 8-bit R component stored with sRGB nonlinear encoding in byte 0, + an 8-bit G component stored with sRGB nonlinear encoding in byte 1, + an 8-bit B component stored with sRGB nonlinear encoding in byte 2, and + an 8-bit A component in byte 3. + +ename:VK_FORMAT_B8G8R8A8_UNORM:: + A four-component, 32-bit unsigned normalized format that has + an 8-bit B component in byte 0, + an 8-bit G component in byte 1, + an 8-bit R component in byte 2, and + an 8-bit A component in byte 3. + +ename:VK_FORMAT_B8G8R8A8_SNORM:: + A four-component, 32-bit signed normalized format that has + an 8-bit B component in byte 0, + an 8-bit G component in byte 1, + an 8-bit R component in byte 2, and + an 8-bit A component in byte 3. + +ename:VK_FORMAT_B8G8R8A8_USCALED:: + A four-component, 32-bit unsigned scaled format that has + an 8-bit B component in byte 0, + an 8-bit G component in byte 1, + an 8-bit R component in byte 2, and + an 8-bit A component in byte 3. + +ename:VK_FORMAT_B8G8R8A8_SSCALED:: + A four-component, 32-bit signed scaled format that has + an 8-bit B component in byte 0, + an 8-bit G component in byte 1, + an 8-bit R component in byte 2, and + an 8-bit A component in byte 3. + +ename:VK_FORMAT_B8G8R8A8_UINT:: + A four-component, 32-bit unsigned integer format that has + an 8-bit B component in byte 0, + an 8-bit G component in byte 1, + an 8-bit R component in byte 2, and + an 8-bit A component in byte 3. + +ename:VK_FORMAT_B8G8R8A8_SINT:: + A four-component, 32-bit signed integer format that has + an 8-bit B component in byte 0, + an 8-bit G component in byte 1, + an 8-bit R component in byte 2, and + an 8-bit A component in byte 3. + +ename:VK_FORMAT_B8G8R8A8_SRGB:: + A four-component, 32-bit unsigned normalized format that has + an 8-bit B component stored with sRGB nonlinear encoding in byte 0, + an 8-bit G component stored with sRGB nonlinear encoding in byte 1, + an 8-bit R component stored with sRGB nonlinear encoding in byte 2, and + an 8-bit A component in byte 3. + +ename:VK_FORMAT_A8B8G8R8_UNORM_PACK32:: + A four-component, 32-bit packed unsigned normalized format that has + an 8-bit A component in bits 24..31, + an 8-bit B component in bits 16..23, + an 8-bit G component in bits 8..15, and + an 8-bit R component in bits 0..7. + +ename:VK_FORMAT_A8B8G8R8_SNORM_PACK32:: + A four-component, 32-bit packed signed normalized format that has + an 8-bit A component in bits 24..31, + an 8-bit B component in bits 16..23, + an 8-bit G component in bits 8..15, and + an 8-bit R component in bits 0..7. + +ename:VK_FORMAT_A8B8G8R8_USCALED_PACK32:: + A four-component, 32-bit packed unsigned scaled integer format that has + an 8-bit A component in bits 24..31, + an 8-bit B component in bits 16..23, + an 8-bit G component in bits 8..15, and + an 8-bit R component in bits 0..7. + +ename:VK_FORMAT_A8B8G8R8_SSCALED_PACK32:: + A four-component, 32-bit packed signed scaled integer format that has + an 8-bit A component in bits 24..31, + an 8-bit B component in bits 16..23, + an 8-bit G component in bits 8..15, and + an 8-bit R component in bits 0..7. + +ename:VK_FORMAT_A8B8G8R8_UINT_PACK32:: + A four-component, 32-bit packed unsigned integer format that has + an 8-bit A component in bits 24..31, + an 8-bit B component in bits 16..23, + an 8-bit G component in bits 8..15, and + an 8-bit R component in bits 0..7. + +ename:VK_FORMAT_A8B8G8R8_SINT_PACK32:: + A four-component, 32-bit packed signed integer format that has + an 8-bit A component in bits 24..31, + an 8-bit B component in bits 16..23, + an 8-bit G component in bits 8..15, and + an 8-bit R component in bits 0..7. + +ename:VK_FORMAT_A8B8G8R8_SRGB_PACK32:: + A four-component, 32-bit packed unsigned normalized format that has + an 8-bit A component in bits 24..31, + an 8-bit B component stored with sRGB nonlinear encoding in bits 16..23, + an 8-bit G component stored with sRGB nonlinear encoding in bits 8..15, and + an 8-bit R component stored with sRGB nonlinear encoding in bits + 0..7. + +ename:VK_FORMAT_A2R10G10B10_UNORM_PACK32:: + A four-component, 32-bit packed unsigned normalized format that has + a 2-bit A component in bits 30..31, + a 10-bit R component in bits 20..29, + a 10-bit G component in bits 10..19, and + a 10-bit B component in bits 0..9. + +ename:VK_FORMAT_A2R10G10B10_SNORM_PACK32:: + A four-component, 32-bit packed signed normalized format that has + a 2-bit A component in bits 30..31, + a 10-bit R component in bits 20..29, + a 10-bit G component in bits 10..19, and + a 10-bit B component in bits 0..9. + +ename:VK_FORMAT_A2R10G10B10_USCALED_PACK32:: + A four-component, 32-bit packed unsigned scaled integer format that has + a 2-bit A component in bits 30..31, + a 10-bit R component in bits 20..29, + a 10-bit G component in bits 10..19, and + a 10-bit B component in bits 0..9. + +ename:VK_FORMAT_A2R10G10B10_SSCALED_PACK32:: + A four-component, 32-bit packed signed scaled integer format that has + a 2-bit A component in bits 30..31, + a 10-bit R component in bits 20..29, + a 10-bit G component in bits 10..19, and + a 10-bit B component in bits 0..9. + +ename:VK_FORMAT_A2R10G10B10_UINT_PACK32:: + A four-component, 32-bit packed unsigned integer format that has + a 2-bit A component in bits 30..31, + a 10-bit R component in bits 20..29, + a 10-bit G component in bits 10..19, and + a 10-bit B component in bits 0..9. + +ename:VK_FORMAT_A2R10G10B10_SINT_PACK32:: + A four-component, 32-bit packed signed integer format that has + a 2-bit A component in bits 30..31, + a 10-bit R component in bits 20..29, + a 10-bit G component in bits 10..19, and + a 10-bit B component in bits 0..9. + +ename:VK_FORMAT_A2B10G10R10_UNORM_PACK32:: + A four-component, 32-bit packed unsigned normalized format that has + a 2-bit A component in bits 30..31, + a 10-bit B component in bits 20..29, + a 10-bit G component in bits 10..19, and + a 10-bit R component in bits 0..9. + +ename:VK_FORMAT_A2B10G10R10_SNORM_PACK32:: + A four-component, 32-bit packed signed normalized format that has + a 2-bit A component in bits 30..31, + a 10-bit B component in bits 20..29, + a 10-bit G component in bits 10..19, and + a 10-bit R component in bits 0..9. + +ename:VK_FORMAT_A2B10G10R10_USCALED_PACK32:: + A four-component, 32-bit packed unsigned scaled integer format that has + a 2-bit A component in bits 30..31, + a 10-bit B component in bits 20..29, + a 10-bit G component in bits 10..19, and + a 10-bit R component in bits 0..9. + +ename:VK_FORMAT_A2B10G10R10_SSCALED_PACK32:: + A four-component, 32-bit packed signed scaled integer format that has + a 2-bit A component in bits 30..31, + a 10-bit B component in bits 20..29, + a 10-bit G component in bits 10..19, and + a 10-bit R component in bits 0..9. + +ename:VK_FORMAT_A2B10G10R10_UINT_PACK32:: + A four-component, 32-bit packed unsigned integer format that has + a 2-bit A component in bits 30..31, + a 10-bit B component in bits 20..29, + a 10-bit G component in bits 10..19, and + a 10-bit R component in bits 0..9. + +ename:VK_FORMAT_A2B10G10R10_SINT_PACK32:: + A four-component, 32-bit packed signed integer format that has + a 2-bit A component in bits 30..31, + a 10-bit B component in bits 20..29, + a 10-bit G component in bits 10..19, and + a 10-bit R component in bits 0..9. + +ename:VK_FORMAT_R16_UNORM:: + A one-component, 16-bit unsigned normalized format that has + a single 16-bit R component. + +ename:VK_FORMAT_R16_SNORM:: + A one-component, 16-bit signed normalized format that has + a single 16-bit R component. + +ename:VK_FORMAT_R16_USCALED:: + A one-component, 16-bit unsigned scaled integer format that has + a single 16-bit R component. + +ename:VK_FORMAT_R16_SSCALED:: + A one-component, 16-bit signed scaled integer format that has + a single 16-bit R component. + +ename:VK_FORMAT_R16_UINT:: + A one-component, 16-bit unsigned integer format that has + a single 16-bit R component. + +ename:VK_FORMAT_R16_SINT:: + A one-component, 16-bit signed integer format that has + a single 16-bit R component. + +ename:VK_FORMAT_R16_SFLOAT:: + A one-component, 16-bit signed floating-point format that has + a single 16-bit R component. + +ename:VK_FORMAT_R16G16_UNORM:: + A two-component, 32-bit unsigned normalized format that has + a 16-bit R component in bytes 0..1, and + a 16-bit G component in bytes 2..3. + +ename:VK_FORMAT_R16G16_SNORM:: + A two-component, 32-bit signed normalized format that has + a 16-bit R component in bytes 0..1, and + a 16-bit G component in bytes 2..3. + +ename:VK_FORMAT_R16G16_USCALED:: + A two-component, 32-bit unsigned scaled integer format that has + a 16-bit R component in bytes 0..1, and + a 16-bit G component in bytes 2..3. + +ename:VK_FORMAT_R16G16_SSCALED:: + A two-component, 32-bit signed scaled integer format that has + a 16-bit R component in bytes 0..1, and + a 16-bit G component in bytes 2..3. + +ename:VK_FORMAT_R16G16_UINT:: + A two-component, 32-bit unsigned integer format that has + a 16-bit R component in bytes 0..1, and + a 16-bit G component in bytes 2..3. + +ename:VK_FORMAT_R16G16_SINT:: + A two-component, 32-bit signed integer format that has + a 16-bit R component in bytes 0..1, and + a 16-bit G component in bytes 2..3. + +ename:VK_FORMAT_R16G16_SFLOAT:: + A two-component, 32-bit signed floating-point format that has + a 16-bit R component in bytes 0..1, and + a 16-bit G component in bytes 2..3. + +ename:VK_FORMAT_R16G16B16_UNORM:: + A three-component, 48-bit unsigned normalized format that has + a 16-bit R component in bytes 0..1, + a 16-bit G component in bytes 2..3, and + a 16-bit B component in bytes 4..5. + +ename:VK_FORMAT_R16G16B16_SNORM:: + A three-component, 48-bit signed normalized format that has + a 16-bit R component in bytes 0..1, + a 16-bit G component in bytes 2..3, and + a 16-bit B component in bytes 4..5. + +ename:VK_FORMAT_R16G16B16_USCALED:: + A three-component, 48-bit unsigned scaled integer format that has + a 16-bit R component in bytes 0..1, + a 16-bit G component in bytes 2..3, and + a 16-bit B component in bytes 4..5. + +ename:VK_FORMAT_R16G16B16_SSCALED:: + A three-component, 48-bit signed scaled integer format that has + a 16-bit R component in bytes 0..1, + a 16-bit G component in bytes 2..3, and + a 16-bit B component in bytes 4..5. + +ename:VK_FORMAT_R16G16B16_UINT:: + A three-component, 48-bit unsigned integer format that has + a 16-bit R component in bytes 0..1, + a 16-bit G component in bytes 2..3, and + a 16-bit B component in bytes 4..5. + +ename:VK_FORMAT_R16G16B16_SINT:: + A three-component, 48-bit signed integer format that has + a 16-bit R component in bytes 0..1, + a 16-bit G component in bytes 2..3, and + a 16-bit B component in bytes 4..5. + +ename:VK_FORMAT_R16G16B16_SFLOAT:: + A three-component, 48-bit signed floating-point format that has + a 16-bit R component in bytes 0..1, + a 16-bit G component in bytes 2..3, and + a 16-bit B component in bytes 4..5. + +ename:VK_FORMAT_R16G16B16A16_UNORM:: + A four-component, 64-bit unsigned normalized format that has + a 16-bit R component in bytes 0..1, + a 16-bit G component in bytes 2..3, + a 16-bit B component in bytes 4..5, and + a 16-bit A component in bytes 6..7. + +ename:VK_FORMAT_R16G16B16A16_SNORM:: + A four-component, 64-bit signed normalized format that has + a 16-bit R component in bytes 0..1, + a 16-bit G component in bytes 2..3, + a 16-bit B component in bytes 4..5, and + a 16-bit A component in bytes 6..7. + +ename:VK_FORMAT_R16G16B16A16_USCALED:: + A four-component, 64-bit unsigned scaled integer format that has + a 16-bit R component in bytes 0..1, + a 16-bit G component in bytes 2..3, + a 16-bit B component in bytes 4..5, and + a 16-bit A component in bytes 6..7. + +ename:VK_FORMAT_R16G16B16A16_SSCALED:: + A four-component, 64-bit signed scaled integer format that has + a 16-bit R component in bytes 0..1, + a 16-bit G component in bytes 2..3, + a 16-bit B component in bytes 4..5, and + a 16-bit A component in bytes 6..7. + +ename:VK_FORMAT_R16G16B16A16_UINT:: + A four-component, 64-bit unsigned integer format that has + a 16-bit R component in bytes 0..1, + a 16-bit G component in bytes 2..3, + a 16-bit B component in bytes 4..5, and + a 16-bit A component in bytes 6..7. + +ename:VK_FORMAT_R16G16B16A16_SINT:: + A four-component, 64-bit signed integer format that has + a 16-bit R component in bytes 0..1, + a 16-bit G component in bytes 2..3, + a 16-bit B component in bytes 4..5, and + a 16-bit A component in bytes 6..7. + +ename:VK_FORMAT_R16G16B16A16_SFLOAT:: + A four-component, 64-bit signed floating-point format that has + a 16-bit R component in bytes 0..1, + a 16-bit G component in bytes 2..3, + a 16-bit B component in bytes 4..5, and + a 16-bit A component in bytes 6..7. + +ename:VK_FORMAT_R32_UINT:: + A one-component, 32-bit unsigned integer format that has + a single 32-bit R component. + +ename:VK_FORMAT_R32_SINT:: + A one-component, 32-bit signed integer format that has + a single 32-bit R component. + +ename:VK_FORMAT_R32_SFLOAT:: + A one-component, 32-bit signed floating-point format that has + a single 32-bit R component. + +ename:VK_FORMAT_R32G32_UINT:: + A two-component, 64-bit unsigned integer format that has + a 32-bit R component in bytes 0..3, and + a 32-bit G component in bytes 4..7. + +ename:VK_FORMAT_R32G32_SINT:: + A two-component, 64-bit signed integer format that has + a 32-bit R component in bytes 0..3, and + a 32-bit G component in bytes 4..7. + +ename:VK_FORMAT_R32G32_SFLOAT:: + A two-component, 64-bit signed floating-point format that has + a 32-bit R component in bytes 0..3, and + a 32-bit G component in bytes 4..7. + +ename:VK_FORMAT_R32G32B32_UINT:: + A three-component, 96-bit unsigned integer format that has + a 32-bit R component in bytes 0..3, + a 32-bit G component in bytes 4..7, and + a 32-bit B component in bytes 8..11. + +ename:VK_FORMAT_R32G32B32_SINT:: + A three-component, 96-bit signed integer format that has + a 32-bit R component in bytes 0..3, + a 32-bit G component in bytes 4..7, and + a 32-bit B component in bytes 8..11. + +ename:VK_FORMAT_R32G32B32_SFLOAT:: + A three-component, 96-bit signed floating-point format that has + a 32-bit R component in bytes 0..3, + a 32-bit G component in bytes 4..7, and + a 32-bit B component in bytes 8..11. + +ename:VK_FORMAT_R32G32B32A32_UINT:: + A four-component, 128-bit unsigned integer format that has + a 32-bit R component in bytes 0..3, + a 32-bit G component in bytes 4..7, + a 32-bit B component in bytes 8..11, and + a 32-bit A component in bytes 12..15. + +ename:VK_FORMAT_R32G32B32A32_SINT:: + A four-component, 128-bit signed integer format that has + a 32-bit R component in bytes 0..3, + a 32-bit G component in bytes 4..7, + a 32-bit B component in bytes 8..11, and + a 32-bit A component in bytes 12..15. + +ename:VK_FORMAT_R32G32B32A32_SFLOAT:: + A four-component, 128-bit signed floating-point format that has + a 32-bit R component in bytes 0..3, + a 32-bit G component in bytes 4..7, + a 32-bit B component in bytes 8..11, and + a 32-bit A component in bytes 12..15. + +ename:VK_FORMAT_R64_UINT:: + A one-component, 64-bit unsigned integer format that has + a single 64-bit R component. + +ename:VK_FORMAT_R64_SINT:: + A one-component, 64-bit signed integer format that has + a single 64-bit R component. + +ename:VK_FORMAT_R64_SFLOAT:: + A one-component, 64-bit signed floating-point format that has + a single 64-bit R component. + +ename:VK_FORMAT_R64G64_UINT:: + A two-component, 128-bit unsigned integer format that has + a 64-bit R component in bytes 0..7, and + a 64-bit G component in bytes 8..15. + +ename:VK_FORMAT_R64G64_SINT:: + A two-component, 128-bit signed integer format that has + a 64-bit R component in bytes 0..7, and + a 64-bit G component in bytes 8..15. + +ename:VK_FORMAT_R64G64_SFLOAT:: + A two-component, 128-bit signed floating-point format that has + a 64-bit R component in bytes 0..7, and + a 64-bit G component in bytes 8..15. + +ename:VK_FORMAT_R64G64B64_UINT:: + A three-component, 192-bit unsigned integer format that has + a 64-bit R component in bytes 0..7, + a 64-bit G component in bytes 8..15, and + a 64-bit B component in bytes 16..23. + +ename:VK_FORMAT_R64G64B64_SINT:: + A three-component, 192-bit signed integer format that has + a 64-bit R component in bytes 0..7, + a 64-bit G component in bytes 8..15, and + a 64-bit B component in bytes 16..23. + +ename:VK_FORMAT_R64G64B64_SFLOAT:: + A three-component, 192-bit signed floating-point format that has + a 64-bit R component in bytes 0..7, + a 64-bit G component in bytes 8..15, and + a 64-bit B component in bytes 16..23. + +ename:VK_FORMAT_R64G64B64A64_UINT:: + A four-component, 256-bit unsigned integer format that has + a 64-bit R component in bytes 0..7, + a 64-bit G component in bytes 8..15, + a 64-bit B component in bytes 16..23, and + a 64-bit A component in bytes 24..31. + +ename:VK_FORMAT_R64G64B64A64_SINT:: + A four-component, 256-bit signed integer format that has + a 64-bit R component in bytes 0..7, + a 64-bit G component in bytes 8..15, + a 64-bit B component in bytes 16..23, and + a 64-bit A component in bytes 24..31. + +ename:VK_FORMAT_R64G64B64A64_SFLOAT:: + A four-component, 256-bit signed floating-point format that has + a 64-bit R component in bytes 0..7, + a 64-bit G component in bytes 8..15, + a 64-bit B component in bytes 16..23, and + a 64-bit A component in bytes 24..31. + +ename:VK_FORMAT_B10G11R11_UFLOAT_PACK32:: + A three-component, 32-bit packed unsigned floating-point format that has + a 10-bit B component in bits 22..31, + an 11-bit G component in bits 11..21, + an 11-bit R component in bits 0..10. + See <> and <>. + +ename:VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:: + A three-component, 32-bit packed unsigned floating-point format that has + a 5-bit shared exponent in bits 27..31, + a 9-bit B component mantissa in bits 18..26, + a 9-bit G component mantissa in bits 9..17, and + a 9-bit R component mantissa in bits 0..8. + +ename:VK_FORMAT_D16_UNORM:: + A one-component, 16-bit unsigned normalized format that has a + single 16-bit depth component. + +ename:VK_FORMAT_X8_D24_UNORM_PACK32:: + A two-component, 32-bit format that has 24 unsigned normalized bits in + the depth component and, optionally:, 8 bits that are unused. + +ename:VK_FORMAT_D32_SFLOAT:: + A one-component, 32-bit signed floating-point format that has 32-bits in + the depth component. + +ename:VK_FORMAT_S8_UINT:: + A one-component, 8-bit unsigned integer format that has 8-bits in the + stencil component. + +ename:VK_FORMAT_D16_UNORM_S8_UINT:: + A two-component, 24-bit format that has 16 unsigned normalized bits in + the depth component and 8 unsigned integer bits in the stencil + component. + +ename:VK_FORMAT_D24_UNORM_S8_UINT:: + A two-component, 32-bit packed format that has + 8 unsigned integer bits in the stencil component, and + 24 unsigned normalized bits in the depth component. + +ename:VK_FORMAT_D32_SFLOAT_S8_UINT:: + A two-component format that has 32 signed float bits in the depth + component and 8 unsigned integer bits in the stencil component. There + are optionally: 24-bits that are unused. + +ename:VK_FORMAT_BC1_RGB_UNORM_BLOCK:: + A three-component, block compressed format where each 4x4 block consists + of 64-bits of encoded unsigned normalized RGB image data. This format + has no alpha and is considered opaque. + +ename:VK_FORMAT_BC1_RGB_SRGB_BLOCK:: + A three-component, block compressed format where each 4x4 block consists + of 64-bits of encoded unsigned normalized RGB image data with sRGB + nonlinear encoding. This format has no alpha and is considered opaque. + +ename:VK_FORMAT_BC1_RGBA_UNORM_BLOCK:: + A four-component, block compressed format where each 4x4 block consists + of 64-bits of encoded unsigned normalized RGB image data, and provides 1 + bit of alpha. + +ename:VK_FORMAT_BC1_RGBA_SRGB_BLOCK:: + A four-component, block compressed format where each 4x4 block consists + of 64-bits of encoded unsigned normalized RGB image data with sRGB + nonlinear encoding, and provides 1 bit of alpha. + +ename:VK_FORMAT_BC2_UNORM_BLOCK:: + A four-component, block compressed format where each 4x4 block consists + of 64-bits of unsigned normalized alpha image data followed by 64-bits + of encoded unsigned normalized RGB image data. + +ename:VK_FORMAT_BC2_SRGB_BLOCK:: + A four-component, block compressed format where each 4x4 block consists + of 64-bits of unsigned normalized alpha image data followed by 64-bits + of encoded unsigned normalized RGB image data with sRGB nonlinear + encoding. + +ename:VK_FORMAT_BC3_UNORM_BLOCK:: + A four-component, block compressed format where each 4x4 block consists + of 64-bits of encoded alpha image data followed by 64-bits of encoded + RGB image data. Both blocks are decoded as unsigned normalized values. + +ename:VK_FORMAT_BC3_SRGB_BLOCK:: + A four-component, block compressed format where each 4x4 block consists + of 64-bits of encoded alpha image data followed by 64-bits of encoded + RGB image data with sRGB nonlinear encoding. Both blocks are decoded as + unsigned normalized values. + +ename:VK_FORMAT_BC4_UNORM_BLOCK:: + A one-component, block compressed format where each 4x4 block consists + of 64-bits of encoded unsigned normalized red image data. + +ename:VK_FORMAT_BC4_SNORM_BLOCK:: + A one-component, block compressed format where each 4x4 block consists + of 64-bits of encoded signed normalized red image data. + +ename:VK_FORMAT_BC5_UNORM_BLOCK:: + A two-component, block compressed format where each 4x4 block consists + of 64-bits of encoded unsigned normalized red image data followed by + 64-bits of encoded unsigned normalized green image data. + +ename:VK_FORMAT_BC5_SNORM_BLOCK:: + A two-component, block compressed format where each 4x4 block consists + of 64-bits of encoded signed normalized red image data followed by + 64-bits of encoded signed normalized green image data. + +ename:VK_FORMAT_BC6H_UFLOAT_BLOCK:: + A three-component, block compressed format where each 4x4 block consists + of 128-bits of encoded unsigned floating-point RGB image data. + +ename:VK_FORMAT_BC6H_SFLOAT_BLOCK:: + A three-component, block compressed format where each 4x4 block consists + of 128-bits of encoded signed floating-point RGB image data. + +ename:VK_FORMAT_BC7_UNORM_BLOCK:: + A four-component, block compressed format where each 4x4 block consists + of 128-bits of encoded unsigned normalized RGBA image data. + +ename:VK_FORMAT_BC7_SRGB_BLOCK:: + A four-component, block compressed format where each 4x4 block consists + of 128-bits of encoded unsigned normalized RGBA image data with sRGB + nonlinear encoding. + +ename:VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:: + A three-component, ETC2 compressed format where each 4x4 block consists + of 64-bits of encoded unsigned normalized RGB image data. + +ename:VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:: + A three-component, ETC2 compressed format where each 4x4 block consists + of 64-bits of encoded unsigned normalized RGB image data with sRGB + nonlinear encoding. + +ename:VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:: + A four-component, ETC2 compressed format where each 4x4 block consists + of 64-bits of encoded unsigned normalized RGB image data, and provides 1 + bit of alpha. + +ename:VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:: + A four-component, ETC2 compressed format where each 4x4 block consists + of 64-bits of encoded unsigned normalized RGB image data with sRGB + nonlinear encoding, and provides 1 bit of alpha. + +ename:VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:: + A four-component, ETC2 compressed format where each 4x4 block consists + of 64-bits of encoded unsigned normalized RGB image data, and 64-bits of + encoded unsigned normalized alpha image data. + +ename:VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:: + A four-component, ETC2 compressed format where each 4x4 block consists + of 64-bits of encoded unsigned normalized RGB image data with sRGB + nonlinear encoding, and 64-bits of encoded unsigned normalized alpha + image data. + +ename:VK_FORMAT_EAC_R11_UNORM_BLOCK:: + A one-component, ETC2 compressed format where each 4x4 block consists of + 64-bits of encoded unsigned normalized red image data. + +ename:VK_FORMAT_EAC_R11_SNORM_BLOCK:: + A one-component, ETC2 compressed format where each 4x4 block consists of + 64-bits of encoded signed normalized red image data. + +ename:VK_FORMAT_EAC_R11G11_UNORM_BLOCK:: + A two-component, ETC2 compressed format where each 4x4 block consists of + 64-bits of encoded unsigned normalized red image data followed by + 64-bits of encoded unsigned normalized green image data. + +ename:VK_FORMAT_EAC_R11G11_SNORM_BLOCK:: + A two-component, ETC2 compressed format where each 4x4 block consists of + 64-bits of encoded signed normalized red image data followed by 64-bits + of encoded signed normalized green image data. + +ename:VK_FORMAT_ASTC_4x4_UNORM_BLOCK:: + A four-component, ASTC compressed format where each 4x4 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data. + +ename:VK_FORMAT_ASTC_4x4_SRGB_BLOCK:: + A four-component, ASTC compressed format where each 4x4 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data with sRGB nonlinear encoding. + +ename:VK_FORMAT_ASTC_5x4_UNORM_BLOCK:: + A four-component, ASTC compressed format where each 5x4 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data. + +ename:VK_FORMAT_ASTC_5x4_SRGB_BLOCK:: + A four-component, ASTC compressed format where each 5x4 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data with sRGB nonlinear encoding. + +ename:VK_FORMAT_ASTC_5x5_UNORM_BLOCK:: + A four-component, ASTC compressed format where each 5x5 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data. + +ename:VK_FORMAT_ASTC_5x5_SRGB_BLOCK:: + A four-component, ASTC compressed format where each 5x5 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data with sRGB nonlinear encoding. + +ename:VK_FORMAT_ASTC_6x5_UNORM_BLOCK:: + A four-component, ASTC compressed format where each 6x5 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data. + +ename:VK_FORMAT_ASTC_6x5_SRGB_BLOCK:: + A four-component, ASTC compressed format where each 6x5 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data with sRGB nonlinear encoding. + +ename:VK_FORMAT_ASTC_6x6_UNORM_BLOCK:: + A four-component, ASTC compressed format where each 6x6 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data. + +ename:VK_FORMAT_ASTC_6x6_SRGB_BLOCK:: + A four-component, ASTC compressed format where each 6x6 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data with sRGB nonlinear encoding. + +ename:VK_FORMAT_ASTC_8x5_UNORM_BLOCK:: + A four-component, ASTC compressed format where each 8x5 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data. + +ename:VK_FORMAT_ASTC_8x5_SRGB_BLOCK:: + A four-component, ASTC compressed format where each 8x5 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data with sRGB nonlinear encoding. + +ename:VK_FORMAT_ASTC_8x6_UNORM_BLOCK:: + A four-component, ASTC compressed format where each 8x6 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data. + +ename:VK_FORMAT_ASTC_8x6_SRGB_BLOCK:: + A four-component, ASTC compressed format where each 8x6 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data with sRGB nonlinear encoding. + +ename:VK_FORMAT_ASTC_8x8_UNORM_BLOCK:: + A four-component, ASTC compressed format where each 8x8 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data. + +ename:VK_FORMAT_ASTC_8x8_SRGB_BLOCK:: + A four-component, ASTC compressed format where each 8x8 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data with sRGB nonlinear encoding. + +ename:VK_FORMAT_ASTC_10x5_UNORM_BLOCK:: + A four-component, ASTC compressed format where each 10x5 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data. + +ename:VK_FORMAT_ASTC_10x5_SRGB_BLOCK:: + A four-component, ASTC compressed format where each 10x5 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data with sRGB nonlinear encoding. + +ename:VK_FORMAT_ASTC_10x6_UNORM_BLOCK:: + A four-component, ASTC compressed format where each 10x6 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data. + +ename:VK_FORMAT_ASTC_10x6_SRGB_BLOCK:: + A four-component, ASTC compressed format where each 10x6 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data with sRGB nonlinear encoding. + +ename:VK_FORMAT_ASTC_10x8_UNORM_BLOCK:: + A four-component, ASTC compressed format where each 10x8 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data. + +ename:VK_FORMAT_ASTC_10x8_SRGB_BLOCK:: + A four-component, ASTC compressed format where each 10x8 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data with sRGB nonlinear encoding. + +ename:VK_FORMAT_ASTC_10x10_UNORM_BLOCK:: + A four-component, ASTC compressed format where each 10x10 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data. + +ename:VK_FORMAT_ASTC_10x10_SRGB_BLOCK:: + A four-component, ASTC compressed format where each 10x10 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data with sRGB nonlinear encoding. + +ename:VK_FORMAT_ASTC_12x10_UNORM_BLOCK:: + A four-component, ASTC compressed format where each 12x10 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data. + +ename:VK_FORMAT_ASTC_12x10_SRGB_BLOCK:: + A four-component, ASTC compressed format where each 12x10 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data with sRGB nonlinear encoding. + +ename:VK_FORMAT_ASTC_12x12_UNORM_BLOCK:: + A four-component, ASTC compressed format where each 12x12 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data. + +ename:VK_FORMAT_ASTC_12x12_SRGB_BLOCK:: + A four-component, ASTC compressed format where each 12x12 block consists + of 128-bits of encoded image data which is decoded as unsigned + normalized RGBA image data with sRGB nonlinear encoding. + + +[[features-formats-packed]] +==== Packed Formats + +For the purposes of address alignment when accessing buffer memory +containing vertex attribute or texel data, the following formats are +considered _packed_ - whole texels or attributes are stored in a single data +element, rather than individual components occupying a single data element: + + * <>: + ** ename:VK_FORMAT_R4G4_UNORM_PACK8 + * <>: + ** ename:VK_FORMAT_R4G4B4A4_UNORM_PACK16 + ** ename:VK_FORMAT_B4G4R4A4_UNORM_PACK16 + ** ename:VK_FORMAT_R5G6B5_UNORM_PACK16 + ** ename:VK_FORMAT_B5G6R5_UNORM_PACK16 + ** ename:VK_FORMAT_R5G5B5A1_UNORM_PACK16 + ** ename:VK_FORMAT_B5G5R5A1_UNORM_PACK16 + ** ename:VK_FORMAT_A1R5G5B5_UNORM_PACK16 + * <>: + ** ename:VK_FORMAT_A8B8G8R8_UNORM_PACK32 + ** ename:VK_FORMAT_A8B8G8R8_SNORM_PACK32 + ** ename:VK_FORMAT_A8B8G8R8_USCALED_PACK32 + ** ename:VK_FORMAT_A8B8G8R8_SSCALED_PACK32 + ** ename:VK_FORMAT_A8B8G8R8_UINT_PACK32 + ** ename:VK_FORMAT_A8B8G8R8_SINT_PACK32 + ** ename:VK_FORMAT_A8B8G8R8_SRGB_PACK32 + ** ename:VK_FORMAT_A2R10G10B10_UNORM_PACK32 + ** ename:VK_FORMAT_A2R10G10B10_SNORM_PACK32 + ** ename:VK_FORMAT_A2R10G10B10_USCALED_PACK32 + ** ename:VK_FORMAT_A2R10G10B10_SSCALED_PACK32 + ** ename:VK_FORMAT_A2R10G10B10_UINT_PACK32 + ** ename:VK_FORMAT_A2R10G10B10_SINT_PACK32 + ** ename:VK_FORMAT_A2B10G10R10_UNORM_PACK32 + ** ename:VK_FORMAT_A2B10G10R10_SNORM_PACK32 + ** ename:VK_FORMAT_A2B10G10R10_USCALED_PACK32 + ** ename:VK_FORMAT_A2B10G10R10_SSCALED_PACK32 + ** ename:VK_FORMAT_A2B10G10R10_UINT_PACK32 + ** ename:VK_FORMAT_A2B10G10R10_SINT_PACK32 + ** ename:VK_FORMAT_B10G11R11_UFLOAT_PACK32 + ** ename:VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 + ** ename:VK_FORMAT_X8_D24_UNORM_PACK32 + + +==== Identification of Formats + +A ``format'' is represented by a single enum value. The name of a format is +usually built up by using the following pattern: + + VK_FORMAT_{component-format|compression-scheme}_{numeric-format} + +The component-format specifies either the size of the R, G, B, and A +components (if they are present) in the case of a color format, or the size +of the depth (D) and stencil (S) components (if they are present) in the +case of a depth/stencil format (see below). An X indicates a component that +is unused, but may: be present for padding. + +<<< + +[[features-formats-numericformat]] +.Interpretation of Numeric Format +[width="95%",cols="2,10",options="header"] +|=================== +| Numeric format | Description +| etext:UNORM | The components are unsigned normalized values in the range [0,1] +| etext:SNORM | The components are signed normalized values in the range [-1,1] +| etext:USCALED | The components are unsigned integer values that get converted to floating-point in the range [0,2^n^-1] +| etext:SSCALED | The components are signed integer values that get converted to floating-point in the range [-2^n-1^,2^n-1^-1] +| etext:UINT | The components are unsigned integer values in the range [0,2^n^-1] +| etext:SINT | The components are signed integer values in the range [-2^n-1^,2^n-1^-1] +| etext:UFLOAT | The components are unsigned floating-point numbers (used by packed, shared exponent, and some compressed formats) +| etext:SFLOAT | The components are signed floating-point numbers +| etext:SRGB | The R, G, and B components are unsigned normalized values that represent values using sRGB nonlinear encoding, while the A component (if one exists) is a regular unsigned normalized value +|=================== + +The suffix etext:_PACKnn indicates that the format is packed into an +underlying type with nn bits. + +The suffix etext:_BLOCK indicates that the format is a block compressed +format, with the representation of multiple pixels encoded interdependently +within a region. + +[[features-formats-compressionscheme]] +.Interpretation of Compression Scheme +[width="95%",cols="2,10",options="header"] +|================== +| Compression scheme | Description +| etext:BC | Block Compression. See <>. +| etext:ETC2 | Ericsson Texture Compression. See <>. +| etext:EAC | ETC2 Alpha Compression. See <>. +| etext:ASTC | Adaptive Scalable Texture Compression (LDR Profile). See <>. +|================== + + +==== Representation + +Color formats must: be represented in memory in exactly the form indicated +by the format's name. This means that promoting one format to +another with more bits per component and/or additional components +mustnot: occur for color formats. Depth/stencil formats have more relaxed +requirements as discussed <>. + +The representation of non-packed formats is that the first component +specified in the name of the format is in the lowest memory addresses and +the last component specified is in the highest memory addresses. See +<>. The in-memory ordering of bytes within a component is determined +by the host endianness. + +[[features-formats-non-packed]] +.Byte mappings for non-packed/compressed color formats +[options="header",cols="16*1,23",width="100%"] +|=============== +>|0 >|1 >|2 >|3 >|4 >|5 >|6 >|7 >|8 >|9 >|10 >|11 >|12 >|13 >|14 >|15 ^| latexmath:[$\leftarrow$] Byte +^|R 16+>s|VK_FORMAT_R8_* +^|R ^|G 15+>s|VK_FORMAT_R8G8_* +^|R ^|G ^|B 14+>s|VK_FORMAT_R8G8B8_* +^|B ^|G ^|R 14+>s|VK_FORMAT_B8G8R8_* +^|R ^|G ^|B ^|A 13+>s|VK_FORMAT_R8G8B8A8_* +^|B ^|G ^|R ^|A 13+>s|VK_FORMAT_B8G8R8A8_* +2+^|R 15+>s|VK_FORMAT_R16_* +2+^|R 2+^|G 13+>s|VK_FORMAT_R16G16_* +2+^|R 2+^|G 2+^|B 11+>s|VK_FORMAT_R16G16B16_* +2+^|R 2+^|G 2+^|B 2+^|A 9+>s|VK_FORMAT_R16G16B16A16_* +4+^|R 13+>s|VK_FORMAT_R32_* +4+^|R 4+^|G 9+>s|VK_FORMAT_R32G32_* +4+^|R 4+^|G 4+^|B 5+>s|VK_FORMAT_R32G32B32_* +4+^|R 4+^|G 4+^|B 4+^|A >s|VK_FORMAT_R32G32B32A32_* +8+^|R 9+>s|VK_FORMAT_R64_* +8+^|R 8+^|G >s|VK_FORMAT_R64G64_* +17+^s|VK_FORMAT_R64G64B64_* as VK_FORMAT_R64G64_* but with B in bytes 16-23 +17+^s|VK_FORMAT_R64G64B64A64_* as VK_FORMAT_R64G64B64_* but with A in bytes 24-31 +|=============== + +Packed formats store multiple components within one underlying type. The bit +representation is that the first component specified in the name of the +format is in the most-significant bits and the last component specified is +in the least-significant bits of the underlying type. The in-memory ordering +of bytes comprising the underlying type is determined by the host +endianness. + +[[features-formats-packed-8-bit]] +.Bit mappings for packed 8-bit formats +[options="header",cols="24h,8*1",width="80%"] +|=============== +^| Bit latexmath:[$\rightarrow$] >| 7 >| 6 >| 5 >| 4 >| 3 >| 2 >| 1 >| 0 +^| VK_FORMAT_R4G4_UNORM_PACK8 +^| latexmath:[$R_3$] ^| latexmath:[$R_2$] ^| latexmath:[$R_1$] ^| latexmath:[$R_0$] +^| latexmath:[$G_3$] ^| latexmath:[$G_2$] ^| latexmath:[$G_1$] ^| latexmath:[$G_0$] +|=============== + +[[features-formats-packed-16-bit]] +.Bit mappings for packed 16-bit VK_FORMAT_* formats +[options="header",cols="18h,16*1",width="100%"] +|=============== +^| Bit latexmath:[$\rightarrow$] >| 15 >| 14 >| 13 >| 12 >| 11 >| 10 >| 9 >| 8 >| 7 >| 6 >| 5 >| 4 >| 3 >| 2 >| 1 >| 0 +^|R4G4B4A4_UNORM_PACK16 +^| latexmath:[$R_3$] ^| latexmath:[$R_2$] ^| latexmath:[$R_1$] ^| latexmath:[$R_0$] +^| latexmath:[$G_3$] ^| latexmath:[$G_2$] ^| latexmath:[$G_1$] ^| latexmath:[$G_0$] +^| latexmath:[$B_3$] ^| latexmath:[$B_2$] ^| latexmath:[$B_1$] ^| latexmath:[$B_0$] +^| latexmath:[$A_3$] ^| latexmath:[$A_2$] ^| latexmath:[$A_1$] ^| latexmath:[$A_0$] +^|B4G4R4A4_UNORM_PACK16 +^| latexmath:[$B_3$] ^| latexmath:[$B_2$] ^| latexmath:[$B_1$] ^| latexmath:[$B_0$] +^| latexmath:[$G_3$] ^| latexmath:[$G_2$] ^| latexmath:[$G_1$] ^| latexmath:[$G_0$] +^| latexmath:[$R_3$] ^| latexmath:[$R_2$] ^| latexmath:[$R_1$] ^| latexmath:[$R_0$] +^| latexmath:[$A_3$] ^| latexmath:[$A_2$] ^| latexmath:[$A_1$] ^| latexmath:[$A_0$] +^|R5G6B5_UNORM_PACK16 +^| latexmath:[$R_4$] ^| latexmath:[$R_3$] ^| latexmath:[$R_2$] ^| latexmath:[$R_1$] ^| latexmath:[$R_0$] +^| latexmath:[$G_5$] ^| latexmath:[$G_4$] ^| latexmath:[$G_3$] ^| latexmath:[$G_2$] ^| latexmath:[$G_1$] ^| latexmath:[$G_0$] +^| latexmath:[$B_4$] ^| latexmath:[$B_3$] ^| latexmath:[$B_2$] ^| latexmath:[$B_1$] ^| latexmath:[$B_0$] +^|B5G6R5_UNORM_PACK16 +^| latexmath:[$B_4$] ^| latexmath:[$B_3$] ^| latexmath:[$B_2$] ^| latexmath:[$B_1$] ^| latexmath:[$B_0$] +^| latexmath:[$G_5$] ^| latexmath:[$G_4$] ^| latexmath:[$G_3$] ^| latexmath:[$G_2$] ^| latexmath:[$G_1$] ^| latexmath:[$G_0$] +^| latexmath:[$R_4$] ^| latexmath:[$R_3$] ^| latexmath:[$R_2$] ^| latexmath:[$R_1$] ^| latexmath:[$R_0$] +^|R5G5B5A1_UNORM_PACK16 +^| latexmath:[$R_4$] ^| latexmath:[$R_3$] ^| latexmath:[$R_2$] ^| latexmath:[$R_1$] ^| latexmath:[$R_0$] +^| latexmath:[$G_4$] ^| latexmath:[$G_3$] ^| latexmath:[$G_2$] ^| latexmath:[$G_1$] ^| latexmath:[$G_0$] +^| latexmath:[$B_4$] ^| latexmath:[$B_3$] ^| latexmath:[$B_2$] ^| latexmath:[$B_1$] ^| latexmath:[$B_0$] +^| latexmath:[$A_0$] +^|B5G5R5A1_UNORM_PACK16 +^| latexmath:[$B_4$] ^| latexmath:[$B_3$] ^| latexmath:[$B_2$] ^| latexmath:[$B_1$] ^| latexmath:[$B_0$] +^| latexmath:[$G_4$] ^| latexmath:[$G_3$] ^| latexmath:[$G_2$] ^| latexmath:[$G_1$] ^| latexmath:[$G_0$] +^| latexmath:[$R_4$] ^| latexmath:[$R_3$] ^| latexmath:[$R_2$] ^| latexmath:[$R_1$] ^| latexmath:[$R_0$] +^| latexmath:[$A_0$] +^|A1R5G5B5_UNORM_PACK16 +^| latexmath:[$A_0$] +^| latexmath:[$R_4$] ^| latexmath:[$R_3$] ^| latexmath:[$R_2$] ^| latexmath:[$R_1$] ^| latexmath:[$R_0$] +^| latexmath:[$G_4$] ^| latexmath:[$G_3$] ^| latexmath:[$G_2$] ^| latexmath:[$G_1$] ^| latexmath:[$G_0$] +^| latexmath:[$B_4$] ^| latexmath:[$B_3$] ^| latexmath:[$B_2$] ^| latexmath:[$B_1$] ^| latexmath:[$B_0$] +|=============== + +// N.B. This table is slightly too wide to fit - we cheat by not drawing the grid lines so we can't see... +[[features-formats-packed-32-bit]] +.Bit mappings for packed 32-bit formats +[cols="32*1",frame="none",grid="rows",options="header"] +|=============== +>|31 >|30 >|29 >|28 >|27 >|26 >|25 >|24 >|23 >|22 >|21 >|20 >|19 >|18 >|17 >|16 +>|15 >|14 >|13 >|12 >|11 >|10 >|9 >|8 >|7 >|6 >|5 >|4 >|3 >|2 >|1 >|0 +32+^s|VK_FORMAT_A8B8G8R8_*_PACK32 +^|latexmath:[$A_7$] ^|latexmath:[$A_6$] ^|latexmath:[$A_5$] ^|latexmath:[$A_4$] +^|latexmath:[$A_3$] ^|latexmath:[$A_2$] ^|latexmath:[$A_1$] ^|latexmath:[$A_0$] +^|latexmath:[$B_7$] ^|latexmath:[$B_6$] ^|latexmath:[$B_5$] ^|latexmath:[$B_4$] +^|latexmath:[$B_3$] ^|latexmath:[$B_2$] ^|latexmath:[$B_1$] ^|latexmath:[$B_0$] +^|latexmath:[$G_7$] ^|latexmath:[$G_6$] ^|latexmath:[$G_5$] ^|latexmath:[$G_4$] +^|latexmath:[$G_3$] ^|latexmath:[$G_2$] ^|latexmath:[$G_1$] ^|latexmath:[$G_0$] +^|latexmath:[$R_7$] ^|latexmath:[$R_6$] ^|latexmath:[$R_5$] ^|latexmath:[$R_4$] +^|latexmath:[$R_3$] ^|latexmath:[$R_2$] ^|latexmath:[$R_1$] ^|latexmath:[$R_0$] +32+^s|VK_FORMAT_A2R10G10B10_*_PACK32 +^|latexmath:[$A_1$] ^|latexmath:[$A_0$] +^|latexmath:[$R_9$] ^|latexmath:[$R_8$] ^|latexmath:[$R_7$] ^|latexmath:[$R_6$] ^|latexmath:[$R_5$] +^|latexmath:[$R_4$] ^|latexmath:[$R_3$] ^|latexmath:[$R_2$] ^|latexmath:[$R_1$] ^|latexmath:[$R_0$] +^|latexmath:[$G_9$] ^|latexmath:[$G_8$] ^|latexmath:[$G_7$] ^|latexmath:[$G_6$] ^|latexmath:[$G_5$] +^|latexmath:[$G_4$] ^|latexmath:[$G_3$] ^|latexmath:[$G_2$] ^|latexmath:[$G_1$] ^|latexmath:[$G_0$] +^|latexmath:[$B_9$] ^|latexmath:[$B_8$] ^|latexmath:[$B_7$] ^|latexmath:[$B_6$] ^|latexmath:[$B_5$] +^|latexmath:[$B_4$] ^|latexmath:[$B_3$] ^|latexmath:[$B_2$] ^|latexmath:[$B_1$] ^|latexmath:[$B_0$] +32+^s|VK_FORMAT_A2B10G10R10_*_PACK32 +^|latexmath:[$A_1$] ^|latexmath:[$A_0$] +^|latexmath:[$B_9$] ^|latexmath:[$B_8$] ^|latexmath:[$B_7$] ^|latexmath:[$B_6$] ^|latexmath:[$B_5$] +^|latexmath:[$B_4$] ^|latexmath:[$B_3$] ^|latexmath:[$B_2$] ^|latexmath:[$B_1$] ^|latexmath:[$B_0$] +^|latexmath:[$G_9$] ^|latexmath:[$G_8$] ^|latexmath:[$G_7$] ^|latexmath:[$G_6$] ^|latexmath:[$G_5$] +^|latexmath:[$G_4$] ^|latexmath:[$G_3$] ^|latexmath:[$G_2$] ^|latexmath:[$G_1$] ^|latexmath:[$G_0$] +^|latexmath:[$R_9$] ^|latexmath:[$R_8$] ^|latexmath:[$R_7$] ^|latexmath:[$R_6$] ^|latexmath:[$R_5$] +^|latexmath:[$R_4$] ^|latexmath:[$R_3$] ^|latexmath:[$R_2$] ^|latexmath:[$R_1$] ^|latexmath:[$R_0$] +32+^s|VK_FORMAT_B10G11R11_UFLOAT_PACK32 +^|latexmath:[$B_9$] ^|latexmath:[$B_8$] ^|latexmath:[$B_7$] ^|latexmath:[$B_6$] ^|latexmath:[$B_5$] +^|latexmath:[$B_4$] ^|latexmath:[$B_3$] ^|latexmath:[$B_2$] ^|latexmath:[$B_1$] ^|latexmath:[$B_0$] +^|latexmath:[$G_{10}$] ^|latexmath:[$G_9$] ^|latexmath:[$G_8$] ^|latexmath:[$G_7$] ^|latexmath:[$G_6$] ^|latexmath:[$G_5$] +^|latexmath:[$G_4$] ^|latexmath:[$G_3$] ^|latexmath:[$G_2$] ^|latexmath:[$G_1$] ^|latexmath:[$G_0$] +^|latexmath:[$R_{10}$] ^|latexmath:[$R_9$] ^|latexmath:[$R_8$] ^|latexmath:[$R_7$] ^|latexmath:[$R_6$] ^|latexmath:[$R_5$] +^|latexmath:[$R_4$] ^|latexmath:[$R_3$] ^|latexmath:[$R_2$] ^|latexmath:[$R_1$] ^|latexmath:[$R_0$] +32+^s|VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 +^|latexmath:[$E_4$] ^|latexmath:[$E_3$] ^|latexmath:[$E_2$] ^|latexmath:[$E_1$] ^|latexmath:[$E_0$] +^|latexmath:[$B_8$] ^|latexmath:[$B_7$] ^|latexmath:[$B_6$] ^|latexmath:[$B_5$] +^|latexmath:[$B_4$] ^|latexmath:[$B_3$] ^|latexmath:[$B_2$] ^|latexmath:[$B_1$] ^|latexmath:[$B_0$] +^|latexmath:[$G_8$] ^|latexmath:[$G_7$] ^|latexmath:[$G_6$] ^|latexmath:[$G_5$] +^|latexmath:[$G_4$] ^|latexmath:[$G_3$] ^|latexmath:[$G_2$] ^|latexmath:[$G_1$] ^|latexmath:[$G_0$] +^|latexmath:[$R_8$] ^|latexmath:[$R_7$] ^|latexmath:[$R_6$] ^|latexmath:[$R_5$] +^|latexmath:[$R_4$] ^|latexmath:[$R_3$] ^|latexmath:[$R_2$] ^|latexmath:[$R_1$] ^|latexmath:[$R_0$] +32+^s|VK_FORMAT_X8_D24_UNORM_PACK32 +^|latexmath:[$X_7$] ^|latexmath:[$X_6$] ^|latexmath:[$X_5$] ^|latexmath:[$X_4$] +^|latexmath:[$X_3$] ^|latexmath:[$X_2$] ^|latexmath:[$X_1$] ^|latexmath:[$X_0$] +^|latexmath:[$D_{23}$] ^|latexmath:[$D_{22}$] ^|latexmath:[$D_{21}$] ^|latexmath:[$D_{20}$] +^|latexmath:[$D_{19}$] ^|latexmath:[$D_{18}$] ^|latexmath:[$D_{17}$] ^|latexmath:[$D_{16}$] +^|latexmath:[$D_{15}$] ^|latexmath:[$D_{14}$] ^|latexmath:[$D_{13}$] ^|latexmath:[$D_{12}$] +^|latexmath:[$D_{11}$] ^|latexmath:[$D_{10}$] ^|latexmath:[$D_9$] ^|latexmath:[$D_8$] +^|latexmath:[$D_7$] ^|latexmath:[$D_6$] ^|latexmath:[$D_5$] ^|latexmath:[$D_4$] +^|latexmath:[$D_3$] ^|latexmath:[$D_2$] ^|latexmath:[$D_1$] ^|latexmath:[$D_0$] +|=============== + +[[features-formats-depth-stencil]] +==== Depth/Stencil Formats + +Depth/stencil formats are considered opaque and need not +be stored in the exact number of bits per texel or component ordering +indicated by the format enum. However, implementations mustnot: substitute +a different depth or stencil precision than that described in the format +(e.g. D16 mustnot: be implemented as D24 or D32). + + +[[features-formats-compatibility-classes]] +==== Format Compatibility Classes + +Uncompressed color formats are _compatible_ with each other if they occupy +the same number of bits per data element. Compressed color formats are +compatible with each other if the only difference between them is the +numerical type of the uncompressed pixels (e.g. signed vs. unsigned, or +SRGB vs. UNORM encoding). Each depth/stencil format is only compatible +with itself. In the <> table, +all the formats in the same row are compatible. + + +[[features-formats-compatibility]] +.Compatible formats +[width="80%",cols="4,10",options="header"] +|========================================= +| Class | Formats +| 8-bit | ename:VK_FORMAT_R4G4_UNORM_PACK8, + + ename:VK_FORMAT_R8_UNORM, + + ename:VK_FORMAT_R8_SNORM, + + ename:VK_FORMAT_R8_USCALED, + + ename:VK_FORMAT_R8_SSCALED, + + ename:VK_FORMAT_R8_UINT, + + ename:VK_FORMAT_R8_SINT, + + ename:VK_FORMAT_R8_SRGB +| 16-bit | ename:VK_FORMAT_R4G4B4A4_UNORM_PACK16, + + ename:VK_FORMAT_B4G4R4A4_UNORM_PACK16, + + ename:VK_FORMAT_R5G6B5_UNORM_PACK16, + + ename:VK_FORMAT_B5G6R5_UNORM_PACK16, + + ename:VK_FORMAT_R5G5B5A1_UNORM_PACK16, + + ename:VK_FORMAT_B5G5R5A1_UNORM_PACK16, + + ename:VK_FORMAT_A1R5G5B5_UNORM_PACK16, + + ename:VK_FORMAT_R8G8_UNORM, + + ename:VK_FORMAT_R8G8_SNORM, + + ename:VK_FORMAT_R8G8_USCALED, + + ename:VK_FORMAT_R8G8_SSCALED, + + ename:VK_FORMAT_R8G8_UINT, + + ename:VK_FORMAT_R8G8_SINT, + + ename:VK_FORMAT_R8G8_SRGB, + + ename:VK_FORMAT_R16_UNORM, + + ename:VK_FORMAT_R16_SNORM, + + ename:VK_FORMAT_R16_USCALED, + + ename:VK_FORMAT_R16_SSCALED, + + ename:VK_FORMAT_R16_UINT, + + ename:VK_FORMAT_R16_SINT, + + ename:VK_FORMAT_R16_SFLOAT +| 24-bit | ename:VK_FORMAT_R8G8B8_UNORM, + + ename:VK_FORMAT_R8G8B8_SNORM, + + ename:VK_FORMAT_R8G8B8_USCALED, + + ename:VK_FORMAT_R8G8B8_SSCALED, + + ename:VK_FORMAT_R8G8B8_UINT, + + ename:VK_FORMAT_R8G8B8_SINT, + + ename:VK_FORMAT_R8G8B8_SRGB, + + ename:VK_FORMAT_B8G8R8_UNORM, + + ename:VK_FORMAT_B8G8R8_SNORM, + + ename:VK_FORMAT_B8G8R8_USCALED, + + ename:VK_FORMAT_B8G8R8_SSCALED, + + ename:VK_FORMAT_B8G8R8_UINT, + + ename:VK_FORMAT_B8G8R8_SINT, + + ename:VK_FORMAT_B8G8R8_SRGB +| 32-bit | ename:VK_FORMAT_R8G8B8A8_UNORM, + + ename:VK_FORMAT_R8G8B8A8_SNORM, + + ename:VK_FORMAT_R8G8B8A8_USCALED, + + ename:VK_FORMAT_R8G8B8A8_SSCALED, + + ename:VK_FORMAT_R8G8B8A8_UINT, + + ename:VK_FORMAT_R8G8B8A8_SINT, + + ename:VK_FORMAT_R8G8B8A8_SRGB, + + ename:VK_FORMAT_B8G8R8A8_UNORM, + + ename:VK_FORMAT_B8G8R8A8_SNORM, + + ename:VK_FORMAT_B8G8R8A8_USCALED, + + ename:VK_FORMAT_B8G8R8A8_SSCALED, + + ename:VK_FORMAT_B8G8R8A8_UINT, + + ename:VK_FORMAT_B8G8R8A8_SINT, + + ename:VK_FORMAT_B8G8R8A8_SRGB, + + ename:VK_FORMAT_A8B8G8R8_UNORM_PACK32, + + ename:VK_FORMAT_A8B8G8R8_SNORM_PACK32, + + ename:VK_FORMAT_A8B8G8R8_USCALED_PACK32, + + ename:VK_FORMAT_A8B8G8R8_SSCALED_PACK32, + + ename:VK_FORMAT_A8B8G8R8_UINT_PACK32, + + ename:VK_FORMAT_A8B8G8R8_SINT_PACK32, + + ename:VK_FORMAT_A8B8G8R8_SRGB_PACK32, + + ename:VK_FORMAT_A2R10G10B10_UNORM_PACK32, + + ename:VK_FORMAT_A2R10G10B10_SNORM_PACK32, + + ename:VK_FORMAT_A2R10G10B10_USCALED_PACK32, + + ename:VK_FORMAT_A2R10G10B10_SSCALED_PACK32, + + ename:VK_FORMAT_A2R10G10B10_UINT_PACK32, + + ename:VK_FORMAT_A2R10G10B10_SINT_PACK32, + + ename:VK_FORMAT_A2B10G10R10_UNORM_PACK32, + + ename:VK_FORMAT_A2B10G10R10_SNORM_PACK32, + + ename:VK_FORMAT_A2B10G10R10_USCALED_PACK32, + + ename:VK_FORMAT_A2B10G10R10_SSCALED_PACK32, + + ename:VK_FORMAT_A2B10G10R10_UINT_PACK32, + + ename:VK_FORMAT_A2B10G10R10_SINT_PACK32, + + ename:VK_FORMAT_R16G16_UNORM, + + ename:VK_FORMAT_R16G16_SNORM, + + ename:VK_FORMAT_R16G16_USCALED, + + ename:VK_FORMAT_R16G16_SSCALED, + + ename:VK_FORMAT_R16G16_UINT, + + ename:VK_FORMAT_R16G16_SINT, + + ename:VK_FORMAT_R16G16_SFLOAT, + + ename:VK_FORMAT_R32_UINT, + + ename:VK_FORMAT_R32_SINT, + + ename:VK_FORMAT_R32_SFLOAT, + + ename:VK_FORMAT_B10G11R11_UFLOAT_PACK32, + + ename:VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 +| 48-bit | ename:VK_FORMAT_R16G16B16_UNORM, + + ename:VK_FORMAT_R16G16B16_SNORM, + + ename:VK_FORMAT_R16G16B16_USCALED, + + ename:VK_FORMAT_R16G16B16_SSCALED, + + ename:VK_FORMAT_R16G16B16_UINT, + + ename:VK_FORMAT_R16G16B16_SINT, + + ename:VK_FORMAT_R16G16B16_SFLOAT +| 64-bit | ename:VK_FORMAT_R16G16B16A16_UNORM, + + ename:VK_FORMAT_R16G16B16A16_SNORM, + + ename:VK_FORMAT_R16G16B16A16_USCALED, + + ename:VK_FORMAT_R16G16B16A16_SSCALED, + + ename:VK_FORMAT_R16G16B16A16_UINT, + + ename:VK_FORMAT_R16G16B16A16_SINT, + + ename:VK_FORMAT_R16G16B16A16_SFLOAT, + + ename:VK_FORMAT_R32G32_UINT, + + ename:VK_FORMAT_R32G32_SINT, + + ename:VK_FORMAT_R32G32_SFLOAT, + + ename:VK_FORMAT_R64_UINT, + + ename:VK_FORMAT_R64_SINT, + + ename:VK_FORMAT_R64_SFLOAT +| 96-bit | ename:VK_FORMAT_R32G32B32_UINT, + + ename:VK_FORMAT_R32G32B32_SINT, + + ename:VK_FORMAT_R32G32B32_SFLOAT +| 128-bit | ename:VK_FORMAT_R32G32B32A32_UINT, + + ename:VK_FORMAT_R32G32B32A32_SINT, + + ename:VK_FORMAT_R32G32B32A32_SFLOAT, + + ename:VK_FORMAT_R64G64_UINT, + + ename:VK_FORMAT_R64G64_SINT, + + ename:VK_FORMAT_R64G64_SFLOAT +| 192-bit | ename:VK_FORMAT_R64G64B64_UINT, + + ename:VK_FORMAT_R64G64B64_SINT, + + ename:VK_FORMAT_R64G64B64_SFLOAT +| 256-bit | ename:VK_FORMAT_R64G64B64A64_UINT, + + ename:VK_FORMAT_R64G64B64A64_SINT, + + ename:VK_FORMAT_R64G64B64A64_SFLOAT +| BC1_RGB | ename:VK_FORMAT_BC1_RGB_UNORM_BLOCK, + + ename:VK_FORMAT_BC1_RGB_SRGB_BLOCK +| BC1_RGBA | ename:VK_FORMAT_BC1_RGBA_UNORM_BLOCK, + + ename:VK_FORMAT_BC1_RGBA_SRGB_BLOCK +| BC2 | ename:VK_FORMAT_BC2_UNORM_BLOCK, + + ename:VK_FORMAT_BC2_SRGB_BLOCK +| BC3 | ename:VK_FORMAT_BC3_UNORM_BLOCK, + + ename:VK_FORMAT_BC3_SRGB_BLOCK +| BC4 | ename:VK_FORMAT_BC4_UNORM_BLOCK, + + ename:VK_FORMAT_BC4_SNORM_BLOCK +| BC5 | ename:VK_FORMAT_BC5_UNORM_BLOCK, + + ename:VK_FORMAT_BC5_SNORM_BLOCK +| BC6H | ename:VK_FORMAT_BC6H_UFLOAT_BLOCK, + + ename:VK_FORMAT_BC6H_SFLOAT_BLOCK +| BC7 | ename:VK_FORMAT_BC7_UNORM_BLOCK, + + ename:VK_FORMAT_BC7_SRGB_BLOCK +| ETC2_RGB | ename:VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, + + ename:VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK +| ETC2_RGBA | ename:VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK, + + ename:VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK +| ETC2_EAC_RGBA | ename:VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, + + ename:VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK +| EAC_R | ename:VK_FORMAT_EAC_R11_UNORM_BLOCK, + + ename:VK_FORMAT_EAC_R11_SNORM_BLOCK +| EAC_RG | ename:VK_FORMAT_EAC_R11G11_UNORM_BLOCK, + + ename:VK_FORMAT_EAC_R11G11_SNORM_BLOCK +| ASTC_4x4 | ename:VK_FORMAT_ASTC_4x4_UNORM_BLOCK, + + ename:VK_FORMAT_ASTC_4x4_SRGB_BLOCK +| ASTC_5x4 | ename:VK_FORMAT_ASTC_5x4_UNORM_BLOCK, + + ename:VK_FORMAT_ASTC_5x4_SRGB_BLOCK +| ASTC_5x5 | ename:VK_FORMAT_ASTC_5x5_UNORM_BLOCK, + + ename:VK_FORMAT_ASTC_5x5_SRGB_BLOCK +| ASTC_6x5 | ename:VK_FORMAT_ASTC_6x5_UNORM_BLOCK, + + ename:VK_FORMAT_ASTC_6x5_SRGB_BLOCK +| ASTC_6x6 | ename:VK_FORMAT_ASTC_6x6_UNORM_BLOCK, + + ename:VK_FORMAT_ASTC_6x6_SRGB_BLOCK +| ASTC_8x5 | ename:VK_FORMAT_ASTC_8x5_UNORM_BLOCK, + + ename:VK_FORMAT_ASTC_8x5_SRGB_BLOCK +| ASTC_8x6 | ename:VK_FORMAT_ASTC_8x6_UNORM_BLOCK, + + ename:VK_FORMAT_ASTC_8x6_SRGB_BLOCK +| ASTC_8x8 | ename:VK_FORMAT_ASTC_8x8_UNORM_BLOCK, + + ename:VK_FORMAT_ASTC_8x8_SRGB_BLOCK +| ASTC_10x5 | ename:VK_FORMAT_ASTC_10x5_UNORM_BLOCK, + + ename:VK_FORMAT_ASTC_10x5_SRGB_BLOCK +| ASTC_10x6 | ename:VK_FORMAT_ASTC_10x6_UNORM_BLOCK, + + ename:VK_FORMAT_ASTC_10x6_SRGB_BLOCK +| ASTC_10x8 | ename:VK_FORMAT_ASTC_10x8_UNORM_BLOCK, + + ename:VK_FORMAT_ASTC_10x8_SRGB_BLOCK +| ASTC_10x10 | ename:VK_FORMAT_ASTC_10x10_UNORM_BLOCK, + + ename:VK_FORMAT_ASTC_10x10_SRGB_BLOCK +| ASTC_12x10 | ename:VK_FORMAT_ASTC_12x10_UNORM_BLOCK, + + ename:VK_FORMAT_ASTC_12x10_SRGB_BLOCK +| ASTC_12x12 | ename:VK_FORMAT_ASTC_12x12_UNORM_BLOCK, + + ename:VK_FORMAT_ASTC_12x12_SRGB_BLOCK +| D16 | ename:VK_FORMAT_D16_UNORM +| D24 | ename:VK_FORMAT_X8_D24_UNORM_PACK32 +| D32 | ename:VK_FORMAT_D32_SFLOAT +| S8 | ename:VK_FORMAT_S8_UINT +| D16S8 | ename:VK_FORMAT_D16_UNORM_S8_UINT +| D24S8 | ename:VK_FORMAT_D24_UNORM_S8_UINT +| D32S8 | ename:VK_FORMAT_D32_SFLOAT_S8_UINT +|========================================= + + +[[features-formats-properties]] +=== Format Properties + +To query supported format features which are properties of the physical +device, call: + +include::../protos/vkGetPhysicalDeviceFormatProperties.txt[] + + * pname:physicalDevice is the physical device from which to query the + format properties. + * pname:format is the format whose properties are queried. + * pname:pFormatProperties is a pointer to a slink:VkFormatProperties + structure in which physical device properties for pname:format are + returned. + +include::../validity/protos/vkGetPhysicalDeviceFormatProperties.txt[] + +fname:vkGetPhysicalDeviceFormatProperties returns sname:VkFormatProperties: + +include::../structs/VkFormatProperties.txt[] + +The features are described as a set of elink:VkFormatFeatureFlagBits: + +include::../enums/VkFormatFeatureFlagBits.txt[] + +The pname:linearTilingFeatures and pname:optimalTilingFeatures members of +the sname:VkFormatProperties structure describe what features are supported +by ename:VK_IMAGE_TILING_LINEAR and ename:VK_IMAGE_TILING_OPTIMAL images, +respectively. + +The following features may: be supported by images or image views created +with pname:format: + +ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT:: + sname:VkImageView can: be sampled from. See + <> section. + +ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT:: + sname:VkImageView can: be used as storage image. See + <> section. + +ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT:: + sname:VkImageView can: be used as storage image that supports atomic + operations. + +ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT:: + sname:VkImageView can: be used as a framebuffer color attachment and + as an input attachment. + +ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT:: + sname:VkImageView can: be used as a framebuffer color attachment that + supports blending and as an input attachment. + +ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT:: + sname:VkImageView can: be used as a framebuffer depth/stencil attachment + and as an input attachment. + +ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT:: + sname:VkImage can: be used as pname:srcImage for the + fname:vkCmdBlitImage command. + +ename:VK_FORMAT_FEATURE_BLIT_DST_BIT:: + sname:VkImage can: be used as pname:dstImage for the + fname:vkCmdBlitImage command. + +ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT:: + sname:VkImage can: be used with a sampler that has either of + pname:magFilter or pname:minFilter set to ename:VK_FILTER_LINEAR, + or pname:mipmapMode set to ename:VK_SAMPLER_MIPMAP_MODE_LINEAR. This bit + must: only be exposed for formats that also support the + ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT. If the format being + queried is a depth/stencil format, this only indicates that the + depth aspect is linearly filterable. + +The pname:bufferFeatures member of the sname:VkFormatProperties structure +describes what features are supported by buffers. + +The following features may: be supported by buffers or buffer views created +with pname:format: + +ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT:: + Format can: be used to create a sname:VkBufferView that can: be bound to + a ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER descriptor. + +ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT:: + Format can: be used to create a sname:VkBufferView that can: be bound to + a ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor. + +ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT:: + Atomic operations are supported on + ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER with this format. + +ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT:: + Format can: be used as a vertex attribute format + (sname:VkVertexInputAttributeDescription.format). + +If pname:format is a block-compression format, then buffers mustnot: support +any features for the format. + +include::../validity/structs/VkFormatProperties.txt[] + + +=== Required Format Support + +Implementations must: support at least the following set of +features on the listed formats. For images, these features must: +be supported for every slink:VkImageType (including arrayed and cube +variants) unless otherwise noted. These features are supported +on existing formats without needing to advertise an extension or +needing to explicitly enable them. Support for additional functionality +beyond the requirements listed here is queried using the +flink:vkGetPhysicalDeviceFormatProperties command. + +The following tables show which feature bits must: be supported +for each format. + +.Key for format feature tables +[width="70%",cols="1,10"] +|============ +^|• | This feature must: be supported on +the named format +^|∘ | This feature must: be supported on at least some +of the named formats, with more information below +|============ + +.Feature bits in pname:optimalTilingFeatures +[width="70%"] +|============ +|ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT +|ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT +|ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT +|ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT +|ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT +|ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT +|ename:VK_FORMAT_FEATURE_BLIT_DST_BIT +|ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT +|ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT +|============ + +.Feature bits in pname:bufferFeatures +[width="70%"] +|============ +|ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT +|ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT +|ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT +|ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT +|============ + +<<< + +[[features-formats-mandatory-features-subbyte]] +.Mandatory format support: sub-byte channels +[width="100%",cols="62,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1",options="unbreakable"] +|========================================= +14+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT +13+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT .13+^.^|latexmath:[$\downarrow$] +12+>| ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT .12+^.^|latexmath:[$\downarrow$] +11+>| ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT .11+^.^|latexmath:[$\downarrow$] +10+>| ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT .10+^.^|latexmath:[$\downarrow$] +9+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT .9+^.^|latexmath:[$\downarrow$] +8+>| ename:VK_FORMAT_FEATURE_BLIT_DST_BIT .8+^.^|latexmath:[$\downarrow$] +7+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT .7+^.^|latexmath:[$\downarrow$] +6+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT .6+^.^|latexmath:[$\downarrow$] +5+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT .5+^.^|latexmath:[$\downarrow$] +4+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT .4+^.^|latexmath:[$\downarrow$] +3+>| ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT .3+^.^|latexmath:[$\downarrow$] +2+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT .2+^.^|latexmath:[$\downarrow$] +s| Format ^.^|latexmath:[$\downarrow$] +| ename:VK_FORMAT_UNDEFINED | | | | | | | | | | | | | +| ename:VK_FORMAT_R4G4_UNORM_PACK8 | | | | | | | | | | | | | +| ename:VK_FORMAT_R4G4B4A4_UNORM_PACK16 | | | | | | | | | | | | | +| ename:VK_FORMAT_B4G4R4A4_UNORM_PACK16 | • | • | • | | | | | | | | | | +| ename:VK_FORMAT_R5G6B5_UNORM_PACK16 | • | • | • | | | • | • | • | | | | | +| ename:VK_FORMAT_B5G6R5_UNORM_PACK16 | | | | | | | | | | | | | +| ename:VK_FORMAT_R5G5B5A1_UNORM_PACK16 | | | | | | | | | | | | | +| ename:VK_FORMAT_B5G5R5A1_UNORM_PACK16 | | | | | | | | | | | | | +| ename:VK_FORMAT_A1R5G5B5_UNORM_PACK16 | • | • | • | | | • | • | • | | | | | +|========================================= + +<<< + +[[features-formats-mandatory-features-2byte]] +.Mandatory format support: 1-3 byte-sized channels +[width="100%",cols="62,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1",options="unbreakable"] +|========================================= +14+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT +13+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT .13+^.^|latexmath:[$\downarrow$] +12+>| ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT .12+^.^|latexmath:[$\downarrow$] +11+>| ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT .11+^.^|latexmath:[$\downarrow$] +10+>| ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT .10+^.^|latexmath:[$\downarrow$] +9+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT .9+^.^|latexmath:[$\downarrow$] +8+>| ename:VK_FORMAT_FEATURE_BLIT_DST_BIT .8+^.^|latexmath:[$\downarrow$] +7+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT .7+^.^|latexmath:[$\downarrow$] +6+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT .6+^.^|latexmath:[$\downarrow$] +5+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT .5+^.^|latexmath:[$\downarrow$] +4+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT .4+^.^|latexmath:[$\downarrow$] +3+>| ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT .3+^.^|latexmath:[$\downarrow$] +2+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT .2+^.^|latexmath:[$\downarrow$] +s| Format ^.^|latexmath:[$\downarrow$] +| ename:VK_FORMAT_R8_UNORM | • | • | • | | | • | • | • | | • | • | | +| ename:VK_FORMAT_R8_SNORM | • | • | • | | | | | | | • | • | | +| ename:VK_FORMAT_R8_USCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_R8_SSCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_R8_UINT | • | • | | | | • | • | | | • | • | | +| ename:VK_FORMAT_R8_SINT | • | • | | | | • | • | | | • | • | | +| ename:VK_FORMAT_R8_SRGB | | | | | | | | | | | | | +| ename:VK_FORMAT_R8G8_UNORM | • | • | • | | | • | • | • | | • | • | | +| ename:VK_FORMAT_R8G8_SNORM | • | • | • | | | | | | | • | • | | +| ename:VK_FORMAT_R8G8_USCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_R8G8_SSCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_R8G8_UINT | • | • | | | | • | • | | | • | • | | +| ename:VK_FORMAT_R8G8_SINT | • | • | | | | • | • | | | • | • | | +| ename:VK_FORMAT_R8G8_SRGB | | | | | | | | | | | | | +| ename:VK_FORMAT_R8G8B8_UNORM | | | | | | | | | | | | | +| ename:VK_FORMAT_R8G8B8_SNORM | | | | | | | | | | | | | +| ename:VK_FORMAT_R8G8B8_USCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_R8G8B8_SSCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_R8G8B8_UINT | | | | | | | | | | | | | +| ename:VK_FORMAT_R8G8B8_SINT | | | | | | | | | | | | | +| ename:VK_FORMAT_R8G8B8_SRGB | | | | | | | | | | | | | +| ename:VK_FORMAT_B8G8R8_UNORM | | | | | | | | | | | | | +| ename:VK_FORMAT_B8G8R8_SNORM | | | | | | | | | | | | | +| ename:VK_FORMAT_B8G8R8_USCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_B8G8R8_SSCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_B8G8R8_UINT | | | | | | | | | | | | | +| ename:VK_FORMAT_B8G8R8_SINT | | | | | | | | | | | | | +| ename:VK_FORMAT_B8G8R8_SRGB | | | | | | | | | | | | | +|========================================= + +<<< + +[[features-formats-mandatory-features-4byte]] +.Mandatory format support: 4 byte-sized channels +[width="100%",cols="62,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1",options="unbreakable"] +|========================================= +14+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT +13+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT .13+^.^|latexmath:[$\downarrow$] +12+>| ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT .12+^.^|latexmath:[$\downarrow$] +11+>| ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT .11+^.^|latexmath:[$\downarrow$] +10+>| ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT .10+^.^|latexmath:[$\downarrow$] +9+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT .9+^.^|latexmath:[$\downarrow$] +8+>| ename:VK_FORMAT_FEATURE_BLIT_DST_BIT .8+^.^|latexmath:[$\downarrow$] +7+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT .7+^.^|latexmath:[$\downarrow$] +6+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT .6+^.^|latexmath:[$\downarrow$] +5+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT .5+^.^|latexmath:[$\downarrow$] +4+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT .4+^.^|latexmath:[$\downarrow$] +3+>| ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT .3+^.^|latexmath:[$\downarrow$] +2+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT .2+^.^|latexmath:[$\downarrow$] +s| Format ^.^|latexmath:[$\downarrow$] +| ename:VK_FORMAT_R8G8B8A8_UNORM | • | • | • | • | | • | • | • | | • | • | • | +| ename:VK_FORMAT_R8G8B8A8_SNORM | • | • | • | • | | | | | | • | • | • | +| ename:VK_FORMAT_R8G8B8A8_USCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_R8G8B8A8_SSCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_R8G8B8A8_UINT | • | • | | • | | • | • | | | • | • | • | +| ename:VK_FORMAT_R8G8B8A8_SINT | • | • | | • | | • | • | | | • | • | • | +| ename:VK_FORMAT_R8G8B8A8_SRGB | • | • | • | | | • | • | • | | | | | +| ename:VK_FORMAT_B8G8R8A8_UNORM | • | • | • | | | • | • | • | | • | • | | +| ename:VK_FORMAT_B8G8R8A8_SNORM | | | | | | | | | | | | | +| ename:VK_FORMAT_B8G8R8A8_USCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_B8G8R8A8_SSCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_B8G8R8A8_UINT | | | | | | | | | | | | | +| ename:VK_FORMAT_B8G8R8A8_SINT | | | | | | | | | | | | | +| ename:VK_FORMAT_B8G8R8A8_SRGB | • | • | • | | | • | • | • | | | | | +| ename:VK_FORMAT_A8B8G8R8_UNORM_PACK32 | • | • | • | | | • | • | • | | • | • | • | +| ename:VK_FORMAT_A8B8G8R8_SNORM_PACK32 | • | • | • | | | | | | | • | • | • | +| ename:VK_FORMAT_A8B8G8R8_USCALED_PACK32 | | | | | | | | | | | | | +| ename:VK_FORMAT_A8B8G8R8_SSCALED_PACK32 | | | | | | | | | | | | | +| ename:VK_FORMAT_A8B8G8R8_UINT_PACK32 | • | • | | | | • | • | | | • | • | • | +| ename:VK_FORMAT_A8B8G8R8_SINT_PACK32 | • | • | | | | • | • | | | • | • | • | +| ename:VK_FORMAT_A8B8G8R8_SRGB_PACK32 | • | • | • | | | • | • | • | | | | | +|========================================= + +<<< + +[[features-formats-mandatory-features-10bit]] +.Mandatory format support: 10-bit channels +[width="100%",cols="62,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1",options="unbreakable"] +|========================================= +14+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT +13+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT .13+^.^|latexmath:[$\downarrow$] +12+>| ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT .12+^.^|latexmath:[$\downarrow$] +11+>| ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT .11+^.^|latexmath:[$\downarrow$] +10+>| ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT .10+^.^|latexmath:[$\downarrow$] +9+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT .9+^.^|latexmath:[$\downarrow$] +8+>| ename:VK_FORMAT_FEATURE_BLIT_DST_BIT .8+^.^|latexmath:[$\downarrow$] +7+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT .7+^.^|latexmath:[$\downarrow$] +6+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT .6+^.^|latexmath:[$\downarrow$] +5+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT .5+^.^|latexmath:[$\downarrow$] +4+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT .4+^.^|latexmath:[$\downarrow$] +3+>| ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT .3+^.^|latexmath:[$\downarrow$] +2+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT .2+^.^|latexmath:[$\downarrow$] +s| Format ^.^|latexmath:[$\downarrow$] +| ename:VK_FORMAT_A2R10G10B10_UNORM_PACK32 | | | | | | | | | | | | | +| ename:VK_FORMAT_A2R10G10B10_SNORM_PACK32 | | | | | | | | | | | | | +| ename:VK_FORMAT_A2R10G10B10_USCALED_PACK32 | | | | | | | | | | | | | +| ename:VK_FORMAT_A2R10G10B10_SSCALED_PACK32 | | | | | | | | | | | | | +| ename:VK_FORMAT_A2R10G10B10_UINT_PACK32 | | | | | | | | | | | | | +| ename:VK_FORMAT_A2R10G10B10_SINT_PACK32 | | | | | | | | | | | | | +| ename:VK_FORMAT_A2B10G10R10_UNORM_PACK32 | • | • | • | | | • | • | • | | • | • | | +| ename:VK_FORMAT_A2B10G10R10_SNORM_PACK32 | | | | | | | | | | | | | +| ename:VK_FORMAT_A2B10G10R10_USCALED_PACK32 | | | | | | | | | | | | | +| ename:VK_FORMAT_A2B10G10R10_SSCALED_PACK32 | | | | | | | | | | | | | +| ename:VK_FORMAT_A2B10G10R10_UINT_PACK32 | • | • | | | | • | • | | | | • | | +| ename:VK_FORMAT_A2B10G10R10_SINT_PACK32 | | | | | | | | | | | | | +|========================================= + +<<< + +[[features-formats-mandatory-features-16bit]] +.Mandatory format support: 16-bit channels +[width="100%",cols="62,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1",options="unbreakable"] +|========================================= +14+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT +13+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT .13+^.^|latexmath:[$\downarrow$] +12+>| ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT .12+^.^|latexmath:[$\downarrow$] +11+>| ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT .11+^.^|latexmath:[$\downarrow$] +10+>| ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT .10+^.^|latexmath:[$\downarrow$] +9+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT .9+^.^|latexmath:[$\downarrow$] +8+>| ename:VK_FORMAT_FEATURE_BLIT_DST_BIT .8+^.^|latexmath:[$\downarrow$] +7+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT .7+^.^|latexmath:[$\downarrow$] +6+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT .6+^.^|latexmath:[$\downarrow$] +5+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT .5+^.^|latexmath:[$\downarrow$] +4+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT .4+^.^|latexmath:[$\downarrow$] +3+>| ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT .3+^.^|latexmath:[$\downarrow$] +2+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT .2+^.^|latexmath:[$\downarrow$] +s| Format ^.^|latexmath:[$\downarrow$] +| ename:VK_FORMAT_R16_UNORM | | | | | | | | | | • | | | +| ename:VK_FORMAT_R16_SNORM | | | | | | | | | | • | | | +| ename:VK_FORMAT_R16_USCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_R16_SSCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_R16_UINT | • | • | | | | • | • | | | • | • | | +| ename:VK_FORMAT_R16_SINT | • | • | | | | • | • | | | • | • | | +| ename:VK_FORMAT_R16_SFLOAT | • | • | • | | | • | • | • | | • | • | | +| ename:VK_FORMAT_R16G16_UNORM | | | | | | | | | | • | | | +| ename:VK_FORMAT_R16G16_SNORM | | | | | | | | | | • | | | +| ename:VK_FORMAT_R16G16_USCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_R16G16_SSCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_R16G16_UINT | • | • | | | | • | • | | | • | • | | +| ename:VK_FORMAT_R16G16_SINT | • | • | | | | • | • | | | • | • | | +| ename:VK_FORMAT_R16G16_SFLOAT | • | • | • | | | • | • | • | | • | • | | +| ename:VK_FORMAT_R16G16B16_UNORM | | | | | | | | | | | | | +| ename:VK_FORMAT_R16G16B16_SNORM | | | | | | | | | | | | | +| ename:VK_FORMAT_R16G16B16_USCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_R16G16B16_SSCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_R16G16B16_UINT | | | | | | | | | | | | | +| ename:VK_FORMAT_R16G16B16_SINT | | | | | | | | | | | | | +| ename:VK_FORMAT_R16G16B16_SFLOAT | | | | | | | | | | | | | +| ename:VK_FORMAT_R16G16B16A16_UNORM | | | | | | | | | | • | | | +| ename:VK_FORMAT_R16G16B16A16_SNORM | | | | | | | | | | • | | | +| ename:VK_FORMAT_R16G16B16A16_USCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_R16G16B16A16_SSCALED | | | | | | | | | | | | | +| ename:VK_FORMAT_R16G16B16A16_UINT | • | • | | • | | • | • | | | • | • | • | +| ename:VK_FORMAT_R16G16B16A16_SINT | • | • | | • | | • | • | | | • | • | • | +| ename:VK_FORMAT_R16G16B16A16_SFLOAT | • | • | • | • | | • | • | • | | • | • | • | +|========================================= + +<<< + +[[features-formats-mandatory-features-32bit]] +.Mandatory format support: 32-bit channels +[width="100%",cols="62,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1",options="unbreakable"] +|========================================= +14+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT +13+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT .13+^.^|latexmath:[$\downarrow$] +12+>| ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT .12+^.^|latexmath:[$\downarrow$] +11+>| ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT .11+^.^|latexmath:[$\downarrow$] +10+>| ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT .10+^.^|latexmath:[$\downarrow$] +9+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT .9+^.^|latexmath:[$\downarrow$] +8+>| ename:VK_FORMAT_FEATURE_BLIT_DST_BIT .8+^.^|latexmath:[$\downarrow$] +7+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT .7+^.^|latexmath:[$\downarrow$] +6+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT .6+^.^|latexmath:[$\downarrow$] +5+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT .5+^.^|latexmath:[$\downarrow$] +4+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT .4+^.^|latexmath:[$\downarrow$] +3+>| ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT .3+^.^|latexmath:[$\downarrow$] +2+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT .2+^.^|latexmath:[$\downarrow$] +s| Format ^.^|latexmath:[$\downarrow$] +| ename:VK_FORMAT_R32_UINT | • | • | | • | • | • | • | | | • | • | • | • +| ename:VK_FORMAT_R32_SINT | • | • | | • | • | • | • | | | • | • | • | • +| ename:VK_FORMAT_R32_SFLOAT | • | • | | • | | • | • | | | • | • | • | +| ename:VK_FORMAT_R32G32_UINT | • | • | | • | | • | • | | | • | • | • | +| ename:VK_FORMAT_R32G32_SINT | • | • | | • | | • | • | | | • | • | • | +| ename:VK_FORMAT_R32G32_SFLOAT | • | • | | • | | • | • | | | • | • | • | +| ename:VK_FORMAT_R32G32B32_UINT | | | | | | | | | | • | | | +| ename:VK_FORMAT_R32G32B32_SINT | | | | | | | | | | • | | | +| ename:VK_FORMAT_R32G32B32_SFLOAT | | | | | | | | | | • | | | +| ename:VK_FORMAT_R32G32B32A32_UINT | • | • | | • | | • | • | | | • | • | • | +| ename:VK_FORMAT_R32G32B32A32_SINT | • | • | | • | | • | • | | | • | • | • | +| ename:VK_FORMAT_R32G32B32A32_SFLOAT | • | • | | • | | • | • | | | • | • | • | +|========================================= + +<<< + +[[features-formats-mandatory-features-64bit]] +.Mandatory format support: 64-bit/uneven channels and depth/stencil +[width="100%",cols="62,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1",options="unbreakable"] +|========================================= +14+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT +13+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT .13+^.^|latexmath:[$\downarrow$] +12+>| ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT .12+^.^|latexmath:[$\downarrow$] +11+>| ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT .11+^.^|latexmath:[$\downarrow$] +10+>| ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT .10+^.^|latexmath:[$\downarrow$] +9+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT .9+^.^|latexmath:[$\downarrow$] +8+>| ename:VK_FORMAT_FEATURE_BLIT_DST_BIT .8+^.^|latexmath:[$\downarrow$] +7+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT .7+^.^|latexmath:[$\downarrow$] +6+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT .6+^.^|latexmath:[$\downarrow$] +5+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT .5+^.^|latexmath:[$\downarrow$] +4+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT .4+^.^|latexmath:[$\downarrow$] +3+>| ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT .3+^.^|latexmath:[$\downarrow$] +2+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT .2+^.^|latexmath:[$\downarrow$] +s| Format ^.^|latexmath:[$\downarrow$] +| ename:VK_FORMAT_R64_UINT | | | | | | | | | | | | | +| ename:VK_FORMAT_R64_SINT | | | | | | | | | | | | | +| ename:VK_FORMAT_R64_SFLOAT | | | | | | | | | | | | | +| ename:VK_FORMAT_R64G64_UINT | | | | | | | | | | | | | +| ename:VK_FORMAT_R64G64_SINT | | | | | | | | | | | | | +| ename:VK_FORMAT_R64G64_SFLOAT | | | | | | | | | | | | | +| ename:VK_FORMAT_R64G64B64_UINT | | | | | | | | | | | | | +| ename:VK_FORMAT_R64G64B64_SINT | | | | | | | | | | | | | +| ename:VK_FORMAT_R64G64B64_SFLOAT | | | | | | | | | | | | | +| ename:VK_FORMAT_R64G64B64A64_UINT | | | | | | | | | | | | | +| ename:VK_FORMAT_R64G64B64A64_SINT | | | | | | | | | | | | | +| ename:VK_FORMAT_R64G64B64A64_SFLOAT | | | | | | | | | | | | | +| ename:VK_FORMAT_B10G11R11_UFLOAT_PACK32 | • | • | • | | | | | | | | • | | +| ename:VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 | • | • | • | | | | | | | | | | +| ename:VK_FORMAT_D16_UNORM | • | • | | | | | | | • | | | | +| ename:VK_FORMAT_X8_D24_UNORM_PACK32 | | | | | | | | | ∘ | | | | +| ename:VK_FORMAT_D32_SFLOAT | • | • | | | | | | | ∘ | | | | +| ename:VK_FORMAT_S8_UINT | | | | | | | | | | | | | +| ename:VK_FORMAT_D16_UNORM_S8_UINT | | | | | | | | | | | | | +| ename:VK_FORMAT_D24_UNORM_S8_UINT | | | | | | | | | ∘ | | | | +| ename:VK_FORMAT_D32_SFLOAT_S8_UINT | | | | | | | | | ∘ | | | | +|========================================= + +ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT feature must: be +supported for at least one of ename:VK_FORMAT_X8_D24_UNORM_PACK32 and +ename:VK_FORMAT_D32_SFLOAT, and must: be supported for at least one of +ename:VK_FORMAT_D24_UNORM_S8_UINT and ename:VK_FORMAT_D32_SFLOAT_S8_UINT. + +<<< + +The ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, +ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT and +ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT features must: be +supported in pname:optimalTilingFeatures for all the formats in at least +one of the following three tables: + +[[features-formats-mandatory-features-bcn]] +.Mandatory format support: BC compressed formats with slink:VkImageType ename:VK_IMAGE_TYPE_2D and ename:VK_IMAGE_TYPE_3D +[width="100%",cols="62,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1",options="unbreakable"] +|========================================= +14+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT +13+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT .13+^.^|latexmath:[$\downarrow$] +12+>| ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT .12+^.^|latexmath:[$\downarrow$] +11+>| ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT .11+^.^|latexmath:[$\downarrow$] +10+>| ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT .10+^.^|latexmath:[$\downarrow$] +9+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT .9+^.^|latexmath:[$\downarrow$] +8+>| ename:VK_FORMAT_FEATURE_BLIT_DST_BIT .8+^.^|latexmath:[$\downarrow$] +7+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT .7+^.^|latexmath:[$\downarrow$] +6+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT .6+^.^|latexmath:[$\downarrow$] +5+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT .5+^.^|latexmath:[$\downarrow$] +4+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT .4+^.^|latexmath:[$\downarrow$] +3+>| ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT .3+^.^|latexmath:[$\downarrow$] +2+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT .2+^.^|latexmath:[$\downarrow$] +s| Format ^.^|latexmath:[$\downarrow$] +| ename:VK_FORMAT_BC1_RGB_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_BC1_RGB_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_BC1_RGBA_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_BC1_RGBA_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_BC2_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_BC2_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_BC3_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_BC3_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_BC4_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_BC4_SNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_BC5_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_BC5_SNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_BC6H_UFLOAT_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_BC6H_SFLOAT_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_BC7_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_BC7_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +|========================================= + +<<< + +[[features-formats-mandatory-features-etc]] +.Mandatory format support: ETC2 and EAC compressed formats with slink:VkImageType ename:VK_IMAGE_TYPE_2D +[width="100%",cols="62,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1",options="unbreakable"] +|========================================= +14+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT +13+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT .13+^.^|latexmath:[$\downarrow$] +12+>| ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT .12+^.^|latexmath:[$\downarrow$] +11+>| ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT .11+^.^|latexmath:[$\downarrow$] +10+>| ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT .10+^.^|latexmath:[$\downarrow$] +9+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT .9+^.^|latexmath:[$\downarrow$] +8+>| ename:VK_FORMAT_FEATURE_BLIT_DST_BIT .8+^.^|latexmath:[$\downarrow$] +7+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT .7+^.^|latexmath:[$\downarrow$] +6+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT .6+^.^|latexmath:[$\downarrow$] +5+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT .5+^.^|latexmath:[$\downarrow$] +4+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT .4+^.^|latexmath:[$\downarrow$] +3+>| ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT .3+^.^|latexmath:[$\downarrow$] +2+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT .2+^.^|latexmath:[$\downarrow$] +s| Format ^.^|latexmath:[$\downarrow$] +| ename:VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_EAC_R11_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_EAC_R11_SNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_EAC_R11G11_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_EAC_R11G11_SNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +|========================================= + +<<< + +[[features-formats-mandatory-features-astc]] +.Mandatory format support: ASTC LDR compressed formats with slink:VkImageType ename:VK_IMAGE_TYPE_2D +[width="100%",cols="62,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1,^1",options="unbreakable"] +|========================================= +14+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT +13+>| ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT .13+^.^|latexmath:[$\downarrow$] +12+>| ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT .12+^.^|latexmath:[$\downarrow$] +11+>| ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT .11+^.^|latexmath:[$\downarrow$] +10+>| ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT .10+^.^|latexmath:[$\downarrow$] +9+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT .9+^.^|latexmath:[$\downarrow$] +8+>| ename:VK_FORMAT_FEATURE_BLIT_DST_BIT .8+^.^|latexmath:[$\downarrow$] +7+>| ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT .7+^.^|latexmath:[$\downarrow$] +6+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT .6+^.^|latexmath:[$\downarrow$] +5+>| ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT .5+^.^|latexmath:[$\downarrow$] +4+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT .4+^.^|latexmath:[$\downarrow$] +3+>| ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT .3+^.^|latexmath:[$\downarrow$] +2+>| ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT .2+^.^|latexmath:[$\downarrow$] +s| Format ^.^|latexmath:[$\downarrow$] +| ename:VK_FORMAT_ASTC_4x4_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_4x4_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_5x4_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_5x4_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_5x5_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_5x5_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_6x5_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_6x5_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_6x6_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_6x6_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_8x5_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_8x5_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_8x6_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_8x6_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_8x8_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_8x8_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_10x5_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_10x5_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_10x6_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_10x6_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_10x8_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_10x8_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_10x10_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_10x10_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_12x10_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_12x10_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_12x12_UNORM_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +| ename:VK_FORMAT_ASTC_12x12_SRGB_BLOCK | ∘ | ∘ | ∘ | | | | | | | | | | +|========================================= + +== Additional Image Capabilities + +In addition to the minimum capabilities described in the previous sections +(<> and <>), +implementations may: support additional capabilities for certain types of +images. For example, larger dimensions or additional sample counts for +certain image types, or additional capabilities for _linear_ tiling format +images. + +To query additional capabilities specific to image types, call: + +include::../protos/vkGetPhysicalDeviceImageFormatProperties.txt[] + + * pname:physicalDevice is the physical device from which to query the + image capabilities. + * pname:format is the image format, corresponding to + slink:VkImageCreateInfo.format. + * pname:type is the image type, corresponding to + slink:VkImageCreateInfo.imageType. + * pname:tiling is the image tiling, corresponding to + slink:VkImageCreateInfo.tiling. + * pname:usage is the intended usage of the image, corresponding to + slink:VkImageCreateInfo.usage. + * pname:flags is a bitfield describing additional parameters of the image, + corresponding to slink:VkImageCreateInfo.flags. + * pname:pImageFormatProperties points to an instance of the + slink:VkImageFormatProperties structure in which capabilities are + returned. + +The pname:format, pname:type, pname:tiling, pname:usage, and pname:flags +parameters correspond to parameters that would be consumed by +flink:vkCreateImage. + +include::../validity/protos/vkGetPhysicalDeviceImageFormatProperties.txt[] + +The definition of the sname:VkImageFormatProperties structure is: + +include::../structs/VkImageFormatProperties.txt[] + + * pname:maxExtent are the maximum image dimensions. See the + <> + table below for how these values are constrained by pname:type. + * pname:maxMipLevels is the maximum number of mipmap levels. + pname:maxMipLevels must: either be equal to 1 (valid only if + pname:tiling is ename:VK_IMAGE_TILING_LINEAR) or be greater than or + equal to the latexmath:[$log_2$] of the pname:maxImageDimension1D, + pname:maxImageDimension2D, or pname:maxImageDimension3D (depending on + pname:type) members of slink:VkPhysicalDeviceLimits. + * pname:maxArrayLayers is the maximum number of array layers. + pname:maxArrayLayers must: either be equal to 1 or be greater than or + equal to the pname:maxImageArrayLayers member of + slink:VkPhysicalDeviceLimits. A value of 1 is valid only if pname:tiling + is ename:VK_IMAGE_TILING_LINEAR or if pname:type is + ename:VK_IMAGE_TYPE_3D. + * pname:sampleCounts is a bitmask of elink:VkSampleCountFlagBits + specifying all the supported sample counts for this image. When + pname:tiling is ename:VK_IMAGE_TILING_LINEAR the pname:sampleCounts will + be set to ename:VK_SAMPLE_COUNT_1_BIT. Otherwise the bits set here are a + superset of the corresponding limits for the image type in the + sname:VkPhysicalDeviceLimits struct. For non-integer color images this + is pname:sampledImageColorSampleCounts, for integer format color images + this is pname:sampledImageIntegerSampleCounts, for depth/stencil images + with a depth component this is pname:sampledImageDepthSampleCounts, for + depth/stencil with a stencil component images this is + pname:sampledImageStencilSampleCounts, and if pname:usage has + ename:VK_IMAGE_USAGE_STORAGE_BIT set this is + pname:storageImageSampleCounts. For depth/stencil images with both a + depth and stencil component, both the depth and stencil limits must: be + satisfied. + * pname:maxResourceSize is the maximum total image size in bytes, + inclusive of all subresources. Implementations may: have an address + space limit on total size of a resource, which is advertised by this + property. pname:maxResourceSize must: be at least 2^31^. + +[NOTE] +.Note +==== +There is no mechanism to query the size of an image before creating it, to +compare that size against pname:maxResourceSize. If an application attempts +to create an image that exceeds this limit, the creation will fail or the +image will be invalid. +==== + +If the combination of parameters to +fname:vkGetPhysicalDeviceImageFormatProperties is not supported by the +implementation for use in flink:vkCreateImage, then all members of +sname:VkImageFormatProperties will be filled with zero. + +include::../validity/structs/VkImageFormatProperties.txt[] + +[[features-extentperimagetype]] +.Allowed extent values based on imageType +[cols="1a,1a", options="header"] +|==== +| VkImageType | maxExtent values +| VK_IMAGE_TYPE_1D | +width >= 1 + +height = 1 + +depth = 1 + +| VK_IMAGE_TYPE_2D | +width >= 1 + +height >= 1 + +depth = 1 + +| VK_IMAGE_TYPE_3D | +width >= 1 + +height >= 1 + +depth >= 1 + +|==== + +If pname:format is not a supported image format, or if the combination of +pname:format, pname:type, pname:tiling, pname:usage, and pname:flags is not +supported for images, then fname:vkGetPhysicalDeviceImageFormatProperties +returns ename:VK_ERROR_FORMAT_NOT_SUPPORTED. + +The limitations on an image format that are reported by +fname:vkGetPhysicalDeviceImageFormatProperties have the following property: +if code:usage1 and code:usage2 of type elink:VkImageUsageFlags and +code:flags1 and code:flags2 of type elink:VkImageCreateFlags are such that +code:usage1 contains a subset of the bits set in code:usage2 and code:flags1 +contains a subset of the bits set in code:flags2, then the limitations for +code:usage1 and code:flags1 must: be no more strict than the limitations for +code:usage2 and code:flags2, for all values of pname:format, pname:type, and +pname:tiling. diff --git a/doc/specs/vulkan/chapters/fragops.txt b/doc/specs/vulkan/chapters/fragops.txt new file mode 100644 index 00000000..0d53281a --- /dev/null +++ b/doc/specs/vulkan/chapters/fragops.txt @@ -0,0 +1,544 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[fragops]] += Fragment Operations + + +[[fragops-early]] +== Early Per-Fragment Tests + +Once fragments are produced by rasterization, a number of per-fragment +operations are performed prior to fragment shader execution. +If a fragment is discarded during any of these +operations, it will not be processed by any subsequent stage, including +fragment shader execution. + +Two fragment operations are performed in the following order: + + * the scissor test (see <>) + * multisample fragment operations (see <>) + +If early per-fragment operations are <>, these tests are also performed in the following +order: + + * the depth bounds tests (see <>) + * the stencil test (see <>) + * the depth test (see <>) + * sample counting (see <>) + + +[[fragops-scissor]] +== Scissor Test + +The scissor test determines if a fragment's framebuffer coordinates +latexmath:[$(x_f,y_f)$] lie within the scissor rectangle corresponding to +the viewport index (see <>) used by the primitive that generated the fragment. If the +pipeline state object is created without ename:VK_DYNAMIC_STATE_SCISSOR +enabled then the scissor rectangles are set by the +slink:VkPipelineViewportStateCreateInfo state of the pipeline state object. +Otherwise, to dynamically set the scissor rectangles call: + +include::../protos/vkCmdSetScissor.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:firstScissor is the index of the first scissor whose state is + updated by the command. + * pname:scissorCount is the number of scissors whose rectangles are + updated by the command. + * pname:pScissors is a pointer to an array of slink:VkRect2D structures + defining scissor rectangles. + +The scissor rectangles taken from element latexmath:[$i$] of pname:pScissors +replace the current state for the scissor index +latexmath:[$\mathit{firstScissor}+i$], for latexmath:[$i$] in +latexmath:[$[0, scissorCount)$]. + +Each scissor rectangle is described by a slink:VkRect2D structure, with the +pname:offset.x and pname:offset.y values determining the upper left corner +of the scissor rectangle, and the pname:extent.width and pname:extent.height +values determining the size in pixels. + +include::../validity/protos/vkCmdSetScissor.txt[] + +If latexmath:[$\mathit{offset.x} \le x_f \lt \mathit{offset.x} + +\mathit{extent.width}$] and latexmath:[$\mathit{offset.y} \le y_f \lt +\mathit{offset.y} + \mathit{extent.height}$] for the selected scissor +rectangle, then the scissor test passes. Otherwise, the test fails and the +fragment is discarded. For points, lines, and polygons, the scissor +rectangle for a primitive is selected in the same manner as the viewport +(see <>). The scissor +rectangles only apply to drawing commands, not to other commands like clears +or copies. + +It is legal for latexmath:[$\mathit{offset.x} + \mathit{extent.width}$] or +latexmath:[$\mathit{offset.y} + \mathit{extent.height}$] to exceed the +dimensions of the framebuffer - the scissor test still applies as defined +above. Rasterization does not produce fragments outside of the framebuffer, +so such fragments never have the scissor test performed on them. + +The scissor test is always performed. Applications can: effectively disable +the scissor test by specifying a scissor rectangle that encompasses the +entire framebuffer. + + +[[fragops-samplemask]] +== Sample Mask + +This step modifies fragment coverage values based on the values in the +pname:pSampleMask array member of +slink:VkPipelineMultisampleStateCreateInfo, as described previously in +section <>. + +pname:pSampleMask contains a bitmask of static coverage information that is +code:ANDed with the coverage information generated during rasterization. +Bits that are zero disable coverage for the corresponding sample. Bit B of +mask word M corresponds to sample latexmath:[$32 \times M + B$]. The array +is sized to a length of latexmath:[$\lceil{rasterizationSamples / +32}\rceil$] words. If pname:pSampleMask is `NULL`, it is treated as if the +mask has all bits enabled, i.e. no coverage is removed from fragments. + + +[[fragops-early-mode]] +== Early Fragment Test Mode + +The depth bounds test, stencil test, depth test, and occlusion query sample +counting are performed before fragment shading if and only if early fragment +tests are enabled by the fragment shader (see +<>). When early +per-fragment operations are enabled, these operations are performed prior to +fragment shader execution, and the stencil buffer, depth buffer, and +occlusion query sample counts will be updated accordingly; these operations +will not be performed again after fragment shader execution. + +If a pipeline's fragment shader has early fragment tests disabled, these +operations are performed only after fragment program execution, in the order +described below. If a pipeline does not contain a fragment shader, these +operations are performed only once. + +If early fragment tests are enabled, any depth value computed by the +fragment shader has no effect. Additionally, the depth test (including depth +writes), stencil test (including stencil writes) and sample counting +operations are performed even for fragments or samples that would be +discarded after fragment shader execution due to per-fragment operations +such as alpha-to-coverage tests, or due to the fragment being discarded by +the shader itself. + + +[[fragops-late]] +== Late Per-Fragment Tests + +After programmable fragment processing, per-fragment operations are +performed before blending and color output to the framebuffer. + +A fragment is produced by rasterization with framebuffer coordinates of +latexmath:[$(x_f,y_f)$] and depth latexmath:[$z$], as described in +<>. The fragment is then modified by programmable +fragment processing, which adds associated data as described in +<>. The fragment is then further modified, and possibly +discarded by the late per-fragment operations described in this chapter. +These operations are diagrammed in figure <>, in the order in which they are performed. Finally, if the +fragment was not discarded, it is used to update the framebuffer at the +fragment's framebuffer coordinates for any samples that remain covered. + +The depth bounds test, stencil test, and depth test are performed for each +pixel sample, rather than just once for each fragment. Stencil and depth +operations are performed for a pixel sample only if that sample's fragment +coverage bit is a value of 1 when the fragment executes the corresponding +stage of the graphics pipeline. If the corresponding coverage bit is 0, no +operations are performed for that sample. Failure of the depth bounds, +stencil, or depth test results in termination of the processing of that +sample by means of disabling coverage for that sample, rather than +discarding of the fragment. If, at any point, a fragment's coverage becomes +zero for all samples, then the fragment is discarded. All operations are +performed on the depth and stencil values stored in the depth/stencil +attachment of the framebuffer. The contents of the color attachments are not +modified at this point. + +The depth bounds test, stencil test, depth test, and occlusion query +operations described in <>, +<>, <>, +<> are instead performed prior to +fragment processing, as described in <>, if requested by the fragment shader. + + +[[fragops-covg]] +== Multisample Coverage + +If a fragment shader is active and its entry point's interface includes a +built-in output variable decorated with code:SampleMask, the fragment +coverage is code:ANDed with the bits +of the sample mask to generate a new fragment coverage value. If such a +fragment shader did not assign a value to code:SampleMask due to flow of +control, the value code:ANDed with the fragment coverage is undefined. If no +fragment shader is active, or if the active fragment shader does not +include code:SampleMask in its interface, the fragment coverage is not +modified. + +Next, the fragment alpha and coverage values are modified based on the +values of the pname:alphaToCoverageEnable and pname:alphaToOneEnable members +of the slink:VkPipelineMultisampleStateCreateInfo structure. + +All alpha values in this section refer only to the alpha component of the +fragment shader output that has a code:Location and code:Index decoration of +zero (see <>). +If that shader output has an integer or unsigned integer type, then these +operations are skipped. + +If pname:alphaToCoverageEnable is enabled, a temporary coverage value is +generated where each bit is determined by the fragment's alpha value. The +temporary coverage value is then ANDed with the fragment coverage value to +generate a new fragment coverage value. + +No specific algorithm is specified for converting the alpha value to a +temporary coverage mask. It is intended that the number of 1's in this value +be proportional to the alpha value (clamped to +latexmath:[$[0,1\]$]), with all 1's corresponding to a value of 1.0 and all +0's corresponding to 0.0. The algorithm may: be different at different pixel +locations. + +[NOTE] +.Note +==== +Using different algorithms at different pixel location may: help to +avoid artifacts caused by regular coverage sample locations. +==== + +Next, if pname:alphaToOneEnable is enabled, each alpha value is replaced by +the maximum representable alpha value for fixed-point color buffers, or by +1.0 for floating-point buffers. Otherwise, the alpha values are not changed. + +[[fragops-ds-state]] +== Depth and Stencil Operations + +Pipeline state controlling the <>, +<>, and <> is +specified through the members of +sname:VkPipelineDepthStencilStateCreateInfo: + +include::../structs/VkPipelineDepthStencilStateCreateInfo.txt[] + +The members of sname:VkPipelineDepthStencilStateCreateInfo structure are as +follows: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:depthTestEnable controls whether <> + is enabled. + * pname:depthWriteEnable controls whether + <> are enabled. + * pname:depthCompareOp is the comparison operator used in the + <>. + * pname:depthBoundsTestEnable controls whether <> is enabled. + * pname:stencilTestEnable controls whether <> is enabled. + * pname:front and pname:back control the parameters of the + <>. + * pname:minDepthBounds and pname:maxDepthBounds define the range of values + used in the <>. + +include::../validity/structs/VkPipelineDepthStencilStateCreateInfo.txt[] + +[[fragops-dbt]] +== Depth Bounds Test + +The depth bounds test conditionally disables coverage of a sample based on +the outcome of a comparison between the value latexmath:[$z_a$] in the depth +attachment at location latexmath:[$(x_f,y_f)$] (for the appropriate sample) +and a range of values. The test is enabled or disabled by the +pname:depthBoundsTestEnable member of +slink:VkPipelineDepthStencilStateCreateInfo: If the pipeline state object +is created without the ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state +enabled then the range of values used in the depth bounds test are defined +by the pname:minDepthBounds and pname:maxDepthBounds members of the +slink:VkPipelineDepthStencilStateCreateInfo structure. Otherwise, to +dynamically set the depth bounds range values call: + +include::../protos/vkCmdSetDepthBounds.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:minDepthBounds is the lower bound of the range of depth values + used in the depth bounds test. + * pname:maxDepthBounds is the upper bound of the range. + +include::../validity/protos/vkCmdSetDepthBounds.txt[] + +If latexmath:[$\mathit{minDepthBounds} \leq z_a \leq +\mathit{maxDepthBounds}$], then the depth bounds test passes. Otherwise, the +test fails and the sample's coverage bit is cleared in the fragment. If +there is no depth framebuffer attachment or if the depth bounds test is +disabled, it is as if the depth bounds test always passes. + + +[[fragops-stencil]] +== Stencil Test + +The stencil test conditionally disables coverage of a sample based on the +outcome of a comparison between the stencil value in the depth/stencil +attachment at location latexmath:[$(x_f,y_f)$] (for the appropriate sample) +and a reference value. The stencil test also updates the value in the +stencil attachment, depending on the test state, the stencil value and the +stencil write masks. The test is enabled or disabled by the +pname:stencilTestEnable member of +slink:VkPipelineDepthStencilStateCreateInfo. + +When disabled, the stencil test and associated modifications are not made, +and the sample's coverage is not modified. + +The stencil test is controlled with the pname:front and pname:back members +of sname:VkPipelineDepthStencilStateCreateInfo which are of type +sname:VkStencilOpState. + +The definition of sname:VkStencilOpState is: + +include::../structs/VkStencilOpState.txt[] + +The members of sname:VkStencilOpState structure are as follows: + + * pname:failOp is the action performed on samples that fail the stencil + test. + * pname:passOp is the action performed on samples that pass both the depth + and stencil tests. + * pname:depthFailOp is the action performed on samples that pass the + stencil test and fail the depth test. + * pname:compareOp is the comparison operator used in the stencil test. + * pname:compareMask selects the bits of the unsigned integer stencil + values participating in the stencil test. + * pname:writeMask selects the bits of the unsigned integer stencil values + updated by the stencil test in the stencil framebuffer attachment. + * pname:reference is an integer reference value that is used in the + unsigned stencil comparison. + +include::../validity/structs/VkStencilOpState.txt[] + +There are two sets of stencil-related state, the front stencil state set and +the back stencil state set. Stencil tests and writes use the front set of +stencil state when processing fragments rasterized from non-polygon +primitives (points and lines) and front-facing polygon primitives while the +back set of stencil state is used when processing fragments rasterized from +back-facing polygon primitives. For the purposes of stencil testing, a +primitive is still considered a polygon even if the polygon is to be +rasterized as points or lines due to the current elink:VkPolygonMode. +Whether a polygon is front- or back-facing is determined in the same manner +used for face culling (see <>). + +The operation of the stencil test is also affected by the +pname:compareMask, pname:writeMask, and pname:reference +members of sname:VkStencilOpState set in the pipeline state object if the +pipeline state object is created without the +ename:VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK, +ename:VK_DYNAMIC_STATE_STENCIL_WRITE_MASK, and +ename:VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic states enabled, +respectively. + +If the pipeline state object is created with the +ename:VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled, then to +dynamically set the stencil compare mask call: + +include::../protos/vkCmdSetStencilCompareMask.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:faceMask is a bitmask specifying the set of stencil state for + which to update the compare mask, and may include the bits: ++ +-- +include::../enums/VkStencilFaceFlagBits.txt[] + + ** ename:VK_STENCIL_FACE_FRONT_BIT indicates that only the front set of + stencil state is updated. + ** ename:VK_STENCIL_FACE_BACK_BIT indicates that only the back set of + stencil state is updated. + ** ename:VK_STENCIL_FRONT_AND_BACK is the combination of + ename:VK_STENCIL_FACE_FRONT_BIT and ename:VK_STENCIL_FACE_BACK_BIT and + indicates that both sets of stencil state are updated. +-- + + * pname:compareMask is the new value to use as the stencil compare mask. + +include::../validity/protos/vkCmdSetStencilCompareMask.txt[] + +If the pipeline state object is created with the +ename:VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled, then to +dynamically set the stencil write mask call: + +include::../protos/vkCmdSetStencilWriteMask.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:faceMask is a bitmask of elink:VkStencilFaceFlagBits specifying + the set of stencil state for which to update the compare mask, as + described above for flink:vkCmdSetStencilCompareMask. + * pname:writeMask is the new value to use as the stencil write mask. + +include::../validity/protos/vkCmdSetStencilWriteMask.txt[] + +If the pipeline state object is created with the +ename:VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled, then to +dynamically set the stencil reference value call: + +include::../protos/vkCmdSetStencilReference.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:faceMask is a bitmask of elink:VkStencilFaceFlagBits specifying + the set of stencil state for which to update the compare mask, as + described above for flink:vkCmdSetStencilCompareMask. + * pname:reference is the new value to use as the stencil reference value. + +include::../validity/protos/vkCmdSetStencilReference.txt[] + +pname:reference is an integer reference value that is used in the +unsigned stencil comparison. Stencil comparison clamps the reference value +to latexmath:[$[0,2^s-1\]$], where latexmath:[$s$] is the number +of bits in the stencil framebuffer attachment. The latexmath:[$s$] least +significant bits of pname:compareMask are bitwise code:ANDed with +both the reference and the stored stencil value, and the resulting masked +values are those that participate in the comparison controlled by +pname:compareOp. Let latexmath:[$R$] be the masked reference value +and latexmath:[$S$] be the masked stored stencil value. +pname:compareOp is a symbolic constant that determines the stencil +comparison function: + +include::../enums/VkCompareOp.txt[] + + * ename:VK_COMPARE_OP_NEVER: the test never passes. + * ename:VK_COMPARE_OP_LESS: the test passes when latexmath:[$R \lt S$]. + * ename:VK_COMPARE_OP_EQUAL: the test passes when latexmath:[$R = S$]. + * ename:VK_COMPARE_OP_LESS_OR_EQUAL: the test passes when latexmath:[$R + \leq S$]. + * ename:VK_COMPARE_OP_GREATER: the test passes when latexmath:[$R \gt S$]. + * ename:VK_COMPARE_OP_NOT_EQUAL: the test passes when latexmath:[$R \neq + S$]. + * ename:VK_COMPARE_OP_GREATER_OR_EQUAL: the test passes when latexmath:[$R + \geq S$]. + * ename:VK_COMPARE_OP_ALWAYS: the test always passes. + +As described earlier, the pname:failOp, pname:passOp, and pname:depthFailOp +members of pname:VkStencilOpState indicate what happens to the stored +stencil value if this or certain subsequent tests fail or pass. Each enum is +of type ename:VkStencilOp, which is defined as: + +include::../enums/VkStencilOp.txt[] + +The possible values are: + + * ename:VK_STENCIL_OP_KEEP keeps the current value. + * ename:VK_STENCIL_OP_ZERO sets the value to 0. + * ename:VK_STENCIL_OP_REPLACE sets the value to pname:reference. + * ename:VK_STENCIL_OP_INCREMENT_AND_CLAMP increments the current value and + clamps to the maximum representable unsigned value. + * ename:VK_STENCIL_OP_DECREMENT_AND_CLAMP decrements the current value and + clamps to 0. + * ename:VK_STENCIL_OP_INVERT bitwise-inverts the current value. + * ename:VK_STENCIL_OP_INCREMENT_AND_WRAP increments the current value and + wraps to 0 when the maximum value would have been exceeded. + * ename:VK_STENCIL_OP_DECREMENT_AND_WRAP decrements the current value and + wraps to the maximum possible value when the value would go below 0. + +For purposes of increment and decrement, the stencil bits are considered as +an unsigned integer. + +If the stencil test fails, the sample's coverage bit is cleared in the +fragment. If there is no stencil framebuffer attachment, stencil +modification cannot: occur, and it is as if the stencil tests always pass. + +If the stencil test passes, the pname:writeMask member of the +slink:VkStencilOpState structures controls how the updated stencil value is +written to the stencil framebuffer attachment. + +The least significant latexmath:[$s$] bits of pname:writeMask, where +latexmath:[$s$] is the number of bits in the stencil framebuffer attachment, +specify an integer mask. Where a latexmath:[$1$] appears in this mask, the +corresponding bit in the stencil value in the depth/stencil attachment is +written; where a latexmath:[$0$] appears, the bit is not written. The +pname:writeMask value uses either the front-facing or back-facing state +based on the facing-ness of the fragment. Fragments generated by +front-facing primitives use the front mask and fragments generated by +back-facing primitives use the back mask. + + +[[fragops-depth]] +== Depth Test + +The depth test conditionally disables coverage of a sample based on the +outcome of a comparison between the fragment's depth value at the sample +location and the sample's depth value in the depth/stencil attachment at +location latexmath:[$(x_f,y_f)$]. The comparison is enabled or disabled with +the pname:depthTestEnable member of the +slink:VkPipelineDepthStencilStateCreateInfo structure. When disabled, the +depth comparison and subsequent possible updates to the depth/stencil +attachment value are bypassed and the fragment is passed to the next +operation. The stencil value, however, can: be modified as indicated above +if the depth test passed. If enabled, the comparison takes place and the +depth/stencil attachment value can: subsequently be modified. + +The comparison is specified with the pname:depthCompareOp member of +slink:VkPipelineDepthStencilStateCreateInfo. Let latexmath:[$z_f$] be the +incoming fragment's depth value for a sample, and let latexmath:[$z_a$] be +the depth/stencil attachment value in memory for that sample. The depth test +passes under the following conditions: + + * ename:VK_COMPARE_OP_NEVER: the test never passes. + * ename:VK_COMPARE_OP_LESS: the test passes when + latexmath:[$z_f \lt z_a$]. + * ename:VK_COMPARE_OP_EQUAL: the test passes when + latexmath:[$z_f = z_a$]. + * ename:VK_COMPARE_OP_LESS_OR_EQUAL: the test passes when + latexmath:[$z_f \leq z_a$]. + * ename:VK_COMPARE_OP_GREATER: the test passes when + latexmath:[$z_f \gt z_a$]. + * ename:VK_COMPARE_OP_NOT_EQUAL: the test passes when + latexmath:[$z_f \neq z_a$]. + * ename:VK_COMPARE_OP_GREATER_OR_EQUAL: the test passes when + latexmath:[$z_f \geq z_a$]. + * ename:VK_COMPARE_OP_ALWAYS: the test always passes. + +If depth clamping (see <>) is +enabled, before the incoming fragment's latexmath:[$z_f$] is compared to +latexmath:[$z_a$], latexmath:[$z_f$] is clamped to +latexmath:[$[\min(n,f), \max(n,f)\]$], where latexmath:[$n$] and +latexmath:[$f$] are the pname:minDepth and pname:maxDepth depth range values +of the viewport used by this fragment, respectively. + +If the depth test fails, the sample's coverage bit is cleared in the +fragment. The stencil value at the sample's location is updated according to +the function currently in effect for depth test failure. Otherwise, the +fragment continues to the next operation and the value of the depth +framebuffer attachment at the sample's location is conditionally written to +the sample's latexmath:[$z_f$] value. In this case the stencil value is +updated according to the function currently in effect for depth test +success. + +[[fragops-depth-write]] +Upon passing the depth test, a sample's (possibly clamped) latexmath:[$z_f$] +value is conditionally written to the depth framebuffer attachment based on +the value of the pname:depthWriteEnable member of +slink:VkPipelineDepthStencilStateCreateInfo. If pname:depthWriteEnable is +ename:VK_TRUE the value is written, and if it is ename:VK_FALSE the value is +not written. + +If there is no depth framebuffer attachment, it is as if the depth test +always passes. + + +[[fragops-samplecount]] +== Sample Counting + +Occlusion queries use query pool entries to track the number of samples that +pass all the per-fragment tests. The mechanism of collecting an occlusion +query value is described in <>. + +The occlusion query sample counter increments by one for each sample with a +coverage value of 1 in each fragment that survives all the per-fragment +tests, including scissor, sample mask, alpha to coverage, stencil, and depth +tests. diff --git a/doc/specs/vulkan/chapters/framebuffer.txt b/doc/specs/vulkan/chapters/framebuffer.txt new file mode 100644 index 00000000..9fc26b23 --- /dev/null +++ b/doc/specs/vulkan/chapters/framebuffer.txt @@ -0,0 +1,365 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[framebuffer]] += The Framebuffer + + +[[framebuffer-blending]] +== Blending + +Blending combines the incoming ``source'' fragment's R, G, B, and A values +with the ``destination'' R, G, B, and A values of each sample stored in the +framebuffer at the fragment's latexmath:[$(x_f,y_f)$] location. Blending is +performed for each pixel sample, rather than just once for each fragment. + +Source and destination values are combined according to the +<>, quadruplets of source and +destination weighting factors determined by the <>, and a <>, +to obtain a new set of R, G, B, and A values, as described below. + +Blending is computed and applied separately to each color attachment used by +the subpass, with separate controls for each attachment. + +Prior to performing the blend operation, signed and unsigned normalized +fixed-point color components undergo an implied conversion to floating-point +as specified by <>. Blending +computations are treated as if carried out in floating-point, and will be +performed with a precision and dynamic range no lower than that used to +represent destination components. + +Blending applies only to fixed-point and floating-point color attachments. +If the color attachment has an integer format, blending is not applied. + +The pipeline blend state is included in the +sname:VkPipelineColorBlendStateCreateInfo struct during graphics pipeline +creation: + +include::../structs/VkPipelineColorBlendStateCreateInfo.txt[] + +The members of the sname:VkPipelineColorBlendStateCreateInfo structure are +as follows: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:logicOpEnable controls whether to apply <>. + * pname:logicOp selects which logical operation to apply. + * pname:attachmentCount is the number of + sname:VkPipelineColorBlendAttachmentState elements in + pname:pAttachments. This value must: equal the + pname:colorAttachmentCount for the subpass in which this pipeline is + used. + * pname:pAttachments: pointer to array of per target attachment states. + * pname:blendConstants is an array of four values used as the R, G, B, and + A components of the blend constant that are used in blending, depending + on the <>. + +include::../validity/structs/VkPipelineColorBlendStateCreateInfo.txt[] + +The elements of the pname:pAttachments array specify per-target blending +state, and are of type: + +include::../structs/VkPipelineColorBlendAttachmentState.txt[] + +Blending of each individual color attachment is controlled by the +corresponding element of the pname:pAttachments array. If the +<> feature is +not enabled on the device, all sname:VkPipelineColorBlendAttachmentState +elements in the pname:pAttachments array must: be identical. The members of +the sname:VkPipelineColorBlendAttachmentState struct have the following +meanings: + + * pname:blendEnable controls whether blending is enabled for the + corresponding color attachment. If blending is not enabled, the source + fragment's color for that attachment is passed through unmodified. + * pname:srcColorBlendFactor selects which blend factor is used to + determine the source factors latexmath:[$S_r,S_g,S_b$]. + * pname:dstColorBlendFactor selects which blend factor is used to + determine the destination factors latexmath:[$D_r,D_g,D_b$]. + * pname:colorBlendOp selects which blend operation is used to calculate + the RGB values to write to the color attachment. + * pname:srcAlphaBlendFactor selects which blend factor is used to + determine the source factor latexmath:[$S_a$]. + * pname:dstAlphaBlendFactor selects which blend factor is used to + determine the destination factor latexmath:[$D_a$]. + * pname:alphaBlendOp selects which blend operation is use to calculate the + alpha values to write to the color attachment. + * pname:colorWriteMask is a bitmask selecting which of the R, G, B, + and/or A components are enabled for writing, as described later in this + chapter. + +include::../validity/structs/VkPipelineColorBlendAttachmentState.txt[] + + +[[framebuffer-blendfactors]] +=== Blend Factors + +The source and destination color and alpha blending factors are selected +from the enum: + +include::../enums/VkBlendFactor.txt[] + +The semantics of each enum value is described in the table below: + +.Blend Factors +[width="100%",options="header",align="center",cols="59%,28%,13%"] +|======================================== +|VkBlendFactor | RGB Blend Factors (latexmath:[$S_r,S_g,S_b$]) or (latexmath:[$D_r,D_g,D_b$]) | Alpha Blend Factor (latexmath:[$S_a$] or latexmath:[$D_a$]) +|ename:VK_BLEND_FACTOR_ZERO | latexmath:[$(0,0,0)$] | latexmath:[$0$] +|ename:VK_BLEND_FACTOR_ONE | latexmath:[$(1,1,1)$] | latexmath:[$1$] +|ename:VK_BLEND_FACTOR_SRC_COLOR | latexmath:[$(R_{s0},G_{s0},B_{s0})$] | latexmath:[$A_{s0}$] +|ename:VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR | latexmath:[$(1-R_{s0},1-G_{s0},1-B_{s0})$] | latexmath:[$1-A_{s0}$] +|ename:VK_BLEND_FACTOR_DST_COLOR | latexmath:[$(R_d,G_d,B_d)$] | latexmath:[$A_d$] +|ename:VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR | latexmath:[$(1-R_d,1-G_d,1-B_d)$] | latexmath:[$1-A_d$] +|ename:VK_BLEND_FACTOR_SRC_ALPHA | latexmath:[$(A_{s0},A_{s0},A_{s0})$] | latexmath:[$A_{s0}$] +|ename:VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA | latexmath:[$(1-A_{s0},1-A_{s0},1-A_{s0})$] | latexmath:[$1-A_{s0}$] +|ename:VK_BLEND_FACTOR_DST_ALPHA | latexmath:[$(A_d,A_d,A_d)$] | latexmath:[$A_d$] +|ename:VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA | latexmath:[$(1-A_d,1-A_d,1-A_d)$] | latexmath:[$1-A_d$] +|ename:VK_BLEND_FACTOR_CONSTANT_COLOR | latexmath:[$(R_c,G_c,B_c)$] | latexmath:[$A_c$] +|ename:VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR | latexmath:[$(1-R_c,1-G_c,1-B_c)$] | latexmath:[$1-A_c$] +|ename:VK_BLEND_FACTOR_CONSTANT_ALPHA | latexmath:[$(A_c,A_c,A_c)$] | latexmath:[$A_c$] +|ename:VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA | latexmath:[$(1-A_c,1-A_c,1-A_c)$] | latexmath:[$1-A_c$] +|ename:VK_BLEND_FACTOR_SRC_ALPHA_SATURATE | latexmath:[$(f,f,f); f=\min(A_{s0},1-A_d)$] | latexmath:[$1$] +|ename:VK_BLEND_FACTOR_SRC1_COLOR | latexmath:[$(R_{s1},G_{s1},B_{s1})$] | latexmath:[$A_{s1}$] +|ename:VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR | latexmath:[$(1-R_{s1},1-G_{s1},1-B_{s1})$] | latexmath:[$1-A_{s1}$] +|ename:VK_BLEND_FACTOR_SRC1_ALPHA | latexmath:[$(A_{s1},A_{s1},A_{s1})$] | latexmath:[$A_{s1}$] +|ename:VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA | latexmath:[$(1-A_{s1},1-A_{s1},1-A_{s1})$] | latexmath:[$1-A_{s1}$] +|======================================== + +In this table, the following conventions are used: + + - latexmath:[$R_{s0},G_{s0},B_{s0}$] and latexmath:[$A_{s0}$] represent + the first source color R, G, B, and A components, respectively, for the + fragment output location corresponding to the color attachment being + blended. + - latexmath:[$R_{s1},G_{s1},B_{s1}$] and latexmath:[$A_{s1}$] represent + the second source color R, G, B, and A components, respectively, used in + dual source blending modes, for the fragment output location + corresponding to the color attachment being blended. + - latexmath:[$R_d,G_d,B_d$] and latexmath:[$A_d$] represent the R, G, B, + and A components of the destination color. That is, the color currently + in the corresponding color attachment for this fragment/sample. + - latexmath:[$R_c,G_c,B_c$] and latexmath:[$A_c$] represent the blend + constant R, G, B, and A components, respectively. + +[[framebuffer-blendconstants]] +If the pipeline state object is created without the +ename:VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled then the +``blend constant'' latexmath:[$(R_c,G_c,B_c,A_c)$] is specified via the +pname:blendConstants member of slink:VkPipelineColorBlendStateCreateInfo. +Otherwise the blend constant is dynamically set and changed by calling the +command: + +include::../protos/vkCmdSetBlendConstants.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:blendConstants is an array of four values specifying the R, G, B, + and A components of the blend constant color used in blending, depending + on the <>. + +include::../validity/protos/vkCmdSetBlendConstants.txt[] + + +[[framebuffer-dsb]] +=== Dual-Source Blending + +Blend factors that use the secondary color input +latexmath:[$(R_{s1},G_{s1},B_{s1},A_{s1})$] +(ename:VK_BLEND_FACTOR_SRC1_COLOR, +ename:VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, +ename:VK_BLEND_FACTOR_SRC1_ALPHA, and +ename:VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA) may: consume hardware resources +that could otherwise be used for rendering to multiple color attachments. +Therefore, the number of color attachments that can: be used in a +framebuffer may: be lower when using dual-source blending. + +Dual-source blending is only supported if the +<> feature is enabled. + +The maximum number of color attachments that can: be used in a subpass when +using dual-source blending functions is implementation-dependent and is +reported as the pname:maxFragmentDualSrcAttachments member of +sname:VkPhysicalDeviceLimits. + +When using a fragment shader with dual-source blending functions, the color +outputs are bound to the first and second inputs of the blender using the +code:Index decoration, as described in <>. If the second color input to the blender is not +written in the shader, or if no output is bound to the second input of a +blender, the result of the blending operation is not defined. + + +[[framebuffer-blendoperations]] +=== Blend Operations + +Once the source and destination blend factors have been selected, they along +with the source and destination components are passed to the blending +operation. The blending operations are selected from the following enum, +with RGB and alpha components potentially using different blend operations: + +include::../enums/VkBlendOp.txt[] + +The semantics of each enum value is described in the table below: + +.Blend Operations +[width="100%",cols="45%,30%,25%",options="header",style="verse",align="center"] +|========================================== +|VkBlendOp | RGB Components | Alpha Component + +|ename:VK_BLEND_OP_ADD +| latexmath:[$R=R_{s0}\times S_r+R_d\times D_r$] + + latexmath:[$G=G_{s0}\times S_g+G_d\times D_g$] + + latexmath:[$B=B_{s0}\times S_b+B_d\times D_b$] +| latexmath:[$A=A_{s0}\times S_a+A_d\times D_a$] + +|ename:VK_BLEND_OP_SUBTRACT +| latexmath:[$R=R_{s0}\times S_r-R_d\times D_r$] + + latexmath:[$G=G_{s0}\times S_g-G_d\times D_g$] + + latexmath:[$B=B_{s0}\times S_b-B_d\times D_b$] + +| latexmath:[$A=A_{s0}\times S_a-A_d\times D_a$] + +|ename:VK_BLEND_OP_REVERSE_SUBTRACT +| latexmath:[$R=R_d\times D_r-R_{s0}\times S_r$] + + latexmath:[$G=G_d\times D_g-G_{s0}\times S_g$] + + latexmath:[$B=B_d\times D_b-B_{s0}\times S_b$] + +| latexmath:[$A=A_d\times D_a-A_{s0}\times S_a$] + +|ename:VK_BLEND_OP_MIN +| latexmath:[$R=\min(R_{s0},R_d)$] + + latexmath:[$G=\min(G_{s0},G_d)$] + + latexmath:[$B=\min(B_{s0},B_d)$] +| latexmath:[$A=\min(A_{s0},A_d)$] + +|ename:VK_BLEND_OP_MAX +| latexmath:[$R=\max(R_{s0},R_d)$] + + latexmath:[$G=\max(G_{s0},G_d)$] + + latexmath:[$B=\max(B_{s0},B_d)$] + +| latexmath:[$A=\max(A_{s0},A_d)$] +|========================================== + +In this table, the following conventions are used: + + - latexmath:[$R_{s0},G_{s0},B_{s0}$] and latexmath:[$A_{s0}$] represent + the first source color R, G, B, and A components, respectively. + - latexmath:[$R_d,G_d,B_d$] and latexmath:[$A_d$] represent the R, G, B, + and A components of the destination color. That is, the color currently + in the corresponding color attachment for this fragment/sample. + - latexmath:[$S_r,S_g,S_b$] and latexmath:[$S_a$] represent the source + blend factor R, G, B, and A components, respectively. + - latexmath:[$D_r,D_g,D_b$] and latexmath:[$D_a$] represent the + destination blend factor R, G, B, and A components, respectively. + +The blending operation produces a new set of values latexmath:[$R, G, +B$] and latexmath:[$A$], which are written to the framebuffer attachment. If +blending is not enabled for this attachment, then latexmath:[$R, G, B$] and +latexmath:[$A$] are assigned the values of +latexmath:[$R_{s0},G_{s0},B_{s0}$] and latexmath:[$A_{s0}$]. + +If the color attachment is fixed-point, the components of the source and +destination values and blend factors are each clamped to +latexmath:[$[0,1\]$] or latexmath:[$[-1,1\]$] respectively for an unsigned +normalized or signed normalized color attachment prior to evaluating the +blend operations. If the color attachment is floating-point, no clamping +occurs. + +The pname:colorWriteMask member of slink:VkPipelineColorBlendAttachmentState +determines whether the final color values latexmath:[$R, G, B$] and +latexmath:[$A$] are written to the framebuffer attachment. +pname:colorWriteMask is any combination of the following bits: + +include::../enums/VkColorComponentFlagBits.txt[] + +If ename:VK_COLOR_COMPONENT_R_BIT is set, then the latexmath:[$R$] value is +written to color attachment for the appropriate sample, otherwise the value +in memory is unmodified. The ename:VK_COLOR_COMPONENT_G_BIT, +ename:VK_COLOR_COMPONENT_B_BIT, and ename:VK_COLOR_COMPONENT_A_BIT bits +similarly control writing of the latexmath:[$G, B,$] and latexmath:[$A$] +values. The pname:colorWriteMask is applied regardless of whether blending +is enabled. + +If the numeric format of a framebuffer attachment uses sRGB encoding, the R, +G, and B destination color values (after conversion from fixed-point to +floating-point) are considered to be encoded for the sRGB color space and +hence are linearized prior to their use in blending. Each R, G, and B +component is converted from nonlinear to linear as described in the +``KHR_DF_TRANSFER_SRGB`` section of the Khronos Data Format Specification. +If the format is not sRGB, no linearization is performed. + +If the numeric format of a framebuffer attachment uses sRGB encoding, then +the final R, G and B values are converted into the nonlinear sRGB color +space before being written to the framebuffer attachment as described in the +``KHR_DF_TRANSFER_SRGB`` section of the Khronos Data Format Specification. + +If the framebuffer color attachment numeric format is not sRGB encoded then +the resulting latexmath:[$c_s$] values for R, G and B are unmodified. The +value of A is never sRGB encoded. That is, the alpha component is always +stored in memory as linear. + + +[[framebuffer-logicop]] +== Logical Operations + +The application can: enable a _logical operation_ between the fragment's +color values and the existing value in the framebuffer attachment. This +logical operation is applied prior to updating the framebuffer attachment. +Logical operations are applied only for signed and unsigned integer and +normalized integer framebuffers. Logical operations are not applied to +floating-point or sRGB format color attachments. + +Logical operations are controlled by the pname:logicOpEnable and +pname:logicOp members of slink:VkPipelineColorBlendStateCreateInfo. If +pname:logicOpEnable is ename:VK_TRUE, then a logical operation selected by +pname:logicOp is applied between each color attachment and the fragment's +corresponding output value, and blending of all attachments is treated as if +it were disabled. Any attachments using color formats for which logical +operations are not supported simply pass through the color values +unmodified. The logical operation is applied independently for each of the +red, green, blue, and alpha components. The pname:logicOp is selected from +the following operations: + +include::../enums/VkLogicOp.txt[] + +The logical operations supported by {apiname} are summarized in the +following table in which + + * latexmath:[$\lnot$] is bitwise invert, + * latexmath:[$\land$] is bitwise and, + * latexmath:[$\lor$] is bitwise or, + * latexmath:[$\oplus$] is bitwise exclusive or, + * latexmath:[$s$] is the fragment's latexmath:[$R_{s0}, G_{s0}, B_{s0}$] + or latexmath:[$A_{s0}$] component value for the fragment output + corresponding to the color attachment being updated, and + * latexmath:[$d$] is the color attachment's latexmath:[$R, G, B$] or + latexmath:[$A$] component value: + +.Logical Operations +[width="75%",options="header",style="verse",align="center"] +|========================================== +|Mode | Operation +|ename:VK_LOGIC_OP_CLEAR | latexmath:[$0$] +|ename:VK_LOGIC_OP_AND | latexmath:[$s \land d$] +|ename:VK_LOGIC_OP_AND_REVERSE | latexmath:[$s \land \lnot d$] +|ename:VK_LOGIC_OP_COPY | latexmath:[$s$] +|ename:VK_LOGIC_OP_AND_INVERTED | latexmath:[$\lnot s \land d$] +|ename:VK_LOGIC_OP_NO_OP | latexmath:[$d$] +|ename:VK_LOGIC_OP_XOR | latexmath:[$s \oplus d$] +|ename:VK_LOGIC_OP_OR | latexmath:[$s \lor d$] +|ename:VK_LOGIC_OP_NOR | latexmath:[$\lnot (s \lor d)$] +|ename:VK_LOGIC_OP_EQUIVALENT | latexmath:[$\lnot (s \oplus d)$] +|ename:VK_LOGIC_OP_INVERT | latexmath:[$\lnot d$] +|ename:VK_LOGIC_OP_OR_REVERSE | latexmath:[$s \lor \lnot d$] +|ename:VK_LOGIC_OP_COPY_INVERTED | latexmath:[$\lnot s$] +|ename:VK_LOGIC_OP_OR_INVERTED | latexmath:[$\lnot s \lor d$] +|ename:VK_LOGIC_OP_NAND | latexmath:[$\lnot (s \land d)$] +|ename:VK_LOGIC_OP_SET | all 1s +|========================================== + +The result of the logical operation is then written to the color attachment +as controlled by the component write mask, described in +<>. + diff --git a/doc/specs/vulkan/chapters/fundamentals.txt b/doc/specs/vulkan/chapters/fundamentals.txt new file mode 100644 index 00000000..b3f829fa --- /dev/null +++ b/doc/specs/vulkan/chapters/fundamentals.txt @@ -0,0 +1,1004 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[fundamentals]] += Fundamentals + +This chapter introduces fundamental concepts including the {apiname} +execution model, API syntax, queues, pipeline configurations, numeric +representation, state and state queries, and the different types of objects +and shaders. It provides a framework for interpreting more specific +descriptions of commands and behavior in the remainder of the Specification. + + +[[fundamentals-execmodel]] +== Execution Model + +This section outlines the execution model of a {apiname} system. + +{apiname} exposes one or more _devices_, +each of which exposes one or more _queues_ which may: process work +asynchronously to one another. The queues supported by a device are divided +into _families_, each of which supports one or more types of functionality +and may: +contain multiple queues with similar characteristics. Queues within a single +family are considered _compatible_ with one another, and work produced for a +family of queues can: be executed on any queue within that family. This +specification defines four types of functionality that queues may: support: +graphics, compute, transfer, and sparse memory management. + +[NOTE] +.Note +==== +It is possible that a single device may: report multiple similar queue +families rather than, or as well as reporting multiple members of one or +more of those families. This indicates that while members of those families +have similar capabilities, they are _not_ directly compatible with one +another. +==== + +Device memory is explicitly managed by the application. Each device may: +advertise one or more heaps, representing different areas of memory. Memory +heaps are either device local or host local, but are always visible to the +device. Further detail about memory heaps is exposed via memory types +available on that heap. Examples of memory areas that may: be available on +an implementation include _device local_ (memory that is physically +connected to the device), _device local, host visible_ (device local memory +that is visible to the host) and _host local, host visible_ (memory that is +local to the host and visible to the device and host). On other +architectures, there may: only be a single heap that can: be used for any +purpose. + +A {apiname} application controls a set of devices through the submission of +command buffers which have recorded device commands issued via {apiname} +library calls. The content of command buffers is specific to the underlying +hardware and is opaque to the application. Once constructed, a command +buffer can: be submitted once or many times to a queue for execution. +Multiple command buffers can: be built in parallel by employing multiple +threads within the application. + +Command buffers submitted to different queues may: execute in parallel or +even out of order with respect to one another. Command buffers submitted to +a single queue respect the submission order, as described further in +<>. Command buffer execution by +the device is also asynchronous to host execution. Once a command buffer is +submitted to a queue, control may: return to the application immediately. +Synchronization between the device and host, and between different queues is +the responsibility of the application. + + +[[fundamentals-queueoperation]] +=== Queue Operation + +{apiname} queues provide an interface to the execution engines of a device. +Commands are recorded into command buffers ahead of execution time. +These command buffers are then submitted to queues for execution. Command +buffers submitted to a single queue play back the commands in the order +they were recorded, both within and across command buffer boundaries. +Work performed by those commands respects the ordering guarantees provided +by explicit and implicit dependencies, as described below. Work submitted +to separate queues may: execute in any relative order unless otherwise +specified. Therefore, the application must: explicitly synchronize work +between queues when needed. + +In order to control relative order of execution of work both within a queue +and across multiple queues, {apiname} provides several synchronization +primitives, which include _semaphores_, _events_, _pipeline barriers_, and +_fences_. These are covered in depth in <>. In broad terms, semaphores are used to synchronize work +across queues or across coarse-grained submissions to a single queue, events +and barriers are used to synchronize work within a command buffer or +sequence of command buffers submitted to a single queue, and fences are used +to synchronize work between the device and the host. + +[NOTE] +.Note +==== +Implementations have significant freedom to overlap execution of work +submitted to a queue, and this is common due to deep pipelining and +parallelism in {apiname} devices. +==== + +Work is submitted to queues using queue submission commands that typically +take the form ftext:vkQueue* (e.g. flink:vkQueueSubmit, +flink:vkQueueBindSparse), and usually take a list of semaphores upon which +to wait before work begins and a list of semaphores to signal once work has +completed. Unless otherwise ordered by semaphores, command buffer execution +from multiple queue submissions done using the flink:vkQueueSubmit command +may: overlap (but not be reordered), sparse binding operations done using +the flink:vkQueueBindSparse command from multiple batches may: overlap or be +reordered, and command buffer submissions and sparse binding operations may: +overlap or be reordered against operations of the other type. + +Command buffer boundaries, both between primary command buffers of the same +or different batches or submissions as well as between primary and secondary +command buffers, do not introduce any implicit ordering constraints. In +other words, submitting the set of command buffers (which can: include +executing secondary command buffers) between any semaphore or fence +operations plays back the recorded commands as if they had all been recorded +into a single primary command buffer, except that the current state is +<> on each boundary. + +Commands recorded in command buffers either perform actions (draw, dispatch, +clear, copy, query/timestamp operations, begin/end subpass operations), set +state (bind pipelines, descriptor sets, and buffers, set dynamic state, push +constants, set render pass/subpass state), or perform synchronization +(set/wait events, pipeline barrier, render pass/subpass dependencies). Some +commands perform more than one of these tasks. State setting commands update +the _current state_ of the command buffer. Some commands that perform +actions (e.g. draw/dispatch) do so based on the current state set +cumulatively since the start of the command buffer. The work involved in +performing action commands is often allowed to overlap or to be reordered, +but doing so mustnot: alter the state to be used by each action command. In +general, action commands are those commands that alter framebuffer +attachments, read/write buffer or image memory, or write to query pools. + +Synchronization commands introduce explicit +<> between two sets of action commands, where the second set of +commands depends on the first set of commands. These dependencies enforce +that both the execution of certain +<> in the later set +occur after the execution of certain stages in the source set, and that the +effects of <> performed by +certain pipeline stages occur in order and are visible to each other. When +not enforced by an explicit dependency or otherwise forbidden by the +specification, action commands may: overlap execution or execute out of +order, and may: not see the side effects of each other's memory accesses. + +Submitting command buffers and sparse memory operations, signaling fences, +and signaling and waiting on semaphores each provide +<>. +Signaling a fence or semaphore each guarantees that the previous commands +have completed execution and that memory writes from those commands are +<> +to future commands. Waiting on a semaphore or submitting command buffers +after a fence has been signaled each guarantees that previous writes that +were available are also +<> +to subsequent commands. + +[[fundamentals-queueoperation-apiorder]] +Within a subpass of a <>, for a given +(x,y,layer,sample) sample location, the following stages are guaranteed to +execute in _API order_ for each separate primitive that includes that sample +location: + + * depth bounds test + * stencil test, stencil op and stencil write + * depth test and depth write + * occlusion queries + * blending, logic op and color write + +where the API order sorts primitives: + + * First, by the action command that generates them. + * Second, by the order they are processed by + <>. + +Within this order, implementations also sort primitives: + + * Third, by an implementation-dependent ordering of new primitives + generated by tessellation, if a tessellation shader is active. + * Fourth, by the order new primitives are generated by + <>, if geometry shading is + active. + * Fifth, by an implementation-dependent ordering of primitives generated + due to the <>. + +The device executes command buffers from queues asynchronously from the +host. Control is returned to an application immediately following command +buffer submission to a queue. The application must: synchronize work between +the host and device as needed. + +As part of each submission to a queue, a list of semaphores upon which to +wait, and a list of semaphores to signal is provided along with the list of +command buffers to execute. This is covered in more detail in +<>. + + +[[fundamentals-objectmodel-overview]] +== Object Model + +The devices, queues, and other entities in {apiname} are represented by +{apiname} objects. At the API level, all objects are referred to by handles. +There are two classes of handles, dispatchable and non-dispatchable. +_Dispatchable_ handle types are a pointer to an opaque type. This pointer +may: be used by layers as part of intercepting API commands, and thus each +API command takes a dispatchable type as its first parameter. Each object of +a dispatchable type has a unique handle value. + +_Non-dispatchable_ handle types are a 64-bit integer type whose meaning is +implementation-dependent, and may: encode object information directly in the +handle rather than pointing to a software structure. Objects of a +non-dispatchable type maynot: have unique handle values within a type or +across types. If handle values are not unique, then destroying one such +handle mustnot: cause identical handles of other types to become invalid, +and mustnot: cause identical handles of the same type to become invalid if +that handle value has been created more times than it has been destroyed. + +All objects created or allocated from a sname:VkDevice (i.e. with a +sname:VkDevice as the first parameter) are private to that device, and +mustnot: be used on other devices. + + +[[fundamentals-objectmodel-lifetime]] +=== Object Lifetime + +Objects are created or allocated by ftext:vkCreate* and ftext:vkAllocate* +commands, respectively. Once an object is created or allocated, its +``structure'' is considered to be immutable, though the contents of certain +object types is still free to change. Objects are destroyed or freed by +ftext:vkDestroy* and ftext:vkFree* commands, respectively. + +Objects that are allocated (rather than created) take resources from an +existing pool object or memory heap, and when freed return resources to that +pool or heap. While object creation and destruction are generally expected +to be low-frequency occurences during runtime, allocating and freeing +objects can: occur at high frequency. Pool objects help accommodate improved +performance of the allocations and frees. + +It is an application's responsibility to track the lifetime of {apiname} +objects, and not to destroy them while they are still in use. + +Application-owned memory is immediately consumed by any {apiname} command it +is passed into. The application can: alter or free this memory as soon as +the commands that consume it have returned. + +The following object types are consumed when they are passed into a +{apiname} command and not further accessed by the objects they are used to +create. They can be destroyed at any time they are not in use by an API +command: + + * sname:VkShaderModule + * sname:VkPipelineCache + * sname:VkPipelineLayout + +sname:VkDescriptorSetLayout objects may: be accessed by commands that +operate on descriptor sets allocated using that layout, and those descriptor +sets mustnot: be updated with flink:vkUpdateDescriptorSets after the +descriptor set layout has been destroyed. Otherwise, descriptor set layouts +can be destroyed any time they are not in use by an API command. + +The application mustnot: destroy any other type of {apiname} object until +any uses of that object by the device (such as via command buffer execution) +have completed. + +The following {apiname} objects can: be destroyed when no command buffers +using the object are executing: + + * sname:VkEvent + * sname:VkQueryPool + * sname:VkBuffer + * sname:VkBufferView + * sname:VkImage + * sname:VkImageView + * sname:VkPipeline + * sname:VkSampler + * sname:VkDescriptorPool + * sname:VkFramebuffer + * sname:VkRenderPass + * sname:VkCommandPool + * sname:VkDeviceMemory + * sname:VkDescriptorSet + +The following {apiname} objects can: be destroyed when work on the queue +that uses the object has been completed: + + * sname:VkFence + * sname:VkSemaphore + * sname:VkCommandBuffer + * sname:VkCommandPool + +In general, objects can: be destroyed or freed in any order, even if the +object being freed is involved in the use of another object (e.g. use of a +resource in a view, use of a view in a descriptor set, use of an object in a +command buffer, binding of a memory allocation to a resource), as long as +any object that uses the freed object is not further used in any way except +to be destroyed or to be reset in such a way that it no longer uses the +other object (such as resetting a command buffer). If the object has been +reset, then it can: be used as if it never used the freed object. An +exception to this is when there is a parent/child relationship between +objects. In this case, the application mustnot: destroy a parent object +before its children, except when the parent is explicitly defined to free +its children when it is destroyed (i.e. for pool objects, as defined below). + +sname:VkCommandPool objects are parents of sname:VkCommandBuffer objects. +sname:VkDescriptorPool objects are parents of sname:VkDescriptorSet objects. +sname:VkDevice objects are parents of many object types (all that take a +sname:VkDevice as a parameter to their creation). + +The following {apiname} objects have specific restrictions for when they +can: be destroyed: + + * sname:VkQueue objects cannot: be explicitly destroyed. Instead, they are + implicitly destroyed when the sname:VkDevice object they are retrieved + from is destroyed. + * Destroying a pool object implicitly frees all objects allocated from + that pool. Specifically, destroying sname:VkCommandPool frees all + sname:VkCommandBuffer objects that were allocated from it, and + destroying sname:VkDescriptorPool frees all sname:VkDescriptorSet + objects that were allocated from it. + * sname:VkDevice objects can: be destroyed when all sname:VkQueue objects + retrieved from them are idle, and all objects created from them have + been destroyed. This includes the following objects: + ** sname:VkFence + ** sname:VkSemaphore + ** sname:VkEvent + ** sname:VkQueryPool + ** sname:VkBuffer + ** sname:VkBufferView + ** sname:VkImage + ** sname:VkImageView + ** sname:VkShaderModule + ** sname:VkPipelineCache + ** sname:VkPipeline + ** sname:VkPipelineLayout + ** sname:VkSampler + ** sname:VkDescriptorSetLayout + ** sname:VkDescriptorPool + ** sname:VkFramebuffer + ** sname:VkRenderPass + ** sname:VkCommandPool + ** sname:VkCommandBuffer + ** sname:VkDeviceMemory + * sname:VkPhysicalDevice objects cannot: be explicitly destroyed. Instead, + they are implicitly destroyed when the sname:VkInstance object they are + retrieved from is destroyed. + * sname:VkInstance objects can: be destroyed once all sname:VkDevice + objects created from any of its sname:VkPhysicalDevice objects have been + destroyed. + + +[[fundamentals-commandsyntax]] +== Command Syntax + +The Specification describes {apiname} commands as functions or procedures +using C99 syntax. Language bindings for other languages such as C++ and +Javascript may: allow for stricter parameter passing, or object-oriented +interfaces. + +With few exceptions, {apiname} uses the standard C types for parameters (int +types from stdint.h, etc). Exceptions to this are using basetype:VkResult +for return values, using basetype:VkBool32 for boolean values, +basetype:VkDeviceSize for sizes and offsets pertaining to device address +space, and basetype:VkFlags for passing bits or sets of bits of predefined +values. + +Commands that create {apiname} objects are of the form ftext:vkCreate* and +take stext:Vk*CreateInfo structures with the parameters needed to create the +object. These {apiname} objects are destroyed with commands of the form +ftext:vkDestroy*. + +The last in-parameter to each command that creates or destroys a {apiname} +object is pname:pAllocator. The pname:pAllocator parameter can: be set to a +non-`NULL` value such that allocations for the given object are delegated to +an application provided callback; refer to the <> chapter for further details. + +Commands that allocate {apiname} objects owned by pool objects are of the +form ftext:vkAllocate*, and take stext:Vk*AllocateInfo structures. These +{apiname} objects are freed with commands of the form ftext:vkFree*. +These objects do not take allocators; if host memory is needed, they will +use the allocator that was specified when their parent pool was created. + +Information is retrieved from the implementation with commands of the form +ftext:vkGet*. + +Commands are recorded into a command buffer by calling API commands of the +form ftext:vkCmd*. Each such command may have different restrictions on +where it can be used: in a primary and/or secondary command buffer, inside +and/or outside a render pass, and in one or more of the supported queue +types. These restrictions are documented together with the definition of +each such command. + + +[[fundamentals-threadingbehavior]] +== Threading Behavior + +{apiname} is intended to provide scalable performance when used on multiple +host threads. All commands support being called concurrently from multiple +threads, but certain parameters, or components of parameters are defined to +be _externally synchronized_. This means that the caller must: guarantee +that no more than one thread is using such a parameter at a given time. + +More precisely, {apiname} commands use simple stores to update software +structures representing {apiname} objects. A parameter declared as +externally synchronized may: have its software +structures updated at any time during the host execution of the command. If +two commands operate on the same object and at least one of the commands +declares the object to be externally synchronized, then the caller must: +guarantee not only that the commands do not execute simultaneously, but also +that the two commands are separated by an appropriate memory barrier (if +needed). + +[NOTE] +.Note +==== +Memory barriers are particularly relevant on the ARM CPU architecture +which is more weakly ordered than many developers are accustomed to from +x86/x64 programming. Fortunately, most higher-level synchronization +primitives (like the pthread library) perform memory barriers as a part of +mutual exclusion, so mutexing {apiname} objects via these primitives will +have the desired effect. +==== + +Many object types are _immutable_, meaning the objects cannot: change once +they have been created. These types of objects never need external +synchronization, except that they mustnot: be destroyed while they are in +use on another thread. In certain special cases, mutable object parameters +are internally synchronized such that they do not require external +synchronization. One example of this is the use of a sname:VkPipelineCache +in fname:vkCreateGraphicsPipelines and fname:vkCreateComputePipelines, where +external synchronization around such a heavyweight command would be +impractical. The implementation must: internally synchronize the cache in +this example, and may: be able to do so in the form of a much finer-grained +mutex around the command. Any command parameters that are not labeled as +externally synchronized are either not mutated by the command or are +internally synchronized. Additionally, certain objects related to a +command's parameters (e.g. command pools and descriptor pools) may: be +affected by a command, and must: also be externally synchronized. These +implicit parameters are documented as described below. + +Parameters of commands that are externally synchronized are listed below. + +include::../hostsynctable/parameters.txt[] + +There are also a few instances where a command can: take in a user allocated +list whose contents are externally synchronized parameters. In these cases, +the caller must: guarantee that at most one thread is using a given element +within the list at a given time. These parameters are listed below. + +include::../hostsynctable/parameterlists.txt[] + +In addition, there are some implicit parameters that need to be externally +synchronized. For example, all pname:commandBuffer parameters that need to +be externally synchronized imply that the pname:commandPool that was passed +in when creating that command buffer also needs to be externally +synchronized. The implicit parameters and their associated object are listed +below. + +include::../hostsynctable/implicit.txt[] + + +[[fundamentals-errors]] +== Errors + +{apiname} is a layered API. The lowest layer is the core {apiname} layer, as +defined by this Specification. The application can: use additional layers +above the core for debugging, validation, and other purposes. + +One of the core principles of {apiname} is that building and submitting +command buffers should: be highly efficient. Thus error checking and +validation of state in the core layer is minimal, although more rigorous +validation can: be enabled through the use of layers. + +The core layer assumes applications are using the API correctly. Except as +documented elsewhere in the Specification, the behavior of the core layer to +an application using the API incorrectly is undefined, and may: include +program termination. +However, implementations must: ensure that incorrect usage by an +application does not affect the integrity of the operating system, +the Vulkan implementation, or other Vulkan client applications +in the system, and does not allow one application to access data +belonging to another application. Applications can: request stronger +robustness guarantees by enabling the pname:robustBufferAccess feature +as described in <>. + +Validation of correct API usage is left to validation layers. Applications +should: be developed with validation layers enabled, to help catch and +eliminate errors. Once validated, released applications shouldnot: enable +validation layers by default. + + +[[fundamentals-validusage]] +=== Valid Usage + +Certain usage rules apply to all commands in the API unless explicitly +denoted differently for a command. These rules are as follows. + +Any input parameter to a command that is an object handle must: be a valid +object handle, unless otherwise specified. An object handle is valid if: + + * It has been created or allocated by a previous, successful call to the + API. Such calls are noted in the specification. + * It has not been deleted or freed by a previous call to the API. Such + calls are noted in the specification. + * Any objects used by that object, either as part of creation or + execution, must: also be valid. + +The reserved handle sname:VK_NULL_HANDLE can: be passed in place of valid +object handles when _explicitly called out in the specification_. Any +command that creates an object successfully mustnot: return +sname:VK_NULL_HANDLE. It is valid to pass sname:VK_NULL_HANDLE to any +ftext:vkDestroy* or ftext:vkFree* command, which will silently ignore these +values. + +Any parameter that is a pointer must: be a valid pointer. A pointer is valid +if it points at memory containing values of the number and type(s) expected +by the command, and all fundamental types accessed through the pointer (e.g. +as elements of an array or as members of a structure) satisfy the alignment +requirements of the host processor. + +Any parameter that is an enumerant must: be a valid value for that enumerant +type. A value is valid for an enumerant if: + + * The value is defined as part of the enumerant type. + * The value is not one of the special values defined for an enumerant + type, which are suffixed with etext:_BEGIN_RANGE, etext:_END_RANGE, + etext:_RANGE_SIZE or etext:_MAX_ENUM. + +Any parameter that is a flag value must: be a valid combination of bit +flags. A valid combination is either zero or the bitwise OR of valid bit +flags. A bit flag is valid if: + + * The value is defined as part of the bits type, where the bits type is + obtained by taking the flag type and replacing the trailing etext:Flags + with etext:FlagBits. For example, a flag value of type + elink:VkColorComponentFlags must: contain only values selected from the + bit flags in elink:VkColorComponentFlagBits. + * The flag is allowed in the context in which it is being used. For + example, in some cases, certain bit flags or combinations of bit flags + are mutually exclusive. + +Any parameter that is a structure containing a etext:VkStructureType +ptext:sType member must: have a value of ptext:sType matching the type of +the structure. The correct value is described for each structure type, but +as a general rule, the name of this value is obtained by taking the +structure name, stripping the leading etext:Vk, prefixing each capital +letter with etext:_, converting the entire resulting string to upper case, +and prefixing it with etext:VK_STRUCTURE_TYPE. For example, structures of +type sname:VkImageCreateInfo must: have a ptext:sType value of +ename:VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO. + +The values ename:VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO and +ename:VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO are reserved for internal +use by the loader, and don't have corresponding {apiname} structures in this +specification. + +Any parameter that is a structure containing a basetype:void* ptext:pNext +member must: have a value of ptext:pNext that is either `NULL`, or points to +a valid structure that is defined by an enabled extension. Extension +structures are not described in the base {apiname} specification, but either +in layered specifications incorporating those extensions, or in separate +vendor-provided documents. + +The above rules also apply recursively to members of structures provided as +input to a command, either as a direct argument to the command, or +themselves a member of another structure. + +Specifics on valid usage of each command are covered in their individual +sections. + + +[[fundamentals-returncodes]] +=== Return Codes + +While the core {apiname} API is not designed to capture incorrect usage, +some circumstances still require return codes. Commands in {apiname} return +their status via return codes that are in one of two categories: + + * Successful completion codes are returned when a command needs to + communicate success or status information. All successful completion + codes are non-negative values. + * Run time error codes are returned when a command needs to communicate a + failure that could only be detected at run time. All run time error + codes are negative values. + +All return codes in {apiname} are reported via basetype:VkResult return +values. The possible codes are: + +include::../enums/VkResult.txt[] + +[[fundamentals-successcodes]] +.Success codes +* ename:VK_SUCCESS + Command successfully completed +* ename:VK_NOT_READY + A fence or query has not yet completed +* ename:VK_TIMEOUT + A wait operation has not completed in the specified time +* ename:VK_EVENT_SET + An event is signaled +* ename:VK_EVENT_RESET + An event is unsignaled +* ename:VK_INCOMPLETE + A return array was too small for the result + +[[fundamentals-errorcodes]] +.Error codes +* ename:VK_ERROR_OUT_OF_HOST_MEMORY + A host memory allocation has failed. +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY + A device memory allocation has failed. +* ename:VK_ERROR_INITIALIZATION_FAILED + Initialization of an object could not be completed for + implementation-specific reasons. +* ename:VK_ERROR_DEVICE_LOST + The logical or physical device has been lost. See + <> +* ename:VK_ERROR_MEMORY_MAP_FAILED + Mapping of a memory object has failed. +* ename:VK_ERROR_LAYER_NOT_PRESENT + A requested layer is not present or could not be loaded. +* ename:VK_ERROR_EXTENSION_NOT_PRESENT + A requested extension is not supported. +* ename:VK_ERROR_FEATURE_NOT_PRESENT + A requested feature is not supported. +* ename:VK_ERROR_INCOMPATIBLE_DRIVER + The requested version of {apiname} is not supported by the driver or + is otherwise incompatible for implementation-specific reasons. +* ename:VK_ERROR_TOO_MANY_OBJECTS + Too many objects of the type have already been created. +* ename:VK_ERROR_FORMAT_NOT_SUPPORTED + A requested format is not supported on this device. + +If a command returns a run time error, it will leave any result pointers +unmodified. + +Out of memory errors do not damage any currently existing {apiname} objects. +Objects that have already been successfully created can: still be used by +the application. + +Performance-critical commands generally do not have return codes. If a run +time error occurs in such commands, the implementation will defer reporting +the error until a specified point. For commands that record into +command buffers (ftext:vkCmd*) run time errors are reported by +fname:vkEndCommandBuffer. + +[[fundamentals-numerics]] +== Numeric Representation and Computation + +Implementations normally perform computations in floating-point, and must: +meet the range and precision requirements defined under +``Floating-Point Computation'' below. + +These requirements only apply to computations performed in {apiname} +operations outside of shader execution, such as texture image +specification and sampling, and per-fragment operations. Range and +precision requirements during shader execution differ and are specified +by the <> section. + +In some cases, the representation and/or precision of operations is +implicitly limited by the specified format of vertex or texel +data consumed by {apiname}. Specific floating-point formats are +described later in this section. + + +[[fundamentals-floatingpoint]] +=== Floating-Point Computation + +Most floating-point computation is performed in SPIR-V shader modules. The +properties of computation within shaders are constrained as defined by the +<> section. + +Some floating-point computation is performed outside of shaders, such as +viewport and depth range calculations. For these computations, we do not +specify how floating-point numbers are to be represented, or the details of +how operations on them are performed, but only place minimal requirements on +representation and precision as described in the remainder of this section. + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +(Jon, Bug 14966) This is a rat's nest of complexity, both in terms of +describing/enumerating places such computation may take place (other than +``not shader code'') and in how implementations may do it. We have consciously +deferred the resolution of this issue to post-1.0, and in the meantime, the +following language inherited from the OpenGL Specification is inserted as a +placeholder. Hopefully it can be tightened up considerably. +==== +endif::editing-notes[] + +We require simply that numbers' floating-point parts contain enough bits and +that their exponent fields are large enough so that individual results of +floating-point operations are accurate to about 1 part in 10^5^. The +maximum representable magnitude for all floating-point values must: be at +least 2^32^. latexmath:[$x \cdot 0 = 0 \cdot x = 0$] for any non-infinite +and non-NaN latexmath:[$x$]. latexmath:[$1 \cdot x = x \cdot 1 = x$]. +latexmath:[$x + 0 = 0 + x = x$]. latexmath:[$0^0 = 1$]. + +Occasionally, further requirements will be specified. Most +single-precision floating-point formats meet these requirements. + +The special values latexmath:[$Inf$] and latexmath:[$-Inf$] encode values +with magnitudes too large to be represented; the special value +latexmath:[$NaN$] encodes ``Not A Number'' values resulting from undefined +arithmetic operations such as latexmath:[$0 / 0$]. Implementations may: +support latexmath:[$Inf$]s and latexmath:[$NaN$]s in their floating-point +computations. + +Any representable floating-point value is legal as input to a {apiname} +command that requires floating-point data. The result of providing a value +that is not a floating-point number to such a command is unspecified, but +mustnot: lead to {apiname} interruption or termination. In <> +arithmetic, for example, providing a negative zero or a denormalized number +to an {apiname} command must: yield deterministic results, while providing a +latexmath:[$NaN$] or latexmath:[$Inf$] yields unspecified results. + + +[[fundamentals-fp16]] +=== 16-Bit Floating-Point Numbers + +16-bit floating point numbers are defined in the +``16-bit floating point numbers'' +section of the Khronos Data Format Specification. + +Any representable 16-bit floating-point value is legal as input to a +{apiname} command that accepts 16-bit floating-point data. The result of +providing a value that is not a floating-point number (such as +latexmath:[$Inf$] or latexmath:[$NaN$]) to such a command is +unspecified, but mustnot: lead to {apiname} interruption or termination. +Providing a denormalized number or negative zero to {apiname} must: yield +deterministic results. + + +[[fundamentals-fp11]] +=== Unsigned 11-Bit Floating-Point Numbers + +Unsigned 11-bit floating point numbers are defined in the +``Unsigned 11-bit floating point numbers'' +section of the Khronos Data Format Specification. + +When a floating-point value is converted to an unsigned 11-bit +floating-point representation, finite values are rounded to the closest +representable finite value. + +While less accurate, implementations are allowed to always round in the +direction of zero. This means negative values are converted to zero. +Likewise, finite positive values greater than 65024 (the maximum finite +representable unsigned 11-bit floating-point value) are converted to 65024. +Additionally: negative infinity is converted to zero; positive infinity is +converted to positive infinity; and both positive and negative +latexmath:[$NaN$] are converted to positive latexmath:[$NaN$]. + +Any representable unsigned 11-bit floating-point value is legal as input +to a {apiname} command that accepts 11-bit floating-point data. The +result of providing a value that is not a floating-point number (such as +latexmath:[$Inf$] or latexmath:[$NaN$]) to such a command is +unspecified, but mustnot: lead to {apiname} interruption or termination. +Providing a denormalized number to {apiname} must: yield deterministic +results. + + +[[fundamentals-fp10]] +=== Unsigned 10-Bit Floating-Point Numbers + +Unsigned 10-bit floating point numbers are defined in the +``Unsigned 10-bit floating point numbers'' +section of the Khronos Data Format Specification. + +When a floating-point value is converted to an unsigned 10-bit +floating-point representation, finite values are rounded to the closest +representable finite value. + +While less accurate, implementations are allowed to always round in the +direction of zero. This means negative values are converted to zero. +Likewise, finite positive values greater than 64512 (the maximum finite +representable unsigned 10-bit floating-point value) are converted to 64512. +Additionally: negative infinity is converted to zero; positive infinity is +converted to positive infinity; and both positive and negative +latexmath:[$NaN$] are converted to positive latexmath:[$NaN$]. + +Any representable unsigned 10-bit floating-point value is legal as input to +a {apiname} command that accepts 10-bit floating-point data. The result of +providing a value that is not a floating-point number (such as +latexmath:[$Inf$] or latexmath:[$NaN$]) to such a command is unspecified, +but mustnot: lead to {apiname} interruption or termination. Providing a +denormalized number to {apiname} must: yield deterministic results. + + +[[fundamentals-general]] +=== General Requirements + +Some calculations require division. In such cases (including implied +divisions performed by vector normalization), division by zero produces an +unspecified result but mustnot: lead to {apiname} interruption or +termination. + + +[[fundamentals-fixedconv]] +== Fixed-Point Data Conversions + +When generic vertex attributes and pixel color or depth components are +represented as integers, they are often (but not always) considered to be +_normalized_. Normalized integer values are treated specially when +being converted to and from floating-point values, and are usually referred +to as _normalized fixed-point_. + +In the remainder of this section, latexmath:[$b$] denotes the bit width of +the fixed-point integer representation. When the integer is one of the types +defined by the API, latexmath:[$b$] is the bit width of that type. When the +integer comes from an <> containing color or depth +component texels, latexmath:[$b$] is the number of bits allocated to that +component in its <>. + +The signed and unsigned fixed-point representations are assumed to be +latexmath:[$b$]-bit binary two's-complement integers and binary unsigned +integers, respectively. + + +[[fundamentals-fixedfpconv]] +=== Conversion from Normalized Fixed-Point to Floating-Point + +Unsigned normalized fixed-point integers represent numbers in the range +latexmath:[$[0,1\]$]. The conversion from an unsigned normalized fixed-point +value latexmath:[$c$] to the corresponding floating-point value +latexmath:[$f$] is defined as + +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\[ f = { c \over { 2^b - 1 } } \] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +Signed normalized fixed-point integers represent numbers in the range +latexmath:[$[-1,1\]$]. The conversion from a signed normalized fixed-point +value latexmath:[$c$] to the corresponding floating-point value +latexmath:[$f$] is performed using + +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\[ f = \max \left\{ {c \over {2^{b-1} - 1}}, -1.0 \right\} \] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +Only the range latexmath:[$[-2^{b-1}+1,2^{b-1}-1\]$] is used to represent +signed fixed-point values in the range latexmath:[$[-1,1\]$]. For example, +if latexmath:[$b = 8$], then the integer value latexmath:[$-127$] +corresponds to latexmath:[$-1.0$] and the value 127 corresponds to +latexmath:[$1.0$]. Note that while zero is exactly expressible in this +representation, one value (latexmath:[$-128$] in the example) is outside the +representable range, and must: be clamped before use. This equation is used +everywhere that signed normalized fixed-point values are converted to +floating-point, including for all signed normalized fixed-point parameters +in {apiname} commands, such as vertex attribute values, as well as for +specifying texture or framebuffer values using signed normalized +fixed-point. + + +[[fundamentals-fpfixedconv]] +=== Conversion from Floating-Point to Normalized Fixed-Point + +The conversion from a floating-point value latexmath:[$f$] to the +corresponding unsigned normalized fixed-point value latexmath:[$c$] is +defined by first clamping latexmath:[$f$] to the range latexmath:[$[0,1\]$], +then computing + +// Equation {glop:fund:convert:eqfloatuint} +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\[ f' = \operatorname{convertFloatToUint} ( f \times ( 2^b - 1 ) , b ) \] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +where latexmath:[$\operatorname{convertFloatToUint}(r,b)$] returns one of +the two unsigned binary integer values with exactly latexmath:[$b$] bits +which are closest to the floating-point value latexmath:[$r$] (where +rounding to nearest is preferred). If latexmath:[$r$] is equal to an +integer, then that integer value is returned. In particular, if +latexmath:[$f$] is equal to 0.0 or 1.0, then latexmath:[$f'$] must: be +assigned 0 or latexmath:[$2^b-1$], respectively. + +The conversion from a floating-point value latexmath:[$f$] to the +corresponding signed normalized fixed-point value latexmath:[$c$] is +performed by clamping latexmath:[$f$] to the range latexmath:[$[-1,1\]$], +then computing + +// Equation {glop:fund:convert:eqfloatsnorm} +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\[ f' = \operatorname{convertFloatToInt} ( f \times ( 2^{b - 1} - 1 ) , b ) \] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +where latexmath:[$\operatorname{convertFloatToInt}(r,b)$] returns one of the +two signed two's-complement binary integer values with exactly +latexmath:[$b$] bits which are closest to the floating-point value +latexmath:[$r$] (where rounding to nearest is preferred). If latexmath:[$r$] +is equal to an integer, then that integer value is returned. In particular, +if latexmath:[$f$] is equal to -1.0, 0.0, or 1.0, then latexmath:[$f'$] +must: be assigned latexmath:[$-(2^{b-1}-1)$], 0, or latexmath:[$2^{b-1}-1$], +respectively. + +This equation is used everywhere that floating-point values are converted to +signed normalized fixed-point, including when querying floating-point state +and returning integers, as well as for specifying signed normalized texture +or framebuffer values using floating-point. + + +[[fundamentals-versionnum]] +== API Version Numbers and Semantics + +The {apiname} version number is used in several places in the API. In each +such use, the API _major version number_, _minor version number_, and _patch +version number_ are packed into a 32-bit integer as follows: + + * The major version number is a 10-bit integer packed into bits 31-22. + * The minor version number is a 10-bit integer packed into bits 21-12. + * The patch version number is a 12-bit integer packed into bits 11-0. + +Differences in any of the {apiname} version numbers indicates a change to +the API in some way, with each part of the version number indicating a +different scope of changes. + +A difference in patch version numbers indicates that some usually small +aspect of the specification or header has been modified, typically to fix a +bug, and may: have an impact on the behavior of existing functionality. +Differences in this version number shouldnot: affect either _full +compatibility_ or _backwards compatibility_ between two versions, or add +additional interfaces to the API. + +A difference in minor version numbers indicates that some amount of new +functionality has been added. This will usually include new interfaces in +the header, and may: also include behavior changes and bug fixes. +Functionality may: be deprecated in a minor revision, but will not be +removed. When a new minor version is introduced, the patch version is reset +to 0, and each minor revision maintains its own set of patch versions. +Differences in this version shouldnot: affect backwards compatibility, but +will affect full compatibility. + +A difference in major version numbers indicates a large set of changes to +the API, potentially including new functionality and header interfaces, +behavioral changes, removal of deprecated features, modification or outright +replacement of any feature, and is thus very likely to break any and all +compatibility. Differences in this version will typically require +significant modification to an application in order for it to function. + +[[fundamentals-common-objects]] +== Common Object Types + +Some types of {apiname} objects are used in many different structures and +command parameters, and are described here. These types include _offsets_, +_extents_, and _rectangles_. + + +=== Offsets + +Offsets are used to describe a pixel location within an image or +framebuffer, as an (x,y) location for two-dimensional images, or an (x,y,z) +location for three-dimensional images. Two- and three-dimensional offsets +are respectively defined by the structures + +include::../structs/VkOffset2D.txt[] + +include::../validity/structs/VkOffset2D.txt[] + +include::../structs/VkOffset3D.txt[] + +include::../validity/structs/VkOffset3D.txt[] + + +=== Extents + +Extents are used to describe the size of a block of pixels within an image +or framebuffer, as (width,height) for two-dimensional images, or as +(width,height,depth) for three-dimensional images. Two- and +three-dimensional extents are respectively defined by the structures + +include::../structs/VkExtent2D.txt[] + +include::../validity/structs/VkExtent2D.txt[] + +include::../structs/VkExtent3D.txt[] + +include::../validity/structs/VkExtent3D.txt[] + + +=== Rectangles + +Rectangles are used to describe a specified rectangular block of pixels +within an image or framebuffer. Rectangles include both an offset and an +extent of the same dimensionality, as described above. Two-dimensional +rectangles are defined by the structure + +// Comment out until SubresourceRectangle-style structure proposed +// Two- and three-dimensional rectangles are respectively defined by the +// structures + +include::../structs/VkRect2D.txt[] + +include::../validity/structs/VkRect2D.txt[] + +// include::../structs/VkRect3D.txt[] + +// include::../validity/structs/VkRect3D.txt[] diff --git a/doc/specs/vulkan/chapters/fxvertex.txt b/doc/specs/vulkan/chapters/fxvertex.txt new file mode 100644 index 00000000..e132c69a --- /dev/null +++ b/doc/specs/vulkan/chapters/fxvertex.txt @@ -0,0 +1,455 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[fxvertex]] += Fixed-Function Vertex Processing + +Some implementations have specialized fixed-function hardware for fetching +and format-converting vertex input data from buffers, rather than performing +the fetch as part of the vertex shader. {apiname} includes a vertex +attribute fetch stage in the graphics pipeline in order to take advantage of +this. + + +[[fxvertex-attrib]] +== Vertex Attributes + +Vertex shaders can: define input variables, which receive _vertex attribute_ +data transferred from one or more sname:VkBuffer(s) by drawing commands. +Vertex shader input variables are bound to buffers via an indirect binding +where the vertex shader associates a _vertex input attribute_ number with +each variable, vertex input attributes are associated to _vertex input +bindings_ on a per-pipeline basis, and vertex input bindings are associated +with specific buffers on a per-draw basis via the +fname:vkCmdBindVertexBuffers command. Vertex input attribute and vertex +input binding descriptions also contain format information controlling how +data is extracted from buffer memory and converted to the format expected by +the vertex shader. + +There are sname:VkPhysicalDeviceLimits::pname:maxVertexInputAttributes +number of vertex input attributes and +sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindings number of +vertex input bindings (each referred to +by zero-based indices), where there are at least as many vertex input +attributes as there are vertex input bindings. Applications can: store +multiple vertex input attributes interleaved in a single buffer, and use a +single vertex input binding to access those attributes. + +In GLSL, vertex shaders associate input variables with a vertex input +attribute number using the code:location layout qualifier. The +code:component layout qualifier associates components of a vertex shader +input variable with components of a vertex input attribute. + +.GLSL example +[source,{basebackend@docbook:c:glsl}] +--------------------------------------------------- +// Assign location M to variableName +layout (location=M, component=2) in vec2 variableName; + +// Assign locations [N,N+L) to the array elements of variableNameArray +layout (location=N) in vec4 variableNameArray[L]; +--------------------------------------------------- + +In SPIR-V, vertex shaders associate input variables with a vertex input +attribute number using the code:Location decoration. The code:Component +decoration associates components of a vertex shader input variable with +components of a vertex input attribute. The code:Location and code:Component +decorations are specified via the code:OpDecorate instruction. + +.SPIR-V example +--------------------------------------------------- + ... + %1 = OpExtInstImport "GLSL.std.450" + ... + OpName %9 "variableName" + OpName %15 "variableNameArray" + OpName %18 "gl_VertexID" + OpName %19 "gl_InstanceID" + OpDecorate %9 Location M + OpDecorate %9 Component 2 + OpDecorate %15 Location N + ... + %2 = OpTypeVoid + %3 = OpTypeFunction %2 + %6 = OpTypeFloat 32 + %7 = OpTypeVector %6 2 + %8 = OpTypePointer Input %7 + %9 = OpVariable %8 Input + %10 = OpTypeVector %6 4 + %11 = OpTypeInt 32 0 + %12 = OpConstant %11 L + %13 = OpTypeArray %10 %12 + %14 = OpTypePointer Input %13 + %15 = OpVariable %14 Input + ... +--------------------------------------------------- + + +[[fxvertex-attrib-location]] +=== Attribute Location and Component Assignment + +Vertex shaders allow code:Location and code:Component decorations on +input variable declarations. The code:Location decoration specifies which +vertex input attribute is used to read and interpret the data that +a variable will consume. The code:Component decoration allows the 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 starting +at component N will consume components N, N+1, N+2, ... up through +its size. For single precision types, it is invalid if the sequence +of components gets larger than 3. + +When a vertex shader input variable declared using a scalar or vector +32-bit data type is assigned a location, its value(s) are taken from +the components of the input attribute specified with the corresponding +sname:VkVertexInputAttributeDescription::pname:location. +The components used depend on the type of variable and the value of the +code:Component decoration specified in the variable declaration, +as identified in <>. Any 32-bit scalar +or vector input will consume a single location. For 32-bit data types, +missing components are filled in with default values as described +<>. + + +[[fxvertex-attrib-components]] +.Input attribute components accessed by 32-bit input variables +[width="65%",cols="<5,<3,<3",options="header"] +|============================================= +| 32-bit data type | code:Component decoration | Components consumed +| scalar | 0 or unspecified | (x, o, o, o) +| scalar | 1 | (o, y, o, o) +| scalar | 2 | (o, o, z, o) +| scalar | 3 | (o, o, o, w) +| two-component vector | 0 or unspecified | (x, y, o, o) +| two-component vector | 1 | (o, y, z, o) +| two-component vector | 2 | (o, o, z, w) +| three-component vector| 0 or unspecified | (x, y, z, o) +| three-component vector| 1 | (o, y, z, w) +| four-component vector | 0 or unspecified | (x, y, z, w) +|============================================= + +Components indicated by `o' are available for use by other input variables +which are sourced from the same attribute, and if used, are either filled +with the corresponding component from the input format (if present), or +the default value. + +When a vertex shader input variable declared using a 32-bit floating point +matrix type is assigned a location _i_, its values are taken from +consecutive input attributes starting with the corresponding +sname:VkVertexInputAttributeDescription::pname:location. Such matrices are +treated as an array of column vectors with values taken from the input +attributes identified in <>. The +sname:VkVertexInputAttributeDescription::pname:format must: be specified +with a elink:VkFormat that corresponds to the appropriate type of column +vector. The code:Component decoration mustnot: be used with matrix types. + +[[fxvertex-attrib-matrix]] +.Input attributes accessed by 32-bit input matrix variables +[width="100%",cols="<10%,<24%,<21%,<45%",options="header"] +|============================================= +| Data type | Column vector type | Locations consumed | Components consumed +| mat2 | two-component vector | i, i+1 | (x, y, o, o), (x, y, o, o) +| mat2x3 | three-component vector | i, i+1 | (x, y, z, o), (x, y, z, o) +| mat2x4 | four-component vector | i, i+1 | (x, y, z, w), (x, y, z, w) +| mat3x2 | two-component vector | i, i+1, i+2 | (x, y, o, o), (x, y, o, o), (x, y, o, o) +| mat3 | three-component vector | i, i+1, i+2 | (x, y, z, o), (x, y, z, o), (x, y, z, o) +| mat3x4 | four-component vector | i, i+1, i+2 | (x, y, z, w), (x, y, z, w), (x, y, z, w) +| mat4x2 | two-component vector | i, i+1, i+2, i+3 | (x, y, o, o), (x, y, o, o), (x, y, o, o), (x, y, o, o) +| mat4x3 | three-component vector | i, i+1, i+2, i+3 | (x, y, z, o), (x, y, z, o), (x, y, z, o), (x, y, z, o) +| mat4 | four-component vector | i, i+1, i+2, i+3 | (x, y, z, w), (x, y, z, w), (x, y, z, w), (x, y, z, w) +|============================================= + +Components indicated by `o' are available for use by other input variables +which are sourced from the same attribute, and if used, are either filled +with the corresponding component from the input (if present), or +the default value. + +When a vertex shader input variable declared using a scalar or vector +64-bit data type is assigned a location _i_, its values are taken from +consecutive input attributes starting with the corresponding +sname:VkVertexInputAttributeDescription::pname:location. The locations +and components used depend on the type of variable and the code:Component +decoration specified in the variable declaration, as identified in +<>. For 64-bit data types, no default +attribute values are provided. Input variables mustnot: use more +components than provided by the attribute. Input attributes which have +one- or two-component 64-bit formats will consume a single location. +Input attributes which have three- or four-component 64-bit formats +will consume two consecutive locations. A 64-bit scalar +data type will consume two components, and a 64-bit two-component +vector data type will consume all four components available within +a location. A three- or four-component 64-bit data type mustnot: +specify a component. A three-component 64-bit data 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 four-component 64-bit +data type will consume all four components of the first location +and all four components of the second location. It is invalid for +a scalar or two-component 64-bit data type to specify a component +of 1 or 3. + +[[fxvertex-attrib-double]] +.Input attribute locations and components accessed by 64-bit input variables +[width="100%",cols="<18%,^12%,<25%,^14%,^18%,<13%",options="header"] +|============================================= +^.^| Input format | Locations consumed + ^.^| 64-bit data type |code:Location decoration |code:Component decoration ^| 32-bit components consumed +| R64 | i + | scalar | i | 0 or unspecified | (x, y, -, -) +.3+<.^| R64G64 .3+^.^| i + | scalar | i | 0 or unspecified | (x, y, o, o) + | scalar | i | 2 | (o, o, z, w) + | two-component vector | i | 0 or unspecified | (x, y, z, w) +.5+<.^| R64G64B64 .5+^.^| i, i+1 + | scalar | i | 0 or unspecified | (x, y, o, o), (o, o, -, -) + | scalar | i | 2 | (o, o, z, w), (o, o, -, -) + | scalar | i+1 | 0 or unspecified | (o, o, o, o), (x, y, -, -) + | two-component vector | i | 0 or unspecified | (x, y, z, w), (o, o, -, -) + | three-component vector | i | unspecified | (x, y, z, w), (x, y, -, -) +.8+<.^| R64G64B64A64 .8+^.^| i, i+1 + | scalar | i | 0 or unspecified | (x, y, o, o), (o, o, o, o) + | scalar | i | 2 | (o, o, z, w), (o, o, o, o) + | scalar | i+1 | 0 or unspecified | (o, o, o, o), (x, y, o, o) + | scalar | i+1 | 2 | (o, o, o, o), (o, o, z, w) + | two-component vector | i | 0 or unspecified | (x, y, z, w), (o, o, o, o) + | two-component vector | i+1 | 0 or unspecified | (o, o, o, o), (x, y, z, w) + | three-component vector | i | unspecified | (x, y, z, w), (x, y, o, o) + | four-component vector | i | unspecified | (x, y, z, w), (x, y, z, w) +|============================================= + +Components indicated by `o' are available for use by other input variables +which are sourced from the same attribute. +Components indicated by `-' are not available for input variables +as there are no default values provided for 64-bit data types, and +there is no data provided by the input format. + +When a vertex shader input variable declared using a 64-bit floating-point +matrix type is assigned a location _i_, its values are taken from +consecutive input attribute locations. Such matrices are treated as an array +of column vectors with values taken from the input attributes as shown in +<>. Each column vector starts at the location +immediately following the last location of the previous column vector. The +number of attributes and components assigned to each matrix is determined by +the matrix dimensions and ranges from two to eight locations. + +When a vertex shader input variable declared using an array type +is assigned a location, its values are taken from consecutive +input attributes starting with the corresponding +sname:VkVertexInputAttributeDescription::pname:location. The number +of attributes and components assigned to each element are determined +according to the data type of the array elements and code:Component +decoration (if any) specified in the declaration of the array, as described +above. Each element of the array, in order, is assigned to consecutive +locations, but all at the same specified component within each location. + +Only input variables declared with the data types and component decorations +as specified above are supported. _Location aliasing_ is +causing two variables to have the same location number. _Component aliasing_ +is assigning the same (or overlapping) component number for +two location aliases. Location aliasing is allowed only if it does +not cause compenent aliasing. Further, when location aliasing, the +aliases sharing the location must: have the same underlying numerical +type (floating-point or integer). Failure to meet these requirements +will result in an invalid pipeline. + + + +[[fxvertex-input]] +== Vertex Input Description + +Applications specify vertex input attribute and vertex input binding +descriptions as part of graphics pipeline creation, via the +pname:pVertexInputState member of sname:VkGraphicsPipelineCreateInfo, which +is of type sname:VkPipelineVertexInputStateCreateInfo: + +include::../structs/VkPipelineVertexInputStateCreateInfo.txt[] + +The members of sname:VkPipelineVertexInputStateCreateInfo have the following +meanings: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:vertexBindingDescriptionCount is the number of vertex binding + descriptions provided in pname:pVertexBindingDescriptions. + * pname:pVertexBindingDescriptions is a pointer to an array of + sname:VkVertexInputBindingDescription structures. + * pname:vertexAttributeDescriptionCount is the number of vertex attribute + descriptions provided in pname:pVertexAttributeDescriptions. + * pname:pVertexAttributeDescriptions is a pointer to an array of + sname:VkVertexInputAttributeDescription structures. + +include::../validity/structs/VkPipelineVertexInputStateCreateInfo.txt[] + +Each vertex input binding is specified by an instance of the +sname:VkVertexInputBindingDescription structure: + +include::../structs/VkVertexInputBindingDescription.txt[] + +The members of sname:VkVertexInputBindingDescription have the following +meanings: + + * pname:binding is the binding number that this structure + describes. + * pname:stride is the distance in bytes between two + consecutive elements within the buffer. + * pname:inputRate is a elink:VkVertexInputRate value that specifies + whether vertex attribute addressing is a function of the vertex index or + of the instance index. + +include::../validity/structs/VkVertexInputBindingDescription.txt[] + +The definition of elink:VkVertexInputRate is: + +include::../enums/VkVertexInputRate.txt[] + +The values of elink:VkVertexInputRate have the following meanings: + + * ename:VK_VERTEX_INPUT_RATE_VERTEX indicates that vertex attribute + addressing is a function of the vertex index. + * ename:VK_VERTEX_INPUT_RATE_INSTANCE indicates that vertex attribute + addressing is a function of the instance index. + +Each vertex input attribute is specified by an instance of the +sname:VkVertexInputAttributeDescription structure: + +include::../structs/VkVertexInputAttributeDescription.txt[] + +The members of sname:VkVertexInputAttributeDescription have the following +meanings: + + * pname:location is the shader binding location number for this + attribute. + * pname:binding is the binding number which this attribute takes + its data from. + * pname:format is the size and type of the vertex attribute data. + * pname:offset is a byte offset of this attribute relative + to the start of an element in the vertex input binding. + +include::../validity/structs/VkVertexInputAttributeDescription.txt[] + +Vertex buffers are bound to a command buffer for use in subsequent draw +commands by calling: + +include::../protos/vkCmdBindVertexBuffers.txt[] + + * pname:commandBuffer is the command buffer into which the command is + recorded. + * pname:firstBinding is the index of the first vertex input binding whose + state is updated by the command. + * pname:bindingCount is the number of vertex input bindings whose state is + updated by the command. + * pname:pBuffers is a pointer to an array of buffer handles. + * pname:pOffsets is a pointer to an array of buffer offsets. + +The values taken from elements latexmath:[$i$] of pname:pBuffers and +pname:pOffsets replace the current state for the vertex input binding +latexmath:[$\mathit{firstBinding}+i$], for latexmath:[$i$] in +latexmath:[$[0, bindingCount)$]. The vertex input binding is updated to +start at the offset indicated by pname:pOffsets[i] from the start of the +buffer pname:pBuffers[i]. All vertex input attributes that use each of these +bindings will use these updated addresses in their address calculations for +subsequent draw commands. + +include::../validity/protos/vkCmdBindVertexBuffers.txt[] + +The address of each attribute for each code:vertexIndex and +code:instanceIndex is calculated as follows: + + - Let attribDesc be the member of + sname:VkPipelineVertexInputStateCreateInfo::pname:pVertexAttributeDescriptions + with sname:VkVertexInputAttributeDescription::pname:location equal to + the vertex input attribute number. + - Let bindingDesc be the member of + sname:VkPipelineVertexInputStateCreateInfo::pname:pVertexBindingDescriptions + with sname:VkVertexInputAttributeDescription::pname:binding equal to + attribDesc.binding. + - Let code:vertexIndex be the index of the vertex within the draw (a value + between pname:firstVertex and pname:firstVertex+pname:vertexCount for + fname:vkCmdDraw, or a value taken from the index buffer for + fname:vkCmdDrawIndexed), and let code:instanceIndex be the instance + number of the draw (a value between pname:firstInstance and + pname:firstInstance+pname:instanceCount). + +[source,c] +--------------------------------------------------- +bufferBindingAddress = buffer[binding].baseAddress + offset[binding]; + +if (bindingDesc.inputRate == VK_VERTEX_INPUT_RATE_VERTEX) + vertexOffset = vertexIndex * bindingDesc.stride; +else + vertexOffset = instanceIndex * bindingDesc.stride; + +attribAddress = bufferBindingAddress + vertexOffset + attribDesc.offset; +--------------------------------------------------- + +[[fxvertex-input-extraction]] +For each attribute, raw data is extracted starting at `attribAddress` and is +converted from the sname:VkVertexInputAttributeDescription's pname:format to +either to floating-point, unsigned integer, or signed integer based on the +base type of the format; the base type of the format must: match the base +type of the input variable in the shader. If pname:format is a packed +format, `attribAddress` must: be a multiple of the size in bytes of the +whole attribute data type as described in <>. Otherwise, `attribAddress` must: be a multiple of the size in +bytes of the component type indicated by pname:format (see +<>). If the format does not include G, B, or A +components, then those are filled with (0,0,1) as needed (using either 1.0f +or integer 1 based on the format) for attributes that are not 64-bit data +types. The number of components in the vertex shader input variable need not +exactly match the number of components in the format. If the vertex shader +has fewer components, the extra components are discarded. + + +[[fxvertex-example]] +== Example + +To create a graphics pipeline that uses the following vertex description: + +[source,{basebackend@docbook:c++:cpp}] +--------------------------------------------------- +struct Vertex +{ + float x, y, z, w; + uint8_t u, v; +}; +--------------------------------------------------- + +The application could use the following set of structures: + +[source,{basebackend@docbook:c++:cpp}] +--------------------------------------------------- +const VkVertexInputBindingDescription binding = +{ + 0, // binding + sizeof(Vertex), // stride + VK_VERTEX_INPUT_RATE_VERTEX // inputRate +}; + +const VkVertexInputAttributeDescription attributes[] = +{ + { + 0, // location + binding.binding, // binding + VK_FORMAT_R32G32B32A32_SFLOAT, // format + 0 // offset + }, + { + 1, // location + binding.binding, // binding + VK_FORMAT_R8G8_UNORM, // format + 4 * sizeof(float) // offset + } +}; + +const VkPipelineVertexInputStateCreateInfo viInfo = +{ + VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_CREATE_INFO, // sType + NULL, // pNext + 0, // flags + 1, // vertexBindingDescriptionCount + &binding, // pVertexBindingDescriptions + 2, // vertexAttributeDescriptionCount + &attributes[0] // pVertexAttributeDescriptions +}; +--------------------------------------------------- diff --git a/doc/specs/vulkan/chapters/geometry.txt b/doc/specs/vulkan/chapters/geometry.txt new file mode 100644 index 00000000..f380851b --- /dev/null +++ b/doc/specs/vulkan/chapters/geometry.txt @@ -0,0 +1,149 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[geometry]] += Geometry Shading + +The geometry shader operates on a group of vertices and their associated +data assembled from a single input primitive, and emits zero or more +output primitives and the group of vertices and their associated data +required for each output primitive. Geometry shading is enabled when a +geometry shader is included in the pipeline. + + +[[geometry-input]] +== Geometry Shader Input Primitives + +Each geometry shader invocation has access to all vertices in the primitive +(and their associated data), which are presented to the shader as an array +of inputs. The input primitive type expected by the geometry shader is +specified with an code:OpExecutionMode instruction in the geometry shader, +and must: be compatible with the primitive topology used by primitive +assembly (if tessellation is not in use) or must: match the type of +primitive generated by the tessellation primitive generator (if tessellation +is in use). Compatibility is defined below, with each input primitive type. +The input primitive types accepted by a geometry shader are: + +Points:: + +Geometry shaders that operate on points use an code:OpExecutionMode +instruction specifing the code:InputPoints input mode. Such a shader is +valid only when the pipeline primitive topology is +code:VK_PRIMITIVE_TOPOLOGY_POINT_LIST (if tessellation is not in use) or if +tessellation is in use and the tessellation evaluation shader uses +code:PointMode. There is only a single input vertex available for each +geometry shader invocation. However, inputs to the geometry shader are still +presented as an array, but this array has a length of one. + +Lines:: + +Geometry shaders that operate on line segments are generated by including an +code:OpExecutionMode instruction with the code:InputLines mode. Such a +shader is valid only for the code:VK_PRIMITIVE_TOPOLOGY_LINE_LIST, and +code:VK_PRIMITIVE_TOPOLOGY_LINE_STRIP primitive topologies (if tessellation +is not in use) or if tessellation is in use and the tessellation mode is +code:Isolines. There are two input vertices available for each geometry +shader invocation. The first vertex refers to the vertex at the beginning of +the line segment and the second vertex refers to the vertex at the end of +the line segment. + +Lines with Adjacency:: + +Geometry shaders that operate on line segments with adjacent vertices are +generated by including an code:OpExecutionMode instruction with the +code:InputLinesAdjacency mode. Such a shader is valid only for the +code:VK_PRIMITIVE_TOPOLOGY_LINES_WITH_ADJACENCY and +code:VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY primitive topologies +and mustnot: be used when tessellation is in use. ++ +In this mode, there are four vertices available for each geometry shader +invocation. The second vertex refers to attributes of the vertex at the +beginning of the line segment and the third vertex refers to the vertex at +the end of the line segment. The first and fourth vertices refer to the +vertices adjacent to the beginning and end of the line segment, +respectively. + +Triangles:: + +Geometry shaders that operate on triangles are created by including an +code:OpExecutionMode instruction with the code:Triangles mode. Such a +shader is valid when the pipeline topology is +code:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, +code:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP, or +code:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN (if tessellation is not in use) or +when tessellation is in use and the tessellation mode is code:Triangles or +code:Quads. ++ +In this mode, there are three vertices available for each geometry shader +invocation. The first, second, and third vertices refer to attributes of the +first, second, and third vertex of the triangle, respectively. + +Triangles with Adjacency:: + +Geometry shaders that operate on triangles with adjacent vertices are +created by including an code:OpExecutionMode instruction with the +code:InputTrianglesAdjacency mode. Such a shader is valid when the pipeline +topology is code:VK_PRIMITIVE_TOPOLOGY_TRIANGLES_WITH_ADJACENCY or +code:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY, and mustnot: be +used when tessellation is in use. ++ +In this mode, there are six vertices available for each geometry shader +invocation. The first, third and fifth vertices refer to attributes of the +first, second and third vertex of the triangle, respectively. The second, +fourth and sixth vertices refer to attributes of the vertices adjacent to +the edges from the first to the second vertex, from the second to the third +vertex, and from the third to the first vertex, respectively. + + +[[geometry-output]] +== Geometry Shader Output Primitives + +A geometry shader generates primitives in one of three output modes: points, +line strips, or triangle strips. The primitive mode is specified in the +shader using an code:OpExecutionMode instruction with the code:OutputPoints, +code:OutputLineStrip or code:OutputTriangleStrip modes, respectively. Each +geometry shader must: include exactly one output primitive mode. + +The vertices output by the geometry shader are assembled into points, lines, +or triangles based on the output primitive type and the resulting primitives +are then further processed as described in <>. If the number of +vertices emitted by the geometry shader is not sufficient to produce a +single primitive, vertices corresponding to incomplete primitives are not +processed by subsequent pipeline stages. The number of vertices output by +the geometry shader is limited to a maximum count specified in the shader. + +The maximum output vertex count is specified in the shader using an +code:OpExecutionMode instruction with the mode set to code:OutputVertices +and the maximum number of vertices that will be produced by the geometry +shader specified as a literal. Each geometry shader must: specify a maximum +output vertex count. + + +[[geometry-invocations]] +== Multiple Invocations of Geometry Shaders + +Geometry shaders can: be invoked more than one time for each input +primitive. This is known as _geometry shader instancing_ and is requested by +including an code:OpExecutionMode instruction with code:mode specified as +code:Invocations and the number of invocations specified as an integer +literal. + +In this mode, the geometry shader will execute latexmath:[$n$] times for +each input primitive, where latexmath:[$n$] is the number of invocations +specified in the code:OpExecutionMode instruction. The instance number is +available to each invocation as a built-in input using code:InvocationID. + + +[[geometry-ordering]] +== Geometry Shader Primitive Ordering + +Limited guarantees are provided for the relative ordering of primitives +produced by a geometry shader. + + - For instanced geometry shaders, the output primitives generated from + each input primitive are passed to subsequent pipeline stages using the + invocation number to order the primitives, from least to greatest. + - All output primitives generated from a given input primitive are passed + to subsequent pipeline stages before any output primitives generated + from subsequent input primitives. + diff --git a/doc/specs/vulkan/chapters/initialization.txt b/doc/specs/vulkan/chapters/initialization.txt new file mode 100644 index 00000000..d4589d9f --- /dev/null +++ b/doc/specs/vulkan/chapters/initialization.txt @@ -0,0 +1,177 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[initialization]] += Initialization + +Before using {apiname}, an application must: initialize it by loading the +{apiname} commands, and creating a slink:VkInstance object. + +[[initialization-functionpointers]] +== Command Function Pointers + +{apiname} commands are not necessarily exposed statically on a platform. +Function pointers for all {apiname} commands can: be obtained with the +command: + +include::../protos/vkGetInstanceProcAddr.txt[] + + * pname:instance is the instance that the function pointer will be + compatible with. + * pname:pName is the name of the command to obtain. + +include::../validity/protos/vkGetInstanceProcAddr.txt[] + +fname:vkGetInstanceProcAddr itself is obtained in a platform- and loader- +specific manner. Typically, the loader library will export this command as a +function symbol, so applications can: link against the loader library, or +load it dynamically and look up the symbol using platform-specific APIs. +Loaders are encouraged to export function symbols for all other core +{apiname} commands as well; if this is done, then applications that use only +the core {apiname} commands have no need to use fname:vkGetInstanceProcAddr. + +Function pointers to commands that don't operate on a specific instance can: +be obtained by using this command with pname:instance equal to `NULL`. The +following commands can: be accessed this way: + + * fname:vkEnumerateInstanceExtensionProperties + * fname:vkEnumerateInstanceLayerProperties + * fname:vkCreateInstance + +If pname:instance is a valid sname:VkInstance, function pointers to any +commands that operate on pname:instance or a child of pname:instance can: be +obtained. The returned function pointer must: only be called with a +dispatchable object (the first parameter) that is a child of pname:instance. + +If pname:pName is not the name of a core {apiname} command, or is an +extension command for any extension not supported by any available layer or +implementation, then fname:vkGetInstanceProcAddr will return `NULL`. + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +(Jon, Bug 14886 / Gitlab issue 4) The WSI group tentatively agreed that the +WSI extensions were special, and should get static entry points in link +libraries and prototypes in +vulkan.h+, while future extensions would have +to be dynamically loaded. If this decision is upheld by the group as a +whole, it would probably be encoded in the previous paragraph, in the WSI +extensions branch of the Specification. + +However, this decision hasn't been fully signed off on by the entire Vulkan +WG yet AFAIK. Note that implementations typically won't support many of the +WSI extensions, so ``static entry points'' doesn't relieve apps of the +neccessity of runtime enabling and testing of each extension before using +it. +==== +endif::editing-notes[] + +In order to support systems with multiple {apiname} implementations +comprising heterogenous collections of hardware and software, the function +pointers returned by fname:vkGetInstanceProcAddr may: point to dispatch +code, which calls a different real implementation for different +sname:VkDevice objects (and objects created from them). The overhead of this +internal dispatch can: be avoided by obtaining device-specific function +pointers for any commands that use a device or device-child object as their +dispatchable object. Such function pointers can: be obtained with the +command: + +include::../protos/vkGetDeviceProcAddr.txt[] + + * pname:device is the logical device that provides the function pointer. + * pname:pName is the name of any {apiname} command whose first parameter + is one of + ** sname:VkDevice + ** sname:VkQueue + ** sname:VkCommandBuffer + +If pname:pName is not the name of one of these {apiname} commands, and is +not the name of an extension command belonging to an extension enabled for +pname:device, then fname:vkGetDeviceProcAddr will return `NULL`. + +include::../validity/protos/vkGetDeviceProcAddr.txt[] + +[[initialization-instances]] +== Instances + +There is no global state in {apiname} and all per-application state is +stored in a sname:VkInstance object. Creating a sname:VkInstance object +initializes the {apiname} library and allows the application to pass +information about itself to the implementation. + +To create an instance object, call: + +include::../protos/vkCreateInstance.txt[] + + * pname:pCreateInfo points to an instance of slink:VkInstanceCreateInfo + controlling creation of the instance. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pInstance points a sname:VkInstance handle in which the resulting + instance is returned. + +include::../validity/protos/vkCreateInstance.txt[] + +The definition of sname:VkInstanceCreateInfo is: + +include::../structs/VkInstanceCreateInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:pApplicationInfo is `NULL` or a pointer to an instance of + sname:VkApplicationInfo. If not `NULL`, this information helps + implementations recognize behavior inherent to classes of applications. + slink:VkApplicationInfo is defined in detail below. + * pname:enabledLayerCount is the number of global layers to enable. + * pname:ppEnabledLayerNames is a pointer to an array of + pname:enabledLayerCount null-terminated UTF-8 strings containing the + names of layers to enable. + * pname:enabledExtensionCount is the number of global extensions to + enable. + * pname:ppEnabledExtensionNames is a pointer to an array of + pname:enabledExtensionCount null-terminated UTF-8 strings containing the + names of extensions to enable. + +include::../validity/structs/VkInstanceCreateInfo.txt[] + +fname:vkCreateInstance creates the instance, then enables and initializes +global layers and extensions requested by the application. If an extension +is provided by a layer, both the layer and extension must: be specified at +fname:vkCreateInstance time. + +The pname:pApplicationInfo member of slink:VkInstanceCreateInfo can: point +to an instance of sname:VkApplicationInfo. This structure is defined as: + +include::../structs/VkApplicationInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:pApplicationName is a pointer to a null-terminated UTF-8 string + containing the name of the application. + * pname:applicationVersion is an unsigned integer variable containing the + developer-supplied version number of the application. + * pname:pEngineName is a pointer to a null-terminated UTF-8 string + containing the name of the engine (if any) used to create the + application. + * pname:engineVersion is an unsigned integer variable containing the + developer-supplied version number of the engine used to create the + application. + * pname:apiVersion is the version of the {apiname} API against which the + application expects to run, encoded as described in the + <> section. + If pname:apiVersion is 0 the implementation must: ignore it, otherwise + if the implementation does not support the requested pname:apiVersion + it must: return VK_ERROR_INCOMPATIBLE_DRIVER. + +include::../validity/structs/VkApplicationInfo.txt[] + +To destroy an instance, call: + +include::../protos/vkDestroyInstance.txt[] + + * pname:instance is the handle of the instance to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroyInstance.txt[] diff --git a/doc/specs/vulkan/chapters/interfaces.txt b/doc/specs/vulkan/chapters/interfaces.txt new file mode 100644 index 00000000..83e97a81 --- /dev/null +++ b/doc/specs/vulkan/chapters/interfaces.txt @@ -0,0 +1,1180 @@ +// 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 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. + + +[[interfaces-iointerfaces-builtin]] +=== Built-in Interface Block + +Shader <> variables meeting the +following requirements define the _built-in interface block_. They must: be: + + * explicitly declared (there are no implicit built-ins), + * identified with a code:BuiltIn decoration, + * form object types as described in the + <> section, and + * declared in a block whose top-level members are the built-ins. + +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 +<> 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. + +Any input value to a shader stage is well-defined as long as the preceeding +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 <> 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 +code:Block with a code:Location decoration, then its first member is +assigned to the location specified for the code:Block, any member with +its own code:Location decoration is assigned that location, and otherwise +each subsequent member is assigned consecutive locations in declaration +order. + +The locations consumed by block and structure members are determined +by applying the rules above in a depth-first traversal of the instantiated +members as though the structure or block member were declared as in input or +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]] +.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. +A code:Component decoration mustnot: be specified any type that is +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 <> 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 <>, if enabled. Locations are consumed as +described in <>. 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 +<>. +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. +If two variables are placed within the same location, they must +have the same underlying type (floating-point or integer). + +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 +<>; 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. + +The fragment shader input variables listed by code:OpEntryPoint with the +code:Input storage class and a decoration of code:InputAttachmentIndex +form the _fragment input attachment interface_. These variables must: +be declared with a type of code:OpImageType and a code:Dim operand +of code:SubpassData. + +A fragment shader input variable identified with a code:InputAttachmentIndex +decoration of _i_ reads from the input attachment indicated by +pname:pInputAttachments[_i_]. If the 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 +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 <> for more details. + + +[[interfaces-resources]] +== Shader Resource Interface + +When a shader stage accesses buffer or image resources, as described +in the <> section, the shader +resource variables must be matched with the +<> 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 +with the storage classes of code:Uniform, code:UniformConstant, and +code:PushConstant. For the fragment shader, the variables identified by +operands to code:OpEntryPoint with a storage class of code:Input and a +decoration of code:InputAttachmentIndex are also included in this interface. + +The shader resource interface can be further broken down into two +sub-interfaces: the push constant interface and the descriptor +set interface. + + +[[interfaces-resources-pushconst]] +=== Push Constant Interface + +The shader variables defined with a storage class of code:PushConstant that +are statically used by the shader entry points for the pipeline +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 + <>. + +There must: be no more than one push constant block statically used per +shader entry point. + +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 +storage classes of code:Uniform, code:UniformConstant, and the variables in +the <>, +that are statically used by the shader entry points for the pipeline. + +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 +<>. + +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 + <>. + +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})$]. + +Variables identified with a storage class of code:Input and a decoration of +code:InputAttachmentIndex must be declared as described +<>. + +Each shader variable declaration must: refer to the same type of resource as +is indicated by the pname:descriptorType. See +<> 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"] +|============================= +| Resource type | Descriptor Type +| sampler |VK_DESCRIPTOR_TYPE_SAMPLER +| sampled image |VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE +| storage image |VK_DESCRIPTOR_TYPE_STORAGE_IMAGE +| combined image sampler | VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER +| uniform texel buffer | VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER +| storage texel buffer | VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER +| uniform buffer | VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER + + VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC +| storage buffer | VK_DESCRIPTOR_TYPE_STORAGE_BUFFER + + VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC +| input attachment| VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT +|============================= + +.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 + | code:Input | code:OpTypeImage (code:Dim=code:SubpassData) | code:InputAttachmentIndex +|============================= +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 +pname:maxBoundDescriptorSets minus one, inclusive. If a descriptor set value +is statically used by an entry point there must: be an associated +pname:pSetLayout in the corresponding pipeline layout as described in +<>. + +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 <>, if a resource +variable is not an array, it is treated as if it has an arrayElement of +zero. + +The binding can be any 32-bit unsigned integer value, as described in +<>. 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 +<>. +The ``Resources Per Stage'' column gives the limit on the number each type +of resource that can: be statically used for an entry point in any given +stage in a pipeline. The ``Resource Types'' column lists which resource +types are counted against the limit. Some resource types count against +multiple limits. + +If multiple entry points in the same pipeline refer to the same set and +binding, all variable definitions with that code:DescriptorSet and +code:Binding must have the same basic type. + +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 + +All variables with a storage class of code:PushConstant or code:Uniform must +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* + +Member variables of an code:OpTypeStructure with storage class of +code:Uniform and a decoration of code:Block (uniform buffers) must: be laid +out according to the following rules. + + * The code:Offset Decoration must be a multiple of its base alignment, + computed recursively as follows: ++ + ** 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 ++ + * Any code:ArrayStride or code:MatrixStride decoration must equal the base + alignment of the array or matrix from above. + +[NOTE] +.Note +==== +The *std140 layout* in GLSL satisfies these rules. +==== + +[[interfaces-resources-layout-std430]] +*Standard Storage Buffer Layout* + +Member variables of an code:OpTypeStructure with a storage class of +code:PushConstant (push constants), or a storage class of code:Uniform +with a decoration of code:BufferBlock (storage buffers) must: be laid +out as <>, 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 +using a code:BuiltIn decoration. The meaning of each code:BuiltIn decoration +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. + +code:ClipDistance:: + +Variables decorated with the code:ClipDistance decoration provide the +mechanism for controlling user clipping. Declared as an array, the i^th^ +element of the variable decorated as code:ClipDistance specifies a 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 +negative distance means the point is outside the clip half-space. ++ +The code:ClipDistance array is explicitly sized by the shader. ++ +The code:ClipDistance decoration can: be applied to array inputs in +tessellation control, tessellation evaluation and geometry shader stages +which will contain the values written by the previous stage. It can: be +applied to outputs in vertex, tessellation evaluation and geometry shaders. +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. ++ +In the fragment shader, the code:ClipDistance decoration can: be applied to +an array of floating-point input variables and contains the linearly +interpolated values described above. ++ +code:ClipDistance mustnot: be used in compute shaders. ++ +code:ClipDistance must: be declared as an array of 32-bit floating-point +values. + +code:CullDistance:: + +A variable decorated as code:CullDistance provides a mechanism for a vertex +processing stage to reject an entire primitive. code:CullDistance can: be +applied to an array variable. 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. code:CullDistance can: be applied to an +output variable in the last vertex processing stage (vertex, tessellation +evaluation or geometry shader). ++ +If applied to an input variable, that variable will contain the value of the +corresponding output in the previous shader stage. code:CullDistance +mustnot: be applied to an input in the vertex shader or to an output in the +fragment shader, and mustnot: be used in compute shaders. ++ +In fragment shaders, the values of the code:CullDistance array are linearly +interpolated across each primitive. ++ +code:CullDistance must: be declared as an array of 32-bit floating-point +values. + +code:FragCoord:: + +This variable contains the framebuffer coordinate +latexmath:[$(x,y,z,\frac{1}{w})$] of the fragment being processed. The (x,y) +coordinate (0,0) is the upper left corner of the upper left pixel in the +framebuffer. The values of the x and y components of code:FragCoord reflect +the location of the center of the pixel (i.e. fractional values of +latexmath:[$(0.5,0.5)$]) when sample shading is not enabled, and the +location of the sample corresponding to the shader invocation when using +sample shading. ++ +The z component of code:FragCoord is the interpolated depth value of the +primitive, and the w components is the interpolated +latexmath:[$\frac{1}{w}$]. ++ +The code:FragCoord decoration is only supported in fragment shaders. The +code:Centroid interpolation decoration is ignored on code:FragCoord. ++ +code:FragCoord must: be declared as a four-component vector of 32-bit +floating-point values. + +code:FragDepth:: + +Writing to an output variable decorated with code:FragDepth from the +fragment shader establishes a 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. That is, if the fragment shader enables depth +replacing, then it must: always write it. ++ +The code:FragDepth decoration is only supported in fragment shaders. ++ +code:FragDepth must: be declared as a scalar 32-bit floating-point value. + +code:FrontFacing:: + +The code:FrontFacing decoration can: be applied to an input variable in the +fragment shader. The value of this variable is non-zero if the current +fragment is considered to be part of a +<> primitive and is zero if the +fragment is considered to be part of a back-facing primitive. ++ +-- +The code:FrontFacing decoration is not available to shader stages other than +fragment. + +code:FrontFacing must: be declared as a scalar 32-bit integer. + +[NOTE] +.Note +==== +In GLSL, code:gl_FrontFacing is declared as a code:bool. To achieve +similar semantics in SPIR-V, a variable of code:OpTypeBool can: be declared +and initialized as the result of the code:OpINotEqual operation with the +operands of the code:FrontFacing variable and an appropriately typed +constant zero. +==== +-- + +code:GlobalInvocationID:: + +An input variable decorated with code:GlobalInvocationID will contain the +location of the current compute shader invocation within the global +workgroup. The value in this variable is equal to the index of the local +workgroup multiplied by the size of the local workgroup plus the value of +code:LocalInvocationID. ++ +The code:GlobalInvocationID decoration is only supported in compute shaders. ++ +code:GlobalInvocationID must: be declared as a three-component vector of +32-bit integers. + +code:HelperInvocation:: + +This variable is non-zero if the fragment being shaded is a helper +invocation and zero otherwise. A helper invocation is an invocation of +the shader that is produced to satisfy internal requirements such as the +generation of derivatives. ++ +-- +The code:HelperInvocation decoration is only supported in fragment shaders. + +code:HelperInvocation must: be declared as a scalar 32-bit integer. + +[NOTE] +.Note +==== +It is very likely that a helper invocation will have a value of +code:SampleMask fragment shader input value that is zero. +==== + +[NOTE] +.Note +==== +In GLSL, code:HelperInvocation is declared as a code:bool. To achieve +similar semantics in SPIR-V, a variable of code:OpTypeBool can: be declared +and initialized as the result of the code:OpINotEqual operation with the +operands of the code:HelperInvocation variable and an appropriately typed +constant zero. +==== +-- + +code:InvocationID:: + +In a geometry shader, an input variable decorated with the code:InvocationID +decoration contains the index of the current shader invocation, which ranges +from zero to the number of <> declared +in the shader. If the instance count of the geometry shader is one or is not +specified, then code:InvocationID will be zero. ++ +In tessellation control shaders, and input variable decorated with the +code:InvocationID decoration contains the index of the output patch vertex +assigned to the tessellation control shader invocation. ++ +The code:InvocationID decoration mustnot: be used in vertex, tessellation +evaluation, fragment, or compute shaders. ++ +code:InvocationID must: be declared as a scalar 32-bit integer. + +code:InstanceIndex:: + +The code:InstanceIndex decoration can: be applied to a vertex shader input +which will be filled with the index of the instance that is being processed +by the current vertex shader invocation. The value of code:InstanceIndex +begins at the value of the pname:firstInstance parameter to flink:vkCmdDraw +or flink:vkCmdDrawIndexed or at the value of the pname:firstInstance member +of a structure consumed by flink:vkCmdDrawIndirect or +flink:vkCmdDrawIndexedIndirect. ++ +The code:InstanceIndex decoration mustnot: be used in any shader stage other +than vertex. ++ +code:InstanceIndex must: be declared as a scalar 32-bit integer. + +code:Layer:: + +The code:Layer decoration can: be applied to an output variable in the +geometry shader that is 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 an output variable +decorated with code:Layer, then the first layer is used. If a geometry +shader entry point's interface includes an output variable decorated with +code:Layer, it must: write the same value to code:Layer for all output +vertices of a given primitive. When used in a fragment shader, an input +variable decorated with code:Layer contains the layer index of the primitive +that the fragment invocation belongs to. ++ +The code:Layer decoration is only supported in geometry and fragment +shaders. ++ +code:Layer must: be declared as a scalar 32-bit integer. + +code:LocalInvocationID:: + +This variable contains the location of the current compute shader invocation +within the local workgroup. The range of possible values for each component +of LocalInvocationID range from zero through the size of the workgroup (as +defined by code:LocalSize) in that dimension minus one. If the size of the +workgroup in a particular dimension is one, then the value of +LocalInvocationID in that dimension will be zero. That is, if the workgroup +is effectively two-dimensional, then pname:LocalInvocationID.z will be zero, +and if the workgroup is one-dimensional, then the values of both +pname:LocalInvocationID.y and pname:LocalInvocationID.z will be zero. ++ +The code:LocalInvocationID decoration is only supported in compute shaders. ++ +code:LocalInvocationID must: be declared as a three-component vector of +32-bit integers. + +code:NumWorkGroups:: + +The code:NumWorkGroups decoration can: be applied to a code:uvec3 input +variable in a compute shader, in which case it will contain the number of +local workgroups that are part of the dispatch that the invocation belongs +to. It reflects the values passed to a call to flink:vkCmdDispatch or +through the structure consumed by the execution of +flink:vkCmdDispatchIndirect. ++ +The code:NumWorkGroups decoration is only supported in compute shaders. ++ +code:NumWorkGroups must: be declared as a three-component vector of 32-bit +integers. + +code:PatchVertices:: + +An input variable decorated with code:PatchVertices in the tessellation +control or evaluation shader is an integer specifying the number of +vertices in the input patch being processed by the shader. A single +tessellation control or evaluation shader can: read patches of differing +sizes, so the value of the code:PatchVertices variable may: differ between +patches. ++ +The code:PatchVertices decoration is only supported in tessellation control +and evaluation shaders. ++ +code:PatchVertices must: be declared as scalar 32-bit integer. + +code:PointCoord:: + +During point rasterization, a variable decorated with code:PointCoord +contains the coordinate of the current fragment within the point being +rasterized, normalized to the size of the point with origin in the upper +left corner of the point, as described in <>. If the primitive the fragment shader invocation +belongs to is not a point then the value of code:PointCoord is undefined. ++ +-- +The code:PointCoord decoration is only supported in fragment shaders. + +code:PointCoord must: be declared as two-component vector of 32-bit +floating-point values. + +[NOTE] +.Note +==== +Depending on how the point is rasterized, code:PointCoord may: never +reach (0,0) or (1,1). +==== +-- + +code:PointSize:: + +The code:PointSize built-in decoration is used to pass the size of point +primitives between shader stages. It can: be applied to inputs to +tessellation control and geometry shaders. It can: be applied to output +variables in vertex, tessellation evaluation and geometry shaders. The value +written to the variable decorated as code:PointSize by the last vertex +processing stage in the pipeline is used as the framebuffer space size of +points produced by rasterization. As an input, it reflects the value written +to the output decorated with code:PointSize in the previous shader stage. ++ +The code:PointSize decoration mustnot: be applied to inputs in the vertex +shader and mustnot: be used in fragment or compute shaders. ++ +code:PointSize must: be declared as a scalar 32-bit floating-point value. + +code:Position:: + +The code:Position built-in decoration can: be used on variables declared as +input to tessellation control, tessellation evaluation and geometry shaders. +It can: be used on variables declared as outputs in the vertex, tessellation +control, tessellation evaluation and geometry shaders. As an input, it +contains the data written to the output variable decorated as code:Position +in the previous shader stage. As an output, the data written to a variable +decorated as code:Position is passed to the next shader stage. In the last +vertex processing stage, the output position is used in subsequent primitive +assembly, clipping and rasterization operations. ++ +Variables decorated as code:Position mustnot: be used as inputs in vertex +shaders and are mustnot: be used in fragment or compute shaders. ++ +code:Position must: be declared as a four-component vector of 32-bit +floating-point values. + +code:PrimitiveID:: + +When the code:PrimitiveID decoration is applied to an input variable in the +tessellation control or tessellation evaluation shader, it will be filled +with the index of the patch within the current set of rendering primitives +that corresponds to the shader invocation. ++ +When the code:PrimitiveID decoration is applied to an input variable in the +geometry shader, it will be filled with the number of primitives presented +as input to the geometry shader since the current set of rendering +primitives was started. When code:PrimitiveID is applied to an output in the +geometry shader, the resulting value is seen as an input to the fragment +shader. ++ +When code:PrimitiveID is applied to an input in the fragment shader, it will +be filled with 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, otherwise the value +of the code:PrimitiveID input in the fragment shader is undefined. ++ +The code:PrimitiveID decoration mustnot: be used in vertex or compute +shaders. code:PrimitiveID mustnot: be used on output variables in +tessellation control, tessellation evaluation, or fragment shaders. ++ +code:PrimitiveID must: be declared as scalar 32-bit integer. + +code:SampleID:: + +The code:SampleID decoration can: be applied to an integer input variable in +the fragment shader. This variable will contain the zero-based index of the +sample the invocation corresponds to. The value of 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. ++ +code:SampleID is not available in shader stages other than fragment. ++ +code:SampleID must: be declared as a scalar 32-bit integer. + +code:SampleMask:: + +A fragment input variable decorated with code:SampleMask will contain a +bitmask of the set of samples covered by the primitive generating the +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. ++ +A fragment output variable 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 +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 +shader entry point's interface includes an output variable decorated with +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 +shader entry point's interface does not include an output variable decorated +with code:SampleMask, the sample mask has no effect on the processing of a +fragment. ++ +The code:SampleMask decoration is only supported in fragment shaders. ++ +code:SampleMask must: be declared as an array of 32-bit integers. + +code:SamplePosition:: + +This variable contains the sub-pixel position of the sample being shaded. +The top left of the pixel is considered to be at coordinate (0,0) and the +bottom right of the pixel is considered to be at coordinate (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. ++ +The code:SamplePosition decoration is only supported in fragment shaders. ++ +code:SamplePosition must: be declared as a two-component vector of +floating-point values. + +code:TessellationCoord:: + +The code:TessellationCoord is applied to an input variable in tessellation +evaluation shaders and specifies the three-dimensional (u,v,w) barycentric +coordinate of the tessellated vertex within the patch. The values of u, v, +and 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. ++ +The code:TessellationCoord decoration is only available to tessellation +evaluation shaders. ++ +code:TessellationCoord must: be declared as three-component vector of 32-bit +floating-point values. + +code:TessellationLevelOuter:: + +The code:TessellationLevelOuter decoration is used in tessellation control +shaders to decorate an output variable to contain the outer tessellation +factor for the resulting patch. This value is used by the tessellator +to control primitive tessellation and can: be read by +tessellation evaluation shaders. When applied to an input variable in a +tessellation evaluation shader, the shader can: read the value written by +the tessellation control shader. ++ +The code:TessellationLevelOuter decoration is not available outside +tessellation control and evaluation shaders. ++ +code:TessellationLevelOuter must: be declared as an array of size two, +containing 32-bit floating-point values. + +code:TessellationLevelInner:: + +The code:TessellationLevelInner decoration is used in tessellation control +shaders to decorate an output variable to contain the inner tessellation +factor for the resulting patch. This value is used by the tessellator to +control primitive tessellation and can: be read by +tessellation evaluation shaders. When applied to an input variable in a +tessellation evaluation shader, the shader can: read the value written by +the tessellation control shader. ++ +The code:TessellationLevelInner decoration is not available outside +tessellation control and evaluation shaders. ++ +code:TessellationLevelInner must: be declared as an array of size four, +containing 32-bit floating-point values. + +code:VertexIndex:: + +The code:VertexIndex decoration can: be applied to a vertex shader input +which will be filled with the index of the vertex that is being processed by +the current vertex shader invocation. For non-indexed draws, the value of +this variable begins at the value of the pname:firstVertex parameter to +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 +vertex plus the value of the pname:vertexOffset parameter to +flink:vkCmdDrawIndexed or the pname:vertexOffset member of the structure +consumed by flink:vkCmdDrawIndexedIndirect. ++ +The value of code:VertexIndex starts at the same starting value for each +instance. ++ +The code:VertexIndex decoration mustnot: be used in any shader stage other +than vertex. ++ +code:VertexIndex must: be declared as a 32-bit integer. + +code:ViewportIndex:: + +The code:ViewportIndex decoration can: be applied to an output variable in +the geometry shader that is written with the viewport index to which the +primitive produced by the geometry shader will be directed. The selected +viewport index is used to select the viewport transform and scissor +rectangle. If a geometry shader entry point's interface does not include an +output variable decorated with code:ViewportIndex, then the first viewport +is used. If a geometry shader entry point's interface includes an output +variable decorated with code:ViewportIndex, it must: write the same value to +code:ViewportIndex for all output vertices of a given primitive. When used +in a fragment shader, an input variable decorated with code:ViewportIndex +contains the viewport index of the primitive that the fragment invocation +belongs to. ++ +The code:ViewportIndex decoration is only supported in geometry and fragment +shaders. ++ +code:ViewportIndex must: be declared as a 32-bit integer. + +code:WorkgroupID:: + +The code:WorkgroupID built-in decoration can: be applied to an input +variable in the compute shader. It will contain a three dimensional integer +index of the global 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. ++ +The code:WorkGroupID decoration is only supported in compute shaders. ++ +code:WorkGroupID must: be declared as a three-component vector of 32-bit +integers. diff --git a/doc/specs/vulkan/chapters/introduction.txt b/doc/specs/vulkan/chapters/introduction.txt new file mode 100644 index 00000000..9afa8afc --- /dev/null +++ b/doc/specs/vulkan/chapters/introduction.txt @@ -0,0 +1,193 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[introduction]] += Introduction + +This chapter is Informative except for the sections on Terminology and +Normative References. + +This document, referred to as the ``{apiname} Specification'' or just the +``Specification'' hereafter, describes the {apiname} graphics system: what +it is, how it acts, and what is required to implement it. We assume that the +reader has at least a rudimentary understanding of computer graphics. This +means familiarity with the essentials of computer graphics algorithms and +terminology as well as with modern GPUs (Graphic Processing Units). + +The canonical version of the Specification is available in the official +{apiname} Registry, located at URL + +http://www.khronos.org/registry/vulkan/ + + +[[introduction-whatis]] +== What is the {apiname} Graphics System? + +{apiname} is an API (Application Programming Interface) for graphics and +compute hardware. The API consists of many commands that +allow a programmer to specify shader programs, compute kernels, objects, and +operations involved in producing high-quality graphical images, specifically +color images of three-dimensional objects. + + +[[introduction-programmer]] +=== The Programmer's View of {apiname} + +To the programmer, {apiname} is a set of commands that allow the +specification of _shader programs_ or _shaders_, _kernels_, data used by +kernels or shaders, and state controlling aspects of {apiname} outside the +scope of shaders. Typically, the data represents geometry in two or three +dimensions and texture images, while the shaders and kernels control the +processing of the data, rasterization of the geometry, and the lighting and +shading of _fragments_ generated by rasterization, resulting in the +rendering of geometry into the framebuffer. + +A typical {apiname} program begins with platform-specific calls to open a +window or otherwise prepare a display device onto which the program will +draw. Then, calls are made to open _queues_ to which _command buffers_ are +submitted. The command buffers contain lists of commands which will be +executed by the underlying hardware. The application can: also allocate +device memory, associate _resources_ with memory and refer to these +resources from within command buffers. Drawing commands cause +application-defined shader programs to be invoked, which can: then consume +the data in the resources and use them to produce graphical images. To +display the resulting images, further platform-specific commands are made to +transfer the resulting image to a display device or window. + + +[[introduction-implementor]] +=== The Implementor's View of {apiname} + +To the implementor, {apiname} is a set of commands that allow the +construction and submission of command buffers to a device. Modern devices +accelerate virtually all {apiname} operations, storing data and framebuffer +images in high-speed memory and executing shaders in dedicated GPU +processing resources. + +The implementor's task is to provide a software library on the host which +implements the {apiname} API, while mapping the work for each {apiname} +command to the graphics hardware as appropriate for the capabilities of the +device. + + +[[introduction-ourview]] +=== Our View of {apiname} + +We view {apiname} as a pipeline having some programmable stages and some +state-driven fixed-function stages that are invoked by a set of specific +drawing operations. We expect this model to result in a specification that +satisfies the needs of both programmers and implementors. It does not, +however, necessarily provide a model for implementation. An implementation +must: produce results conforming to those produced by the specified methods, +but may: carry out particular computations in ways that are more +efficient than the one specified. + + +[[introduction-bugs]] +== Filing Bug Reports + +Issues with and bug reports on the {apiname} Specification and the API +Registry can: be filed in the Khronos Vulkan Github repository, located at +URL + +http://github.com/KhronosGroup/Vulkan-Docs + +Please tag issues with appropriate labels, such as ``Specification'', +``Ref Pages'' or ``Registry'', to help us triage and assign them +appropriately. + + +[[introduction-terminology]] +== Terminology + +The key words *must*, *must not*, *required*, *shall*, *shall not*, +*should*, *should not*, *recommend*, *may*, and *optional* in this document +are to be interpreted as described in RFC 2119: + +http://www.ietf.org/rfc/rfc2119.txt + +*must*:: This word, or the terms *required* or *shall*, mean that the +definition is an absolute requirement of the specification. + +*must not*:: This phrase, or the phrase *shall not*, means that the +definition is an absolute prohibition of the specification. + +*should*:: This word, or the adjective *recommended*, means that there may +exist valid reasons in particular circumstances to ignore a particular item, +but the full implications must be understood and carefully weighed before +choosing a different course. + +*should not*:: This phrase, or the phrase *not recommended*, means that +there may exist valid reasons in particular circumstances when the +particular behavior is acceptable or even useful, but the full implications +should be understood and the case carefully weighed before implementing any +behavior described with this label. + +*may*:: This word, or the adjective *optional*, means that an item is truly +optional. One vendor may choose to include the item because a particular +marketplace requires it or because the vendor feels that it enhances the +product while another vendor may omit the same item. An implementation which +does not include a particular option must be prepared to interoperate with +another implementation which does include the option, though perhaps with +reduced functionality. In the same vein an implementation which does include +a particular option must be prepared to interoperate with another +implementation which does not include the option (except, of course, for the +feature the option provides). + +The additional terms *can* and *cannot* are to be interpreted as follows: + +*can*:: This word means that the particular behavior described is a valid +choice for an application, and is never used to refer to implementation +behavior. + +*cannot*:: This word means that the particular behavior described is not +achievable by an application. For example, an entry point does not exist, or +shader code is not capable of expressing an operation. + +[NOTE] +.Note +================== +There is an important distinction between *cannot* and *must not*, as used +in this Specification. *Cannot* means something the application literally is +unable to express or accomplish through the API, while *must not* means +something that the application is capable of expressing through the API, but +that the consequences of doing so are undefined and potentially +unrecoverable for the implementation. +================== + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +TODO (Jon) - We might need to augment the RFC 2119 definition of *must not* +to include some of the previous note, since at present it is defined solely +in terms of implementation behavior. See Gitlab issue #9. +==== +endif::editing-notes[] + + +[[introduction-normative]] +== Normative References + +Normative references are references to external documents or resources to +which implementers of {apiname} must: comply. + +[[IEEE 754]]:: _IEEE Standard for Floating-Point Arithmetic_, +IEEE Std 754-2008, +http://dx.doi.org/10.1109/IEEESTD.2008.4610935, +August, 2008. + +[[Khronos Data Format Specification]]:: A. Garrard, _Khronos Data Format +Specification, version 1.1_, +https://www.khronos.org/registry/dataformat/specs/1.1/dataformat.1.1.html, +February 16, 2015. + +[[Khronos SPIR-V Extended Instructions for GLSL Specification]]:: J. +Kessenich, _SPIR-V Extended Instructions for GLSL, Version 1.00_, +https://www.khronos.org/registry/spir-v/, +February 10, 2016. + +[[Khronos SPIR-V Specification]]:: J. Kessenich and B. Ouriel, _The Khronos +SPIR-V Specification, Version 1.00_, +https://www.khronos.org/registry/spir-v/, +February 10, 2016. diff --git a/doc/specs/vulkan/chapters/memory.txt b/doc/specs/vulkan/chapters/memory.txt new file mode 100644 index 00000000..b0844800 --- /dev/null +++ b/doc/specs/vulkan/chapters/memory.txt @@ -0,0 +1,768 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[memory]] += Memory Allocation + +{apiname} memory is broken up into two categories, _host memory_ and +_device memory_. + + +[[memory-host]] +== Host Memory + +Host memory is memory needed by the {apiname} implementation for +non-device-visible storage. This storage may: be used for e.g. internal +software structures. + +[[memory-allocation]] +{apiname} provides applications the opportunity to perform host memory +allocations on behalf of the {apiname} implementation. If this feature is +not used, the implementation will perform its own memory allocations. Since +most memory allocations are off the critical path, this is not meant as a +performance feature. Rather, this can: be useful for certain embedded +systems, for debugging purposes (e.g. putting a guard page after all host +allocations), or for memory allocation logging. + +Allocators are provided by the application as a pointer to a +sname:VkAllocationCallbacks structure: + +include::../structs/VkAllocationCallbacks.txt[] + + * pname:pUserData is a value to be interpreted by the implementation of + the callbacks. When any of the callbacks in sname:VkAllocationCallbacks + are called, the {apiname} implementation will pass this value as the + first parameter to the callback. This value can: vary each time an + allocator is passed into a command, even when the same object takes an + allocator in multiple commands. + * pname:pfnAllocation is a pointer to an application-defined memory + allocation function of type tlink:PFN_vkAllocationFunction. + * pname:pfnReallocation is a pointer to an application-defined memory + reallocation function of type tlink:PFN_vkReallocationFunction. + * pname:pfnFree is a pointer to an application-defined memory free + function of type tlink:PFN_vkFreeFunction. + * pname:pfnInternalAllocation is a pointer to an application-defined + function that is called by the implementation when the implementation + makes internal allocations, and it is of type + tlink:PFN_vkInternalAllocationNotification. + * pname:pfnInternalFree is a pointer to an application-defined function + that is called by the implementation when the implementation frees + internal allocations, and it is of type + tlink:PFN_vkInternalFreeNotification. + +include::../validity/structs/VkAllocationCallbacks.txt[] + +An allocator indicates an error condition by returning `NULL` from +pname:pfnAllocation or pname:pfnReallocation. If this occurs, the +implementation should: treat it as a run time error and should: report +ename:VK_ERROR_OUT_OF_HOST_MEMORY at the appropriate time for the +command in which the condition was detected, as described in +<>. + +The type of pname:pfnAllocation is: + +include::../funcpointers/PFN_vkAllocationFunction.txt[] + + * pname:pUserData is the value specified for + slink:VkAllocationCallbacks.pUserData in the allocator specified by the + application. + * pname:size is the size in bytes of the requested allocation. + * pname:alignment is the requested alignment of the allocation in bytes + and must: be a power of two. + * pname:allocationScope is a elink:VkSystemAllocationScope value + specifying the scope of the lifetime of the allocation, as described + <>. + +pname:pfnAllocation must: either return `NULL` (in case of allocation +failure or if pname:size is zero) or a valid pointer to a memory allocation +containing at least pname:size bytes, and with the pointer value being a +multiple of pname:alignment. + +The type of pname:pfnReallocation is: + +include::../funcpointers/PFN_vkReallocationFunction.txt[] + + * pname:pUserData is the value specified for + slink:VkAllocationCallbacks.pUserData in the allocator specified by the + application. + * pname:pOriginal must: be either `NULL` or a pointer previously returned + by pname:pfnReallocation or pname:pfnAllocation of the same allocator. + * pname:size is the size in bytes of the requested allocation. + * pname:alignment is the requested alignment of the allocation in bytes + and must: be a power of two. + * pname:allocationScope is a elink:VkSystemAllocationScope value + specifying the scope of the lifetime of the allocation, as described + <>. + +pname:pfnReallocation must: alter the size of the allocation +pname:pOriginal, either by shrinking or growing it, to accommodate the new +pname:size. + +If pname:pOriginal is `NULL`, then pname:pfnReallocation must: behave +similarly to tlink:PFN_vkAllocationFunction. If pname:size is zero, then +pname:pfnReallocation must: behave similarly to tlink:PFN_vkFreeFunction. +The contents of the original allocation from bytes zero to +latexmath:[$\min(\textrm{original size, new size})-1$], inclusive, must: be +preserved in the new allocation. If the new allocation is larger than the +old allocation, then the contents of the additional space are undefined. +If pname:pOriginal is non-`NULL`, pname:alignment must: be equal to the +originally requested alignment. If satisfying these requirements involves +creating a new allocation, then the old allocation must: be freed. If this +function fails, it must: return `NULL` and not free the old allocation. + +The type of pname:pfnFree is: + +include::../funcpointers/PFN_vkFreeFunction.txt[] + + * pname:pUserData is the value specified for + slink:VkAllocationCallbacks.pUserData in the allocator specified by the + application. + * pname:pMemory is the allocation to be freed. + +pname:pMemory may: be `NULL`, which the callback must: handle safely. If +pname:pMemory is non-`NULL`, it must: be a pointer previously allocated by +pname:pfnAllocation or pname:pfnReallocation and must: be freed by the +function. + +The type of pname:pfnInternalAllocation is: + +include::../funcpointers/PFN_vkInternalAllocationNotification.txt[] + + * pname:pUserData is the value specified for + slink:VkAllocationCallbacks.pUserData in the allocator specified by the + application. + * pname:size is the requested size of an allocation. + * pname:allocationType is the requested type of an allocation. + * pname:allocationScope is a elink:VkSystemAllocationScope value + specifying the scope of the lifetime of the allocation, as described + <>. + +This is a purely informational callback. + +The type of pname:pfnInternalFree is: + +include::../funcpointers/PFN_vkInternalFreeNotification.txt[] + + * pname:pUserData is the value specified for + slink:VkAllocationCallbacks.pUserData in the allocator specified by the + application. + * pname:size is the requested size of an allocation. + * pname:allocationType is the requested type of an allocation. + * pname:allocationScope is a elink:VkSystemAllocationScope value + specifying the scope of the lifetime of the allocation, as described + <>. + +[[memory-host-allocation-scope]] +Each allocation has a _scope_ which defines its lifetime and which object it +is associated with. The scope is provided in the pname:allocationScope +parameter and takes a value of type elink:VkSystemAllocationScope: + +include::../enums/VkSystemAllocationScope.txt[] + + * ename:VK_SYSTEM_ALLOCATION_SCOPE_COMMAND - The allocation is scoped to + the lifetime of the {apiname} command. + * ename:VK_SYSTEM_ALLOCATION_SCOPE_OBJECT - The allocation is scoped to + the lifetime of the {apiname} object that is being created or used. + * ename:VK_SYSTEM_ALLOCATION_SCOPE_CACHE - The allocation is scoped to the + lifetime of a sname:VkPipelineCache object. + * ename:VK_SYSTEM_ALLOCATION_SCOPE_DEVICE - The allocation is scoped to + the lifetime of the {apiname} device. + * ename:VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE - The allocation is scoped to + the lifetime of the {apiname} instance. + +Most {apiname} commands operate on a single object, or there is a sole +object that is being created or manipulated. When an allocation uses a scope +of ename:VK_SYSTEM_ALLOCATION_SCOPE_OBJECT or +ename:VK_SYSTEM_ALLOCATION_SCOPE_CACHE, the allocation is scoped to the +object being created or manipulated. + +When an implementation requires host memory, it will make callbacks to the +application using the most specific allocator and scope available: + + * If an allocation is scoped to the duration of a command, the allocator + will use the ename:VK_SYSTEM_ALLOCATION_SCOPE_COMMAND scope. The most + specific allocator available is used: if the object being created or + manipulated has an allocator, that object's allocator will be used, else + if the parent sname:VkDevice has an allocator it will be used, else if + the parent sname:VkInstance has an allocator it will be used. Else, + * If an allocation is associated with an object of type + sname:VkPipelineCache, the allocator will use the + ename:VK_SYSTEM_ALLOCATION_SCOPE_CACHE scope. The most specific + allocator available is used (pipeline cache, else device, else + instance). Else, + * If an allocation is scoped to the lifetime of an object, that object is + being created or manipulated by the command, and that object's type is + not sname:VkDevice or sname:VkInstance, the allocator will use a scope + of ename:VK_SYSTEM_ALLOCATION_SCOPE_OBJECT. The most specific allocator + available is used (object, else device, else instance). Else, + * If an allocation is scoped to the lifetime of a device, the allocator + will use scope of ename:VK_SYSTEM_ALLOCATION_SCOPE_DEVICE. The most + specific allocator available is used (device, else instance). Else, + * If the allocation is scoped to the lifetime of an instance and the + instance has an allocator, its allocator will be used with a scope of + ename:VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE. + * Otherwise an implementation will allocate memory through an alternative + mechanism that is unspecified. + +Objects that are allocated from pools do not specify their own allocator. +When an implementation requires host memory for such an object, that memory +is sourced from the object's parent pool's allocator. + +The application is not expected to handle allocating memory that is intended +for execution by the host due to the complexities of differing security +implementations across multiple platforms. The implementation will allocate +such memory internally and invoke an application provided informational +callback when these _internal allocations_ are allocated and freed. Upon +allocation of executable memory, pname:pfnInternalAllocation will be called. +Upon freeing executable memory, pname:pfnInternalFree will be called. An +implementation will only call an informational callback for executable +memory allocations and frees. + +The pname:allocationType parameter to the pname:pfnInternalAllocation and +pname:pfnInternalFree functions may: be one of the following values: + +include::../enums/VkInternalAllocationType.txt[] + + * ename:VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE - The allocation is + intended for execution by the host. + +An implementation must: only make calls into an application-provided +allocator from within the scope of an API command. An implementation must: +only make calls into an application-provided allocator from the same thread +that called the provoking API command. The implementation shouldnot: +synchronize calls to any of the callbacks. If synchronization is needed, the +callbacks must: provide it themselves. The informational callbacks are +subject to the same restrictions as the allocation callbacks. + +If an implementation intends to make calls through an +sname:VkAllocationCallbacks structure between the time a ftext:vkCreate* +command returns and the time a corresponding ftext:vkDestroy* command +begins, that implementation must: save a copy of the allocator before the +ftext:vkCreate* command returns. The callback functions and any data +structures they rely upon must: remain valid for the lifetime of the object +they are associated with. + +If an allocator is provided to a ftext:vkCreate* command, a _compatible_ +allocator must: be provided to the corresponding ftext:vkDestroy* command. +Two sname:VkAllocationCallbacks structures are compatible if memory created +with pname:pfnAllocation or pname:pfnReallocation in each can: be freed with +pname:pfnReallocation or pname:pfnFree in the other. An allocator mustnot: +be provided to a ftext:vkDestroy* command if an allocator was not provided +to the corresponding ftext:vkCreate* command. + +If a non-`NULL` allocator is used, the pname:pfnAllocation, +pname:pfnReallocation and pname:pfnFree members must: be non-`NULL` and +point to valid implementations of the callbacks. An application can: choose +to not provide informational callbacks by setting both +pname:pfnInternalAllocation and pname:pfnInternalFree to `NULL`. +pname:pfnInternalAllocation and pname:pfnInternalFree must: either both be +`NULL` or both be non-`NULL`. + +If pname:pfnAllocation or pname:pfnReallocation fail, the implementation +may: fail object creation and/or generate an +ename:VK_ERROR_OUT_OF_HOST_MEMORY error, as appropriate. + +The following sets of rules define when an implementation is permitted to +call the allocator callbacks. + +pname:pfnAllocation or pname:pfnReallocation may: be called in the following +situations: + + * Host memory scoped to the lifetime of a sname:VkDevice or + sname:VkInstance may: be allocated from any API command. + * Host memory scoped to the lifetime of a sname:VkPipelineCache may: only + be allocated from: + ** fname:vkCreatePipelineCache + ** fname:vkMergePipelineCaches for pname:dstCache + ** fname:vkCreateGraphicsPipelines for pname:pPipelineCache + ** fname:vkCreateComputePipelines for pname:pPipelineCache + * Host memory scoped to the lifetime of a sname:VkDescriptorPool may: only + be allocated from: + ** any command that takes the pool as a direct argument + ** fname:vkAllocateDescriptorSets for the pname:descriptorPool member of + its pname:pAllocateInfo parameter + ** fname:vkCreateDescriptorPool + * Host memory scoped to the lifetime of a sname:VkCommandPool may: only be + allocated from: + ** any command that takes the pool as a direct argument + ** fname:vkCreateCommandPool + ** fname:vkAllocateCommandBuffers for the pname:commandPool member of its + pname:pAllocateInfo parameter + ** any ftext:vkCmd* command whose pname:commandBuffer was created from + that sname:VkCommandPool + * Host memory scoped to the lifetime of any other object may: only be + allocated in that object's ftext:vkCreate* command. + +pname:pfnFree may: be called in the following situations: + + * Host memory scoped to the lifetime of a sname:VkDevice or + sname:VkInstance may: be freed from any API command. + * Host memory scoped to the lifetime of a sname:VkPipelineCache may: be + freed from fname:vkDestroyPipelineCache. + * Host memory scoped to the lifetime of a sname:VkDescriptorPool may: be + freed from + ** any command that takes the pool as a direct argument + * Host memory scoped to the lifetime of a sname:VkCommandPool may: be + freed from: + ** any command that takes the pool as a direct argument + ** fname:vkResetCommandBuffer whose pname:commandBuffer was created from + that sname:VkCommandPool + * Host memory scoped to the lifetime of any other object may: be freed in + that object's ftext:vkDestroy* command. + * Any command that allocates host memory may: also free host memory of the + same scope. + + +[[memory-device]] +== Device Memory + +Device memory is memory that is visible to the device, for example the +contents of opaque images that can: be natively used by the device, or +uniform buffer objects that reside in on-device memory. + +The memory properties of the physical device describe the memory heaps and +memory types available to a physical device. These can: be queried by +calling: + +include::../protos/vkGetPhysicalDeviceMemoryProperties.txt[] + + * pname:physicalDevice is the handle to the device to query. + * pname:pMemoryProperties points to an instance of + sname:VkPhysicalDeviceMemoryProperties structure in which the properties + are returned. + +include::../validity/protos/vkGetPhysicalDeviceMemoryProperties.txt[] + +The definition of sname:VkPhysicalDeviceMemoryProperties is: + +include::../structs/VkPhysicalDeviceMemoryProperties.txt[] + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +TODO (Jon) - Need to restructure description like other structs. +==== +endif::editing-notes[] + +include::../validity/structs/VkPhysicalDeviceMemoryProperties.txt[] + +The sname:VkPhysicalDeviceMemoryProperties structure describes a number of +_memory heaps_ as well as a number of _memory types_ that can: be used to +access memory allocated in those heaps. Each heap describes a memory +resource of a particular size, and each memory type describes a set of +memory properties (e.g. host cached vs uncached) that can: be used with a +given memory heap. Allocations using a particular memory type will consume +resources from the heap indicated by that memory type's heap index. More +than one memory type may: share each heap, and the heaps and memory types +provide a mechanism to advertise an accurate size of the physical memory +resources while allowing the memory to be used with a variety of different +properties. + +The number of memory heaps is given by pname:memoryHeapCount and is less +than or equal to ename:VK_MAX_MEMORY_HEAPS. Each heap is described by an +element of the pname:memoryHeaps array, as a sname:VkMemoryHeap structure. +The number of memory types available across all memory heaps is given by +pname:memoryTypeCount and is less than or equal to +ename:VK_MAX_MEMORY_TYPES. Each memory type is described by an element of +the pname:memoryTypes array, as a sname:VkMemoryType structure. + +The definition of sname:VkMemoryHeap is: + +include::../structs/VkMemoryHeap.txt[] + + * pname:size is the total memory size in bytes in the heap. + * pname:flags is a bitmask of attribute flags for the heap. The bits + specified in pname:flags are: ++ +include::../enums/VkMemoryHeapFlagBits.txt[] + + ** if pname:flags contains ename:VK_MEMORY_HEAP_DEVICE_LOCAL_BIT, it means + the heap corresponds to device local memory. Device local memory may: + have different performance characteristics than host local memory, and + may: support different memory property flags. + +include::../validity/structs/VkMemoryHeap.txt[] + +In a unified memory architecture (UMA) system, there is often only a single +memory heap which is considered to be equally ``local'' to the host and to +the device. If there is only one heap, that heap must: be marked as +ename:VK_MEMORY_HEAP_DEVICE_LOCAL_BIT. If there are multiple heaps that all +have similar performance characteristics, they may: all be marked as +ename:VK_MEMORY_HEAP_DEVICE_LOCAL_BIT, but at least one will be device +local. + +The definition of sname:VkMemoryType is: + +include::../structs/VkMemoryType.txt[] + + * pname:heapIndex describes which memory heap this memory type + corresponds to, and must: be less than pname:memoryHeapCount from the + sname:VkPhysicalDeviceMemoryProperties structure. + * pname:propertyFlags is a bitmask of properties for this memory type. The + bits specified in pname:propertyFlags are: ++ +include::../enums/VkMemoryPropertyFlagBits.txt[] + + ** if pname:propertyFlags has the + ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT bit set, memory allocated + with this type is the most efficient for device access. This property + will only be set for memory types belonging to heaps with the + ename:VK_MEMORY_HEAP_DEVICE_LOCAL_BIT set. + ** if pname:propertyFlags has the + ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT bit set, memory allocated + with this type can: be mapped using flink:vkMapMemory so that it can: + be accessed on the host. + ** if pname:propertyFlags has the + ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT bit set, host cache + management commands fname:vkFlushMappedMemoryRanges and + fname:vkInvalidateMappedMemoryRanges are not needed to make host writes + visible to the device or device writes visible to the host, + respectively. + ** if pname:propertyFlags has the + ename:VK_MEMORY_PROPERTY_HOST_CACHED_BIT bit set, memory allocated + with this type is cached on the host. Host memory accesses to + uncached memory are slower than to cached memory, however uncached + memory is always host coherent. + ** if pname:propertyFlags has the + ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set, the memory type + only allows device access to the memory. Memory types mustnot: have + both ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT and + ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT set. Additionally, + the object's backing memory may: be provided by the implementation + lazily as specified in <>. + +include::../validity/structs/VkMemoryType.txt[] + +Each memory type returned by flink:vkGetPhysicalDeviceMemoryProperties must: +have its pname:propertyFlags set to one of the following values: + + * 0 + * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT + * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT + * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | ename:VK_MEMORY_PROPERTY_HOST_CACHED_BIT + * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | ename:VK_MEMORY_PROPERTY_HOST_CACHED_BIT | ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT + * ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT + * ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | ename:VK_MEMORY_PROPERTY_HOST_CACHED_BIT + * ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | ename:VK_MEMORY_PROPERTY_HOST_CACHED_BIT | ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT + * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT + +It is guaranteed that there is at least one memory type that has its +pname:propertyFlags with the ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT bit +set and the ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT bit set. + +The memory types are sorted according to a partial order which serves to aid +in easily selecting an appropriate memory type. Given two memory types X and +Y, the partial order defines latexmath:[$X \leq Y$] if: + + * the memory property bits set for X are a subset of the memory property + bits set for Y. Or, + * the memory property bits set for X are the same as the memory property + bits set for Y, and X uses a memory heap with greater or equal + performance (as determined in an implementation-specific manner). + +Memory types are ordered in the list such that X is assigned a lesser +pname:memoryTypeIndex than Y if latexmath:[$X \leq Y$] according to the +partial order. Note that the list of all allowed memory property flag +combinations above satisfies this partial order, but other orders would as +well. The goal of this ordering is to enable applications to use a simple +search loop in selecting the proper memory type, along the lines of: + +[source,{basebackend@docbook:c++:cpp}] +--------------------------------------------------- +// Searching for the best match for "properties" +for (i = 0; i < memoryTypeCount; ++i) + if ((memoryTypes[i].propertyFlags & properties) == properties) + return i; +--------------------------------------------------- + +This loop will find the first entry that has all bits requested in +code:properties set. If there is no exact match, it will find a closest +match (i.e. a memory type with the fewest additional bits set), which has +some additional bits set but which are not detrimental to the behaviors +requested by code:properties. If there are multiple heaps with the same +properties, it will choose the most performant memory. + +A {apiname} device operates on data in device memory via memory objects that +are represented in the API by a sname:VkDeviceMemory handle. Memory objects +are allocated by calling fname:vkAllocateMemory: + +include::../protos/vkAllocateMemory.txt[] + + * pname:device is the logical device that owns the memory. + * pname:pAllocateInfo is a pointer to a structure of type + slink:VkMemoryAllocateInfo, which contains parameters of the allocation. + A successful returned allocation must: use the requested parameters--no + substitution is permitted by the implementation. + * pname:pAllocator controls host memory allocation as described in + the <> chapter. + * pname:pMemory is a pointer to a sname:VkDeviceMemory structure in which + information about the allocated memory is returned. + +include::../validity/protos/vkAllocateMemory.txt[] + +sname:VkMemoryAllocateInfo is defined as: + +include::../structs/VkMemoryAllocateInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:allocationSize is the size of the allocation in bytes + * pname:memoryTypeIndex is the memory type index, which selects the + properties of the memory to be allocated, as well as the heap the memory + will come from. + +include::../validity/structs/VkMemoryAllocateInfo.txt[] + +Allocations returned by fname:vkAllocateMemory are guaranteed to meet any +alignment requirement by the implementation. For example, if an +implementation requires 128 byte alignment for images and 64 byte alignment +for buffers, the device memory returned through this mechanism would be +128-byte aligned. This ensures that applications can: correctly suballocate +objects of different types (with potentially different alignment +requirements) in the same memory object. + +When memory is allocated, its contents are undefined. + +There is an implementation-dependent maximum number of memory allocations +which can: be simultaneously created on a device. This is specified by the +<> +member of the sname:VkPhysicalDeviceLimits structure. If +pname:maxMemoryAllocationCount is exceeded, fname:vkAllocateMemory will +return ename:VK_ERROR_TOO_MANY_OBJECTS. + +[NOTE] +.Note +==== +Some platforms may: have a limit on the maximum size of a single allocation. +For example, certain systems may: fail to create allocations with a size +greater than or equal to 4GB. Such a limit is implementation-dependent, and +if such a failure occurs then the error ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +should: be returned. +==== + +A memory object is freed by calling: + +include::../protos/vkFreeMemory.txt[] + + * pname:device is the logical device that owns the memory. + * pname:memory is the sname:VkDeviceMemory object to be freed. + * pname:pAllocator controls host memory allocation as described in + the <> chapter. + +include::../validity/protos/vkFreeMemory.txt[] + +Before freeing a memory object, an application must: ensure the +memory object is no longer in use by the device--for example by command +buffers queued for execution. The memory can: remain bound to images or +buffers at the time the memory object is freed, but any further use of them +(on host or device) for anything other than destroying those objects will +result in undefined behavior. If there are still any bound images or +buffers, the memory maynot: be immediately released by the implementation, +but must: be released by the time all bound images and buffers have been +destroyed. Once memory is released, it is returned to the heap from which it +was allocated. + +How memory objects are bound to Images and Buffers is described in detail in +the <> section. + + +[[memory-device-hostaccess]] +=== Host Access to Device Memory Objects + +Memory objects created with fname:vkAllocateMemory are not directly host +accessible. + +Memory objects created with the memory property +ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT are considered _mappable_. Memory +objects must: be mappable in order to be successfully mapped on the host. An +application retrieves a host virtual address pointer to a region of a +mappable memory object by calling: + +include::../protos/vkMapMemory.txt[] + + * pname:device is the logical device that owns the memory. + * pname:memory is the sname:VkDeviceMemory object to be mapped. + * pname:offset is a zero-based byte offset from the beginning of the + memory object. + * pname:size is the size of the memory range to map, or + ename:VK_WHOLE_SIZE to map from pname:offset to the end of the + allocation. + * pname:flags is reserved for future use, and must: be zero. + * pname:ppData points to a pointer in which is returned a host-accessible + pointer to the beginning of the mapped range. This pointer minus + pname:offset must: be aligned to at least + sname:VkPhysicalDeviceLimits::pname:minMemoryMapAlignment. + +include::../validity/protos/vkMapMemory.txt[] + +It is an application error to call fname:vkMapMemory on a memory object that +is already mapped. + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +TODO (Tobias) - There's a circular section reference in this next section. +The information is all covered by both places, but it seems a bit weird to +have them reference each other. Not sure how to resolve it. +==== +endif::editing-notes[] + +[[memory-device-hostaccess-hazards]] +fname:vkMapMemory does not check whether the device memory is currently in +use before returning the host-accessible pointer. The application +must: guarantee that any previously submitted command that writes to this +sub-range has completed before the host reads from or writes to that +sub-range, and that any previously submitted command that reads from that +sub-range has completed before the host writes to that region (see +<> +for details on fulfilling such a guarantee). If the device memory was +allocated without the ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT set, +these guarantees must: be made for an extended sub-range: the application +must: round down the start of the sub-range to the previous multiple of +sname:VkPhysicalDeviceLimits::pname:nonCoherentAtomSize, and round the end +of the range up to the nearest multiple of +sname:VkPhysicalDeviceLimits::pname:nonCoherentAtomSize. + +While a range of device memory is mapped for host access, the application +is responsible for synchronizing both device and host access to that memory +range. + +[NOTE] +.Note +==== +It is important for the application developer to become meticulously +familiar with all of the mechanisms described in the chapter on +<> as they are crucial +to maintaining memory access ordering. +==== + +Host-visible memory types that advertise the +ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT property still require +<> between host and +device in order to be coherent, but do not require additional cache +management operations (fname:vkFlushMappedMemoryRanges or +fname:vkInvalidateMappedMemoryRanges) to achieve coherency. For host writes +to be seen by subsequent command buffer operations, a pipeline barrier from +a source of ename:VK_ACCESS_HOST_WRITE_BIT and +ename:VK_PIPELINE_STAGE_HOST_BIT to a destination of the relevant device +pipeline stages and access types must: be performed. Note that such a +barrier is performed +<> upon each +command buffer submission, so an explicit barrier is only rarely needed +(e.g. if a command buffer waits upon an event signaled by the host, where +the host wrote some data after submission). For device writes to be seen by +subsequent host reads, a pipeline barrier is required: to +<>. + +In order to enable applications to work with non-coherent memory +allocations, two entry points are provided. To flush host write caches, an +application must: use fname:vkFlushMappedMemoryRanges, while +fname:vkInvalidateMappedMemoryRanges allows invalidating host input caches +so that device writes become visible to the host. +fname:vkFlushMappedMemoryRanges must: be called after the host writes to +non-coherent memory have completed and before command buffers that will read +or write any of those memory locations are submitted to a queue. Similarly, +fname:vkInvalidateMappedMemoryRanges must: be called after command buffers +that execute and flush (via memory barriers) the device writes have +completed, and before the host will read or write any of those locations. + +include::../protos/vkFlushMappedMemoryRanges.txt[] + + * pname:device is the logical device that owns the memory ranges. + * pname:memoryRangeCount is the length of the pname:pMemoryRanges array. + * pname:pMemoryRanges is a pointer to an array of + slink:VkMappedMemoryRange structures describing the memory ranges to + flush. + +include::../validity/protos/vkFlushMappedMemoryRanges.txt[] + +include::../protos/vkInvalidateMappedMemoryRanges.txt[] + + * pname:device is the logical device that owns the memory ranges. + * pname:memoryRangeCount is the length of the pname:pMemoryRanges array. + * pname:pMemoryRanges is a pointer to an array of + slink:VkMappedMemoryRange structures describing the memory ranges to + invalidate. + +include::../validity/protos/vkInvalidateMappedMemoryRanges.txt[] + +sname:VkMappedMemoryRange is defined as: + +include::../structs/VkMappedMemoryRange.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:memory is the memory object to which this range belongs. + * pname:offset is the zero-based byte offset from the beginning of the + memory object. + * pname:size is either the size of range, or ename:VK_WHOLE_SIZE to affect + the range from pname:offset to the end of the current mapping of the + allocation. + +include::../validity/structs/VkMappedMemoryRange.txt[] + +[NOTE] +.Note +==== +If the memory object was created with the +ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT set, +fname:vkFlushMappedMemoryRanges and fname:vkInvalidateMappedMemoryRanges are +unnecessary and may: have performance cost. +==== + +Once host access to a memory object is no longer needed by the application, +it can: be unmapped by calling : + +include::../protos/vkUnmapMemory.txt[] + + * pname:device is the logical device that owns the memory. + * pname:memory is the memory object to be unmapped. + +include::../validity/protos/vkUnmapMemory.txt[] + + +[[memory-device-lazy_allocation]] +=== Lazily Allocated Memory + +If the memory object is allocated from a heap with the +ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set, that object's backing +memory may: be provided by the implementation lazily. The actual committed +size of the memory may: initially be as small as zero (or as large as the +requested size), and monotonically increases as additional memory is +needed. + +A memory type with this flag set is only allowed to be bound to a +sname:VkImage whose usage flags include +ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT. + +[NOTE] +.Note +==== +Using lazily allocated memory objects for framebuffer attachments that +are not needed once a render pass instance has completed may: allow some +implementations to never allocate memory for such attachments. +==== + +Determining the amount of lazily-allocated memory that is currently +committed for a memory object is achieved by calling: + +include::../protos/vkGetDeviceMemoryCommitment.txt[] + + * pname:device is the logical device that owns the memory. + * pname:memory is the memory object being queried. + * pname:pCommittedMemoryInBytes is a pointer to a basetype:VkDeviceSize + value in which the number of bytes currently committed is returned, on + success. + +include::../validity/protos/vkGetDeviceMemoryCommitment.txt[] + +The implementation may: update the commitment at any time, and the +value returned by this query may: be out of date. + +The implementation guarantees to allocate any committed memory from the +heapIndex indicated by the memory type that the memory object was created +with. + diff --git a/doc/specs/vulkan/chapters/pipelines.txt b/doc/specs/vulkan/chapters/pipelines.txt new file mode 100644 index 00000000..995a268a --- /dev/null +++ b/doc/specs/vulkan/chapters/pipelines.txt @@ -0,0 +1,863 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[pipelines]] += Pipelines + +The following <> shows a block diagram of +the {apiname} pipelines. Some {apiname} commands specify geometric objects +to be drawn or computational work to be performed, while others specify +state controlling how objects are handled by the various pipeline stages, or +control data transfer between memory organized as images and buffers. +Commands are effectively sent through a processing pipeline, either a +_graphics pipeline_ or a _compute pipeline_. + +The first stage of the <> +(<>) assembles vertices to form +geometric primitives such as points, lines, and triangles, based on a +requested primitive topology. In the next stage (<>) vertices can: be transformed, computing positions and attributes +for each vertex. If <> and/or +<> shaders are supported, they can: then generate +multiple primitives from a single input primitive, possibly changing the +primitive topology or generating additional attribute data in the process. + +The final resulting primitives are <> to a +clip volume in preparation for the next stage, <>. +The rasterizer produces a series of framebuffer addresses and values using a +two-dimensional description of a point, line segment, or triangle. Each +_fragment_ so produced is fed to the next stage (<>) that performs operations on individual fragments before they +finally alter the framebuffer. These operations include conditional updates +into the framebuffer based on incoming and previously stored depth values +(to effect <>), +<> of incoming fragment colors with stored +colors, as well as <>, +<>, and other <> on fragment values. + +Framebuffer operations read and write the color and depth/stencil +attachments of the framebuffer for a given subpass of a +<>. The attachments can: be used as input +attachments in the fragment shader in a later subpass of the same render +pass. + +The <> is a separate pipeline from the +graphics pipeline, which operates on one-, two-, or three-dimensional +_work groups_ which can: read from and write to buffer and image memory. + +This ordering is meant only as a tool for describing {apiname}, not as a +strict rule of how {apiname} is implemented, and we present it only as a +means to organize the various operations of the pipelines. + +[[pipelines-block-diagram]] +image::images/pipeline.{svgpdf}[title="Block diagram of the Vulkan pipeline",width="{svgpdf@pdf:500:800}",align="center"] + +Each pipeline is controlled by a monolithic object created from a +description of all of the shader stages and any relevant fixed-function +stages. <> the whole pipeline together allows +the optimization of shaders based on their input/outputs and eliminates +expensive draw time state validation. + +A pipeline object is bound to the device state in command buffers. Any +pipeline object state that is marked as dynamic is not applied to the device +state when the pipeline is bound. Dynamic state not set by binding the +pipeline object can: be modified at any time and persists for the lifetime +of the command buffer, or until modified by another dynamic state command or +another pipeline bind. No state, including dynamic state, is inherited from +one command buffer to another. Only dynamic state that is required: for the +operations performed in the command buffer needs to be set. For example, if +blending is disabled by the pipeline state then the dynamic color blend +constants do not need to be specified in the command buffer, even if this +state is marked as dynamic in the pipeline state object. If a new pipeline +object is bound with state not marked as dynamic after a previous pipeline +object with that same state as dynamic, the new pipeline object state will +override the dynamic state. Modifying dynamic state that is not set as +dynamic by the pipeline state object will lead to undefined results. + + +[[pipelines-compute]] +== Compute Pipelines + +Compute pipelines consist of a single static compute shader stage and the +pipeline layout. + +The compute pipeline encapsulates a compute shader and is created by calling +fname:vkCreateComputePipelines with pname:module and pname:pName selecting +an entry point from a shader module, where that entry point defines a valid +compute shader, in the sname:VkPipelineShaderStageCreateInfo structure +contained within the sname:VkComputePipelineCreateInfo structure. + +Compute pipelines are created by calling: + +include::../protos/vkCreateComputePipelines.txt[] + + * pname:device is the logical device that creates the compute pipelines. + * pname:pipelineCache is either sname:VK_NULL_HANDLE, indicating that + pipeline caching is disabled; or the handle of a valid + <> object, in which case use of that + cache is enabled for the duration of the command. + * pname:createInfoCount is the length of the pname:pCreateInfos and + pname:Pipelines arrays. + * pname:pCreateInfos is an array of sname:VkComputePipelineCreateInfo + structures. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pPipelines is a pointer to an array in which the resulting compute + pipeline objects are returned. ++ +-- +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +TODO (Jon) - Should we say something like ``the i'th element of the +pname:pPipelines array is created based on the corresponding element of the +pname:pCreateInfos array''? Also for flink:vkCreateGraphicsPipelines below. +==== +endif::editing-notes[] +-- + +include::../validity/protos/vkCreateComputePipelines.txt[] + +The definition of sname:VkComputePipelineCreateInfo is: + +include::../structs/VkComputePipelineCreateInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags provides options for pipeline creation, and is of type + elink:VkPipelineCreateFlagBits. + * pname:stage is a slink:VkPipelineShaderStageCreateInfo describing the + compute shader. + * pname:layout is the description of binding locations used by both the + pipeline and descriptor sets used with the pipeline. + * pname:basePipelineHandle is a pipeline to derive from + * pname:basePipelineIndex is an index into the pname:pCreateInfos + parameter to use as a pipeline to derive from + +include::../validity/structs/VkComputePipelineCreateInfo.txt[] + +The parameters pname:basePipelineHandle and pname:basePipelineIndex are +described in more detail in +<>. + +The parameter pname:stage member of type +sname:VkPipelineShaderStageCreateInfo is: + +include::../structs/VkPipelineShaderStageCreateInfo.txt[] + +The members of the sname:VkPipelineShaderStageCreateInfo structure are as +follows: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:stage is a elink:VkShaderStageFlagBits naming the pipeline stage. + * pname:module is a sname:VkShaderModule object that contains the + shader for this stage. + * pname:pName is a null-terminated UTF-8 string specifying the entry point + name of the shader for this stage. + * pname:pSpecializationInfo is a pointer to slink:VkSpecializationInfo, as + described in <>, and can: be `NULL`. + +include::../validity/structs/VkPipelineShaderStageCreateInfo.txt[] + +The elink:VkShaderStageFlagBits flags are defined as: + +include::../enums/VkShaderStageFlagBits.txt[] + + +[[pipelines-graphics]] +== Graphics Pipelines + +Graphics pipelines consist of multiple shader stages, multiple +fixed-function pipeline stages, and a pipeline layout, and are created by +calling fname:vkCreateGraphicsPipelines: + +include::../protos/vkCreateGraphicsPipelines.txt[] + + * pname:device is the logical device that creates the graphics pipelines. + * pname:pipelineCache is either sname:VK_NULL_HANDLE, indicating that + pipeline caching is disabled; or the handle of a valid + <> object, in which case use of that + cache is enabled for the duration of the command. + * pname:createInfoCount is the length of the pname:pCreateInfos and + pname:Pipelines arrays. + * pname:pCreateInfos is an array of sname:VkGraphicsPipelineCreateInfo + structures. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pPipelines is a pointer to an array in which the resulting + graphics pipeline objects are returned. + +include::../validity/protos/vkCreateGraphicsPipelines.txt[] + +The sname:VkGraphicsPipelineCreateInfo structure includes an array of shader +create info structures containing all the desired active shader stages, as +well as creation info to define all relevant fixed-function stages, and a +pipeline layout. The definition of sname:VkGraphicsPipelineCreateInfo is: + +include::../structs/VkGraphicsPipelineCreateInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is a bitfield of elink:VkPipelineCreateFlagBits controlling + how the pipeline will be generated, as described below. + * pname:stageCount is the number of entries in the pname:pStages array. + * pname:pStages is an array of size pname:stageCount structures of type + slink:VkPipelineShaderStageCreateInfo describing the set of the shader + stages to be included in the graphics pipeline. + * pname:pVertexInputState is a pointer to an instance of the + slink:VkPipelineVertexInputStateCreateInfo structure. + * pname:pInputAssemblyState is a pointer to an instance of the + slink:VkPipelineInputAssemblyStateCreateInfo structure which determines + input assembly behavior, as described in <>. + * pname:pTessellationState is a pointer to an instance of the + slink:VkPipelineTessellationStateCreateInfo structure, or `NULL` if the + pipeline does not include a tessellation control shader stage and + tessellation evaluation shader stage. + * pname:pViewportState is a pointer to an instance of the + slink:VkPipelineViewportStateCreateInfo structure, or `NULL` if the + pipeline has rasterization disabled. + * pname:pRasterState is a pointer to an instance of the + slink:VkPipelineRasterizationStateCreateInfo structure. + * pname:pMultisampleState is a pointer to an instance of the + slink:VkPipelineMultisampleStateCreateInfo, or `NULL` if the pipeline + has rasterization disabled. + * pname:pDepthStencilState is a pointer to an instance of the + slink:VkPipelineDepthStencilStateCreateInfo structure, or `NULL` if the + pipeline has rasterization disabled or if the subpass of the render pass + the pipeline is created against does not use a depth/stencil attachment. + * pname:pColorBlendState is a pointer to an instance of the + slink:VkPipelineColorBlendStateCreateInfo structure, or `NULL` if the + pipeline has rasterization disabled or if the subpass of the render pass + the pipeline is created against does not use any color attachments. + * pname:pDynamicState is a pointer to + slink:VkPipelineDynamicStateCreateInfo and is used to indicate which + properties of the pipeline state object are dynamic and can: be changed + independently of the pipeline state. This can: be `NULL`, which means no + state in the pipeline is considered dynamic. + * pname:layout is the description of binding locations used by both the + pipeline and descriptor sets used with the pipeline. + * pname:renderPass is a handle to a render pass object describing the + environment in which the pipeline will be used; the pipeline can: be + used with an instance of any render pass compatible with the one + provided. See <> for + more information. + * pname:subpass is the index of the subpass in pname:renderPass where this + pipeline will be used. + * pname:basePipelineHandle is a pipeline to derive from. + * pname:basePipelineIndex is an index into the pname:pCreateInfos + parameter to use as a pipeline to derive from. + +include::../validity/structs/VkGraphicsPipelineCreateInfo.txt[] + +The parameters pname:basePipelineHandle and pname:basePipelineIndex are +described in more detail in +<>. + +pname:pStages points to an array of slink:VkPipelineShaderStageCreateInfo +structures, which were previously described in +<>. + +Bits which can: be set in pname:flags are: + +include::../enums/VkPipelineCreateFlagBits.txt[] + + * ename:VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT specifies that the + created pipeline will not be optimized. Using this flag may: reduce + the time taken to create the pipeline. + * ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT specifies that the + pipeline to be created is allowed to be the parent of a pipeline that + will be created in a subsequent call to flink:vkCreateGraphicsPipelines. + * ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT specifies that the pipeline to + be created will be a child of a previously created parent pipeline. + +It is valid to set both ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT and +ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT. This allows a pipeline to be both a +parent and possibly a child in a pipeline hierarchy. See +<> for more +information. + +The definition of the pname:pDynamicState member of type +sname:VkPipelineDynamicStateCreateInfo is: + +include::../structs/VkPipelineDynamicStateCreateInfo.txt[] + +The members of the sname:VkPipelineDynamicStateCreateInfo structure are as +follows: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:dynamicStateCount is the number of elements in the + pname:pDynamicStates array. + * pname:pDynamicStates is an array of elink:VkDynamicState enums which + indicate which pieces of pipeline state will use the values from dynamic + state commands rather than from the pipeline state creation info. + +include::../validity/structs/VkPipelineDynamicStateCreateInfo.txt[] + +The definition of the elink:VkDynamicState enumeration is as follows: + +include::../enums/VkDynamicState.txt[] + + * ename:VK_DYNAMIC_STATE_VIEWPORT indicates that the pname:pViewports + state in sname:VkPipelineViewportStateCreateInfo will be ignored and + must: be set dynamically with flink:vkCmdSetViewport before any draw + commands. The number of viewports used by a pipeline is still + specified by the pname:viewportCount member of + sname:VkPipelineViewportStateCreateInfo. + * ename:VK_DYNAMIC_STATE_SCISSOR indicates that the pname:pScissors + state in sname:VkPipelineViewportStateCreateInfo will be ignored and + must: be set dynamically with flink:vkCmdSetScissor before any draw + commands. The number of scissor rectangles used by a pipeline is still + specified by the pname:scissorCount member of + sname:VkPipelineViewportStateCreateInfo. + * ename:VK_DYNAMIC_STATE_LINE_WIDTH indicates that the pname:lineWidth + state in sname:VkPipelineRasterizationStateCreateInfo will be ignored + and must: be set dynamically with flink:vkCmdSetLineWidth before any + draw commands that generate line primitives for the rasterizer. + * ename:VK_DYNAMIC_STATE_DEPTH_BIAS indicates that the + pname:depthBiasConstantFactor, pname:depthBiasClamp and + pname:depthBiasSlopeFactor states in + sname:VkPipelineRasterizationStateCreateInfo will be ignored and must: + be set dynamically with flink:vkCmdSetDepthBias before any draws are + performed with pname:depthBiasEnable in + sname:VkPipelineRasterizationStateCreateInfo set to ename:VK_TRUE. + * ename:VK_DYNAMIC_STATE_BLEND_CONSTANTS indicates that the + pname:blendConstants state in + sname:VkPipelineColorBlendStateCreateInfo will be ignored and must: be + set dynamically with flink:vkCmdSetBlendConstants before any draws are + performed with a pipeline state with + sname:VkPipelineColorBlendAttachmentState member pname:blendEnable set + to ename:VK_TRUE and any of the blend functions using a constant blend + color. + * ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS indicates that the + pname:minDepthBounds and pname:maxDepthBounds states of + slink:VkPipelineDepthStencilStateCreateInfo will be ignored and must: + be set dynamically with flink:vkCmdSetDepthBounds before any draws are + performed with a pipeline state with + sname:VkPipelineDepthStencilStateCreateInfo member + pname:depthBoundsTestEnable set to ename:VK_TRUE. + * ename:VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK indicates that the + pname:compareMask state in + sname:VkPipelineDepthStencilStateCreateInfo for both pname:front and + pname:back will be ignored and must: be set dynamically with + flink:vkCmdSetStencilCompareMask before any draws are performed with a + pipeline state with sname:VkPipelineDepthStencilStateCreateInfo member + pname:stencilTestEnable set to ename:VK_TRUE + * ename:VK_DYNAMIC_STATE_STENCIL_WRITE_MASK indicates that the + pname:writeMask state in sname:VkPipelineDepthStencilStateCreateInfo + for both pname:front and pname:back will be ignored and must: be set + dynamically with flink:vkCmdSetStencilWriteMask before any draws are + performed with a pipeline state with + sname:VkPipelineDepthStencilStateCreateInfo member + pname:stencilTestEnable set to ename:VK_TRUE + * ename:VK_DYNAMIC_STATE_STENCIL_REFERENCE indicates that the + pname:reference state in sname:VkPipelineDepthStencilStateCreateInfo + for both pname:front and pname:back will be ignored and must: be set + dynamically with flink:vkCmdSetStencilReference before any draws are + performed with a pipeline state with + sname:VkPipelineDepthStencilStateCreateInfo member + pname:stencilTestEnable set to ename:VK_TRUE + +If tessellation shader stages are omitted, the tessellation shading and +fixed-function stages of the pipeline are skipped. + +If a geometry shader is omitted, the geometry shading stage is skipped. + +If a fragment shader is omitted, the results of fragment processing are +undefined. Specifically, any fragment color outputs +are considered to have undefined values, and the fragment depth is +considered to be unmodified. This can: be useful for depth-only rendering. + +Presence of a shader stage in a pipeline is indicated by including a valid +sname:VkPipelineShaderStageCreateInfo with pname:module and pname:pName +selecting an entry point from a shader module, where that entry point is +valid for the stage specified by pname:stage. + +Presence of some of the fixed-function stages in the pipeline is implicitly +derived from enabled shaders and provided state. For example, the +fixed-function tessellator is always present when the pipeline has valid +Tessellation Control and Tessellation Evaluation shaders. + +.For example: + * Depth/stencil-only rendering in a subpass with no color attachments + ** Active Pipeline Shader Stages + *** Vertex Shader + ** Required: Fixed-Function Pipeline Stages + *** slink:VkPipelineVertexInputStateCreateInfo + *** slink:VkPipelineInputAssemblyStateCreateInfo + *** slink:VkPipelineViewportStateCreateInfo + *** slink:VkPipelineRasterizationStateCreateInfo + *** slink:VkPipelineMultisampleStateCreateInfo + *** slink:VkPipelineDepthStencilStateCreateInfo + * Color-only rendering in a subpass with no depth/stencil attachment + ** Active Pipeline Shader Stages + *** Vertex Shader + *** Fragment Shader + ** Required: Fixed-Function Pipeline Stages + *** slink:VkPipelineVertexInputStateCreateInfo + *** slink:VkPipelineInputAssemblyStateCreateInfo + *** slink:VkPipelineViewportStateCreateInfo + *** slink:VkPipelineRasterizationStateCreateInfo + *** slink:VkPipelineMultisampleStateCreateInfo + *** slink:VkPipelineColorBlendStateCreateInfo + * Rendering pipeline with tessellation and geometry shaders + ** Active Pipeline Shader Stages + *** Vertex Shader + *** Tessellation Control Shader + *** Tessellation Evaluation Shader + *** Geometry Shader + *** Fragment Shader + ** Required: Fixed-Function Pipeline Stages + *** slink:VkPipelineVertexInputStateCreateInfo + *** slink:VkPipelineInputAssemblyStateCreateInfo + *** slink:VkPipelineTessellationStateCreateInfo + *** slink:VkPipelineViewportStateCreateInfo + *** slink:VkPipelineRasterizationStateCreateInfo + *** slink:VkPipelineMultisampleStateCreateInfo + *** slink:VkPipelineDepthStencilStateCreateInfo + *** slink:VkPipelineColorBlendStateCreateInfo + + +[[pipelines-destruction]] +== Pipeline destruction + +To destroy a graphics or compute pipeline, call: + +include::../protos/vkDestroyPipeline.txt[] + + * pname:device is the logical device that destroys the pipeline. + * pname:pipeline is the handle of the pipeline to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroyPipeline.txt[] + + +[[pipelines-multiple]] +== Multiple Pipeline Creation + +Multiple pipelines can: be created simultaneously by passing an array of +sname:VkGraphicsPipelineCreateInfo or sname:VkComputePipelineCreateInfo +structures into the flink:vkCreateGraphicsPipelines and +flink:vkCreateComputePipelines commands, respectively. Applications can: +group together similar pipelines to be created in a single call, and +implementations are encouraged to look for reuse opportunities within a +group-create. + +When an application attempts to create many pipelines in a single command, +it is possible that some subset may: fail creation. In that case, the +corresponding entries in the pname:pPipelines output array will be filled +with sname:VK_NULL_HANDLE values. If any pipeline fails creation (for +example, due to out of memory errors), the ftext:vkCreate*Pipelines commands +will return an error code. The implementation will attempt to create all +pipelines, and only return sname:VK_NULL_HANDLE values for those that +actually failed. + + +[[pipelines-pipeline-derivatives]] +== Pipeline Derivatives + +A pipeline derivative is a child pipeline created from a parent pipeline, +where the child and parent are expected to have much commonality. The goal +of derivative pipelines is that they be cheaper to create using the +parent as a starting point, and that it be more efficient (on either host or +device) to switch/bind between children of the same parent. + +A derivative pipeline is created by setting the +ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag in the +stext:Vk*PipelineCreateInfo structure. If this is set, then exactly one of +pname:basePipelineHandle or pname:basePipelineIndex members of the structure +must: have a valid handle/index, and indicates the parent pipeline. If +pname:basePipelineHandle is used, the parent pipeline must: have already +been created. If pname:basePipelineIndex is used, then the parent is being +created in the same command. sname:VK_NULL_HANDLE acts as the invalid handle +for pname:basePipelineHandle, and -1 is the invalid index for +pname:basePipelineIndex. If pname:basePipelineIndex is used, the base +pipeline must: appear earlier in the array. The base pipeline must: have +been created with the ename:VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag +set. + + +[[pipelines-cache]] +== Pipeline Cache + +Pipeline cache objects allow the result of pipeline construction to be +reused between pipelines and between runs of an application. Reuse between +pipelines is achieved by passing the same pipeline cache object when +creating multiple related pipelines. Reuse across runs of an application is +achieved by retrieving pipeline cache contents in one run of an application, +saving the contents, and using them to preinitialize a pipeline cache on a +subsequent run. The contents and size of the pipeline cache objects is +managed by the implementation. Applications can: control the amount of data +retrieved from a pipeline cache object. + +Pipeline cache objects are created by calling: + +include::../protos/vkCreatePipelineCache.txt[] + + * pname:device is the logical device that creates the pipeline cache + object. + * pname:pCreateInfo is a pointer to a sname:VkPipelineCacheCreateInfo + structure that contains the initial parameters for the pipeline cache + object. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pPipelineCache is a pointer to a sname:VkPipelineCache handle in + which the resulting pipeline cache object is returned. + +include::../validity/protos/vkCreatePipelineCache.txt[] + +The definition of sname:VkPipelineCacheCreateInfo is: + +include::../structs/VkPipelineCacheCreateInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:initialDataSize is the number of bytes in pname:pInitialData. If + pname:initialDataSize is zero, the pipeline cache will initially be + empty. + * pname:pInitialData is a pointer to previously retrieved pipeline + cache data. If the pipeline cache data is incompatible (as defined + below) with the device, the pipeline cache will be initially empty. If + pname:initialDataSize is zero, pname:pInitialData is ignored. + +include::../validity/structs/VkPipelineCacheCreateInfo.txt[] + +Once created, a pipeline cache can: be passed to the +fname:vkCreateGraphicsPipelines and fname:vkCreateComputePipelines commands. +If the pipeline cache passed into these commands is not +sname:VK_NULL_HANDLE, the implementation will query it for possible reuse +opportunities and update it with new content. The use of the pipeline cache +object in these commands is internally synchronized, and the same pipeline +cache object can: be used in multiple threads simultaneously. + +[NOTE] +.Note +==== +Implementations should: make every effort to limit any critical sections +to the actual accesses to the cache, which is expected to be significantly +shorter than the duration of the fname:vkCreateGraphicsPipelines and +fname:vkCreateComputePipelines commands. +==== + +Pipeline cache objects can: be merged using the command: + +include::../protos/vkMergePipelineCaches.txt[] + + * pname:device is the logical device that owns the pipeline cache objects. + * pname:dstCache is the handle of the pipeline cache to merge results + into. + * pname:srcCacheCount is the length of the pname:pSrcCaches array. + * pname:pSrcCaches is an array of pipeline cache handles, which will be + merged into pname:dstCache. The previous contents of pname:dstCache are + included after the merge. + +include::../validity/protos/vkMergePipelineCaches.txt[] + +[NOTE] +.Note +==== +The details of the merge operation are implementation dependent, but +implementations are recommended: to merge the contents of the specified +pipelines and prune duplicate entries. +==== + +Data can: be retrieved from a pipeline cache object using the command: + +include::../protos/vkGetPipelineCacheData.txt[] + + * pname:device is the logical device that owns the pipeline cache. + * pname:pipelineCache is the pipeline cache to retrieve data from. + * pname:pDataSize is a pointer to a value related to the amount of data in + the pipeline cache, as described below. + * pname:pData is either `NULL` or a pointer to a buffer. + +If pname:pData is `NULL`, then the maximum size of the data that can be +retrieved from the pipeline cache, in bytes, is returned in pname:pDataSize. +Otherwise, pname:pDataSize must: point to a variable set by the user to the +size of the buffer, in bytes, pointed to by pname:pData, and on return the +variable is overwritten with the amount of data actually written to +pname:pData. + +If the value of pname:dataSize is less than the maximum size that can: be +retrieved by the pipeline cache, at most pname:pDataSize bytes will be +written to pname:pData, and fname:vkGetPipelineCacheData will return +ename:VK_INCOMPLETE. Any data written to pname:pData is valid and can: be +provided as the pname:pInitialData member of the +sname:VkPipelineCacheCreateInfo structure passed to +fname:vkCreatePipelineCache. + +include::../validity/protos/vkGetPipelineCacheData.txt[] + +[[pipelines-cache-header]] +Applications can: store the data retrieved from the pipeline cache, and use +these data, possibly in a future run of the application, to populate new +pipeline cache objects. The results of pipeline compiles, however, +may: depend on the vendor ID, device ID, driver version, and other details +of the device. To enable applications to detect when previously retrieved +data is incompatible with the device, the initial bytes written to +pname:pData must: be a header consisting of the following members: + +.Layout for pipeline cache header version VK_PIPELINE_CACHE_HEADER_VERSION_ONE +[width="85%",cols="8%,21%,71%",options="header"] +|===== +| Offset | Size | Meaning +| 0 | 4 | length in bytes of the entire pipeline cache header + written as a stream of bytes, with the least + significant byte first +| 4 | 4 | a elink:VkPipelineCacheHeaderVersion value + written as a stream of bytes, with the least + significant byte first +| 8 | 4 | a vendor ID equal to + sname:VkPhysicalDeviceProperties::pname:vendorID + written as a stream of bytes, with the least + significant byte first +| 12 | 4 | a device ID equal to + sname:VkPhysicalDeviceProperties::pname:deviceID + written as a stream of bytes, with the least + significant byte first +| 16 | ename:VK_UUID_SIZE | a pipeline cache ID equal to + sname:VkPhysicalDeviceProperties::pname:pipelineCacheUUID +|===== + +The first four bytes encode the length of the entire pipeline header, in +bytes. This value includes all fields in the header including the pipeline +cache version field and the size of the length field. + +The next four bytes encode the pipeline cache version. +This field is a elink:VkPipelineCacheHeaderVersion value. +A consumer of the pipeline cache should use this value to interpret the +remainder of the cache header. + +If the value of pname:dataSize is less than what is necessary to store this +header, nothing will be written to pname:pData and zero will be written to +pname:dataSize. + +To destroy a pipeline cache, call: + +include::../protos/vkDestroyPipelineCache.txt[] + + * pname:device is the logical device that destroys the pipeline cache + object. + * pname:pipelineCache is the handle of the pipeline cache to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroyPipelineCache.txt[] + + +[[pipelines-specialization-constants]] +== Specialization Constants + +Specialization constants are a mechanism whereby constants in a SPIR-V +module can: have their constant value specified at the time the +sname:VkPipeline is created. This allows a SPIR-V module to have constants +that can: be modified while executing an application that uses the Vulkan +API. + +[NOTE] +.Note +==== +Specialization constants are useful to allow a compute shader to have +its work group size changed at runtime by the user, for example. +==== + +Each instance of the sname:VkPipelineShaderStageCreateInfo structure +contains a parameter pname:pSpecializationInfo, which can: be `NULL` to +indicate no specialization constants. The definition of the +sname:VkSpecializationInfo structure is: + +include::../structs/VkSpecializationInfo.txt[] + +The members of sname:VkSpecializationInfo are as follows: + + * pname:mapEntryCount is the number of entries in the pname:pMapEntries + array. + * pname:pMapEntries is a pointer to an array of + sname:VkSpecializationMapEntry which maps constant IDs to offsets in + pname:pData. + * pname:dataSize is the byte size of the pname:pData buffer. + * pname:pData contains the actual constant values to specialize with. + +include::../validity/structs/VkSpecializationInfo.txt[] + +The definition of the pname:pMapEntries member of type +sname:VkSpecializationMapEntry is: + +include::../structs/VkSpecializationMapEntry.txt[] + +The members of sname:VkSpecializationMapEntry are as follows: + + * pname:constantID ID of the specialization constant in SPIR-V. + * pname:offset byte offset of the specialization constant value within the + supplied data buffer. + * pname:size byte size of the specialization constant value within the + supplied data buffer. + +include::../validity/structs/VkSpecializationMapEntry.txt[] + +If a pname:constantID value is not a specialization constant ID used in the +shader, that map entry does not affect the behavior of the pipeline. + +In human readable SPIR-V: + +[source,glsl] +--------------------------------------------------- +OpDecorate %x SpecId 13 ; decorate .x component of WorkgroupSize with ID 13 +OpDecorate %y SpecId 42 ; decorate .y component of WorkgroupSize with ID 42 +OpDecorate %z SpecId 3 ; decorate .z component of WorkgroupSize with ID 3 +OpDecorate %wgsize BuiltIn WorkgroupSize ; decorate WorkgroupSize onto constant +%i32 = OpTypeInt 32 0 ; declare an unsigned 32-bit type +%uvec3 = OpTypeVector %i32 3 ; declare a 3 element vector type of unsigned 32-bit +%x = OpSpecConstant %i32 1 ; declare the .x component of WorkgroupSize +%y = OpSpecConstant %i32 1 ; declare the .y component of WorkgroupSize +%z = OpSpecConstant %i32 1 ; declare the .z component of WorkgroupSize +%wgsize = OpSpecConstantComposite %uvec3 %x %y %z ; declare WorkgroupSize +--------------------------------------------------- + +From the above we have three specialization constants, one for each of the +x, y & z elements of the WorkgroupSize vector. + +Now to specialize the above via the specialization constants mechanism: + +[source,{basebackend@docbook:c++:cpp}] +--------------------------------------------------- +const VkSpecializationMapEntry entries[] = +{ + { + 13, // constantID + 0 * sizeof(uint32_t), // offset + sizeof(uint32_t) // size + }, + { + 42, // constantID + 1 * sizeof(uint32_t), // offset + sizeof(uint32_t) // size + }, + { + 3, // constantID + 2 * sizeof(uint32_t), // offset + sizeof(uint32_t) // size + } +}; + +const uint32_t data[] = { 16, 8, 4 }; // our workgroup size is 16x8x4 + +const VkSpecializationInfo info = +{ + 3, // mapEntryCount + entries, // pMapEntries + 3 * sizeof(uint32_t), // dataSize + data, // pData +}; +--------------------------------------------------- + +Then when calling fname:vkCreateComputePipelines, and passing the +sname:VkSpecializationInfo we defined as the pname:pSpecializationInfo +parameter of sname:VkPipelineShaderStageCreateInfo, we will create a compute +pipeline with the runtime specified work group size. + +Another example would be that an application has a SPIR-V module that has +some platform-dependent constants they wish to use. + +In human readable SPIR-V: + +// [source,{basebackend@docbook:c:glsl}] +[source,glsl] +--------------------------------------------------- +OpDecorate %1 SpecId 0 ; decorate our signed 32-bit integer constant +OpDecorate %2 SpecId 12 ; decorate our 32-bit floating-point constant +%i32 = OpTypeInt 32 1 ; declare a signed 32-bit type +%float = OpTypeFloat 32 ; declare a 32-bit floating-point type +%1 = OpSpecConstant %i32 -1 ; some signed 32-bit integer constant +%2 = OpSpecConstant %float 0.5 ; some 32-bit floating-point constant +--------------------------------------------------- + +From the above we have two specialization constants, one is a signed 32-bit +integer and the second is a 32-bit floating-point. + +Now to specialize the above via the specialization constants mechanism: + +[source,{basebackend@docbook:c++:cpp}] +--------------------------------------------------- +VkSpecializationMapEntry entries[2]; + +const VkSpecializationMapEntry entries[] = +{ + { + 0, // constantID + 0 * sizeof(int32_t), // offset + sizeof(int32_t) // size + }, + { + 12, // constantID + 1 * sizeof(int32_t), // offset + sizeof(float) // size + } +}; + +int32_t data[2]; + +data[0] = -42; // set the data for the 32-bit integer +((float*)data)[1] = 42.0f; // set the data for the 32-bit floating-point + +const VkSpecializationInfo info = +{ + 2, // mapEntryCount + entries, // pMapEntries + 2 * sizeof(int32_t), // dataSize + data, // pData +}; +--------------------------------------------------- + +It is legal for a SPIR-V module with specializations to be compiled into a +pipeline where no specialization info was provided. SPIR-V specialization +constants contain default values such that if a specialization is not +provided, the default value will be used. In the examples above, it would be +valid for an application to only specialize some of the specialization +constants within the SPIR-V module, and let the other constants use their +default values encoded within the OpSpecConstant declarations. + + +[[pipelines-binding]] +== Pipeline Binding + +Once a pipeline has been created, it can: be bound to the command buffer +using the command: + +include::../protos/vkCmdBindPipeline.txt[] + + * pname:commandBuffer is the command buffer that the pipeline will be + bound to. + * pname:pipelineBindPoint specifies the bind point, and must: have one of + the values ++ +-- +include::../enums/VkPipelineBindPoint.txt[] + +specifying whether pname:pipeline will be bound as a compute +(ename:VK_PIPELINE_BIND_POINT_COMPUTE) or graphics +(ename:VK_PIPELINE_BIND_POINT_GRAPHICS) pipeline. There are separate bind +points for each of graphics and compute, so binding one does not disturb the +other. +-- + * pname:pipeline is the pipeline to be bound. + +include::../validity/protos/vkCmdBindPipeline.txt[] + +Once bound, a pipeline binding affects subsequent graphics or compute +commands in the command buffer until a different pipeline is bound to the +bind point. The pipeline bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE +controls the behavior of flink:vkCmdDispatch and +flink:vkCmdDispatchIndirect. The pipeline bound to +ename:VK_PIPELINE_BIND_POINT_GRAPHICS controls the behavior of +flink:vkCmdDraw, flink:vkCmdDrawIndexed, flink:vkCmdDrawIndirect, and +flink:vkCmdDrawIndexedIndirect. No other commands are affected by the +pipeline state. diff --git a/doc/specs/vulkan/chapters/primsrast.txt b/doc/specs/vulkan/chapters/primsrast.txt new file mode 100644 index 00000000..9f695795 --- /dev/null +++ b/doc/specs/vulkan/chapters/primsrast.txt @@ -0,0 +1,755 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[primsrast]] += Rasterization + +Rasterization is the process by which a primitive is converted to a +two-dimensional image. Each point of this image contains associated data +such as depth, color, or other attributes. + +Rasterizing a primitive begins by determining which squares of an integer +grid in framebuffer coordinates are occupied by the primitive, and assigning +one or more depth values to each such square. This process is described +below for points, lines, and polygons. + +A grid square, including its latexmath:[$(x,y)$] framebuffer coordinates, +latexmath:[$z$] (depth), and associated data added by fragment +shaders, is called a fragment. A fragment is located by its upper left +corner, which lies on integer grid coordinates. + +Rasterization operations also refer to a fragment's sample locations, which +are offset by subpixel fractional values from its upper left corner. The +rasterization rules for points, lines, and triangles involve testing whether +each sample location is inside the primitive. Fragments need not actually be +square, and rasterization rules are not affected by the aspect ratio of +fragments. Display of non-square grids, however, will cause rasterized +points and line segments to appear fatter in one direction than the other. + +We assume that fragments are square, since it simplifies antialiasing and +texturing. After rasterization, fragments are processed by the +<>, if enabled. + +Several factors affect rasterization, including the members of +sname:VkPipelineRasterizationStateCreateInfo and +sname:VkPipelineMultisampleStateCreateInfo. + +The sname:VkPipelineRasterizationStateCreateInfo structure is defined as: + +include::../structs/VkPipelineRasterizationStateCreateInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:depthClampEnable controls whether to clamp the fragment's depth + values instead of clipping primitives to the z planes of the frustum, as + described in <>. + * pname:rasterizerDiscardEnable controls whether primitives are discarded + immediately before the rasterization stage. + * pname:polygonMode is the triangle rendering mode. See + elink:VkPolygonMode. + * pname:cullMode is the triangle facing direction used for primitive + culling. See elink:VkCullModeFlagBits. + * pname:frontFace is the front-facing triangle orientation to be used for + culling. See elink:VkFrontFace. + * pname:depthBiasEnable controls whether to bias fragment depth values. + * pname:depthBiasConstantFactor is a scalar factor controlling the + constant depth value added to each fragment. + * pname:depthBiasClamp is the maximum (or minimum) depth bias of a + fragment. + * pname:depthBiasSlopeFactor is a scalar factor applied to a fragment's + slope in depth bias calculations. + * pname:lineWidth is the width of rasterized line segments. + +include::../validity/structs/VkPipelineRasterizationStateCreateInfo.txt[] + +The sname:VkPipelineMultisampleStateCreateInfo structure is defined as: + +include::../structs/VkPipelineMultisampleStateCreateInfo.txt[] + +The members of the sname:VkPipelineMultisampleStateCreateInfo structure are +as follows: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:rasterizationSamples is an elink:VkSampleCountFlagBits specifying + the number of samples per pixel used in rasterization. + * pname:sampleShadingEnable specifies that fragment shading executes + per-sample if ename:VK_TRUE, or per-fragment if ename:VK_FALSE, as + described in <>. + * pname:minSampleShading is the minimum number of unique samples to shade + for each fragment. + * pname:pSampleMask is a bitmask of static coverage information that is + ANDed with the coverage information generated during rasterization, as + described in <>. + * pname:alphaToCoverageEnable controls whether a temporary coverage value + is generated based on the value of the alpha component of the fragment's + first color output as specified in the <> section. + * pname:alphaToOne controls whether the value of the alpha component of + the fragment's first color output is replaced with one as described in + <>. + +include::../validity/structs/VkPipelineMultisampleStateCreateInfo.txt[] + +Rasterization only produces fragments corresponding to pixels in the +framebuffer. Fragments which would be produced by application of any of the +primitive rasterization rules described below but which lie outside the +framebuffer are not produced, nor are they processed by any later stage of +the pipeline, including any of the early per-fragment tests described in +<>. + +Surviving fragments are processed by fragment shaders. Fragment shaders +determine associated data for fragments, and can: also modify or replace +their assigned depth values. + +If the subpass for which this pipeline is being created uses +color and/or depth/stencil attachments, then the value of +pname:rasterizationSamples must: be the same as the sample count for +those subpass attachments. Otherwise, the value of +pname:rasterizationSamples must: follow the rules for a +<>. + + +[[primsrast-discard]] +== Discarding Primitives Before Rasterization + +Primitives are discarded before rasterization if the +pname:rasterizerDiscardEnable member of +slink:VkPipelineRasterizationStateCreateInfo is enabled. When enabled, +primitives are discarded after they are processed by the last active shader +stage in the pipeline before rasterization. + + +[[primsrast-multisampling]] +== Multisampling + +Multisampling is a mechanism to antialias all {apiname} primitives: points, +lines, and polygons. The technique is to sample all primitives multiple +times at each pixel. Each sample in each framebuffer attachment has storage +for a color, depth, and/or stencil value, such that per-fragment operations +apply to each sample independently. The color sample values can: be later +_resolved_ to a single color (see <> and the <> chapter for more details on how +to resolve multisample images to non-multisample images). + +{apiname} defines rasterization rules for single-sample modes in a way that +is equivalent to a multisample mode with a single sample in the center of +each pixel. + +Each fragment includes a coverage value with pname:rasterizationSamples bits +(see <>). Each fragment includes +pname:rasterizationSamples depth values and sets of associated data. An +implementation may: choose to assign the same associated data to more than +one sample. The location for evaluating such associated data may: be +anywhere within the pixel including the pixel center or any of the sample +locations. When pname:rasterizationSamples is ename:VK_SAMPLE_COUNT_1_BIT, +the pixel center must: be used. The different associated data values need +not all be evaluated at the same location. Each pixel fragment thus consists +of integer x and y grid coordinates, pname:rasterizationSamples depth values +and sets of associated data, and a coverage value with +pname:rasterizationSamples bits. + +It is understood that each pixel has pname:rasterizationSamples locations +associated with it. These locations are exact positions, rather than regions +or areas, and each is referred to as a sample point. The sample points +associated with a pixel must: be located inside or on the boundary of the +unit square that is considered to bound the pixel. Furthermore, the relative +locations of sample points may: be identical for each pixel in the +framebuffer, or they may: differ. If the current pipeline includes a +fragment shader with one or more variables in its interface decorated with +code:Sample and code:Input, the data associated with those variables will be +assigned independently for each sample. The values for each sample must: be +evaluated at the location of the sample. The data associated with any other +variables not decorated with code:Sample and code:Input need not be +evaluated independently for each sample. + +If the pname:standardSampleLocations member of +slink:VkPhysicalDeviceFeatures is ename:VK_TRUE, then the sample counts +ename:VK_SAMPLE_COUNT_1_BIT, ename:VK_SAMPLE_COUNT_2_BIT, +ename:VK_SAMPLE_COUNT_4_BIT, ename:VK_SAMPLE_COUNT_8_BIT, and +ename:VK_SAMPLE_COUNT_16_BIT have sample locations as listed in the +following table, with the latexmath:[$i$]th entry in the table corresponding +to bit latexmath:[$i$] in the sample masks. ename:VK_SAMPLE_COUNT_32_BIT and +ename:VK_SAMPLE_COUNT_64_BIT do not have standard sample locations. +Locations are defined relative to an origin in the upper left corner of the +pixel. + +<<< + +.Standard sample locations +[align="center"] +|======================================== +|ename:VK_SAMPLE_COUNT_1_BIT|ename:VK_SAMPLE_COUNT_2_BIT|ename:VK_SAMPLE_COUNT_4_BIT|ename:VK_SAMPLE_COUNT_8_BIT|ename:VK_SAMPLE_COUNT_16_BIT +| +latexmath:[$(0.5,0.5)$] +| +latexmath:[$(0.25,0.25)$] + +latexmath:[$(0.75,0.75)$] +| +latexmath:[$( 0.375, 0.125)$] + +latexmath:[$( 0.875, 0.375)$] + +latexmath:[$( 0.125, 0.625)$] + +latexmath:[$( 0.625, 0.875)$] +| +latexmath:[$( 0.5625, 0.3125)$] + +latexmath:[$( 0.4375, 0.6875)$] + +latexmath:[$( 0.8125, 0.5625)$] + +latexmath:[$( 0.3125, 0.1875)$] + +latexmath:[$( 0.1875, 0.8125)$] + +latexmath:[$( 0.0625, 0.4375)$] + +latexmath:[$( 0.6875, 0.9375)$] + +latexmath:[$( 0.9375, 0.0625)$] +| +latexmath:[$( 0.5625, 0.5625)$] + +latexmath:[$( 0.4375, 0.3125)$] + +latexmath:[$( 0.3125, 0.625)$] + +latexmath:[$( 0.75, 0.4375)$] + +latexmath:[$( 0.1875, 0.375)$] + +latexmath:[$( 0.625, 0.8125)$] + +latexmath:[$( 0.8125, 0.6875)$] + +latexmath:[$( 0.6875, 0.1875)$] + +latexmath:[$( 0.375, 0.875)$] + +latexmath:[$( 0.5, 0.0625)$] + +latexmath:[$( 0.25, 0.125)$] + +latexmath:[$( 0.125, 0.75)$] + +latexmath:[$( 0.0, 0.5)$] + +latexmath:[$( 0.9375, 0.25)$] + +latexmath:[$( 0.875, 0.9375)$] + +latexmath:[$( 0.0625, 0.0)$] +|======================================== + + +[[primsrast-sampleshading]] +== Sample Shading + +Sample shading can: be used to specify a minimum number of unique samples to +process for each fragment. Sample shading is controlled by the +pname:sampleShadingEnable member of +slink:VkPipelineMultisampleStateCreateInfo. If pname:sampleShadingEnable is +ename:VK_FALSE, sample shading is considered disabled and has no effect. +Otherwise, an implementation must: provide a minimum of +latexmath:[$\max(\lceil{minSampleShading \times rasterizationSamples}\rceil, +1)$] unique associated data for each fragment, where pname:minSampleShading +is the minimum fraction of sample shading and pname:rasterizationSamples is +the number of samples requested in +slink:VkPipelineMultisampleStateCreateInfo. These are associated with the +samples in an implementation-dependent manner. pname:minSampleShading must: +be in the range latexmath:[$[0,1\]$]. When the sample shading fraction is +1.0, a separate set of associated data are evaluated for each sample, and +each set of values is evaluated at the sample location. + + +[[primsrast-points]] +== Points + +A point is drawn by generating a set of fragments in the shape of a square +centered around the vertex of the point. Each vertex has an associated point +size that controls the width/height of that square. The point size is taken +from the (potentially clipped) shader built-in code:PointSize written by: + + * the geometry shader, if active; + * the tessellation evaluation shader, if active and no geometry shader is + active; + * the tessellation control shader, if active and no geometry or + tessellation evaluation shader is active; or + * the vertex shader, otherwise + +and clamped to the implementation-dependent point size range +latexmath:[$[pointSizeRange[0\],pointSizeRange[1\]\]$]. If the value written +to code:PointSize is less than or equal to zero, or if no value was written +to code:PointSize, results are undefined. + +Not all point sizes need be supported, but the size 1.0 must: be supported. +The range of supported sizes and the size of evenly-spaced gradations within +that range are implementation-dependent. The range and gradations are +obtained from the pname:pointSizeRange and pname:pointSizeGranularity +members of slink:VkPhysicalDeviceLimits. If, for instance, the size range is +from 0.1 to 2.0 and the gradation size is 0.1, then the size 0.1, 0.2, ..., +1.9, 2.0 are supported. Additional point sizes may: also be supported. There +is no requirement that these sizes be equally spaced. If an unsupported +size is requested, the nearest supported size is used instead. + + +[[primsrast-points-basic]] +=== Basic Point Rasterization + +Point rasterization produces a fragment for each framebuffer pixel with one +or more sample points that intersect a region centered at the point's +latexmath:[$(x_f,y_f)$]. This region is a square with side equal to the +current point size. Coverage bits that correspond to sample points that +intersect the region are 1, other coverage bits are 0. + +All fragments produced in rasterizing a point are assigned the same +associated data, which are those of the vertex corresponding to the point. +However, the fragment shader built-in code:PointCoord contains point sprite +texture coordinates. The latexmath:[$s$] and latexmath:[$t$] point sprite +texture coordinates vary from zero to one across the point horizontally +left-to-right and top-to-bottom, respectively. The following formulas are +used to evaluate latexmath:[$s$] and latexmath:[$t$]: + +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\[ + s = {1 \over 2} + { \left( x_p - x_f \right) \over size } +\] +\[ + t = {1 \over 2} + { \left( y_p - y_f \right) \over size }. +\] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +where size is the point's size, latexmath:[$(x_p,y_p)$] is the location at +which the point sprite coordinates are evaluated - this may: be the +framebuffer coordinates of the pixel center (i.e. at the half-integer) or +the location of a sample, and latexmath:[$(x_f,y_f)$] is the exact, +unrounded framebuffer coordinate of the vertex for the point. When +pname:rasterizationSamples is ename:VK_SAMPLE_COUNT_1_BIT, the pixel center +must: be used. + + +[[primsrast-lines]] +== Line Segments + +A line is drawn by generating a set of fragments overlapping a rectangle +centered on the line segment. Each line segment has an associated width that +controls the width of that rectangle. + +The line width is set by the pname:lineWidth property of +slink:VkPipelineRasterizationStateCreateInfo in the currently active +pipeline if the pipeline was not created with +ename:VK_DYNAMIC_STATE_LINE_WIDTH enabled. Otherwise, the line width is set +by calling fname:vkCmdSetLineWidth: + +include::../protos/vkCmdSetLineWidth.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:lineWidth is the width of rasterized line segments. + +include::../validity/protos/vkCmdSetLineWidth.txt[] + +Not all line widths need be supported for line segment rasterization, but +width 1.0 antialiased segments must: be provided. The range and gradations +are obtained from the pname:lineWidthRange and pname:lineWidthGranularity +members of slink:VkPhysicalDeviceLimits. If, for instance, the size range is +from 0.1 to 2.0 and the gradation size is 0.1, then the size 0.1, 0.2, ..., +1.9, 2.0 are supported. Additional line widths may: also be supported. There +is no requirement that these widths be equally spaced. If an unsupported +width is requested, the nearest supported width is used instead. + + +[[primsrast-lines-basic]] +=== Basic Line Segment Rasterization + +Rasterized line segments produce fragments which intersect a rectangle +centered on the line segment. Two of the edges are parallel to the specified +line segment; each is at a distance of one-half the current width from that +segment in directions perpendicular to the direction of the line. The other +two edges pass through the line endpoints and are perpendicular to the +direction of the specified line segment. Coverage bits that correspond to +sample points that intersect the rectangle are 1, other coverage bits are 0. + +Next we specify how the data associated with each rasterized fragment +are obtained. Let latexmath:[$\mathbf{p}_r = (x_d, y_d)$] be the +framebuffer coordinates at which associated data are evaluated. This may: be +the pixel center of a fragment or the location of a sample within the +fragment. When pname:rasterizationSamples is ename:VK_SAMPLE_COUNT_1_BIT, +the pixel center must: be used. Let latexmath:[$\mathbf{p}_a = (x_a, y_a)$] +and latexmath:[$\mathbf{p}_b = (x_b,y_b)$] be initial and final endpoints of +the line segment, respectively. Set + +// Equation {linet:eq} +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\[ + t = {{( \mathbf{p}_r - \mathbf{p}_a ) \cdot ( \mathbf{p}_b - \mathbf{p}_a )} + \over {\| \mathbf{p}_b - \mathbf{p}_a \|^2 }} +\] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +(Note that latexmath:[$t=0$] at latexmath:[$\mathbf{p}_a$] and +latexmath:[$t=1$] at latexmath:[$\mathbf{p}_b$]. Also note that this +calculation projects the vector from latexmath:[$\mathbf{p}_a$] to +latexmath:[$\mathbf{p}_r$] onto the line, and thus computes the normalized +distance of the fragment along the line.) + +The value of an associated datum latexmath:[$f$] for the fragment, whether +it be a shader output or the clip latexmath:[$w$] coordinate, is found as + +[[line_perspective_interpolation,Equation line_perspective_interpolation]] +.line_perspective_interpolation +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\[ + f = {{ (1-t) {f_a / w_a} + t { f_b / w_b} } \over + {(1-t) / w_a + t / w_b }} +\] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +where latexmath:[$f_a$] and latexmath:[$f_b$] are the data associated with +the starting and ending endpoints of the segment, respectively; +latexmath:[$w_a$] and latexmath:[$w_b$] are the clip latexmath:[$w$] +coordinates of the starting and ending endpoints of the segments, +respectively. However, depth values for lines must: be interpolated by + +[[line_noperspective_interpolation,Equation line_noperspective_interpolation]] +.line_noperspective_interpolation +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\[ z = (1-t) z_a + t z_b \] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +where latexmath:[$z_a$] and latexmath:[$z_b$] are the depth values of the +starting and ending endpoints of the segment, respectively. + +The code:NoPerspective and code:Flat +<> can: be used +with fragment shader inputs to declare how they are interpolated. When +neither decoration is applied, interpolation is performed as described in +<>. When the code:NoPerspective decoration +is used, interpolation is performed in the same fashion as for depth values, +as described in <>. When the code:Flat +decoration is used, no interpolation is performed, and outputs are taken +from the corresponding input value of the +<> corresponding to that +primitive. + +The above description documents the preferred method of line rasterization, +and must: be used when the implementation advertises the pname:strictLines +limit in slink:VkPhysicalDeviceLimits as ename:VK_TRUE. + +When pname:strictLines is ename:VK_FALSE, the edges of the lines are +generated as a parallelogram surrounding the original line. The major axis +is chosen by noting the axis in which there is the greatest distance between +the line start and end points. If the difference is equal in both directions +then the X axis is chosen as the major axis. Edges 2 and 3 are aligned to +the minor axis and are centered on the endpoints of the line as in +<>, and each is pname:lineWidth long. Edges 0 and 1 +are parallel to the line and connect the endpoints of edges 2 and 3. +Coverage bits that correspond to sample points that intersect the +parallelogram are 1, other coverage bits are 0. + +Samples that fall exactly on the edge of the parallelogram follow the +polygon rasterization rules. + +Interpolation occurs as if the parallelogram was decomposed into two +triangles where each pair of vertices at each end of the line has identical +attributes. + +[[fig-non-strict-lines]] +.Non strict lines +image:images/non_strict_lines.{svgpdf}["Non strict lines",{fullimagewidth}] + + +[[primsrast-polygons]] +== Polygons + +A polygon results from the decomposition of a triangle strip, triangle fan +or a series of independent triangles. Like points and line segments, +polygon rasterization is controled by several variables in the +slink:VkPipelineRasterizationStateCreateInfo structure. + + +[[primsrast-polygons-basic]] +=== Basic Polygon Rasterization + +The first step of polygon rasterization is to determine whether the triangle +is _back-facing_ or _front-facing_. This determination is made based on the +sign of the (clipped or unclipped) polygon's area computed in framebuffer +coordinates. One way to compute this area is: + +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\[ + a = -{1 \over 2}\sum_{i=0}^{n-1} + x_f^i y_f^{i \oplus 1} - + x_f^{i \oplus 1} y_f^i +\] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +where latexmath:[$x_f^i$] and latexmath:[$y_f^i$] are the latexmath:[$x$] +and latexmath:[$y$] framebuffer coordinates of the latexmath:[$i$]th vertex +of the latexmath:[$n$]-vertex polygon (vertices are numbered starting at +zero for the purposes of this computation) and latexmath:[$i \oplus 1$] is +latexmath:[$(i + 1)~ \textrm{mod}~ n$]. The interpretation of the sign of +this value is determined by the pname:frontFace property of the +slink:VkPipelineRasterizationStateCreateInfo in the currently active +pipeline, which takes the following values: + +include::../enums/VkFrontFace.txt[] + +When this is set to ename:VK_FRONT_FACE_COUNTER_CLOCKWISE, a triangle with +positive area is considered front-facing. When it is set to +ename:VK_FRONT_FACE_CLOCKWISE, a triangle with negative area is considered +front-facing. Any triangle which is not front-facing is back-facing, +including zero-area triangles. + +Once the orientation of triangles is determined, they are culled according +to the setting of pname:cullMode property in the +slink:VkPipelineRasterizationStateCreateInfo of the currently active +pipeline, which takes the following values: + +include::../enums/VkCullModeFlagBits.txt[] + +If the pname:cullMode is set to ename:VK_CULL_MODE_NONE no triangles are +discarded, if it is set to ename:VK_CULL_MODE_FRONT_BIT front-facing +triangles are discarded, if it is set to ename:VK_CULL_MODE_BACK_BIT then +back-facing triangles are discarded and if it is set to +ename:VK_CULL_MODE_FRONT_AND_BACK then all triangles are discarded. +Following culling, fragments are produced for any triangles which have not +been discarded. + +The rule for determining which fragments are produced by polygon +rasterization is called _point sampling_. The two-dimensional projection +obtained by taking the x and y framebuffer coordinates of the polygon's +vertices is formed. Fragments are produced for any pixels for which any +sample points lie inside of this polygon. Coverage bits that correspond to +sample points that satisfy the point sampling criteria are 1, other coverage +bits are 0. Special treatment is given to a sample whose sample location +lies on a polygon edge. In such a case, if two polygons lie on either side +of a common edge (with identical endpoints) on which a sample point lies, +then exactly one of the polygons must: result in a covered sample for that +fragment during rasterization. As for the data associated with each fragment +produced by rasterizing a polygon, we begin by specifying how these values +are produced for fragments in a triangle. Define _barycentric coordinates_ +for a triangle. Barycentric coordinates are a set of three numbers, +latexmath:[$a$], latexmath:[$b$], and latexmath:[$c$], each in the range +latexmath:[$\lbrack 0, 1\rbrack$], with latexmath:[$a + b + c = 1$]. These +coordinates uniquely specify any point latexmath:[$p$] within the triangle +or on the triangle's boundary as + +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\[ p = ap_a + bp_b + cp_c \] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +where latexmath:[$p_a$], latexmath:[$p_b$], and latexmath:[$p_c$] are the +vertices of the triangle. latexmath:[$a$], latexmath:[$b$], and +latexmath:[$c$] are determined by: + +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\[ + a = {{\rm A}(p p_b p_c) \over {\rm A}(p_a p_b p_c)}, \quad + b = {{\rm A}(p p_a p_c) \over {\rm A}(p_a p_b p_c)}, \quad + c = {{\rm A}(p p_a p_b) \over {\rm A}(p_a p_b p_c)}, +\] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +where latexmath:[$A(lmn)$] denotes the area in framebuffer coordinates of +the triangle with vertices latexmath:[$l$], latexmath:[$n$], and +latexmath:[$n$]. + +Denote an associated datum at latexmath:[$p_a$], latexmath:[$p_b$], or +latexmath:[$p_c$] as latexmath:[$f_a$], latexmath:[$f_b$], or +latexmath:[$f_c$], respectively. Then the value latexmath:[$f$] of a datum +at a fragment produced by rasterizing a triangle is given by: + +[[triangle_perspective_interpolation,Equation triangle_perspective_interpolation]] +.triangle_perspective_interpolation +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\[ + f = {{a{f_a / w_a} + b{f_b / w_b} + c{f_c / w_c}} \over + {a / w_a} + {b / w_b} + {c / w_c}} +\] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +where latexmath:[$w_a$], latexmath:[$w_b$], and latexmath:[$w_c$] are the +clip latexmath:[$w$] coordinates of latexmath:[$p_a$], latexmath:[$p_b$], +and latexmath:[$p_c$], respectively. latexmath:[$a$], latexmath:[$b$], and +latexmath:[$c$] are the barycentric coordinates of the location at which +the data are produced - this must: be a pixel center or the location of +a sample. When pname:rasterizationSamples is +ename:VK_SAMPLE_COUNT_1_BIT, the pixel center must: be used. Depth values +for triangles must: be interpolated by + +[[triangle_noperspective_interpolation,Equation triangle_noperspective_interpolation]] +.triangle_noperspective_interpolation +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\[ z = a z_a + b z_b + c z_c \] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +where latexmath:[$z_a$], latexmath:[$z_b$], and latexmath:[$z_c$] are the +depth values of latexmath:[$p_a$], latexmath:[$p_b$], and latexmath:[$p_c$], +respectively. + +The code:NoPerspective and code:Flat +<> can: be used +with fragment shader inputs to declare how they are interpolated. When +neither decoration is applied, interpolation is performed as described in +<>. When the code:NoPerspective +decoration is used, interpolation is performed in the same fashion as for +depth values, as described in <>. When +the code:Flat decoration is used, no interpolation is performed, and outputs +are taken from the corresponding input value of the +<> corresponding to that +primitive. + +For a polygon with more than three edges, such as are produced by clipping a +triangle, a convex combination of the values of the datum at the polygon's +vertices must: be used to obtain the value assigned to each fragment +produced by the rasterization algorithm. That is, it must: be the case that +at every fragment + +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\[ f = \sum_{i=1}^{n} a_i f_i \] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +where latexmath:[$n$] is the number of vertices in the polygon and +latexmath:[$f_i$] is the value of the latexmath:[$f$] at vertex +latexmath:[$i$]. For each latexmath:[$i$], latexmath:[$0 \leq a_i \leq 1$] +and latexmath:[$\sum_{i=1}^{n}a_i = 1$]. The values of latexmath:[$a_i$] +may: differ from fragment to fragment, but at vertex latexmath:[$i$], +latexmath:[$a_i = 1$] and latexmath:[$a_j = 0$] for latexmath:[$j \neq i$]. + +[NOTE] +.Note +==== +One algorithm that achieves the required behavior is to triangulate a +polygon (without adding any vertices) and then treat each triangle +individually as already discussed. A scan-line rasterizer that linearly +interpolates data along each edge and then linearly interpolates data across +each horizontal span from edge to edge also satisfies the restrictions (in +this case, the numerator and denominator of equation +<> are iterated independently and +a division performed for each fragment). +==== + + +[[primsrast-polygonmode]] +=== Polygon Mode + +The interpretation of polygons for rasterization is controlled using the +pname:polygonMode member of slink:VkPipelineRasterizationStateCreateInfo, +which takes the following values: + +include::../enums/VkPolygonMode.txt[] + +The pname:polygonMode selects which method of rasterization is used for +polygons. If pname:polygonMode is ename:VK_POLYGON_MODE_POINT, then the +vertices of polygons are treated, for rasterization purposes, as if they had +been drawn as points. ename:VK_POLYGON_MODE_LINE causes polygon edges to be +drawn as line segments. ename:VK_POLYGON_MODE_FILL causes polygons to render +using the polygon rasterization rules in this section. + +Note that these modes affect only the final rasterization of polygons: in +particular, a polygon's vertices are shaded and the polygon is clipped and +possibly culled before these modes are applied. + + +[[primsrast-depthbias]] +=== Depth Bias + +The depth values of all fragments generated by the rasterization of a +polygon can: be offset by a single value that is computed for that polygon. +This behavior is controlled by the pname:depthBiasEnable, +pname:depthBiasConstantFactor, pname:depthBiasClamp, and +pname:depthBiasSlopeFactor members of +slink:VkPipelineRasterizationStateCreateInfo, or by the corresponding +parameters to the fname:vkCmdSetDepthBias command if depth bias state is +dynamic. + +include::../protos/vkCmdSetDepthBias.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:depthBiasConstantFactor is a scalar factor controlling the + constant depth value added to each fragment. + * pname:depthBiasClamp is the maximum (or minimum) depth bias of a + fragment. + * pname:depthBiasSlopeFactor is a scalar factor applied to a fragment's + slope in depth bias calculations. + +include::../validity/protos/vkCmdSetDepthBias.txt[] + +If pname:depthBiasEnable is ename:VK_FALSE, no depth bias is applied and the +fragment's depth values are unchanged. + +pname:depthBiasSlopeFactor scales the maximum depth slope of the polygon, +and pname:depthBiasConstantFactor scales an implementation-dependent +constant that relates to the usable resolution of the depth buffer. The +resulting values are summed to produce the depth bias value which is then +clamped to a minimum or maximum value specified by pname:depthBiasClamp. +pname:depthBiasSlopeFactor, pname:depthBiasConstantFactor, and +pname:depthBiasClamp can: each be positive, negative, or zero. + +The maximum depth slope latexmath:[$m$] of a triangle is + +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\begin{equation} +m = \sqrt{ \left({\partial z_f \over \partial x_f}\right)^2 + + \left({\partial z_f \over \partial y_f}\right)^2} +\end{equation} +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +where latexmath:[$(x_f, y_f, z_f)$] is a point on the triangle. +latexmath:[$m$] may: be approximated as + +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\begin{equation} +m = \max \left \{ \left |{\partial z_f \over \partial x_f} \right |, +\left |{\partial z_f \over \partial y_f} \right | \right \}. +\end{equation} +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +The minimum resolvable difference latexmath:[$r$] is an +implementation-dependent parameter that depends on the depth buffer +representation. It is the smallest difference in framebuffer coordinate +latexmath:[$z$] values that is guaranteed to remain distinct throughout +polygon rasterization and in the depth buffer. All pairs of fragments +generated by the rasterization of two polygons with otherwise identical +vertices, but latexmath:[$z_f$] values that differ by $r$, will have +distinct depth values. + +For fixed-point depth buffer representations, latexmath:[$r$] is constant +throughout the range of the entire depth buffer. For floating-point depth +buffers, there is no single minimum resolvable difference. In this case, the +minimum resolvable difference for a given polygon is dependent on the +maximum exponent, latexmath:[$e$], in the range of latexmath:[$z$] values +spanned by the primitive. If latexmath:[$n$] is the number of bits in the +floating-point mantissa, the minimum resolvable difference, latexmath:[$r$], +for the given primitive is defined as + +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\begin{equation} +r = 2^{e - n} +\end{equation} +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +If no depth buffer is present, latexmath:[$r$] is undefined. + +The bias value latexmath:[$o$] for a polygon is + +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\begin{equation} +o = +\begin{cases} + m \times depthBiasSlopeFactor + + r \times depthBiasConstantFactor & depthBiasClamp = 0\ or\ NaN \\ + \min(m \times depthBiasSlopeFactor + + r \times depthBiasConstantFactor, + depthBiasClamp) & depthBiasClamp > 0 \\ + \max(m \times depthBiasSlopeFactor + + r \times depthBiasConstantFactor, + depthBiasClamp) & depthBiasClamp < 0 \\ +\end{cases} +\end{equation} +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +latexmath:[$m$] is computed as described above. If the depth buffer uses a +fixed-point representation, latexmath:[$m$] is a function of depth values in +the range latexmath:[$[0,1\]$], and latexmath:[$o$] is applied to depth +values in the same range. + +For fixed-point depth buffers, fragment depth values are always limited to +the range latexmath:[$[0,1\]$] by clamping after depth bias addition is +performed. Fragment depth values are clamped even when the depth buffer uses +a floating-point representation. diff --git a/doc/specs/vulkan/chapters/queries.txt b/doc/specs/vulkan/chapters/queries.txt new file mode 100644 index 00000000..06c09a7f --- /dev/null +++ b/doc/specs/vulkan/chapters/queries.txt @@ -0,0 +1,648 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[queries]] += Queries + +_Queries_ provide a mechanism to return information about the processing of +a sequence of {apiname} commands. Query operations are asynchronous, and as +such, their results are not returned immediately. Instead, their results, +and their availability status, are stored in a <>. The state of these queries can: be read back on the host, or copied +to a buffer object on the device. + +The supported query types are <>, +<>, and +<>. + + +[[queries-pools]] +== Query Pools + +Queries are managed using _query pool_ objects. Each query pool is a +collection of a specific number of queries of a particular type. + +To create a query pool, call: + +include::../protos/vkCreateQueryPool.txt[] + + * pname:device is the logical device that creates the query pool. + * pname:pCreateInfo is a pointer to an instance of the + sname:VkQueryPoolCreateInfo structure containing the number and type of + queries to be managed by the pool. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pQueryPool is a pointer to a sname:VkQueryPool handle in which the + resulting query pool object is returned. + +include::../validity/protos/vkCreateQueryPool.txt[] + +The definition of sname:VkQueryPoolCreateInfo is: + +include::../structs/VkQueryPoolCreateInfo.txt[] + +The members of sname:VkQueryPoolCreateInfo have the following meanings: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:queryType is the type of queries managed by the pool, + and must: be one of the values ++ +include::../enums/VkQueryType.txt[] + * pname:queryCount is the number of queries managed by the pool. + * pname:pipelineStatistics is a bitmask indicating which counters will + be returned in queries on the new pool, as described below in + <>. pname:pipelineStatistics is ignored if + pname:queryType is not ename:VK_QUERY_TYPE_PIPELINE_STATISTICS. + +include::../validity/structs/VkQueryPoolCreateInfo.txt[] + +To destroy a query pool, call: + +include::../protos/vkDestroyQueryPool.txt[] + + * pname:device is the logical device that destroys the query pool. + * pname:queryPool is the query pool to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroyQueryPool.txt[] + + +[[queries-operation]] +== Query Operation + +The operation of queries is controlled by the commands +flink:vkCmdBeginQuery, flink:vkCmdEndQuery, flink:vkCmdResetQueryPool, +flink:vkCmdCopyQueryPoolResults, and flink:vkCmdWriteTimestamp. + +In order for a sname:VkCommandBuffer to record query management commands, +the queue family for which its sname:VkCommandPool was created must: +support the appropriate type of operations (graphics, compute) suitable +for the query type of a given query pool. + +Each query in a query pool has a status that is either _unavailable_ or +_available_, and also has state to store the numerical results of a query +operation of the type requested when the query pool was created. Resetting a +query via flink:vkCmdResetQueryPool sets the status to unavailable and +makes the numerical results undefined. Performing a query operation with +flink:vkCmdBeginQuery and flink:vkCmdEndQuery changes the status to +available when the query <>, +and updates the numerical results. +Both the availability status and numerical results are retrieved by calling +either flink:vkGetQueryPoolResults or flink:vkCmdCopyQueryPoolResults. + +All query commands execute in order and are guaranteed to see the effects of +each other's memory accesses, with one significant exception: +fname:vkCmdCopyQueryPoolResults may: execute before the results of +fname:vkCmdEndQuery are available. However, if +ename:VK_QUERY_RESULT_WAIT_BIT is used, then fname:vkCmdCopyQueryPoolResults +must: reflect the result of any previously executed queries. Other sequences +of commands, such as fname:vkCmdResetQueryPool followed by +fname:vkCmdBeginQuery, must: make the effects of the first command visible +to the second command. + +After query pool creation, each query is in an undefined state and must: be +reset prior to use. Queries must: also be reset between uses. Using a +query that has not been reset will result in undefined behavior. + +To reset a range of queries in a query pool, call: + +include::../protos/vkCmdResetQueryPool.txt[] + + * pname:commandBuffer is the command buffer into which this command will + be recorded. + * pname:queryPool is the handle of the query pool managing the queries + being reset. + * pname:firstQuery is the initial query index to reset. + * pname:queryCount is the number of queries to reset. + +When executed on a queue, this command sets the status of query indices +latexmath:[$firstQuery,firstQuery+queryCount-1$] to unavailable. + +include::../validity/protos/vkCmdResetQueryPool.txt[] + +Once queries are reset and ready for use, query commands can: be +issued to a command buffer. Occlusion queries and pipeline statistics +queries count events - drawn samples and pipeline stage invocations, +respectively - resulting from commands that are recorded between a +flink:vkCmdBeginQuery command and a flink:vkCmdEndQuery command within +a specified command buffer, effectively scoping a set of drawing and/or +compute commands. Timestamp queries write timestamps to a query pool. + +A query must: begin and end in the same command buffer, although if it is a +primary command buffer, and the +<> feature is +enabled, it can: execute secondary command buffers during the query +operation. For a secondary command buffer to be executed while a query is +active, it must: set the pname:occlusionQueryEnable, pname:queryFlags, +and/or pname:pipelineStatistics members of slink:VkCommandBufferBeginInfo to +conservative values, as described in the <> section. A query must: either begin and end inside the +same subpass of a render pass instance, or must: both begin and end outside +of a render pass instance (i.e. contain entire render pass instances). + +Begin a query by calling: + +include::../protos/vkCmdBeginQuery.txt[] + + * pname:commandBuffer is the command buffer into which this command will + be recorded. + * pname:queryPool is the query pool that will manage the results of the + query. + * pname:query is the query index within the query pool that will contain + the results. + * pname:flags is a bitmask indicating constraints on the types of queries + that can: be performed. Valid bits in pname:flags include: ++ +include::../enums/VkQueryControlFlagBits.txt[] + +If the pname:queryType of the pool is ename:VK_QUERY_TYPE_OCCLUSION and +pname:flags contains ename:VK_QUERY_CONTROL_PRECISE_BIT, an implementation +must: return a result that matches the actual number of samples passed. This +is described in more detail in <>. + +include::../validity/protos/vkCmdBeginQuery.txt[] + +[[queries-operation-active]] +After beginning a query, that query is considered active within the command +buffer it was called in until that same query is ended. Queries active in a +primary command buffer when secondary command buffers are executed are +considered active for those secondary command buffers. + +After the set of desired draw or dispatch commands, end a query by calling: + +include::../protos/vkCmdEndQuery.txt[] + + * pname:commandBuffer is the command buffer into which this command will + be recorded. + * pname:queryPool is the query pool that is managing the results of the + query. + * pname:query is the query index within the query pool where the result is + stored. + +include::../validity/protos/vkCmdEndQuery.txt[] + +[[queries-operation-finished]] +As queries operate asynchronously, ending a query does not immediately set +the query's status to available. A query is considered _finished_ +when the final results of the query are ready to be retrieved by +flink:vkGetQueryPoolResults and flink:vkCmdCopyQueryPoolResults, and this +is when the query's status is set to available. + +Once a query is ended the query must: finish in finite time, unless the +state of the query is changed using other commands, e.g. by issuing a reset +of the query. + +[[queries-operation-memorylayout]] +An application can: retrieve results either by requesting they be written +into application-provided memory, or by requesting they be copied into a +sname:VkBuffer. In either case, the layout in memory is defined as follows: + + * The first query's result is written starting at the first byte requested + by the command, and each subsequent query's result begins pname:stride + bytes later. + * Each query's result is a tightly packed array of unsigned integers, + either 32- or 64-bits as requested by the command, storing the numerical + results and, if requested, the availability status. + * If ename:VK_QUERY_RESULT_WITH_AVAILABILITY_BIT is used, the final + element of each query's result is an integer indicating whether the + query's result is available, with any non-zero value indicating that + it is available. + * Occlusion queries write one integer value - the number of samples + passed. Pipeline statistics queries write one integer value for each bit + that is enabled in the pname:pipelineStatistics when the pool is + created, and the statistics values are written in bit order starting + from the least significant bit. Timestamps write one integer value. + * If more than one query is retrieved and pname:stride is not at least as + large as the size of the array of integers corresponding to a single + query, the values written to memory are undefined. + +To retrieve status and results for a set of queries, call: + +include::../protos/vkGetQueryPoolResults.txt[] + + * pname:device is the logical device that owns the query pool. + * pname:queryPool is the query pool managing the queries containing the + desired results. + * pname:firstQuery is the initial query index. + * pname:queryCount is the number of queries. pname:firstQuery and + pname:queryCount together define a range of queries. + * pname:dataSize is the size in bytes of the buffer pointed to by + pname:pData. + * pname:pData is a pointer to a user-allocated buffer + where the results will be written + * pname:stride is the stride in bytes between results for individual + queries within pname:pData. + * pname:flags is a bitmask of elink:VkQueryResultFlagBits specifying how + and when results are returned. + +Valid bits in pname:flags include: + +include::../enums/VkQueryResultFlagBits.txt[] + +These bits have the following meanings: + + * ename:VK_QUERY_RESULT_64_BIT indicates the results will be written as an + array of 64-bit unsigned integer values. If this bit is not set, the + results will be written as an array of 32-bit unsigned integer values. + * ename:VK_QUERY_RESULT_WAIT_BIT indicates that {apiname} will wait for + each query's status to become available before retrieving its results. + * ename:VK_QUERY_RESULT_WITH_AVAILABILITY_BIT indicates that the + availability status accompanies the results. + * ename:VK_QUERY_RESULT_PARTIAL_BIT indicates that returning partial + results is acceptable. + +If no bits are set in pname:flags, and all requested queries are +in the available state, results are written as an array of +32-bit unsigned integer values. The behavior when not all queries +are available, is described <>. + +If ename:VK_QUERY_RESULT_64_BIT is not set and the result overflows a +32-bit value, the value may: either wrap or saturate. Similarly, if +ename:VK_QUERY_RESULT_64_BIT is set and the result overflows a 64-bit +value, the value may: either wrap or saturate. + +If ename:VK_QUERY_RESULT_WAIT_BIT is set, {apiname} will wait for each +query to be in the available state before retrieving the numerical +results for that query. In this case, fname:vkGetQueryPoolResults is +guaranteed to succeed and return ename:VK_SUCCESS if the queries +become available in a finite time (i.e. if they have been issued and not +reset). If queries will never finish (e.g. due to being reset but not +issued), then fname:vkGetQueryPoolResults maynot: return in finite time. + +[[queries-wait-bit-not-set]] +If ename:VK_QUERY_RESULT_WAIT_BIT and ename:VK_QUERY_RESULT_PARTIAL_BIT +are both not set then no result values are written to pname:pData for +queries that are in the unavailable state at the time of the call, +and fname:vkGetQueryPoolResults returns ename:VK_NOT_READY. +However, availability state is still written to pname:pData for those +queries if ename:VK_QUERY_RESULT_WITH_AVAILABILITY_BIT is set. + +[NOTE] +.Note +==== +Applications must: take care to ensure that use of the +ename:VK_QUERY_RESULT_WAIT_BIT bit has the desired effect. + +For example, if a query has been used previously and a command buffer +records the commands fname:vkCmdResetQueryPool, fname:vkCmdBeginQuery, and +fname:vkCmdEndQuery for that query, then the query will remain +in the available state until the fname:vkCmdResetQueryPool command +executes on a queue. Applications can: use fences or events to ensure that +an query has already been reset before checking for its results or +availability status. Otherwise, a stale value could be returned from a +previous use of the query. + +The above also applies when ename:VK_QUERY_RESULT_WAIT_BIT is used in +combination with ename:VK_QUERY_RESULT_WITH_AVAILABILITY_BIT. In this +case, the returned availability status may: reflect the result of a +previous use of the query unless the fname:vkCmdResetQueryPool command +has been executed since the last use of the query. +==== + +[NOTE] +.Note +==== +Applications can: double-buffer query pool usage, with a pool per +frame, and reset queries at the end of the frame in which they +are read. +==== + +If ename:VK_QUERY_RESULT_PARTIAL_BIT is set, ename:VK_QUERY_RESULT_WAIT_BIT +is not set, and the query's status is unavailable, an intermediate +result value between zero and the final result value is written to +pname:pData for that query. + +ename:VK_QUERY_RESULT_PARTIAL_BIT mustnot: be used if the pool's +pname:queryType is ename:VK_QUERY_TYPE_TIMESTAMP. + +If ename:VK_QUERY_RESULT_WITH_AVAILABILITY_BIT is set, the final integer +value written for each query is non-zero if the query's status was +available or zero if the status was unavailable. When +ename:VK_QUERY_RESULT_WITH_AVAILABILITY_BIT is used, implementations must: +guarantee that if they return a non-zero availability value then the +numerical results must: be valid, assuming the results are not reset by a +subsequent command. + +[NOTE] +.Note +==== +Satisfying this guarantee may: require careful ordering by the application, +e.g. to read the availability status before reading the results. +==== + +include::../validity/protos/vkGetQueryPoolResults.txt[] + +To copy query statuses and numerical results directly to buffer memory, +call: + +include::../protos/vkCmdCopyQueryPoolResults.txt[] + + * pname:commandBuffer is the command buffer into which this command will + be recorded. + * pname:queryPool is the query pool managing the queries containing the + desired results. + * pname:firstQuery is the initial query index. + * pname:queryCount is the number of queries. pname:firstQuery and + pname:queryCount together define a range of queries. + * pname:dstBuffer is a sname:VkBuffer object that will receive the results + of the copy command. + * pname:dstOffset is an offset into pname:dstBuffer. + * pname:stride is the stride in bytes between results for individual + queries within pname:dstBuffer. The required size of the backing memory + for pname:dstBuffer is determined as described above for + flink:vkGetQueryPoolResults. + * pname:flags is a bitmask of elink:VkQueryResultFlagBits specifying how + and when results are returned. + +fname:vkCmdCopyQueryPoolResults is guaranteed to see the effect of previous +uses of fname:vkCmdResetQueryPool in the same queue, without any additional +synchronization. Thus, the results will always reflect the most +recent use of the query. + +pname:flags has the same possible values described above for the param:flags +parameter of flink:vkGetQueryPoolResults, but the different style of +execution causes some subtle behavioral differences. Because +fname:vkCmdCopyQueryPoolResults executes in order with respect to other +query commands, there is less ambiguity about which use of a query is being +requested. + +If no bits are set in pname:flags, results for all requested queries in the +available state are written as 32-bit unsigned integer values, and nothing +is written for queries in the unavailable state. + +If ename:VK_QUERY_RESULT_64_BIT is set, the results are written as an array +of 64-bit unsigned integer values as described for +flink:vkGetQueryPoolResults. + +If ename:VK_QUERY_RESULT_WAIT_BIT is set, the implementation will wait for +each query's status to be in the available state before retrieving the +numerical results for that query. This is guaranteed to reflect the most +recent use of the query on the same queue, assuming that the query is +not being simultaneously used by other queues. If the query does not become +available in a finite amount of time (e.g. due to not issuing a query +since the last reset), a ename:VK_ERROR_DEVICE_LOST error may: occur. + +Similarly, if ename:VK_QUERY_RESULT_WITH_AVAILABILITY_BIT is set and +ename:VK_QUERY_RESULT_WAIT_BIT is not set, the availability is guaranteed to +reflect the most recent use of the query on the same queue, assuming +that the query is not being simultaneously used by other queues. As with +fname:vkGetQueryPoolResults, implementations must: guarantee that if they +return a non-zero availability value, then the numerical results are valid. + +If ename:VK_QUERY_RESULT_PARTIAL_BIT is set, ename:VK_QUERY_RESULT_WAIT_BIT +is not set, and the query's status is unavailable, an intermediate +result value between zero and the final result value is written for that +query. + +ename:VK_QUERY_RESULT_PARTIAL_BIT mustnot: be used if the pool's +pname:queryType is ename:VK_QUERY_TYPE_TIMESTAMP. + +fname:vkCmdCopyQueryPoolResults is considered to be a transfer operation, +and its writes to buffer memory must: be synchronized using +ename:VK_PIPELINE_STAGE_TRANSFER_BIT and +ename:VK_ACCESS_TRANSFER_WRITE_BIT before using the results. + +include::../validity/protos/vkCmdCopyQueryPoolResults.txt[] + + +[[queries-operation-undefined]] +Rendering operations such as clears, MSAA resolves, attachment load/store +operations, and blits may: or maynot: count towards the results of queries. +This behavior is implementation-dependent and may: vary depending on the +path used within an implementation. For example, some implementations have +several types of clears, some of which may: include vertices and some not. + + +[[queries-occlusion]] +== Occlusion Queries + +Occlusion queries track the number of samples that pass the per-fragment +tests for a set of drawing commands. As such, occlusion queries are only +available on queue families supporting graphics operations. The application +can: then use these results to inform future rendering decisions. An +occlusion query is begun and ended by calling fname:vkCmdBeginQuery and +fname:vkCmdEndQuery, respectively. When an occlusion query begins, the count +of passing samples always starts at zero. For each drawing command, the +count is incremented as described in <>. If pname:flags does not contain +ename:VK_QUERY_CONTROL_PRECISE_BIT an implementation may: generate any +non-zero result value for the query if the count of passing samples is +non-zero. + +[NOTE] +.Note +==== +Not setting ename:VK_QUERY_CONTROL_PRECISE_BIT mode may: be more efficient +on some implementations, and should: be used where it is sufficient to know +a boolean result on whether any samples passed the per-fragment tests. In +this case, some implementations may: only return zero or one, indifferent of +the actual number of samples passing the per-fragment tests. +==== + +When an occlusion query finishes, the result for that query is marked +as available. The application can: then either copy the result to a buffer +(via fname:vkCmdCopyQueryPoolResults) or request it be put into host memory +(via fname:vkGetQueryPoolResults). + +[NOTE] +.Note +==== +If occluding geometry is not drawn first, samples can: pass the depth test, +but still not be visible in a final image. +==== + + +[[queries-pipestats]] +== Pipeline Statistics Queries + +Pipeline statistics queries allow the application to sample a specified set +of sname:VkPipeline counters. These counters are accumulated by {apiname} +for a set of either draw or dispatch commands while a pipeline statistics +query is active. As such, pipeline statistics queries are available on +queue families supporting either graphics or compute operations. Further, +the availability of pipeline statistics queries is indicated by the +pname:pipelineStatisticsQuery member of the sname:VkPhysicalDeviceFeatures +object (see fname:vkGetPhysicalDeviceFeatures and fname:vkCreateDevice for +detecting and requesting this query type on a sname:VkDevice). + +A pipeline statistics query is begun and ended by calling +fname:vkCmdBeginQuery and fname:vkCmdEndQuery, respectively. When a pipeline +statistics query begins, all statistics counters are set to zero. While the +query is active, the pipeline type determines which set of statistics are +available, but these must: be configured on the query pool when it is +created. If a statistic counter is issued on a command buffer that does +not support the corresponding operation, the value of that counter is +undefined after the query has finished. At least one statistic counter +relevant to the operations supported on the recording command buffer +must: be enabled. + +pname:pipelineStatisticsQuery is a bitmask indicating different +possible pipeline statistics. + +Valid bits in pname:flags include: + +include::../enums/VkQueryPipelineStatisticFlagBits.txt[] + +These bits have the following meanings: + + * If ename:VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT is set, + queries managed by the pool will count the number of vertices processed + by the <> stage. Vertices + corresponding to incomplete primitives may: or maynot: contribute to the + count. + * If ename:VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT is + set, queries managed by the pool will count the number of primitives + processed by the <> stage. If + primitive restart is enabled, restarting the primitive topology has no + effect on the count. Incomplete primitives may: or maynot: be counted. + * If ename:VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT is + set, queries managed by the pool will count the number of vertex shader + invocations. This counter's value is incremented each time a vertex + shader is <>. + * If ename:VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT is + set, queries managed by the pool will count the number of geometry + shader invocations. This counter's value is incremented each time a + geometry shader is <>. In case of + of <>, the geometry + shader invocations count is incremented for each separate instanced + invocation. + * If ename:VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT is + set, queries managed by the pool will count the number of primitives + generated by geometry shader invocations. The counter's value is + incremented each time the geometry shader emits a primitive. Restarting + primitive topology using the SPIR-V instructions code:OpEndPrimitive or + code:OpEndStreamPrimitive has no effect on the geometry shader output + primitives count. + * If ename:VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT is set, + queries managed by the pool will count the number of primitives + processed by the <> stage of + the pipeline. The counter's value is incremented each time a primitive + reaches the primitive clipping stage. + * If ename:VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT is set, + queries managed by the pool will count the number of primitives output + by the <> stage of the + pipeline. The counter's value is incremented each time a primitive + passes the primitive clipping stage. The actual number of primitives + output by the primitive clipping stage for a particular input primitive + is implementation-dependent but must: satisfy the following conditions: + ** If at least one vertex of the input primitive lies inside the clipping + volume, the counter is incremented by one or more. + ** Otherwise, the counter is incremented by zero or more. + * If ename:VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT is + set, queries managed by the pool will count the number of fragment + shader invocations. The counter's value is incremented each time the + fragment shader is <>. + * If + ename:VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT + is set, queries managed by the pool will count the number of patches + processed by the tessellation control shader. The counter's value is + incremented once for each patch for which a tessellation control shader + is <>. + * If + ename:VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT + is set, queries managed by the pool will count the number of invocations + of the tessellation evaluation shader. The counter's value is + incremented each time the tessellation evaluation shader is + <>. + * If ename:VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT is + set, queries managed by the pool will count the number of compute shader + invocations. The counter's value is incremented every time the compute + shader is invoked. Implementations may: skip the execution of certain + compute shader invocations or execute additional compute shader + invocations for implementation-dependent reasons as long as the results + of rendering otherwise remain unchanged. + + +These values are intended to measure relative statistics on one +implementation. Various device architectures will count these values +differently. Any or all counters may: be affected by the issues described in +<>. + +[NOTE] +.Note +==== +For example, tile-based rendering devices may: need to replay the scene +multiple times, affecting some of the counts. +==== + +If a pipeline has pname:rasterizerDiscardEnable enabled, implementations +may: discard primitives after the final vertex processing stage. As a +result, if pname:rasterizerDiscardEnable is enabled, the clipping input and +output primitives counters maynot: be incremented. + +When a pipeline statistics query finishes, the result for that query is +marked as available. The application can: copy the result to a +buffer (via fname:vkCmdCopyQueryPoolResults), or request it be put into host +memory (via fname:vkGetQueryPoolResults). + + +[[queries-timestamps]] +== Timestamp Queries + +_Timestamps_ provide applications with a mechanism for timing the execution +of commands. A timestamp is an integer value generated by the +sname:VkPhysicalDevice. Unlike other queries, timestamps do not operate over +a range, and so do not use flink:vkCmdBeginQuery or flink:vkCmdEndQuery. The +mechanism is built around a set of commands that allow the application to +tell the sname:VkPhysicalDevice to write timestamp values to a +<> and then either read timestamp values on the +host (using flink:vkGetQueryPoolResults) or copy timestamp values to a +sname:VkBuffer (using flink:vkCmdCopyQueryPoolResults). The application can: +then compute differences between timestamps to determine execution time. + +The number of valid bits in a timestamp value is determined by the +sname:VkQueueFamilyProperties::pname:timestampValidBits property of the +queue on which the timestamp is written. Timestamps are supported on any +queue which reports a non-zero value for pname:timestampValidBits via +flink:vkGetPhysicalDeviceQueueFamilyProperties. +If the <> limit is ename:VK_TRUE, timestamps +are supported by every queue family that supports either +graphics or compute operations (see slink:VkQueueFamilyProperties). + +The number of nanoseconds it takes for a timestamp value to be +incremented by 1 can: be obtained from +sname:VkPhysicalDeviceLimits::pname:timestampPeriod after a call to +fname:vkGetPhysicalDeviceProperties. + +A timestamp is requested by calling: + +include::../protos/vkCmdWriteTimestamp.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:pipelineStage is one of the elink:VkPipelineStageFlagBits, + specifying a stage of the pipeline. + * pname:queryPool is the query pool that will manage the timestamp. + * pname:query is the query within the query pool that will contain the + timestamp. + +fname:vkCmdWriteTimestamp latches the value of the timer when all previous +commands have completed executing as far as the specified pipeline stage, +and writes the timestamp value to memory. When the timestamp value is +written, the availability status of the query is set to available. + +[NOTE] +.Note +==== +If an implementation is unable to detect completion and latch the timer at +any specific stage of the pipeline, it may: instead do so at any logically +later stage. +==== + +flink:vkCmdCopyQueryPoolResults can: then be called to copy the timestamp +value from the query pool into buffer memory, with ordering and +synchronization behavior equivalent to how other queries operate. Timestamp +values can: also be retrieved from the query pool using +flink:vkGetQueryPoolResults. As with other queries, the query must: be reset +using flink:vkCmdResetQueryPool before requesting the timestamp value be +written to it. + +While fname:vkCmdWriteTimestamp can: be called inside or outside of a render +pass instance, flink:vkCmdCopyQueryPoolResults must: only be called outside +of a render pass instance. + +include::../validity/protos/vkCmdWriteTimestamp.txt[] diff --git a/doc/specs/vulkan/chapters/renderpass.txt b/doc/specs/vulkan/chapters/renderpass.txt new file mode 100644 index 00000000..6d059148 --- /dev/null +++ b/doc/specs/vulkan/chapters/renderpass.txt @@ -0,0 +1,856 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[renderpass]] += Render Pass + +A _render pass_ represents a collection of attachments, subpasses, and +dependencies between the subpasses, and describes how the attachments +are used over the course of the subpasses. The use of a render pass +in a command buffer is a _render pass instance_. + +An _attachment description_ describes the properties of an attachment +including its format, sample count, and how its contents are +treated at the beginning and end of each render pass instance. + +A _subpass_ represents a phase of rendering that reads and writes a +subset of the attachments in a render pass. Rendering commands are +recorded into a particular subpass of a render pass instance. + +A _subpass description_ describes the subset of attachments that is involved +in the execution of a subpass. Each subpass can: read from some attachments +as _input attachments_, write to some as _color attachments_ or +_depth/stencil attachments_, and do resolve operations to others as _resolve +attachments_. A subpass description can: also include a set of _preserve +attachments_, which are attachments that are not read or written by the +subpass but whose contents must: be preserved throughout the subpass. + +A subpass _uses_ an attachment if the attachment is a color, depth/stencil, +resolve, or input attachment for that subpass. A subpass does not use an +attachment if that attachment is preserved by the subpass. The first use of +an attachment is in the lowest numbered subpass that uses that attachment. +Similarly, the last use of an attachment is in the highest numbered subpass +that uses that attachment. + +The subpasses in a render pass all render to the same dimensions, and +fragments for pixel (x,y,layer) in one subpass can: only read attachment +contents written by previous subpasses at that same (x,y,layer) location. + +[NOTE] +.Note +==== +By describing a complete set of subpasses a priori, render passes provide +the implementation an opportunity to optimize the storage and transfer of +attachment data between subpasses. + +In practice, this means that subpasses with a simple framebuffer-space +dependency may: be merged into a single tiled rendering pass, keeping the +attachment data on-chip for the duration of a render pass instance. However, +it is also quite common for a render pass to only contain a single subpass. +==== + +_Subpass dependencies_ describe ordering restrictions between pairs of +subpasses. If no dependencies are specified, implementations may: reorder or +overlap portions (e.g., certain shader stages) of the execution of +subpasses. Dependencies limit the extent of overlap or reordering, and are +defined using masks of pipeline stages and memory access types. Each +dependency acts as an +<>, similarly to how <> are defined. Dependencies are needed if two subpasses operate on +attachments with overlapping ranges of the same sname:VkDeviceMemory object +and at least one subpass writes to that range. + +A _subpass dependency chain_ is a sequence of subpass dependencies in a +render pass, where the source subpass of each subpass dependency (after the +first) equals the destination subpass of the previous dependency. + +A render pass describes the structure of subpasses and attachments +independent of any specific image views for the attachments. +The specific image views that will be used for the attachments, and their +dimensions, are specified in sname:VkFramebuffer objects. Framebuffers +are created with respect to a specific render pass that the framebuffer +is compatible with (see <>). Collectively, a render pass and a framebuffer define the +complete render target state for one or more subpasses as well as the +algorithmic dependencies between the subpasses. + +The various pipeline stages of the drawing commands for a given subpass may: +execute concurrently and/or out of order, both within and across drawing +commands. However for a given (x,y,layer,sample) sample location, certain +per-sample operations are performed in +<>. + + +[[renderpass-creation]] +== Render Pass Creation + +A render pass is created by calling: + +include::../protos/vkCreateRenderPass.txt[] + + * pname:device is the logical device that creates the render pass. + * pname:pCreateInfo is a pointer to an instance of the + sname:VkRenderPassCreateInfo structure that describes the parameters of + the render pass. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pRenderPass points to a sname:VkRenderPass handle in which the + resulting render pass object is returned. + +include::../validity/protos/vkCreateRenderPass.txt[] + +The sname:VkRenderPassCreateInfo structure is defined as: + +include::../structs/VkRenderPassCreateInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:attachmentCount is the number of attachments used by this + render pass, or zero indicating no attachments. Attachments are referred + to by zero-based indices in the range [0,pname:attachmentCount). + * pname:pAttachments points to an array of pname:attachmentCount number of + slink:VkAttachmentDescription structures describing properties of the + attachments, or `NULL` if pname:attachmentCount is zero. + * pname:subpassCount is the number of subpasses to create for this render + pass. Subpasses are referred to by zero-based indices in the range + [0,pname:subpassCount). A render pass must: have at least one subpass. + * pname:pSubpasses points to an array of pname:subpassCount number of + slink:VkSubpassDescription structures describing properties of the + subpasses. + * pname:dependencyCount is the number of dependencies between pairs of + subpasses, or zero indicating no dependencies. + * pname:pDependencies points to an array of pname:dependencyCount number + of slink:VkSubpassDependency structures describing dependencies + between pairs of subpasses, or `NULL` if pname:dependencyCount is zero. + +include::../validity/structs/VkRenderPassCreateInfo.txt[] + +sname:VkAttachmentDescription is defined as: + +include::../structs/VkAttachmentDescription.txt[] + + * pname:format is a elink:VkFormat value specifying the format of the + image that will be used for the attachment. + * pname:samples is the number of samples of the image as defined + in elink:VkSampleCountFlagBits. + * pname:loadOp specifies how the contents of color and depth components of + the attachment are treated at the beginning of the subpass where it is + first used: ++ +-- +include::../enums/VkAttachmentLoadOp.txt[] + +** ename:VK_ATTACHMENT_LOAD_OP_LOAD means the contents within the render + area will be preserved. +** ename:VK_ATTACHMENT_LOAD_OP_CLEAR means the contents within the render + area will be cleared to a uniform value, which is specified when a render + pass instance is begun. +** ename:VK_ATTACHMENT_LOAD_OP_DONT_CARE means the contents within the area + need not be preserved; the contents of the attachment will be undefined + inside the render area. +-- + * pname:storeOp specifies how the contents of color and depth components + of the attachment are treated at the end of the subpass where it is last + used: ++ +-- +include::../enums/VkAttachmentStoreOp.txt[] + +** ename:VK_ATTACHMENT_STORE_OP_STORE means the contents within the render + area are written to memory and will be available for reading after the + render pass instance completes once the writes have been synchronized + with ename:VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT (for color attachments) + or ename:VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT (for depth/stencil + attachments). +** ename:VK_ATTACHMENT_STORE_OP_DONT_CARE means the contents within the + render area are not needed after rendering, and may: be discarded; the + contents of the attachment will be undefined inside the render area. +-- + * pname:stencilLoadOp specifies how the contents of stencil components of + the attachment are treated at the beginning of the subpass where it + is first used, and must: be one of the same values allowed for + pname:loadOp above. + * pname:stencilStoreOp specifies how the contents of stencil components of + the attachment are treated at the end of the last subpass where it + is used, and must: be one of the same values allowed for pname:storeOp + above. + * pname:initialLayout is the layout the attachment image subresource will + be in when a render pass instance begins. + * pname:finalLayout is the layout the attachment image subresource will be + transitioned to when a render pass instance ends. During a render pass + instance, an attachment can: use a different layout in each subpass, if + desired. + * pname:flags is a bitfield of elink:VkAttachmentDescriptionFlagBits + describing additional properties of the attachment: + +include::../enums/VkAttachmentDescriptionFlagBits.txt[] + +include::../validity/structs/VkAttachmentDescription.txt[] + +If the attachment uses a color format, then pname:loadOp and pname:storeOp +are used, and pname:stencilLoadOp and pname:stencilStoreOp are ignored. If +the format has depth and/or stencil components, pname:loadOp and +pname:storeOp apply only to the depth data, while pname:stencilLoadOp and +pname:stencilStoreOp define how the stencil data is handled. + +[[renderpass-precision]] +During a renderpass instance, input/color attachments with color formats +that have a component size of 8, 16, or 32 bits must: be represented in the +attachment's format throughout the instance. Attachments with other +floating- or fixed-point color formats, or with depth components may: be +represented in a format with a precision higher than the attachment format, +but must: be represented with the same range. When such a component is +loaded via the pname:loadOp, it will be converted into an +implementation-dependent format used by the render pass. Such components +must: be converted from the render pass format, to the format of the +attachment, before they are stored or resolved at the end of a render pass +instance via pname:storeOp. Conversions occur as described in +<> and +<>. + +[[renderpass-aliasing]] +If pname:flags includes ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT, then +the attachment is treated as if it shares physical memory with another +attachment in the same render pass. This information limits the ability of +the implementation to reorder certain operations (like layout transitions +and the pname:loadOp) such that it is not improperly reordered against +other uses of the same physical memory via a different attachment. This is +described in more detail below. + +If a render pass uses multiple attachments that alias the same device +memory, those attachments must: each include the +ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT bit in their attachment +description flags. Attachments aliasing the same memory occurs in +multiple ways: + + * Multiple attachments being assigned the same image view as part of + framebuffer creation. + * Attachments using distinct image views that correspond to the same + subresource of an image. + * Attachments using views of distinct image subresources which are bound + to overlapping memory. + +Render passes must: include subpass dependencies (either directly or via +a subpass dependency chain) between any two subpasses that operate on the +same attachment or aliasing attachments and those subpass dependencies must: +include execution and memory dependencies separating uses of the aliases, if +at least one of those subpasses writes to one of the aliases. Those +dependencies mustnot: include the ename:VK_DEPENDENCY_BY_REGION_BIT if the +aliases are views of distinct image subresources which overlap in memory. + +Multiple attachments that alias the same memory mustnot: be used in a single +subpass. A given attachment index mustnot: be used multiple times in a +single subpass, with one exception: two subpass attachments can: use the +same attachment index if at least one use is as an input attachment and +neither use is as a resolve or preserve attachment. In other words, the same +view can: be used simultaneously as an input and color or depth/stencil +attachment, but mustnot: be used as multiple color or depth/stencil +attachments nor as resolve or preserve attachments. This valid scenario is +described in more detail <>. + +If a set of attachments alias each other, then all except the first to be +used in the render pass must: use an pname:initialLayout of +ename:VK_IMAGE_LAYOUT_UNDEFINED, since the earlier uses of the other aliases +make their contents undefined. Once an alias has been used and a different +alias has been used after it, the first alias mustnot: be used in any later +subpasses. However, an application can: assign the same image view to +multiple aliasing attachment indices, which allows that image view to be +used multiple times even if other aliases are used in between. Once an +attachment needs the ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT bit, +there should: be no additional cost of introducing additional aliases, and +using these additional aliases may: allow more efficient clearing of the +attachments on multiple uses via ename:VK_ATTACHMENT_LOAD_OP_CLEAR. + +[NOTE] +.Note +==== +The exact set of attachment indices that alias with each other is not known +until a framebuffer is created using the render pass, so the above +conditions cannot: be validated at render pass creation time. +==== + +sname:VkSubpassDescription is defined as: + +include::../structs/VkSubpassDescription.txt[] + + * pname:flags is reserved for future use. + * pname:pipelineBindPoint is a elink:VkPipelineBindPoint value specifying + whether this is a compute or graphics subpass. Currently, only graphics + subpasses are supported. + * pname:inputAttachmentCount is the number of input attachments. + * pname:pInputAttachments is an array of slink:VkAttachmentReference + structures (defined below) that lists which of the render pass's + attachments can: be read in the shader during the subpass, and what + layout the attachment images will be in during the subpass. Each element + of the array corresponds to an input attachment unit number in the + shader, i.e. if the shader declares an input variable + `layout(input_attachment_index=X, set=Y, binding=Z)` then it uses the + attachment provided in pname:pInputAttachments[X]. Input attachments + must: also be bound to the pipeline with a descriptor set, with the + input attachment descriptor written in the location (set=Y, binding=Z). + * pname:colorAttachmentCount is the number of color attachments. + * pname:pColorAttachments is an array of pname:colorAttachmentCount + slink:VkAttachmentReference structures that lists which of the render + pass's attachments will be used as color attachments in the subpass, and + what layout the attachment images will be in during the subpass. Each + element of the array correponds to a fragment shader output location, + i.e. if the shader declared an output variable `layout(location=X)` then + it uses the attachment provided in pname:pColorAttachments[X]. + * pname:pResolveAttachments is `NULL` or a pointer to an array of + sname:VkAttachmentReference structures. If pname:pResolveAttachments is + not `NULL`, each of its elements corresponds to a color attachment (the + element in pname:pColorAttachments at the same index). At the end of + each subpass, the subpass's color attachments are resolved to + corresponding resolve attachments, unless the resolve attachment index + is ename:VK_ATTACHMENT_UNUSED or pname:pResolveAttachments is `NULL`. If + the first use of an attachment in a render pass is as a resolve + attachment, then the pname:loadOp is effectively ignored as the resolve + is guaranteed to overwrite all pixels in the render area. + * pname:pDepthStencilAttachment is a pointer to a + slink:VkAttachmentReference specifying which attachment will be used for + depth/stencil data and the layout it will be in during the subpass. + Setting the attachment index to ename:VK_ATTACHMENT_UNUSED or leaving + this pointer as `NULL` indicates that no depth/stencil attachment will + be used in the subpass. + * pname:preserveAttachmentCount is the number of preserved attachments. + * pname:pPreserveAttachments is an array of pname:preserveAttachmentCount + render pass attachment indices describing the attachments that + are not used by a subpass, but whose contents must: be preserved + throughout the subpass. + +The contents of an attachment within the render area become undefined at +the start of a subpass S if all of the following conditions are true: + + * The attachment is used as a color, depth/stencil, or resolve attachment + in any subpass in the render pass. + * There is a subpass S1 that uses or preserves the attachment, and a + subpass dependency from S1 to S. + * The attachment is not used or preserved in subpass S. + +Once the contents of an attachment become undefined in subpass S, they +remain undefined for subpasses in subpass dependency chains starting with +subpass S until they are written again. However, they remain valid for +subpasses in other subpass dependency chains starting with subpass S1 if +those subpasses use or preserve the attachment. + +include::../validity/structs/VkSubpassDescription.txt[] + +The sname:VkAttachmentReference structure is defined as: + +include::../structs/VkAttachmentReference.txt[] + + * pname:attachment is the index of the attachment of the render pass, and + corresponds to the index of the corresponding element in the + pname:pAttachments array of the sname:VkRenderPassCreateInfo structure. + If any color or depth/stencil attachments are + ename:VK_ATTACHMENT_UNUSED, then no writes occur for those attachments. + * pname:layout is a elink:VkImageLayout value specifying the layout the + attachment uses during the subpass. The implementation will + automatically perform layout transitions as needed between subpasses to + make each subpass use the requested layouts. + +include::../validity/structs/VkAttachmentReference.txt[] + +The sname:VkSubpassDependency structure is defined as: + +include::../structs/VkSubpassDependency.txt[] + + * pname:srcSubpass and pname:dstSubpass are the subpass indexes of the + producer and consumer subpasses, respectively. pname:srcSubpass and + pname:dstSubpass can: also have the special value + ename:VK_SUBPASS_EXTERNAL. The source subpass must: always be a lower + numbered subpass than the destination subpass (excluding external + subpasses and + <>), so that the order of subpass descriptions is a + valid execution ordering, avoiding cycles in the dependency graph. + * pname:srcStageMask, pname:dstStageMask, pname:srcAccessMask, + pname:dstAccessMask, and pname:dependencyFlags describe an + <> between subpasses. The bits that can: be included in + pname:dependencyFlags are: ++ +include::../enums/VkDependencyFlagBits.txt[] + + ** If pname:dependencyFlags contains ename:VK_DEPENDENCY_BY_REGION_BIT, + then the dependency is by-region as defined in + <>. + +Each subpass dependency defines an execution and memory dependency +between two sets of commands, with the second set depending on the first +set. When pname:srcSubpass does not equal pname:dstSubpass then the first +set of commands is: + + * All commands in the subpass indicated by pname:srcSubpass, if + pname:srcSubpass is not ename:VK_SUBPASS_EXTERNAL. + * All commands before the render pass instance, if pname:srcSubpass is + ename:VK_SUBPASS_EXTERNAL. + +While the corresponding second set of commands is: + + * All commands in the subpass indicated by pname:dstSubpass, if + pname:dstSubpass is not ename:VK_SUBPASS_EXTERNAL. + * All commands after the render pass instance, if pname:dstSubpass is + ename:VK_SUBPASS_EXTERNAL. + +When pname:srcSubpass equals pname:dstSubpass then the first set consists of +commands in the subpass before a call to flink:vkCmdPipelineBarrier and the +second set consists of commands in the subpass following that same call as +described in the +<> section. + +The pname:srcStageMask, pname:dstStageMask, pname:srcAccessMask, +pname:dstAccessMask, and pname:dependencyFlags parameters of the dependency +are interpreted the same way as for other dependencies, as described in +<>. + +include::../validity/structs/VkSubpassDependency.txt[] + +Automatic image layout transitions between subpasses also interact with the +subpass dependencies. If two subpasses are connected by a dependency and +those two subpasses use the same attachment in a different layout, then the +layout transition will occur after the memory accesses via +pname:srcAccessMask have completed in all pipeline stages included in +pname:srcStageMask in the source subpass, and before any memory accesses +via pname:dstAccessMask occur in any pipeline stages included in +pname:dstStageMask in the destination subpass. + +The automatic image layout transitions from pname:initialLayout to the first +used layout (if it is different) are performed according to the following +rules: + + * If the attachment does not include the + ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT bit and there is no + subpass dependency from ename:VK_SUBPASS_EXTERNAL to the first subpass + that uses the attachment, then it is as if there were such a dependency + with pname:srcStageMask = pname:srcAccessMask = 0 and pname:dstStageMask + and pname:dstAccessMask including all relevant bits (all graphics + pipeline stages and all access types that use image resources), with the + transition executing as part of that dependency. In other words, it may: + overlap work before the render pass instance and is complete before the + subpass begins. + * If the attachment does not include the + ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT bit and there is a subpass + dependency from ename:VK_SUBPASS_EXTERNAL to the first subpass that uses + the attachment, then the transition executes as part of that dependency + and according to its stage and access masks. It mustnot: overlap work + that came before the render pass instance that is included in the source + masks, but it may: overlap work in previous subpasses. + * If the attachment includes the + ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT bit, then the transition + executes according to all the subpass dependencies with pname:dstSubpass + equal to the first subpass index that the attachment is used in. That + is, it occurs after all memory accesses in the source stages and masks + from all the source subpasses have completed and are available, and + before the union of all the destination stages begin, and the new layout + is visible to the union of all the destination access types. If there + are no incoming subpass dependencies, then this case follows the first + rule. + +Similar rules apply for the transition to the pname:finalLayout, using +dependencies with pname:dstSubpass equal to ename:VK_SUBPASS_EXTERNAL + +If an attachment specifies the ename:VK_ATTACHMENT_LOAD_OP_CLEAR load +operation, then it will logically be cleared at the start of the first +subpass where it is used. + +[NOTE] +.Note +==== +Implementations may: move clears earlier as long as it does not affect the +operation of a render pass instance. For example, an implementation may: +choose to clear all attachments at the start of the render pass instance. If +an attachment has the ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT flag +set, then the clear must: occur at the start of subpass where the attachment +is first used, in order to preserve the operation of the render pass +instance. +==== + +The first use of an attachment mustnot: specify a layout equal to +ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL or +ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL if the attachment specifies +that the pname:loadOp is ename:VK_ATTACHMENT_LOAD_OP_CLEAR. If a subpass +uses the same attachment as both an input attachment and either a color +attachment or a depth/stencil attachment, then both uses must: observe the +result of the clear. + +Similarly, if an attachment specifies that the pname:storeOp is +ename:VK_ATTACHMENT_STORE_OP_STORE, then it will logically be stored at the +end of the last subpass where it is used. + +[NOTE] +.Note +==== +Implementations may: move stores +later as long as it does not affect the operation of a render pass instance. +If an attachment has the ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT flag +set, then the store must: occur at the end of the highest numbered subpass +that uses the attachment. +==== + +If an attachment is not used by any subpass, then the pname:loadOp and the +pname:storeOp are ignored and the attachment's memory contents will not be +modified by execution of a render pass instance. + +It will be common for a render pass to consist of a simple linear graph of +dependencies, where subpass N depends on subpass N-1 for all N, and the +operation of the memory barriers and layout transitions is fairly +straightforward to reason about for those simple cases. But for more complex +graphs, there are some rules that govern when there must be dependencies +between subpasses. + +As stated earlier, render passes must: include subpass dependencies which +(either directly or via a subpass dependency chain) separate any two +subpasses that operate on the same attachment or aliasing attachments, if at +least one of those subpasses writes to the attachment. If an image layout +changes between those two subpasses, the implementation uses the stageMasks +and accessMasks indicated by the subpass dependency as the masks that +control when the layout transition must: occur. If there is not a layout +change on the attachment, or if an implementation treats the two layouts +identically, then it may: treat the dependency as a simple execution/memory +barrier. + +If two subpasses use the same attachment in different layouts but both uses +are read-only (i.e. input attachment, or read-only depth/stencil +attachment), the application does not need to express a dependency between +the two subpasses. Implementations that treat the two layouts differently +may: deduce and insert a dependency between the subpasses, with the +implementation choosing the appropriate stage masks and access masks based +on whether the attachment is used as an input or depth/stencil attachment, +and may: insert the appropriate layout transition along with the +execution/memory barrier. Implementations that treat the two layouts +identically need not insert a barrier, and the two subpasses may: execute +simultaneously. The stage masks and access masks are chosen as follows: + + - for input attachments, stage mask = + ename:VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, access mask = + ename:VK_ACCESS_INPUT_ATTACHMENT_READ_BIT. + - for depth/stencil attachments, stage mask = + ename:VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | + ename:VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT, access mask = + ename:VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT + +where pname:srcStageMask and pname:srcAccessMask are taken based on usage in +the source subpass and pname:dstStageMask and pname:dstAccessMask are taken +based on usage in the destination subpass. + +[[renderpass-feedbackloop]] +If a subpass uses the same attachment as both an input attachment and either +a color attachment or a depth/stencil attachment, reads from the input +attachment are not automatically coherent with writes through the color or +depth/stencil attachment. In order to achieve well-defined results, one of +two criteria must: be satisfied. First, if the color components or +depth/stencil components read by the input attachment are mutually exclusive +with the components written by the color or depth/stencil +attachment then there is no _feedback loop_ and the reads and writes both +function normally, with the reads observing values from the previous +subpass(es) or from memory. This option requires the graphics pipelines +used by the subpass to disable writes to color components that are read as +inputs via the pname:colorWriteMask, and to disable writes to depth/stencil +components that are read as inputs via pname:depthWriteEnable or +pname:stencilTestEnable. + +Second, if the input attachment reads components that are written by the +color or depth/stencil attachment, then there is a feedback loop and a +pipeline barrier must: be used between when the attachment is written and +when it is subsequently read by later fragments. This pipeline barrier must: +follow the rules of a self-dependency as described in +<>, where the barrier's flags include: + + * pname:dstStageMask = ename:VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, + * pname:dstAccessMask = ename:VK_ACCESS_INPUT_ATTACHMENT_READ_BIT, and + * pname:srcAccessMask = ename:VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT (for + color attachments) or pname:srcAccessMask = + ename:VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT (for depth/stencil + attachments). + * pname:srcStageMask = ename:VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT + (for color attachments) or pname:srcStageMask = + ename:VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT | + ename:VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT (for depth/stencil + attachments). + * pname:dependencyFlags = ename:VK_DEPENDENCY_BY_REGION_BIT. + +A pipeline barrier is needed each time a fragment will read a particular +(x,y,layer,sample) location if that location has been written since the most +recent pipeline barrier, or since the start of the subpass if there have +been no pipeline barriers since the start of the subpass. + +An attachment used as both an input attachment and color attachment must: be +in the ename:VK_IMAGE_LAYOUT_GENERAL layout. An attachment used as both an +input attachment and depth/stencil attachment must: be in either the +ename:VK_IMAGE_LAYOUT_GENERAL or +ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL layout. Since an +attachment in the ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL +layout is read-only, this situation is not a feedback loop. + +To destroy a render pass, call: + +include::../protos/vkDestroyRenderPass.txt[] + + * pname:device is the logical device that destroys the render pass. + * pname:renderPass is the handle of the render pass to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroyRenderPass.txt[] + + +[[renderpass-compatibility]] +== Render Pass Compatibility + +Framebuffers and graphics pipelines are created based on a specific +render pass object. They must: only be used with that render pass object, or +one compatible with it. + +Two attachment references are compatible if they have matching format and +sample count, or are both ename:VK_ATTACHMENT_UNUSED or the pointer that +would contain the reference is `NULL`. + +Two arrays of attachment references are compatible if all corresponding +pairs of attachments are compatible. If the arrays are of different lengths, +attachment references not present in the smaller array are treated as +ename:VK_ATTACHMENT_UNUSED. + +Two render passes that contain only a single subpass are compatible if +their corresponding color, input, resolve, and depth/stencil attachment +references are compatible. + +If two render passes contain more than one subpass, they are compatible if +they are identical except for: + + * Initial and final image layout in attachment descriptions + * Load and store operations in attachment descriptions + * Image layout in attachment references + +A framebuffer is compatible with a render pass if it was created using the +same render pass or a compatible render pass. + + +== Framebuffers + +Render passes operate in conjunction with framebuffers, which represent a +collection of specific memory attachments that a render pass instance uses. + +An application creates a framebuffer by calling: + +include::../protos/vkCreateFramebuffer.txt[] + + * pname:device is the logical device that creates the framebuffer. + * pname:pCreateInfo points to a sname:VkFramebufferCreateInfo structure + which describes additional information about framebuffer creation. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pFramebuffer points to a sname:VkFramebuffer handle in which the + resulting framebuffer object is returned. + +include::../validity/protos/vkCreateFramebuffer.txt[] + +The sname:VkFramebufferCreateInfo structure is defined as: + +include::../structs/VkFramebufferCreateInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:renderPass is a render pass that defines what render passes the + framebuffer will be compatible with. See + <> for details. + * pname:attachmentCount is the number of attachments. + * pname:pAttachments is an array of sname:VkImageView handles, each of + which will be used as the corresponding attachment in a render pass + instance. + * pname:width, pname:height and pname:layers define the dimensions of the + framebuffer. + +include::../validity/structs/VkFramebufferCreateInfo.txt[] + +Image subresources used as attachments mustnot: be used via any +non-attachment usage for the duration of a render pass instance. + +[NOTE] +.Note +==== +This restriction means that the render pass has full knowledge of all uses +of all of the attachments, so that the implementation is able to make +correct decisions about when and how to perform layout transitions, when to +overlap execution of subpasses, etc. +==== + +[[renderpass-noattachments]] +It is legal for a subpass to use no color or depth/stencil attachments, and +rather use shader side effects such as image stores and atomics to produce +an output. In this case, the subpass continues to use the pname:width, +pname:height, and pname:layers of the framebuffer to define the dimensions +of the rendering area, and the pname:rasterizationSamples from each +pipeline's sname:VkPipelineMultisampleStateCreateInfo to define the number +of samples used in rasterization; however, if +sname:VkPhysicalDeviceFeatures::pname:variableMultisampleRate is +code:VK_FALSE, then all pipelines to be bound with a given zero-attachment +subpass must: have the same value for +sname:VkPipelineMultisampleStateCreateInfo::pname:rasterizationSamples. + +To destroy a framebuffer, call: + +include::../protos/vkDestroyFramebuffer.txt[] + + * pname:device is the logical device that destroys the framebuffer. + * pname:framebuffer is the handle of the framebuffer to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroyFramebuffer.txt[] + + +[[renderpass-commands]] +== Render Pass Commands + +An application records the commands for a render pass instance one subpass +at a time, by beginning a render pass instance, iterating over the subpasses +to record commands for that subpass, and then ending the render pass +instance. + +To begin a render pass instance, call: + +include::../protos/vkCmdBeginRenderPass.txt[] + + * pname:commandBuffer is the command buffer in which to record the + command. + * pname:pRenderPassBegin is a pointer to a sname:VkRenderPassBeginInfo + structure (defined below) which indicates the render pass to begin an + instance of, and the framebuffer the instance uses. + * pname:contents specifies how the commands in the first subpass will be + provided, and is one of the values: ++ +-- +include::../enums/VkSubpassContents.txt[] + +If pname:contents is ename:VK_SUBPASS_CONTENTS_INLINE, the contents of the +subpass will be recorded inline in the primary command buffer, and secondary +command buffers mustnot: be executed within the subpass. If pname:contents +is ename:VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS, the contents are +recorded in secondary command buffers that will be called from the primary +command buffer, and fname:vkCmdExecuteCommands is the only valid command on +the command buffer until fname:vkCmdNextSubpass or fname:vkCmdEndRenderPass. +-- + +include::../validity/protos/vkCmdBeginRenderPass.txt[] + +After beginning a render pass instance, the command buffer is ready to +record the commands for the first subpass of that render pass. + +[[renderpass-VkRenderPassBeginInfo]] +The sname:VkRenderPassBeginInfo structure is defined as: + +include::../structs/VkRenderPassBeginInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:renderPass is the render pass to begin an instance of. + * pname:framebuffer is the framebuffer containing the attachments that are + used with the render pass. + * pname:renderArea is the render area that is affected by the render pass + instance, and is described in more detail below. + * pname:clearValueCount is the number of elements in pname:pClearValues. + * pname:pClearValues is an array of sname:VkClearValue structures that + contains clear values for each attachment, if the attachment uses a + pname:loadOp value of ename:VK_ATTACHMENT_LOAD_OP_CLEAR. The array is + indexed by attachment number, with elements corresponding to uncleared + attachments being unused. + +include::../validity/structs/VkRenderPassBeginInfo.txt[] + +pname:renderArea is the render area that is affected by the render pass +instance. The effects of attachment load, store and resolve operations are +restricted to the pixels whose x and y coordinates fall within the render +area on all attachments. The render area extends to all layers of +pname:framebuffer. The application must: ensure (using scissor if necessary) +that all rendering is contained within the render area, otherwise the pixels +outside of the render area become undefined and shader side effects may: or +maynot: occur for fragments outside the render area. The render area must: +be contained within the framebuffer dimensions. + +[NOTE] +.Note +==== +There may: be a performance cost for using a render area smaller than the +framebuffer, unless it matches the render area granularity for the render +pass. +==== + +The render area granularity is queried by calling: + +include::../protos/vkGetRenderAreaGranularity.txt[] + + * pname:device is the logical device that owns the render pass. + * pname:renderPass is a handle to a render pass. + * pname:pGranularity points to a sname:VkExtent2D structure in which the + granularity is returned. + +include::../validity/protos/vkGetRenderAreaGranularity.txt[] + +The conditions leading to an optimal pname:renderArea are: + + * the pname:offset.x member in pname:renderArea is a multiple of the + pname:width member of the returned sname:VkExtent2D (the horizontal + granularity). + * the pname:offset.y member in pname:renderArea is a multiple of the + pname:height of the returned sname:VkExtent2D (the vertical + granularity). + * either the pname:offset.width member in pname:renderArea is a multiple + of the horizontal granularity or pname:offset.x+pname:offset.width is + equal to the pname:width of the pname:framebuffer in the + sname:VkRenderPassBeginInfo. + * either the pname:offset.height member in pname:renderArea is a multiple + of the vertical granularity or pname:offset.y+pname:offset.height is + equal to the pname:height of the pname:framebuffer in the + sname:VkRenderPassBeginInfo. + +After recording the commands for a subpass, an application transitions to +the next subpass in the render pass instance by calling: + +include::../protos/vkCmdNextSubpass.txt[] + + * pname:commandBuffer is the command buffer in which to record the + command. + * pname:contents specifies how the commands in the first subpass will be + provided, in the same fashion as the corresponding parameter of + flink:vkCmdBeginRenderPass. + +include::../validity/protos/vkCmdNextSubpass.txt[] + +The subpasses indices for a render pass begin at zero when +fname:vkCmdBeginRenderPass is recorded, and increments each time +fname:vkCmdNextSubpass is recorded. + +Moving to the next subpass automatically performs any multisample resolve +operations in the subpass being ended. End-of-subpass multisample resolves +are treated as color attachment writes for the purposes of synchronization. +That is, they are considered to execute in the +ename:VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage and their +writes are synchronized with ename:VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT. +Synchronization between rendering within a subpass and any resolve +operations at the end of the subpass occurs automatically, without need for +explicit dependencies or pipeline barriers. However, if the resolve +attachment is also used in a different subpass, an explicit dependency is +needed. + +After transitioning to the next subpass, the application can: record the +commands for that subpass. + +After recording the commands for the last subpass, an application records a +command to end a render pass instance by calling: + +include::../protos/vkCmdEndRenderPass.txt[] + + * pname:commandBuffer is the command buffer in which to end the current + render pass instance. + +include::../validity/protos/vkCmdEndRenderPass.txt[] + +Ending a render pass instance performs any multisample resolve operations on +the final subpass. diff --git a/doc/specs/vulkan/chapters/resources.txt b/doc/specs/vulkan/chapters/resources.txt new file mode 100644 index 00000000..98d2a688 --- /dev/null +++ b/doc/specs/vulkan/chapters/resources.txt @@ -0,0 +1,1204 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[resources]] += Resource Creation + +{apiname} supports two primary resource types: _buffers_ and _images_. +Resources are views of memory with associated formatting and dimensionality. +Buffers are essentially unformatted arrays of bytes whereas images contain +format information, can: be multidimensional and may: have associated +metadata. + + +[[resources-buffers]] +== Buffers + +Buffers represent linear arrays of data which are used for various +purposes by binding them to the graphics pipeline via descriptor sets or via +certain commands, or by directly specifying them as parameters to certain +commands. + +Buffers are created by calling: + +include::../protos/vkCreateBuffer.txt[] + + * pname:device is the logical device that creates the buffer object. + * pname:pCreateInfo is a pointer to an instance of the + sname:VkBufferCreateInfo structure containing parameters affecting + creation of the buffer. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pBuffer points to a sname:VkBuffer handle in which the resulting + buffer object is returned. + +include::../validity/protos/vkCreateBuffer.txt[] + +The definition of sname:VkBufferCreateInfo is: + +include::../structs/VkBufferCreateInfo.txt[] + +The members of sname:VkBufferCreateInfo have the following meanings: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is a bitfield describing additional parameters of the + buffer. See elink:VkBufferCreateFlagBits below for a description of the + supported bits. + * pname:size is the size in bytes of the buffer to be created. + * pname:usage is a bitfield describing the allowed usages of the buffer. + See elink:VkBufferUsageFlagBits below for a description of the supported + bits. + * pname:sharingMode is the sharing mode of the buffer when it will be + accessed by multiple queue families, see elink:VkSharingMode in the + <> section below for supported + values. + * pname:queueFamilyIndexCount is the number of entries in the + pname:pQueueFamilyIndices array. + * pname:pQueueFamilyIndices is a list of queue families that will + access this buffer (ignored if pname:sharingMode is not + ename:VK_SHARING_MODE_CONCURRENT). + +include::../validity/structs/VkBufferCreateInfo.txt[] + +Bits which may: be set in pname:usage are: + +include::../enums/VkBufferUsageFlagBits.txt[] + + * ename:VK_BUFFER_USAGE_TRANSFER_SRC_BIT indicates that the buffer can: be + used as the source of a _transfer command_ (see the definition of + <>). + * ename:VK_BUFFER_USAGE_TRANSFER_DST_BIT indicates that the buffer + can: be used as the destination of a transfer command. + * ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT indicates that the buffer + can: be used to create a sname:VkBufferView suitable for occupying a + sname:VkDescriptorSet slot of type + ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER. + * ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT indicates that the buffer + can: be used to create a sname:VkBufferView suitable for occupying a + sname:VkDescriptorSet slot of type + ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER. + * ename:VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT indicates that the buffer can: + be used in a sname:VkDescriptorBufferInfo suitable for occupying a + sname:VkDescriptorSet slot either of type + ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or + ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC. + * ename:VK_BUFFER_USAGE_STORAGE_BUFFER_BIT indicates that the buffer can: + be used in a sname:VkDescriptorBufferInfo suitable for occupying a + sname:VkDescriptorSet slot either of type + ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or + ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC. + * ename:VK_BUFFER_USAGE_INDEX_BUFFER_BIT indicates that the buffer is + suitable for passing as the pname:buffer parameter to + fname:vkCmdBindIndexBuffer. + * ename:VK_BUFFER_USAGE_VERTEX_BUFFER_BIT indicates that the buffer is + suitable for passing as an element of the pname:pBuffers array to + fname:vkCmdBindVertexBuffers. + * ename:VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT indicates that the buffer is + suitable for passing as the pname:buffer parameter to + fname:vkCmdDrawIndirect, fname:vkCmdDrawIndexedIndirect, or + fname:vkCmdDispatchIndirect. + +Any combination of bits can: be specified for pname:usage, but at least one +of the bits must: be set in order to create a valid buffer. + +Bits which may: be set in pname:flags are: + +include::../enums/VkBufferCreateFlagBits.txt[] + +These bitfields have the following meanings: + + * ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT indicates that the buffer will + be backed using sparse memory binding. + * ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT indicates that the buffer + can: be partially backed using sparse memory binding. + * ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT indicates that the buffer will + be backed using sparse memory binding with memory ranges that might also + simultaneously be backing another buffer (or another portion of the same + buffer). + +See <> and +<> for details of the sparse +memory features supported on a device. + +To destroy a buffer, call: + +include::../protos/vkDestroyBuffer.txt[] + + * pname:device is the logical device that destroys the buffer. + * pname:buffer is the buffer to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroyBuffer.txt[] + + +[[resources-buffer-views]] +== Buffer Views + +A _buffer view_ represents a contiguous range of a buffer and a specific +format to be used to interpret the data. Buffer views are used to enable +shaders to access buffer contents interpreted as formatted data. In order to +create a valid buffer view, the buffer must: have been created with at least +one of the following usage flags: + + * ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT + * ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT + +A buffer view is created by calling: + +include::../protos/vkCreateBufferView.txt[] + + * pname:device is the logical device that creates the buffer view. + * pname:pCreateInfo is a pointer to an instance of the + sname:VkBufferViewCreateInfo structure containing parameters to be used + to create the buffer. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pView points to a sname:VkBufferView handle in which the resulting + buffer view object is returned. + +include::../validity/protos/vkCreateBufferView.txt[] + +The definition of sname:VkBufferViewCreateInfo is: + +include::../structs/VkBufferViewCreateInfo.txt[] + +The members of sname:VkBufferViewCreateInfo have the following meanings: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:buffer is a sname:VkBuffer on which the view will be created. + * pname:format is a elink:VkFormat describing the format of the data + elements in the buffer. + * pname:offset is an offset in bytes from the base address of the buffer. + Accesses to the buffer view from shaders use addressing that is relative + to this starting offset. + * pname:range is a size in bytes of the buffer view. If pname:range is + equal to ename:VK_WHOLE_SIZE, the range from pname:offset to the end of + the buffer is used. If ename:VK_WHOLE_SIZE is used and the remaining + size of the buffer is not a multiple of the element size of + pname:format, then the nearest smaller multiple is used. + +include::../validity/structs/VkBufferViewCreateInfo.txt[] + +To destroy a buffer view, call: + +include::../protos/vkDestroyBufferView.txt[] + + * pname:device is the logical device that destroys the buffer view. + * pname:bufferView is the buffer view to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroyBufferView.txt[] + + +[[resources-images]] +== Images + +Images represent multidimensional - up to 3 - arrays of data which can: be +used for various purposes (e.g. attachments, textures), by binding them to +the graphics pipeline via descriptor sets, or by directly specifying them as +parameters to certain commands. + +Images are created by calling: + +include::../protos/vkCreateImage.txt[] + + * pname:device is the logical device that creates the image. + * pname:pCreateInfo is a pointer to an instance of the + sname:VkImageCreateInfo structure containing parameters to be used to + create the image. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pImage points to a sname:VkImage handle in which the resulting + image object is returned. + +include::../validity/protos/vkCreateImage.txt[] + +The definition of sname:VkImageCreateInfo is: + +include::../structs/VkImageCreateInfo.txt[] + +The members of sname:VkImageCreateInfo have the following meanings: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is a bitfield describing additional parameters of the image. + See elink:VkImageCreateFlagBits below for a description of the supported + bits. + * pname:imageType is the basic dimensionality of the image, and must: be + one of the values ++ +-- +include::../enums/VkImageType.txt[] + +specifying one-, two-, or three-dimensionality, respectively. Layers in +array textures do not count as a dimension for the purposes of the image +type. +-- + * pname:format is a elink:VkFormat describing the format and type of the + data elements that will be contained in the image. + * pname:extent is a slink:VkExtent3D describing the number of data + elements in each dimension of the base level. + * pname:mipLevels describes the number of levels of detail available for + minified sampling of the image. + * pname:arrayLayers is the number of layers in the image. + * pname:samples is the number of sub-data element samples in the image as + defined in elink:VkSampleCountFlagBits. See + <>. + * pname:tiling is the tiling arrangement of the data elements in + memory, and must: have one of the values: ++ +-- +include::../enums/VkImageTiling.txt[] + +ename:VK_IMAGE_TILING_OPTIMAL specifies optimal tiling (texels are laid out +in an implementation-dependent arrangement, for more optimal memory access), +and ename:VK_IMAGE_TILING_LINEAR specifies linear tiling (texels are laid +out in memory in row-major order, possibly with some padding on each row). +-- + * pname:usage is a bitfield describing the intended usage of the image. + See elink:VkImageUsageFlagBits below for a description of the supported + bits. + * pname:sharingMode is the sharing mode of the image when it will be + accessed by multiple queue families, and must: be one of the values + described for elink:VkSharingMode in the <> section below. + * pname:queueFamilyIndexCount is the number of entries in the + pname:pQueueFamilyIndices array. + * pname:pQueueFamilyIndices is a list of queue families that will + access this image (ignored if pname:sharingMode is not + ename:VK_SHARING_MODE_CONCURRENT). + * pname:initialLayout selects the initial elink:VkImageLayout state of all + subresources of the image. See <>. pname:initialLayout must: be ename:VK_IMAGE_LAYOUT_UNDEFINED + or ename:VK_IMAGE_LAYOUT_PREINITIALIZED. + +include::../validity/structs/VkImageCreateInfo.txt[] + +Valid limits for the image pname:extent, pname:mipLevels, pname:arrayLayers +and pname:samples members are queried with the +flink:vkGetPhysicalDeviceImageFormatProperties command. + +Images created with pname:tiling equal to ename:VK_IMAGE_TILING_LINEAR have +further restrictions on their limits and capabilities compared to images +created with pname:tiling equal to ename:VK_IMAGE_TILING_OPTIMAL. Creation +of images with tiling ename:VK_IMAGE_TILING_LINEAR maynot: be supported +unless other parameters meet all of the constraints: + + * pname:imageType is ename:VK_IMAGE_TYPE_2D + * pname:format is not a depth/stencil format + * pname:mipLevels is 1 + * pname:arrayLayers is 1 + * pname:samples is ename:VK_SAMPLE_COUNT_1_BIT + * pname:usage only includes ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT + and/or ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT + +Implementations may: support additional limits and capabilities beyond those +listed above. To determine the specific capabilities of an implementation, +query the valid pname:usage bits by calling +flink:vkGetPhysicalDeviceFormatProperties and the valid limits for +pname:mipLevels and pname:arrayLayers by calling +flink:vkGetPhysicalDeviceImageFormatProperties. + +Bits which may: be set in pname:usage are: + +include::../enums/VkImageUsageFlagBits.txt[] + +These bitfields have the following meanings: + + * ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT indicates that the image can: be + used as the source of a transfer command. + * ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT indicates that the image + can: be used as the destination of a transfer command. + * ename:VK_IMAGE_USAGE_SAMPLED_BIT indicates that the image can: be used + to create a sname:VkImageView suitable for occupying a + sname:VkDescriptorSet slot either of type + ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or + ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and be sampled by a + shader. + * ename:VK_IMAGE_USAGE_STORAGE_BIT indicates that the image can: be used + to create a sname:VkImageView suitable for occupying a + sname:VkDescriptorSet slot of type + ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE. + * ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT indicates that the image can: + be used to create a sname:VkImageView suitable for use as a color or + resolve attachment in a sname:VkFramebuffer. + * ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT indicates that the + image can: be used to create a sname:VkImageView suitable for use as a + depth/stencil attachment in a sname:VkFramebuffer. + * ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT indicates that the memory + bound to this image will have been allocated with the + ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT (see <> for more + detail). If this is set, then bits other than + ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, + ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and + ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT mustnot: be set. + * ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT indicates that the image can: + be used to create a sname:VkImageView suitable for occupying + sname:VkDescriptorSet slot of type + ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT; be read from a shader as an + input attachment; and be used as an input attachment in a framebuffer. + +Bits which may: be set in pname:flags are: + +include::../enums/VkImageCreateFlagBits.txt[] + +These bitfields have the following meanings: + + * ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT indicates that the image will + be backed using sparse memory binding. + * ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT indicates that the image can: + be partially backed using sparse memory binding. + * ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT indicates that the image will + be backed using sparse memory binding with memory ranges that might also + simultaneously be backing another image (or another portion of the same + image). Sparse images created with this flag must: also be created with + the ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT. + +If any of these three bits are set, +ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT mustnot: also be set. + +See <> and +<> for +more details. + + * ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT indicates that the image can: + be used to create a slink:VkImageView with a different format from the + image. + * ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT indicates that the image can: + be used to create a slink:VkImageView of type + ename:VK_IMAGE_VIEW_TYPE_CUBE or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY. + +The layout of a subresource (mipLevel/arrayLayer) of an image created with +linear tiling is queried by calling: + +include::../protos/vkGetImageSubresourceLayout.txt[] + + * pname:device is the logical device that owns the image. + * pname:image is the image whose layout is being queried. + * pname:pSubresource is a pointer to a slink:VkImageSubresource structure + selecting a specific image for the subresource. + * pname:pLayout points to a slink:VkSubresourceLayout structure in which + the layout is returned. + +include::../validity/protos/vkGetImageSubresourceLayout.txt[] + +The definition of the sname:VkImageSubresource structure is: + +include::../structs/VkImageSubresource.txt[] + + * pname:aspectMask is a elink:VkImageAspectFlags selecting the image + aspect. + * pname:mipLevel selects the mipmap level. + * pname:arrayLayer selects the array layer. + +include::../validity/structs/VkImageSubresource.txt[] + +Information about the layout of the subresource is returned in a +sname:VkSubresourceLayout structure: + +include::../structs/VkSubresourceLayout.txt[] + + * pname:offset is the byte offset from the start of the image where the + subresource begins. + * pname:size is the size in bytes of the subresource. pname:size includes + any extra memory that is required based on the value of pname:rowPitch. + * pname:rowPitch describes the number of bytes between each row of texels + in an image. + * pname:arrayPitch describes the number of bytes between each array layer + of an image. + * pname:depthPitch describes the number of bytes between each slice of 3D + image. + +include::../validity/structs/VkSubresourceLayout.txt[] + +For images created with linear tiling, pname:rowPitch, pname:arrayPitch and +pname:depthPitch describe the layout of the subresource in linear memory. +For uncompressed formats, pname:rowPitch is the number of bytes between +texels with the same x coordinate in adjacent rows (y coordinates differ by +one). pname:arrayPitch is the number of bytes between texels with the same x +and y coordinate in adjacent array layers of the image (array layer values +differ by one). pname:depthPitch is the number of bytes between texels with +the same x and y coordinate in adjacent slices of a 3D image (z coordinates +differ by one). Expressed as an addressing formula, the starting byte of a +texel in the subresource has address: + +[source,c] +--------------------------------------------------- +// (x,y,z,layer) are in texel coordinates +address(x,y,z,layer) = layer*arrayPitch + z*depthPitch + y*rowPitch + x*texelSize + offset +--------------------------------------------------- + +For compressed formats, the pname:rowPitch is the number of bytes between +compressed blocks in adjacent rows. pname:arrayPitch is the number of bytes +between blocks in adjacent array layers. pname:depthPitch is the number of +bytes between blocks in adjacent slices of a 3D image. + +[source,c] +--------------------------------------------------- +// (x,y,z,layer) are in block coordinates +address(x,y,z,layer) = layer*arrayPitch + z*depthPitch + y*rowPitch + x*blockSize + offset; + +--------------------------------------------------- + +pname:arrayPitch is undefined for images that were not created as arrays. +pname:depthPitch is defined only for 3D images. + +For color formats, the pname:aspectMask member of sname:VkImageSubresource +must: be ename:VK_IMAGE_ASPECT_COLOR_BIT. For depth/stencil formats, +pname:aspect must: be either ename:VK_IMAGE_ASPECT_DEPTH_BIT or +ename:VK_IMAGE_ASPECT_STENCIL_BIT. On implementations that store depth and +stencil aspects separately, querying each of these subresource layouts will +return a different pname:offset and pname:size representing the region of +memory used for that aspect. On implementations that store depth and stencil +aspects interleaved, the same pname:offset and pname:size are returned and +represent the interleaved memory allocation. + +To destroy an image, call: + +include::../protos/vkDestroyImage.txt[] + + * pname:device is the logical device that destroys the image. + * pname:image is the image to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroyImage.txt[] + + +[[resources-image-layouts]] +== Image Layouts + +Images are stored in implementation-dependent opaque layouts in memory. +Implementations may: support several opaque layouts, and the layout used at +any given time is determined by the elink:VkImageLayout state of the +subresource. Each layout has limitations on what kinds of operations are +supported for subresources using the layout. Applications have control over +which layout each image subresource uses, and can: transition an image +subresource from one layout to another. Transitions can: happen with an +image memory barrier, included as part of a fname:vkCmdPipelineBarrier or a +fname:vkCmdWaitEvents command buffer command (see +<>), or as part of a subpass +dependency within a render pass (see sname:VkSubpassDependency). The image +layout state is per-subresource, and separate subresources of the same image +can: be in different layouts at the same time with one exception - depth and +stencil aspects of a given subresource must: always be in the same layout. + +[NOTE] +.Note +==== +Each layout may: offer optimal performance for a specific usage of image +memory. For example, an image with a layout of +ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL may: provide optimal +performance for use as a color attachment, but be unsupported for use in +transfer commands. Applications can: transition an image subresource from +one layout to another in order to achieve optimal performance when the +subresource is used for multiple kinds of operations. After initialization, +applications need not use any layout other than the general layout, though +this may: produce suboptimal performance on some implementations. +==== + +Upon creation, all subresources of an image are initially in the same +layout, where that layout is selected by the +sname:VkImageCreateInfo::pname:initialLayout member. The pname:initialLayout +must: be either ename:VK_IMAGE_LAYOUT_UNDEFINED or +ename:VK_IMAGE_LAYOUT_PREINITIALIZED. If it is +ename:VK_IMAGE_LAYOUT_PREINITIALIZED, then the image data can: be +pre-initialized by the host while using this layout, and the transition away +from this layout will preserve that data. If it is +ename:VK_IMAGE_LAYOUT_UNDEFINED, then the contents of the data are +considered to be undefined, and the transition away from this layout is not +guaranteed to preserve that data. For either of these initial layouts, any +subresources must: be transitioned to another layout before they are +accessed by the device. + +Host access to image memory is only well-defined for images created with +ename:VK_IMAGE_TILING_LINEAR tiling and for subresources of those images +which are currently in either the ename:VK_IMAGE_LAYOUT_PREINITIALIZED or +ename:VK_IMAGE_LAYOUT_GENERAL layout. + +The set of image layouts consists of: + +include::../enums/VkImageLayout.txt[] + +The type(s) of device access supported by each layout are: + + * ename:VK_IMAGE_LAYOUT_UNDEFINED: Supports no device access. This layout + must: only be used as an pname:initialLayout or as the pname:oldLayout + in an image transition. When transitioning out of this layout, the + contents of the memory are not guaranteed to be preserved. + * ename:VK_IMAGE_LAYOUT_PREINITIALIZED: Supports no device access. This + layout must: only be used as an pname:initialLayout or as the + pname:oldLayout in an image transition. When transitioning out of this + layout, the contents of the memory are preserved. This + layout is intended to be used as the initial layout for an image whose + contents are written by the host, and hence the data can: be written to + memory immediately, without first executing a layout transition. + Currently, ename:VK_IMAGE_LAYOUT_PREINITIALIZED is only useful with + ename:VK_IMAGE_TILING_LINEAR images because there is not a standard + layout defined for ename:VK_IMAGE_TILING_OPTIMAL images. + * ename:VK_IMAGE_LAYOUT_GENERAL: Supports all types of device access. + * ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL: must: only be used as a + color or resolve attachment in a sname:VkFramebuffer. This layout is + valid only for subresources of images created with the + ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT usage bit enabled. + * ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL: must: only be + used as a depth/stencil attachment in a sname:VkFramebuffer. This layout + is valid only for subresources of images created with the + ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage bit enabled. + * ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL: must: only be + used as a read-only depth/stencil attachment in a sname:VkFramebuffer + and/or as a read-only image in a shader (which can: be read as a sampled + image, combined image/sampler and/or input attachment). This layout is + valid only for subresources of images created with both the + ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT usage bit enabled. + * ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL: must: only be used as a + read-only image in a shader (which can: be read as a sampled image, + combined image/sampler and/or input attachment). This layout is valid + only for subresources of images created with the + ename:VK_IMAGE_USAGE_SAMPLED_BIT or + ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage bit enabled. + * ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL: must: only be used as a + source image of a transfer command (see the definition of + <>). + This layout is valid only for subresources of images created with the + ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage bit enabled. + * ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL: must: only be used as a + destination image of a transfer command. This layout is valid only for + subresources of images created with the + ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage bit enabled. + +For each mechanism of accessing an image in the API, there is a parameter or +structure member that controls the image layout used to access the image. +For transfer commands, this is a parameter to the command (see <> +and <>). For use as a framebuffer attachment, this is a member in +the substructures of the sname:VkRenderPassCreateInfo (see +<>). For use in a descriptor set, this is a member +in the sname:VkDescriptorImageInfo structure (see +<>). At the time that any command buffer command +accessing an image executes on any queue, the layouts of the image +subresources that are accessed must: all match the layout specified via the +API controlling those accesses. + +The image layout of each image subresource must: be well-defined at each +point in the subresource's lifetime. This means that when performing a +layout transition on the subresource, the old layout value must: either +equal the current layout of the subresource (at the time the transition +executes), or else be ename:VK_IMAGE_LAYOUT_UNDEFINED (implying that the +contents of the subresource need not be preserved). The new layout used in a +transition mustnot: be ename:VK_IMAGE_LAYOUT_UNDEFINED or +ename:VK_IMAGE_LAYOUT_PREINITIALIZED. + + +[[resources-image-views]] +== Image Views + +Image objects are not directly accessed by pipeline shaders for reading or +writing image data. Instead, _image views_ representing contiguous ranges of +the image subresources and containing additional metadata are used for that +purpose. Views must: be created on images of compatible types, and must: +represent a valid subset of image subresources. + +The types of image views that can: be created are: + +include::../enums/VkImageViewType.txt[] + +The exact image view type is partially implicit, based on the image's type +and sample count, as well as the view creation parameters as described in +the <>. This table also +shows which SPIR-V OpTypeImage Dim and Arrayed parameters correspond to each +image view type. + +To create an image view, call: + +include::../protos/vkCreateImageView.txt[] + + * pname:device is the logical device that creates the image view. + * pname:pCreateInfo is a pointer to an instance of the + sname:VkImageViewCreateInfo structure containing parameters to be used + to create the image view. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pView points to a sname:VkImageView handle in which the resulting + image view object is returned. + +Some of the image creation parameters are inherited by the view. The +remaining parameters are contained in the pname:pCreateInfo. + +include::../validity/protos/vkCreateImageView.txt[] + +The sname:VkImageViewCreateInfo structure is defined as: + +include::../structs/VkImageViewCreateInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:image is a sname:VkImage on which the view will be created. + * pname:viewType is the type of the image view. + * pname:format is a elink:VkFormat describing the format and type used to + interpret data elements in the image. + * pname:components specifies a remapping of color components (or of depth + or stencil components after they have been converted into color + components). See slink:VkComponentMapping. + * pname:subresourceRange selects the set of mipmap levels and array layers + to be accessible to the view. + +include::../validity/structs/VkImageViewCreateInfo.txt[] + +If pname:image was created with the ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT +flag, pname:format can: be different from the image's format, but if they +are not equal they must: be _compatible_. Image format compatibility is +defined in the <> section. + +[[resources-image-views-compatibility]] +.Image and image view parameter compatibility requirements +[cols="20%h,35%,45%",options="header"] +|======================================== +| Dim, Arrayed, MS | Image parameters | View parameters +| 1D, 0, 0 | +imageType = IMAGE_TYPE_1D + +width >= 1 + +height = 1 + +depth = 1 + +arrayLayers >= 1 + +samples = 1 | +viewType = VIEW_TYPE_1D + +baseArrayLayer >= 0 + +arrayLayers = 1 +| 1D, 1, 0 | +imageType = IMAGE_TYPE_1D + +width >= 1 + +height = 1 + +depth = 1 + +arrayLayers >= 1 + +samples = 1 | +viewType = VIEW_TYPE_1D_ARRAY + +baseArrayLayer >= 0 + +arrayLayers >= 1 +| 2D, 0, 0 | +imageType = IMAGE_TYPE_2D + +width >= 1 + +height >= 1 + +depth = 1 + +arrayLayers >= 1 + +samples = 1 | +viewType = VIEW_TYPE_2D + +baseArrayLayer >= 0 + +arrayLayers = 1 +| 2D, 1, 0 | +imageType = IMAGE_TYPE_2D + +width >= 1 + +height >= 1 + +depth = 1 + +arrayLayers >= 1 + +samples = 1 | +viewType = VIEW_TYPE_2D_ARRAY + +baseArrayLayer >= 0 + +arrayLayers >= 1 +| 2D, 0, 1 | +imageType = IMAGE_TYPE_2D + +width >= 1 + +height >= 1 + +depth = 1 + +arrayLayers >= 1 + +samples > 1 | +viewType = VIEW_TYPE_2D + +baseArrayLayer >= 0 + +arrayLayers = 1 +| 2D, 1, 1 | +imageType = IMAGE_TYPE_2D + +width >= 1 + +height >= 1 + +depth = 1 + +arrayLayers >= 1 + +samples > 1 | +viewType = VIEW_TYPE_2D_ARRAY + +baseArrayLayer >= 0 + +arrayLayers >= 1 +| CUBE, 0, 0 | +imageType = IMAGE_TYPE_2D + +width >= 1 + +height = width + +depth = 1 + +arrayLayers >= 6 + +samples = 1 + +flags include ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT | +viewType = VIEW_TYPE_CUBE + +baseArrayLayer >= 0 + +arrayLayers = 6 +| CUBE, 1, 0 | +imageType = IMAGE_TYPE_2D + +width >= 1 + +height = width + +depth = 1 + +arrayLayers >= 6×N + +samples = 1 + +flags include ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT | +viewType = VIEW_TYPE_CUBE_ARRAY + +baseArrayLayer >= 0 + +arrayLayers = 6×N +| 3D, 0, 0 | +imageType = IMAGE_TYPE_3D + +width >= 1 + +height >= 1 + +depth >= 1 + +arrayLayers = 1 + +samples = 1 | +viewType = VIEW_TYPE_3D + +baseArrayLayer = 0 + +arrayLayers = 1 +|======================================== + + + +The pname:subresourceRange member is of type sname:VkImageSubresourceRange +and is defined as: + +include::../structs/VkImageSubresourceRange.txt[] + + * pname:aspectMask is a bitmask indicating which aspect(s) of the image + are included in the view. See elink:VkImageAspectFlagBits. + * pname:baseMipLevel is the first mipmap level accessible to the view. + * pname:levelCount is the number of mipmap levels (starting from + pname:baseMipLevel) accessible to the view. + * pname:baseArrayLayer is the first array layer accessible to the view. + * pname:layerCount is the number of array layers (starting from + pname:baseArrayLayer) accessible to the view. + +include::../validity/structs/VkImageSubresourceRange.txt[] + +The number of mip-map levels and array layers must: be a subset of the +subresources in the image. If an application wants to use all mip-levels or +layers in an image after the pname:baseMipLevel or pname:baseArrayLayer, it +can: set pname:levelCount and pname:layerCount to the special values +ename:VK_REMAINING_MIP_LEVELS and ename:VK_REMAINING_ARRAY_LAYERS without +knowing the exact number of mip-levels or layers. + +For cube and cube array image views, the layers of the image view starting +at pname:baseArrayLayer correspond to faces in the order +X, -X, +Y, -Y, +Z, +-Z. For cube arrays, each set of six sequential layers is a single cube, so +the number of cube maps in a cube map array view is _pname:layerCount / 6_, +and image array layer _pname:baseArrayLayer + i_ is face index _i mod 6_ of +cube _i / 6_. If the number of layers in the view, whether set explicitly in +pname:layerCount or implied by ename:VK_REMAINING_ARRAY_LAYERS, is not a +multiple of 6, behavior when indexing the last cube is undefined. + +pname:aspectMask is a bitmask indicating the format being used. Bits which +may: be set include: + +include::../enums/VkImageAspectFlagBits.txt[] + +The mask must: be only ename:VK_IMAGE_ASPECT_COLOR_BIT, +ename:VK_IMAGE_ASPECT_DEPTH_BIT or ename:VK_IMAGE_ASPECT_STENCIL_BIT if +pname:format is a color, depth-only or stencil-only format, respectively. If +using a depth/stencil format with both depth and stencil components, +pname:aspectMask must: include at least one of +ename:VK_IMAGE_ASPECT_DEPTH_BIT and ename:VK_IMAGE_ASPECT_STENCIL_BIT, and +can: include both. + +When using an imageView of a depth/stencil image to populate a descriptor +set (e.g. for sampling in the shader, or for use as an input attachment), +the pname:aspectMask must: only include one bit and selects whether the +imageView is used for depth reads (i.e. using a floating-point sampler or +input attachment in the shader) or stencil reads (i.e. using an unsigned +integer sampler or input attachment in the shader). When an imageView of a +depth/stencil image is used as a depth/stencil framebuffer attachment, the +pname:aspectMask is ignored and both depth and stencil subresources are +used. + +The pname:components member is defined as follows: + +include::../structs/VkComponentMapping.txt[] + +and describes a remapping from components of the image to components of the +vector returned by shader image instructions. This remapping must: be +identity for storage image descriptors, input attachment descriptors, and +framebuffer attachments. The pname:r, pname:g, pname:b, and pname:a members +of pname:components are the values placed in the corresponding components of +the output vector: + +include::../enums/VkComponentSwizzle.txt[] + + * ename:VK_COMPONENT_SWIZZLE_IDENTITY: the component is set to the + identity swizzle. + * ename:VK_COMPONENT_SWIZZLE_ZERO: the component is set to zero. + * ename:VK_COMPONENT_SWIZZLE_ONE: the component is set to either 1 or 1.0 + depending on whether the type of the image view format is integer or + floating-point respectively, as determined by the + <> section for each + elink:VkFormat. + * ename:VK_COMPONENT_SWIZZLE_R: the component is set to the value + of the R component of the image. + * ename:VK_COMPONENT_SWIZZLE_G: the component is set to the value + of the G component of the image. + * ename:VK_COMPONENT_SWIZZLE_B: the component is set to the value + of the B component of the image. + * ename:VK_COMPONENT_SWIZZLE_A: the component is set to the value + of the A component of the image. + +include::../validity/structs/VkComponentMapping.txt[] + +Setting the identity swizzle on a component is equivalent to setting the +identity mapping on that component. That is: + + +[[resources-image-views-identity-mappings]] +.Component Mappings Equivalent To ename:VK_COMPONENT_SWIZZLE_IDENTITY +[options="header"] +|==== +| Component | Identity Mapping +| pname:components.r | ename:VK_COMPONENT_SWIZZLE_R +| pname:components.g | ename:VK_COMPONENT_SWIZZLE_G +| pname:components.b | ename:VK_COMPONENT_SWIZZLE_B +| pname:components.a | ename:VK_COMPONENT_SWIZZLE_A +|==== + +To destroy an image view, call: + +include::../protos/vkDestroyImageView.txt[] + + * pname:device is the logical device that destroys the image view. + * pname:imageView is the image view to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroyImageView.txt[] + + +[[resources-association]] +== Resource Memory Association + +Resources are initially created as _virtual allocations_ with no backing +memory. Device memory is allocated separately (see <>) and +then associated with the resource. This association is done differently for +sparse and non-sparse resources. + +Resources created with any of the sparse creation flags are considered +sparse resources. Resources created without these flags are non-sparse. The +details on resource memory association for sparse resources is described in +<>. + +Non-sparse resources must: be bound completely and contiguously to a single +slink:VkDeviceMemory object before the resource is passed as a parameter to +any of the following operations: + + * creating image or buffer views + * updating descriptor sets + * recording commands in a command buffer + +Once bound, the memory binding is immutable for the lifetime of the +resource. + +To determine the memory requirements for a non-sparse buffer resource, call: + +include::../protos/vkGetBufferMemoryRequirements.txt[] + + * pname:device is the logical device that owns the buffer. + * pname:buffer is the buffer to query. + * pname:pMemoryRequirements points to an instance of the + slink:VkMemoryRequirements structure in which the memory requirements of + the buffer object are returned. + +include::../validity/protos/vkGetBufferMemoryRequirements.txt[] + +To determine the memory requirements for a non-sparse image resource, call: + +include::../protos/vkGetImageMemoryRequirements.txt[] + + * pname:device is the logical device that owns the image. + * pname:image is the image to query. + * pname:pMemoryRequirements points to an instance of the + slink:VkMemoryRequirements structure in which the memory requirements of + the image object are returned. + +include::../validity/protos/vkGetImageMemoryRequirements.txt[] + +The sname:VkMemoryRequirements structure returned by +flink:vkGetBufferMemoryRequirements and flink:vkGetImageMemoryRequirements +is defined as follows: + +include::../structs/VkMemoryRequirements.txt[] + + * pname:size is the size, in bytes, of the memory allocation required: for + the resource. + * pname:alignment is the alignment, in bytes, of the offset within the + allocation required: for the resource. + * pname:memoryTypeBits is a bitfield and contains one bit set for every + supported memory type for the resource. Bit `i` is set if and only if + the memory type `i` in the sname:VkPhysicalDeviceMemoryProperties + structure for the physical device is supported for the resource. + +include::../validity/structs/VkMemoryRequirements.txt[] + +The implementation guarantees certain properties about the memory +requirements returned by flink:vkGetBufferMemoryRequirements and +flink:vkGetImageMemoryRequirements: + + * The pname:memoryTypeBits member always contains at least one bit set. + * If pname:buffer is a sname:VkBuffer, or if pname:image is a + sname:VkImage that was created with a ename:VK_IMAGE_TILING_LINEAR value + in the pname:tiling member of the sname:VkImageCreateInfo structure + passed to fname:vkCreateImage, then the pname:memoryTypeBits member + always contains at least one bit set corresponding to a + sname:VkMemoryType with a pname:propertyFlags that has both the + ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT bit and the + ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT bit set. In other words, + mappable coherent memory can: always be attached to these objects. + * The value of the pname:memoryTypeBits member is identical for all + sname:VkBuffer objects created with the same value for the pname:flags + and pname:usage members in the sname:VkBufferCreateInfo structure passed + to fname:vkCreateBuffer. Further, if code:usage1 and code:usage2 of type + elink:VkBufferUsageFlags are such that code:usage2 contains a subset of + the bits set in code:usage1 and they have the same value of pname:flags, + then the bits set in the value of pname:memoryTypeBits returned for + code:usage1 must: be a subset of the bits set in the value of + pname:memoryTypeBits returned for code:usage2, for all values of + pname:flags. + * The value of the pname:alignment member is identical for all + sname:VkBuffer objects created with the same combination of values for + the pname:usage and pname:flags members in the sname:VkBufferCreateInfo + structure passed to fname:vkCreateBuffer. + * The value of the pname:memoryTypeBits member is identical for all + sname:VkImage objects created with the same combination of values for + the pname:tiling member and the ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT + bit of the pname:flags member and the + ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT of the pname:usage member + in the sname:VkImageCreateInfo structure passed to fname:vkCreateImage. + * The pname:memoryTypeBits member mustnot: refer to a sname:VkMemoryType + with a pname:propertyFlags that has the + ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set if the + sname:VkImage does not have + ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT bit set in the pname:usage + member of the sname:VkImageCreateInfo structure passed to + fname:vkCreateImage. + +To attach memory to a buffer object, call: + +include::../protos/vkBindBufferMemory.txt[] + + * pname:device is the logical device that owns the buffer and memory. + * pname:buffer is the buffer. + * pname:memory is a sname:VkDeviceMemory object describing the device + memory to attach. + * pname:memoryOffset is the start offset of the region of pname:memory + which is to be bound to the buffer. The number of bytes returned in the + sname:VkMemoryRequirements::pname:size member in pname:memory, starting + from pname:memoryOffset bytes, will be bound to the specified buffer. + +include::../validity/protos/vkBindBufferMemory.txt[] + +To attach memory to a image object, call: + +include::../protos/vkBindImageMemory.txt[] + + * pname:device is the logical device that owns the image and memory. + * pname:image is the image. + * pname:memory is the a sname:VkDeviceMemory object describing the device + memory to attach. + * pname:memoryOffset is the start offset of the region of pname:memory + which is to be bound to the image. The number of bytes returned in the + sname:VkMemoryRequirements::pname:size member in pname:memory, starting + from pname:memoryOffset bytes, will be bound to the specified image. + +include::../validity/protos/vkBindImageMemory.txt[] + +[[resources-bufferimagegranularity,Buffer-Image Granularity]] +.Buffer-Image Granularity +There is an implementation-dependent limit, pname:bufferImageGranularity, +which specifies a page-like granularity at which buffer, linear image and +optimal image resources must be placed in adjacent memory locations for +simultaneous usage. Two resources which do not satisfy this granularity +requirement are said to <>. Linear image +resource are images created with ename:VK_IMAGE_TILING_LINEAR and optimal +linear resources are those created with ename:VK_IMAGE_TILING_OPTIMAL. +pname:bufferImageGranularity is specified in bytes, and must: be a power of +two. Implementations which do not require such an additional granularity +may: report a value of one. + +Given resourceA at the lower memory offset and resourceB at the higher +memory offset, where one of the resources is a buffer and the other is an +image, and the following: + + resourceA.end = resourceA.memoryOffset + resourceA.size - 1 + resourceA.endPage = resourceA.end & ~(bufferImageGranularity-1) + resourceB.start = resourceB.memoryOffset + resourceB.startPage = resourceB.start & ~(bufferImageGranularity-1) + +The following property must: hold: + + resourceA.endPage < resourceB.startPage + +That is, the end of the first resource (A) and the beginning of the second +resource (B) must: be on separate ``pages'' of size +pname:bufferImageGranularity. pname:bufferImageGranularity may: be +different than the physical page size of the memory heap. This +restriction is only needed for adjacent image and buffer memory locations +which will be used simultaneously. Adjacent buffers' or adjacent images' +memory ranges can: be closer than pname:bufferImageGranularity, provided +they meet the pname:alignment requirement for the objects in question. + +Sparse memory block sizes and sparse image and buffer memory alignments +must: all be multiples of the pname:bufferImageGranularity. Therefore, +memory bound to sparse resources naturally satisfies the +pname:bufferImageGranularity. + +[[resources-sharing]] +== Resource Sharing Mode + +Buffer and image objects are created with a _sharing mode_ controlling how +they can: be accessed from queues. The supported sharing modes are: + +include::../enums/VkSharingMode.txt[] + + * ename:VK_SHARING_MODE_EXCLUSIVE specifies that access to any range or + subresource of the object will be exclusive to a single queue family at + a time. + * ename:VK_SHARING_MODE_CONCURRENT specifies that concurrent access to any + range or subresource of the object from multiple queue families is + supported. + +[NOTE] +.Note +==== +ename:VK_SHARING_MODE_CONCURRENT may: result in lower performance access to +the buffer or image than ename:VK_SHARING_MODE_EXCLUSIVE. +==== + +Ranges of buffers and subresources of image objects created using +ename:VK_SHARING_MODE_EXCLUSIVE must: only be accessed by queues in the same +queue family at any given time. In order for a different queue family to be +able to interpret the memory contents of a range or subresource, the +application must: transfer exclusive ownership of the range or subresource +between the source and destination queue families with the following +sequence of operations: + +1. Release exclusive ownership from the source queue family to the + destination queue family. +2. Use semaphores to ensure proper execution control for the ownership + transfer. +3. Acquire exclusive ownership for the destination queue family from the + source queue family. + +To release exclusive ownership of a range of a buffer or subresource of an +image object, the application must: execute a buffer or image memory +barrier, respectively (see slink:VkBufferMemoryBarrier and +slink:VkImageMemoryBarrier) on a queue from the source queue family. The +pname:srcQueueFamilyIndex parameter of the barrier must: be set to the +source queue family index, and the pname:dstQueueFamilyIndex parameter to +the destination queue family index. + +To acquire exclusive ownership, the application must: execute the same +buffer or image memory barrier on a queue from the destination queue family. + +Upon creation, resources using ename:VK_SHARING_MODE_EXCLUSIVE are not owned +by any queue family. A buffer or image memory barrier is not required to +acquire ownership when no queue family owns the resource - it is implicitly +acquired upon first use within a queue. However, images still require a +<> from +ename:VK_IMAGE_LAYOUT_UNDEFINED or ename:VK_IMAGE_LAYOUT_PREINITIALIZED +before being used on the first queue. This layout transition can: either be +accomplished by an image memory barrier or by use in a render pass instance. + +Once a queue family has used a range or subresource of an +ename:VK_SHARING_MODE_EXCLUSIVE resource, its contents are undefined to +other queue families unless ownership is transferred. The contents may: also +become undefined for other reasons, e.g. as a result of writes to an image +subresource that aliases the same memory. A queue family can: take ownership +of a range or subresource without an ownership transfer in the same way as +for a resource that was just created, however doing so means any contents +written by other queue families or via incompatible aliases are undefined. + + +[[resources-memory-aliasing]] +== Memory Aliasing + +A range of a sname:VkDeviceMemory allocation is _aliased_ if it is bound to +multiple resources simultaneously, via flink:vkBindImageMemory, +flink:vkBindBufferMemory, or via <>. A memory range aliased between two images or two buffers +is defined to be the intersection of the memory ranges bound to the two +resources. A memory range aliased between an image and a buffer is defined +to be the intersection of the memory ranges bound to the two resources, +where each range is first bloated to be aligned to the +pname:bufferImageGranularity. Applications can: alias memory, but use of +multiple aliases is subject to several constraints. + +[NOTE] +.Note +==== +Memory aliasing can: be useful to reduce the total device memory footprint +of an application, if some large resources are used for disjoint periods of +time. +==== + +When an opaque, non-ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT image is +bound to an aliased range, all subresources of the image _overlap_ the +range. When a linear image is bound to an aliased range, the subresources +that (according to the image's advertised layout) include bytes from the +aliased range overlap the range. When a +ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT image has blocks bound to an +aliased range, only subresources including those blocks overlap the range, +and when the memory bound to the image's miptail overlaps an aliased range +all subresources in the miptail overlap the range. + +Buffers, and linear image subresources in either the +ename:VK_IMAGE_LAYOUT_PREINITIALIZED or ename:VK_IMAGE_LAYOUT_GENERAL +layouts, are _host-accessible subresources_. That is, the host has a +well-defined addressing scheme to interpret the contents, and thus the +layout of the data in memory can be consistently interpreted across aliases +if each of those aliases is a host-accessible subresource. Opaque images and +linear image subresources in other layouts are not host-accessible. + +If two aliases are both host-accessible, then they interpret the contents of +the memory in consistent ways, and data written to one alias can: be read by +the other alias. + +If either of two aliases is not host-accessible, then the aliases interpret +the contents of the memory differently, and writes via one alias make the +contents of memory partially or completely undefined to the other alias. If +the first alias is a host-accessible subresource, then the bytes affected +are those written by the memory operations according to its addressing +scheme. If the first alias is not host-accessible, then the bytes affected +are those overlapped by the image subresources that were written. If the +second alias is a host-accessible subresource, the affected bytes become +undefined. If the second alias is a not host-accessible, all sparse blocks +(for sparse residency images) or all subresources (for non-sparse residency +images) that overlap the affected bytes become undefined. + +If any subresources are made undefined due to writes to an alias, then each +of those subresources must: have its layout transitioned from +ename:VK_IMAGE_LAYOUT_UNDEFINED to a valid layout before it is used, or from +ename:VK_IMAGE_LAYOUT_PREINITIALIZED if the memory has been written by the +host. If any blocks of a sparse image have been made undefined, then only +the subresources containing them must: be transitioned. + +Use of an overlapping range by two aliases must: be separated by a memory +dependency using the appropriate access types if at least one of those uses +performs writes, whether the aliases interpret memory consistently or not. +If buffer or image memory barriers are used, the scope of the barrier must: +contain the entire range and/or set of subresources that overlap. + +If two aliasing image views are used in the same framebuffer, then the +render pass must: declare the attachments using the +<>, and +follow the other rules listed in that section. + +Access to resources which alias memory from shaders using variables +decorated with code:Coherent are not automatically coherent with each other. + +[NOTE] +.Note +==== +Memory recycled via an application suballocator (i.e. without freeing and +reallocating the memory objects) is not substantially different from memory +aliasing. However, a suballocator usually waits on a fence before recycling +a region of memory, and signalling a fence involves enough +<> that the above +requirements are all satisfied. +==== diff --git a/doc/specs/vulkan/chapters/samplers.txt b/doc/specs/vulkan/chapters/samplers.txt new file mode 100644 index 00000000..b9c1c737 --- /dev/null +++ b/doc/specs/vulkan/chapters/samplers.txt @@ -0,0 +1,183 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[samplers]] += Samplers + +sname:VkSampler objects encapsulate the state of an image sampler which is +used by the implementation to read image data and apply filtering and other +transformations for the shader. + +To create a sampler object, call: + +include::../protos/vkCreateSampler.txt[] + + * pname:device is the logical device that creates the sampler. + * pname:pCreateInfo is a pointer to an instance of the + slink:VkSamplerCreateInfo structure specifying the state of the sampler + object. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pSampler points to a sname:VkSampler handle in which the resulting + sampler object is returned. + +include::../validity/protos/vkCreateSampler.txt[] + +The sname:VkSamplerCreateInfo structure is defined as follows: + +include::../structs/VkSamplerCreateInfo.txt[] + +The members of sname:VkSamplerCreateInfo are described as follows: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:magFilter is the magnification filter to apply to lookups, and + is of type: ++ +-- +include::../enums/VkFilter.txt[] +-- ++ + * pname:minFilter is the minification filter to apply to lookups, and is + of type elink:VkFilter. + * pname:mipmapMode is the mipmap filter to apply to lookups as described + in the <> section, and is of + type: ++ +-- +include::../enums/VkSamplerMipmapMode.txt[] +-- ++ + * pname:addressModeU is the addressing mode for outside [0..1] range for U + coordinate. See elink:VkSamplerAddressMode. + * pname:addressModeV is the addressing mode for outside [0..1] range for V + coordinate. See elink:VkSamplerAddressMode. + * pname:addressModeW is the addressing mode for outside [0..1] range for W + coordinate. See elink:VkSamplerAddressMode. + * [[samplers-mipLodBias]] pname:mipLodBias is the bias to be added to + mipmap LOD calculation and bias provided by image sampling functions in + SPIR-V, as described in the <> section. + * [[samplers-maxAnisotropy]] pname:anisotropyEnable is ename:VK_TRUE to + enable anisotropic filtering, as described in the + <> + section, or ename:VK_FALSE otherwise. + * pname:maxAnisotropy is the anisotropy value clamp. + * pname:compareEnable is ename:VK_TRUE to enable comparison against a + reference value during lookups, or ename:VK_FALSE otherwise. + ** Note: Some implementations will default to shader state if this member + does not match. + * pname:compareOp is the comparison function to apply to fetched data + before filtering as described in the <> section. See elink:VkCompareOp. + * pname:minLod and pname:maxLod are the values used to clamp the computed + level-of-detail value, as described in the + <> + section. pname:maxLod must: be greater than or equal to pname:minLod. + * pname:borderColor is the predefined border color to use, as described + in the <> + section, and is of type: ++ +-- +include::../enums/VkBorderColor.txt[] +-- ++ + * [[samplers-unnormalizedCoordinates]] pname:unnormalizedCoordinates + controls whether to use unnormalized or normalized texel coordinates to + address texels of the image. When set to ename:VK_TRUE, the range of the + image coordinates used to lookup the texel is in the range of zero to + the image dimensions for x, y and z. When set to ename:VK_FALSE the + range of image coordinates is zero to one. When + pname:unnormalizedCoordinates is ename:VK_TRUE, samplers have the + following requirements: + ** pname:minFilter and pname:magFilter must: be equal. + ** pname:mipmapMode must: be ename:VK_SAMPLER_MIPMAP_MODE_NEAREST. + ** pname:minLod and pname:maxLod must: be zero. + ** pname:addressModeU and pname:addressModeV must: each + be either ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE or + ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER. + ** pname:anisotropyEnable must: be ename:VK_FALSE. + ** pname:compareEnable must: be ename:VK_FALSE. + * When pname:unnormalizedCoordinates is ename:VK_TRUE, images the sampler + is used with in the shader have the following requirements: + ** The pname:viewType must: be either ename:VK_IMAGE_VIEW_TYPE_1D or + ename:VK_IMAGE_VIEW_TYPE_2D. + ** The image view must: have a single layer and a single mip level. + * When pname:unnormalizedCoordinates is ename:VK_TRUE, image built-in + functions in the shader that use the sampler have the following + requirements: + ** The functions mustnot: use projection. + ** The functions mustnot: use offsets. + +[NOTE] +.Mapping of OpenGL to {apiname} filter modes +================== +pname:magFilter values of ename:VK_FILTER_NEAREST and ename:VK_FILTER_LINEAR +directly correspond to code:GL_NEAREST and code:GL_LINEAR magnification +filters. pname:minFilter and pname:mipmapMode combine to correspond to the +similarly named OpenGL minification filter of +code:GL_minFilter_MIPMAP_mipmapMode (e.g. pname:minFilter of +ename:VK_FILTER_LINEAR and pname:mipmapMode of +ename:VK_SAMPLER_MIPMAP_MODE_NEAREST correspond to +code:GL_LINEAR_MIPMAP_NEAREST). + +There are no {apiname} filter modes that directly correspond to OpenGL +minification filters of code:GL_LINEAR or code:GL_NEAREST, but they can be +emulated using ename:VK_SAMPLER_MIPMAP_MODE_NEAREST, pname:minLod = 0, and +pname:maxLod = 0.25, and using pname:minFilter = ename:VK_FILTER_LINEAR or +pname:minFilter = ename:VK_FILTER_NEAREST, respectively. + +Note that using a pname:maxLod of zero would cause +<> to always be performed, and the +pname:magFilter to always be used. This is valid, just not an exact match +for OpenGL behavior. Clamping the maximum lod to 0.25 allows the +latexmath:[$\lambda$] value to be non-zero and minification to be performed, +while still always rounding down to the base level. If the pname:minFilter +and pname:magFilter are equal, then using a pname:maxLod of zero also works. +================== + +include::../validity/structs/VkSamplerCreateInfo.txt[] + +pname:addressModeU, pname:addressModeV, and pname:addressModeW must: each +have one of the following values: + +include::../enums/VkSamplerAddressMode.txt[] + +These values control the behavior of sampling with coordinates outside the +range [0,1] for the respective u, v, or w coordinate as defined in the +<> section. + + * ename:VK_SAMPLER_ADDRESS_MODE_REPEAT indicates that the repeat wrap mode + will be used. + * ename:VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT indicates that the + mirrored repeat wrap mode will be used. + * ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE indicates that the clamp to + edge wrap mode will be used. + * ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER indicates that the clamp + to border wrap mode will be used. + * ename:VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE indicates that the + mirror clamp to edge wrap mode will be used. + +The maximum number of sampler objects which can: be simultaneously created +on a device is implementation-dependent and specified by the +<> +member of the sname:VkPhysicalDeviceLimits structure. If +pname:maxSamplerAllocationCount is exceeded, fname:vkCreateSampler will +return ename:VK_ERROR_TOO_MANY_OBJECTS. + +Since sname:VkSampler is a non-dispatchable handle type, implementations +may: return the same handle for sampler state vectors that are identical. In +such cases, all such objects would only count once against the +pname:maxSamplerAllocationCount limit. + +To destroy a sampler, call: + +include::../protos/vkDestroySampler.txt[] + + * pname:device is the logical device that destroys the sampler. + * pname:sampler is the sampler to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroySampler.txt[] diff --git a/doc/specs/vulkan/chapters/shaders.txt b/doc/specs/vulkan/chapters/shaders.txt new file mode 100644 index 00000000..3e68d969 --- /dev/null +++ b/doc/specs/vulkan/chapters/shaders.txt @@ -0,0 +1,454 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[shaders]] += Shaders + +A shader specifies programmable operations that execute for each vertex, +control point, tessellated vertex, primitive, fragment, or workgroup in +the corresponding stage(s) of the graphics and compute pipelines. + +Graphics pipelines include vertex shader execution as a result of +<>, followed, if enabled, by tessellation +control and evaluation shaders operating on +<>, geometry shaders, if +enabled, operating on primitives, and fragment shaders, if present, +operating on fragments generated by <>. In this +specification, vertex, tessellation control, tessellation evaluation and +geometry shaders are collectively referred to as vertex processing stages +and occur in the logical pipeline before rasterization. The fragment shader +occurs logically after rasterization. + +Only the compute shader stage is included in a compute pipeline. Compute +shaders operate on compute invocations in a workgroup. + +Shaders can: read from input variables, and read from and write to +output variables. Input and output variables can: be used to transfer data +between shader stages, or to allow the shader to interact with values that +exist in the execution environment. Similarly, the execution environment +provides constants that describe capabilities. + +Shader variables are associated with execution environment-provided inputs +and outputs using _built-in_ decorations in the shader. The available +decorations for each stage are documented in the following subsections. + + +[[shader-modules]] +== Shader Modules + +_Shader modules_ contain _shader code_ and one or more entry points. Shaders +are selected from a shader module by specifying an entry point as part of +<> creation. The stages of a pipeline can: use shaders +that come from different modules. The shader code defining a shader module +must: be in the SPIR-V format, as described by the <> appendix. + +A shader module is created by calling: + +include::../protos/vkCreateShaderModule.txt[] + + * pname:device is the logical device that creates the shader module. + * pname:pCreateInfo parameter is a pointer to an instance of the + sname:VkShaderModuleCreateInfo structure. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pShaderModule points to a sname:VkShaderModule handle in which the + resulting render pass object is returned. + +include::../validity/protos/vkCreateShaderModule.txt[] + +The sname:VkShaderModuleCreateInfo structure is defined as: + +include::../structs/VkShaderModuleCreateInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:codeSize is the size, in bytes, of the code pointed to by + pname:pCode. + * pname:pCode points to code that is used to create the shader + module. The type and format of the code is determined from the content + of the memory addressed by pname:pCode. + +include::../validity/structs/VkShaderModuleCreateInfo.txt[] + +Once a shader module has been created, any entry points it contains can: be +used in pipeline shader stages as described in <> and <>. + +To destroy a shader module, call: + +include::../protos/vkDestroyShaderModule.txt[] + + * pname:device is the logical device that destroys the shader module. + * pname:shaderModule is the handle of the shader module to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +A shader module can: be destroyed while pipelines created using its +shaders are still in use. + +include::../validity/protos/vkDestroyShaderModule.txt[] + + +[[shaders-execution]] +== Shader Execution + +At each stage of the pipeline, multiple invocations of a shader may: execute +simultaneously. Further, invocations of a single shader produced as the +result of different commands may: execute simultaneously. The relative +execution order of invocations of the same shader type is undefined. Shader +invocations may: complete in a different order than that in which the +primitives they originated from were drawn or dispatched by the application. +However, fragment shader outputs are written to attachments in +<>. + +The relative order of invocations of different shader types is largely +undefined. However, when invoking a shader whose inputs are generated from a +previous pipeline stage, the shader invocations from the previous stage are +guaranteed to have executed far enough to generate input values for all +required inputs. + + +[[shaders-execution-memory-ordering]] +== Shader Memory Access Ordering + +The order in which image or buffer memory is read or written by shaders is +largely undefined. For some shader types (vertex, tessellation evaluation, +and in some cases, fragment), even the number of shader invocations that +may: perform loads and stores is undefined. + +In particular, the following rules apply: + + * <> and + <> + shaders will be invoked at least once for each unique vertex, as defined + in those sections. + * <> shaders will be invoked zero or + more times, as defined in that section. + * The relative order of invocations of the same shader type are undefined. + A store issued by a shader when working on primitive B might complete + prior to a store for primitive A, even if primitive A is specified prior + to primitive B. This applies even to fragment shaders; while fragment + shader outputs are always written to the framebuffer + <>, stores + executed by fragment shader invocations are not. + * The relative order of invocations of different shader types is largely + undefined. + +[NOTE] +.Note +==== +The above limitations on shader invocation order make some forms of +synchronization between shader invocations within a single set of primitives +unimplementable. For example, having one invocation poll memory written by +another invocation assumes that the other invocation has been launched and +will complete its writes in finite time. +==== + +Stores issued to different memory locations within a single shader +invocation maynot: be visible to other invocations in the order they were +performed. The OpMemoryBarrier instruction can: be used to provide stronger +ordering of reads and writes performed by a single invocation. +OpMemoryBarrier guarantees that any memory transactions issued by the shader +invocation prior to the instruction complete prior to the memory +transactions issued after the instruction. Memory barriers are needed for +algorithms that require multiple invocations to access the same memory and +require the operations to be performed in a partially-defined relative +order. For example, if one shader invocation does a series of writes, +followed by an OpMemoryBarrier instruction, followed by another write, then +another invocation that sees the results of the final write will also see +the previous writes. Without the memory barrier, the final write may: be +visible before the previous writes. + +The built-in atomic memory transaction instructions can: be used to read and +write a given memory address atomically. While built-in atomic functions +issued by multiple shader invocations are executed in undefined order +relative to each other, these functions perform both a read and a write of a +memory address and guarantee that no other memory transaction will write to +the underlying memory between the read and write. + +[NOTE] +.Note +==== +Atomics allow shaders to use shared global addresses for mutual exclusion or +as counters, among other uses. +==== + + +[[shaders-inputs]] +== Shader Inputs and Outputs + +Data is passed into and out of shaders using variables with input or output +storage class, respectively. User-defined inputs and outputs are connected +between stages by matching their code:Location decorations. Additionally, +data can: be provided by or communicated to special functions provided by +the execution environment using code:BuiltIn decorations. + +In many cases, the same code:BuiltIn decoration can: be used in multiple +shader stages with similar meaning. The specific behavior of variables +decorated as code:BuiltIn is documented in the following sections. + + +[[shaders-vertex]] +== Vertex Shaders + +Each vertex shader invocation operates on one vertex and its associated +<> data, and outputs one vertex and +associated data. Graphics pipelines must: include a vertex shader, and +the vertex shader stage is always the first shader stage in the graphics +pipeline. + + +[[shaders-vertex-execution]] +=== Vertex Shader Execution + +A vertex shader must: be executed at least once for each vertex specified by +a draw command. During execution, the shader is presented with the index of +the vertex and instance for which it has been invoked. Input variables +declared in the vertex shader are filled by the implementation with the +values of vertex attributes associated with the invocation being executed. + +If a vertex is a part of more than one input primitive, for example +by including the same index value multiple times in an index buffer, the +vertex shader may: be invoked only once and the results shared amongst the +resulting primitives. This is known as _vertex reuse_. + +ifdef::implementation-guide[] +.Implementor's Note +**** +If a vertex is repeated in a draw command (i.e. the same index is repeated +in an indexed draw), the shader may: be executed anywhere from one to the +number of repetitions times for that vertex, depending on the +implementation's ability to reuse shader results. +**** +endif::implementation-guide[] + + +[[shaders-tessellation-control]] +== Tessellation Control Shaders + +The tessellation control shader is used to read an input patch provided by +the application and to produce an output patch. Each tessellation control +shader invocation operates on an input patch (after all control points in +the patch are processed by a vertex shader) and its associated data, and +outputs a single control point of the output patch and its associated data, +and can: also output additional per-patch data. The input patch is sized +according to the pname:patchControlPoints member of +slink:VkPipelineTessellationStateCreateInfo, as part of input assembly. The +size of the output patch is controlled by the code:OpExecutionMode +code:OutputVertices specified in the tessellation control or tessellation +evaluation shaders, which must: be specified in at least one of the shaders. +The size of the input and output patches must: each be greater than zero and +less than or equal to +sname:VkPhysicalDeviceLimits::pname:maxTessellationPatchSize. + + +[[shaders-tessellation-control-execution]] +=== Tessellation Control Shader Execution + +A tessellation control shader is invoked at least once for each _output_ +vertex in a patch. + +Inputs to the tessellation control shader are generated by the vertex +shader. Each invocation of the tessellation control shader can: read the +attributes of any incoming vertices and their associated data. The +invocations corresponding to a given patch execute logically in parallel, +with undefined relative execution order. However, the code:OpControlBarrier +instruction can: be used to provide limited control of the execution order +by synchronizing invocations within a patch, effectively dividing +tessellation control shader execution into a set of phases. Tessellation +control shaders will read undefined values if one invocation reads a +per-vertex or per-patch attribute written by another invocation at any point +during the same phase, or if two invocations attempt to write different +values to the same per-patch output in a single phase. + + +[[shaders-tessellation-evaluation]] +== Tessellation Evaluation Shaders + +The Tessellation Evaluation Shader operates on an input patch of control +points and their associated data, and a single input barycentric coordinate +indicating the invocation's relative position within the subdivided patch, +and outputs a single vertex and its associated data. + + +[[shaders-tessellation-evaluation-execution]] +=== Tessellation Evaluation Shader Execution + +A tessellation evaluation shader is invoked at least once for each +unique vertex generated by the tessellator. + + +[[shaders-geometry]] +== Geometry Shaders + +The geometry shader operates on a group of vertices and their associated +data assembled from a single input primitive, and emits zero or more +output primitives and the group of vertices and their associated data +required for each output primitive. + + +[[shaders-geometry-execution]] +=== Geometry Shader Execution + +A geometry shader is invoked at least once for each primitive produced by +the tessellation stages, or at least once for each primitive generated by +<> when tessellation is not in use. The number +of geometry shader invocations per input primitive is determined from the +invocation count of the geometry shader specified by the +code:OpExecutionMode code:Invocations in the geometry shader. If the +invocation count is not specified, then a default of one invocation is +executed. + + +[[shaders-fragment]] +== Fragment Shaders + +Fragment shaders are invoked as the result of rasterization in a graphics +pipeline. Each fragment shader invocation operates on a single fragment and +its associated data. With few exceptions, fragment shaders do not have +access to any data associated with other fragments and is considered to +execute in isolation of fragment shader invocations associated with other +fragments. + + +[[shaders-fragment-execution]] +=== Fragment Shader Execution + +For each fragment generated by rasterization, a fragment shader may: or +maynot: be invoked. A fragment shader mustnot: be invoked if the +<> cause it to have no coverage. + +Furthermore, if it is determined that a fragment generated as the result of +rasterizing a first primitive will have its outputs entirely overwritten by +a fragment generated as the result of rasterizing a second primitive in the +same subpass, and the fragment shader used for the fragment has no other +side effects, then the fragment shader maynot: be executed for the fragment +from the first primitive. + +Relative ordering of execution of different fragment shader invocations is +not defined. + +The number of fragment shader invocations produced per-pixel is determined +as follows: + + - If per-sample shading is enabled, the fragment shader is invoked once + per covered sample. + - Otherwise, the fragment shader is invoked at least once per fragment but + no more than once per covered sample. + +In addition to the conditions outlined above for the invocation of a +fragment shader, a fragment shader invocation may: be produced as a _helper +invocation_. A helper invocation is a fragment shader invocation that is +created solely for the purposes of evaluating derivatives for use in +non-helper fragment shader invocations. Stores and atomics performed by +helper invocations mustnot: have any effect on memory, and values returned +by atomic instructions in helper invocations are undefined. + + +[[shaders-fragment-earlytest]] +=== Early Fragment Tests + +An explicit control is provided to allow fragment shaders to enable early +fragment tests. If the fragment shader specifies the +code:EarlyFragmentTests code:OpExecutionMode, the per-fragment tests +described in <> are +performed prior to fragment shader execution. Otherwise, they are performed +after fragment shader execution. + + +[[shaders-compute]] +== Compute Shaders + +Compute shaders are invoked via flink:vkCmdDispatch and +flink:vkCmdDispatchIndirect commands. In general, they have access to +similar resources as shader stages executing as part of a graphics pipeline. + +Compute workloads are formed from groups of work items called _workgroups_ +and processed by the compute shader in the current compute pipeline. A +workgroup is a collection of shader invocations that execute the same +shader, potentially in parallel. Compute shaders execute in global +workgroups which are divided into a number of _local workgroups_ with a size +that can: be set by assigning a value to the code:LocalSize execution mode +either in the shader code or via +<>. An +invocation within a local workgroup can: share data with other members of +the local workgroup through shared variables and issue memory and control +flow barriers to synchronize with other members of the local workgroup. + + +[[shaders-interpolation-decorations]] +== Interpolation Decorations + +Interpolation decorations control the behavior of attribute interpolation in +the fragment shader stage. Interpolation decorations can: be applied to +code:Input storage class variables in the fragment shader stage's interface, +and control the interpolation behavior of those variables. + +Inputs that could be interpolated can: be decorated by at most one +of the following decorations: + + * code:Flat: no interpolation + * code:NoPerspective: linear interpolation (for + <> and + <>). + +Fragment input variables decorated with neither code:Flat nor +code:NoPerspective use perspective-correct interpolation (for +<> and +<>). + +The presence of and type of interpolation is controlled by the above +interpolation decorations as well as the auxiliary decorations code:Centroid +and code:Sample. + +A variable decorated with code:Flat will not be interpolated. Instead, it +will have the same value for every fragment within a triangle. This value +will come from a single <>. A +variable decorated with code:Flat can: also be decorated with code:Centroid +or code:Sample, which will mean the same thing as decorating it only as +code:Flat. + +For fragment shader input variables decorated with neither code:Centroid nor +code:Sample, the value of the assigned variable may: be interpolated +anywhere within the pixel and a single value may: be assigned to each sample +within the pixel. + +code:Centroid and code:Sample can: be used to control the location and +frequency of the sampling of the decorated fragment shader input. If a +fragment shader input is decorated with code:Centroid, a single value may: +be assigned to that variable for all samples in the pixel, but that value +must: be interpolated to a location that lies in both the pixel and in the +primitive being rendered, including any of the pixel's samples covered by +the primitive. Because the location at which the variable is interpolated +may be different in neighboring pixels, and derivatives may be computed by +computing differences between neighboring pixels, derivatives of +centroid-sampled inputs may: be less accurate than those for non-centroid +interpolated variables. If a fragment shader input is decorated with +code:Sample, a separate value must: be assigned to that variable for each +covered sample in the pixel, and that value must: be sampled at the location +of the individual sample. When pname:rasterizationSamples is +ename:VK_SAMPLE_COUNT_1_BIT, the pixel center must: be used for +code:Centroid, code:Sample, and undecorated attribute interpolation. + +Fragment shader inputs that are signed or unsigned integers, integer +vectors, or any double-precision floating-point type must: be decorated with +code:Flat. + + +[[shaders-staticuse]] +== Static Use + +A SPIR-V module declares a global object in memory using the code:OpVariable +instruction, which results in a pointer code:x to that object. A specific +entry point in a SPIR-V module is said to _statically use_ that object if +that entry-point's call tree contains a function that contains a memory +instruction or image instruction with code:x as an code:id operand. See the +``Memory Instructions'' and ``Image Instructions'' subsections of section 3 +``Binary Form'' of the SPIR-V specification for the complete list of SPIR-V +memory instructions. + +Static use is not used to control the behavior of variables with code:Input +and code:Output storage. The effects of those variables are applied based +only on whether they are present in a shader entry point's interface. diff --git a/doc/specs/vulkan/chapters/sparsemem.txt b/doc/specs/vulkan/chapters/sparsemem.txt new file mode 100644 index 00000000..b53e333f --- /dev/null +++ b/doc/specs/vulkan/chapters/sparsemem.txt @@ -0,0 +1,1505 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[sparsememory]] += Sparse Resources + +As documented in <>, +sname:VkBuffer and sname:VkImage resources in {apiname} must: be bound +completely and contiguously to a single sname:VkDeviceMemory object. +This binding must: be done before the resource is used, and the +binding is immutable for the lifetime of the resource. + +_Sparse resources_ relax these restrictions and provide these additional +features: + + * Sparse resources can: be bound non-contiguously to one or more + sname:VkDeviceMemory allocations. + * Sparse resources can: be re-bound to different memory allocations over + the lifetime of the resource. + * Sparse resources can: have descriptors generated and used orthogonally + with memory binding commands. + + +[[sparsememory-sparseresourcefeatures]] +== Sparse Resource Features + +Sparse resources have several features that must: be enabled explicitly at +resource creation time. The features are enabled by including bits in the +pname:flags parameter of slink:VkImageCreateInfo or +slink:VkBufferCreateInfo. Each feature also has one or more corresponding +feature enables specified in slink:VkPhysicalDeviceFeatures. + + * <> is the base + feature, and provides the following capabilities: + + ** Resources can: be bound at some defined (block) granularity. + ** The entire resource must: be bound to memory before use regardless of + regions actually accessed. + ** No specific mapping of image region to memory offset is defined, i.e. + the location that each texel corresponds to in memory is + implementation-dependent. + ** Sparse buffers have a well-defined mapping of buffer range to memory + range, where an offset into a range of the buffer that is bound to + a single contiguous range of memory corresponds to an identical offset + within that range of memory. + ** Requested via the ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT and + ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT bits. + ** A sparse image created using ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT + (but not ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT) supports all + formats that non-sparse usage supports, and supports both + ename:VK_IMAGE_TILING_OPTIMAL and ename:VK_IMAGE_TILING_LINEAR tiling. + + * _Sparse Residency_ builds on the pname:sparseBinding feature. It + includes the following capabilities: + + ** Resources do not have to be completely bound to memory before use on + the device. + ** Images have a prescribed block layout, allowing specific image blocks + to be bound to specific offsets in memory allocations. + ** Consistency of access to unbound regions of the resource is defined by + the absence or presence of + sname:VkPhysicalDeviceSparseProperties::pname:residencyNonResidentStrict. + If this property is present, accesses to unbound regions of the + resource are well defined and behave as if the data bound is populated + with all zeros; writes are discarded. When this property is absent, + accesses are considered safe, but reads will return undefined values. + ** Requested via the ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT and + ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT bits. + ** Support is advertised on a finer grain via the following features: ++ +-- + *** <>: + Support for creating sname:VkBuffer objects with the + ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT. + *** <>: + Support for creating 2D single-sampled sname:VkImage objects with + ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT. + *** <>: + Support for creating 3D sname:VkImage objects with + ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT. + *** <>: + Support for creating 2D sname:VkImage objects with 2 samples and + ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT. + *** <>: + Support for creating 2D sname:VkImage objects with 4 samples and + ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT. + *** <>: + Support for creating 2D sname:VkImage objects with 8 samples and + ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT. + *** <>: + Support for creating 2D sname:VkImage objects with 16 samples and + ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT. + +Implementations supporting pname:sparseResidencyImage2D are only +required: to support sparse 2D, single-sampled images. Support is +not required: for sparse 3D and MSAA images and is enabled via +pname:sparseResidencyImage3D, pname:sparseResidency2Samples, +pname:sparseResidency4Samples, pname:sparseResidency8Samples, and +pname:sparseResidency16Samples. +-- + ** A sparse image created using ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT + supports all non-compressed color formats with power-of-two texel size + that non-sparse usage supports. Additional formats may: also be + supported and can: be queried via + flink:vkGetPhysicalDeviceSparseImageFormatProperties. + ename:VK_IMAGE_TILING_LINEAR tiling is not supported. + + * <> + provides the following capability that can: be enabled per resource: ++ +Allows physical memory blocks to be shared between multiple locations in +the same sparse resource or between multiple sparse resources, with each +binding of a memory location observing a consistent interpretation of the +memory contents. ++ +See <> for +more information. + + +[[sparsememory-fully-resident]] +== Sparse Buffers and Fully-Resident Images + +Both sname:VkBuffer and sname:VkImage objects created with the +ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT or +ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT bits can: be thought of as a +linear region of address space. In the sname:VkImage case if +ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT is not used, this linear +region is entirely opaque, meaning that there is no application-visible +mapping between pixel location and memory offset. + +Unless ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT or +ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT are also used, the entire +resource must: be bound to one or more sname:VkDeviceMemory objects before +use. + + +=== Sparse Buffer and Fully-Resident Image Block Size + +The block size for sparse buffers and fully-resident images is reported as +sname:VkMemoryRequirements::pname:alignment. This pname:alignment value +represents both the memory alignment requirement and the binding granularity +(in bytes) for sparse resources. + + +[[sparsememory-partially-resident-buffers]] +== Sparse Partially-Resident Buffers + +sname:VkBuffer objects created with the +ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT bit allow the buffer to be made +only partially resident. Partially resident sname:VkBuffer objects are +allocated and bound identically to sname:VkBuffer objects using only the +ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT feature. The only difference is +the ability for some regions of the buffer to be unbound during device use. + + +[[sparsememory-partially-resident-images]] +== Sparse Partially-Resident Images + +sname:VkImage objects created with the +ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT bit allow blocks of the image to +be bound to specific ranges of memory. This allows the application to manage +residency at either the subresource or pixel block granularity. Each +subresource (outside of the <>) starts on a +block boundary and has a size that is an integer number of blocks of memory. + +[NOTE] +.Note +==== +Applications can: use these types of images to control level-of-detail based +on total memory consumption. If memory pressure becomes an issue the +application can: unbind and disable specific mipmap levels of images without +having to recreate resources or modify pixel data of unaffected levels. + +The application can: also use this functionality to access subregions of the +image in a ``megatexture'' fashion. The application can: create a large +image and only populate the region of the image that is currently being used +in the scene. +==== + + +[[sparsememory-accessing-unbound]] +=== Accessing Unbound Regions + +The following member of sname:VkPhysicalDeviceSparseProperties affects how +data in unbound regions of sparse resources are handled by the +implementation: + + * pname:residencyNonResidentStrict + +If this property is not present, reads of unbound regions of the image will +return undefined values. Both reads and writes are still considered _safe_ +and will not affect other resources or populated regions of the image. + +If this property is present, all reads of unbound regions of the image will +behave as if the region was bound to memory populated with all zeros; +writes will be discarded. + +Formatted accesses to unbound memory may: still +alter some component values in the natural way for those accesses, e.g. +substituting a value of one for alpha in formats that do not have an alpha +component. + +======= +Example: Reading the alpha component of an unbacked +ename:VK_FORMAT_R8_UNORM image will return a value of latexmath:[$1.0f$]. +======= + +See <> for instructions for retrieving physical device properties. + +ifdef::implementation-guide[] +.Implementor's Note +**** +For hardware that cannot: natively handle access to unbound regions of a +resource, the implementation may: allocate and bind memory to the +unbound regions. Reads and writes to unbound regions will access the +implementation-managed memory instead of causing a hardware fault. + +Given that reads of unbound regions are undefined in this scenario, +implementations may: use the same physical memory for unbound regions of +multiple resources within the same process. +**** +endif::implementation-guide[] + + +[[sparsememory-miptail]] +=== Mip Tail Regions + +Sparse images created using ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT have no +specific mapping of image region or subresource to memory offset defined, so +the entire image can: be thought of as a linear opaque address region. +However, images created with ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT do +have a prescribed block layout, and hence each subresource must: start on a +block boundary. Within each array layer, the set of mip-levels that are too +small to fill a block are grouped together into a _mip tail region_. + +If the ename:VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT flag is present in +the pname:flags member of sname:VkSparseImageFormatProperties, for the +image's pname:format, then any mip-level which is not a multiple of the +block size, and all subsequent mip-levels, are also included in the mip tail +region. + +The following member of sname:VkPhysicalDeviceSparseProperties may: affect +how the implementation places mip levels in the mip tail region: + + * pname:residencyAlignedMipSize + +Each mip tail region is bound to memory as an opaque block (i.e. must: be +bound using a slink:VkSparseImageOpaqueMemoryBindInfo structure) and may: be +of a size greater than or equal to the normal block size. It is guaranteed +to be an integer multiple of the normal image block size (in bytes). + +An implementation may: choose to allow each array-layer's mip tail region to +be bound to memory independently or require that all array-layer's mip tail +regions be treated as one. This is dictated by +ename:VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT in +sname:VkSparseImageMemoryRequirements::pname:flags. + +The following diagrams depict how +ename:VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT and +ename:VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT alter memory usage and +requirements. + +image::images/sparseimage.{svgpdf}[align="center", title="Sparse Image"] + +In the absense of ename:VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT and +ename:VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT, each array layer contains a +mip tail region containing pixel data for all mip levels smaller than the +sparse block size in any dimension. + +Mip levels that are as large or larger than a block in all dimensions can: +be bound individually. Right-edges and bottom-edges of each level are +allowed to have partially used blocks. Any bound partially-used-blocks must: +still have their full block size allocated in memory. + +image::images/sparseimage_singlemiptail.{svgpdf}[align="center", title="Sparse Image with Single Mip Tail"] + +When ename:VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT is present all array +layers will share a single mip tail region. + +image::images/sparseimage_alignedmipsize.{svgpdf}[align="center", title="Sparse Image with Aligned Mip Size"] + +[NOTE] +.Note +==== +The mip tail regions are presented here in 2D arrays simply for figure size +reasons. Each mip tail is logically a single array of blocks with an +implementation-dependent mapping of pixels to blocks. +==== + +When ename:VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT is present the first +mip level that would contain partially used blocks begins the mip tail +region. This level and all subsequent levels are placed in the mip tail. +Only the first latexmath:[$N$] mip levels that are an exact multiple of the +sparse block size can: be bound and unbound on a block basis. + +image::images/sparseimage_alignedmipsize_singlemiptail.{svgpdf}[align="center", title="Sparse Image with Aligned Mip Size and Single Mip Tail"] + +[NOTE] +.Note +==== +The mip tail region is presented here in a 2D array simply for figure size +reasons. It is logically a single array of blocks with an +implementation-dependent mapping of pixels to blocks. +==== + +When both ename:VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT and +ename:VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT are present the constraints +from each of these flags are in effect. + + +[[sparsememory-standard-sizes]] +=== Standard Image Block Sizes + +Standard sparse image block sizes are defined by {apiname} and depend on +the format of the image. Layout of pixels within a block is +implementation dependent. All currently defined standard block shapes are 64 +KB in size. + +For compressed pixel formats (e.g. ename:VK_FORMAT_BC5_UNORM_BLOCK), the +pixel size is the size of the compression block (128-bit for etext:BC5). + +<<< + +[[sparsememory-sparseblockshapessingle]] +.Standard Sparse Image Block Shapes (Single Sample) +[options="header"] +|==== +| PIXEL SIZE (bits) | Block Shape (2D) | Block Shape (3D) +| *8-Bit* | 256 × 256 × 1 | 64 × 32 × 32 +| *16-Bit* | 256 × 128 × 1 | 32 × 32 × 32 +| *32-Bit* | 128 × 128 × 1 | 32 × 32 × 16 +| *64-Bit* | 128 × 64 × 1 | 32 × 16 × 16 +| *128-Bit* | 64 × 64 × 1 | 16 × 16 × 16 +|==== + +[[sparsememory-sparseblockshapesmsaa]] +.Standard Sparse Image Block Shapes (MSAA) +[options="header"] +|==== +| PIXEL SIZE (bits)| Block Shape (2X)| Block Shape (4X) | Block Shape (8X) | Block Shape (16X) +| *8-Bit* | 128 × 256 × 1 | 128 × 128 × 1 | 64 × 128 × 1 | 64 × 64 × 1 +| *16-Bit* | 128 × 128 × 1 | 128 × 64 × 1 | 64 × 64 × 1 | 64 × 32 × 1 +| *32-Bit* | 64 × 128 × 1 | 64 × 64 × 1 | 32 × 64 × 1 | 32 × 32 × 1 +| *64-Bit* | 64 × 64 × 1 | 64 × 32 × 1 | 32 × 32 × 1 | 32 × 16 × 1 +| *128-Bit* | 32 × 64 × 1 | 32 × 32 × 1 | 16 × 32 × 1 | 16 × 16 × 1 +|==== + + +Implementations that support the standard block shape for all applicable +formats may: advertise the following sname:VkPhysicalDeviceSparseProperties: + + * pname:residencyStandard2DBlockShape + * pname:residencyStandard2DMultisampleBlockShape + * pname:residencyStandard3DBlockShape + +Reporting each of these features does _not_ imply that all possible image +types are supported as sparse. Instead, this indicates that no supported +sparse image of the corresponding type will use a custom block size. + + +[[sparsememory-blocksizes]] +=== Custom Image Block Sizes + +An implementation that does not support the standard image block sizes may: +choose to support a custom block size instead. This custom block size will +have the pixel region size reported in +sname:VkSparseImageFormatProperties::pname:imageGranularity. As with +standard block sizes, the byte-size of the custom block size will be +reported in sname:VkMemoryRequirements::pname:alignment. + +Custom block sizes are reported through +fname:vkGetPhysicalDeviceSparseImageFormatProperties and +fname:vkGetImageSparseMemoryRequirements. + +An implementation mustnot: support both the standard block size and a custom +block size for the same image. The standard size must: be used if it is +supported. + + +[[sparsememory-multiaspect]] +=== Multiple Aspects + +Partially resident images are allowed to report separate sparse properties +for different aspects of the image. One example is for depth/stencil images +where the implementation separates the depth and stencil data into separate +planes. Another reason for multiple aspects is to allow the application to +manage memory allocation for implementation-private _metadata_ associated +with the image. See the figure below: + +image::images/sparseimage_multiaspect.{svgpdf}[align="center",title="Multiple Aspect Sparse Image"] + +[NOTE] +.Note +==== +The mip tail regions are presented here in 2D arrays simply for figure size +reasons. Each mip tail is logically a single array of blocks with an +implementation-dependent mapping of pixels to blocks. +==== + +In the figure above the depth, stencil, and metadata aspects all have unique +sparse properties. The per-pixel stencil data is +latexmath:[${}^{1}\!/\!{}_4$] the size of the depth data, hence the stencil +sparse blocks include latexmath:[$4x$] the number of pixels. The block +byte-size for all of the aspects is identical and defined by +sname:VkMemoryRequirements::pname:alignment. + + +==== Metadata + +The metadata aspect of an image has the following constraints: + + * All metadata is reported in the mip tail region of the metadata aspect. + * All metadata must: be bound prior to device use of the sparse image. + + +[[sparsememory-sparse-memory-aliasing]] +== Sparse Memory Aliasing + +By default sparse resources have the same aliasing rules as +non-sparse resources. See <> for +more information. + +sname:VkDevice objects that have the +<> feature +enabled are able to use the ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT and +ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT flags for resource creation. These +flags allow resources to access physical memory bound into multiple +locations within one or more sparse resources in a _data consistent_ +fashion. This means that reading physical memory from multiple aliased +locations will return the same value. + +Care must: be taken when performing a write operation to aliased physical +memory. Memory dependencies must: be used to separate writes to one alias +from reads or writes to another alias. Writes to aliased memory that are not +properly guarded against accesses to different aliases will have undefined +results for all accesses to the aliased memory. + +Applications that wish to make use of data consistent sparse memory aliasing +must: abide by the following guidelines: + + * All sparse resources that are bound to aliased physical memory must: be + created with the ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT / + ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT flag. + * All resources that access aliased physical memory must interpret the + memory in the same way. This implies the following: + ** Buffers and images cannot: alias the same physical memory in a data + consistent fashion. The physical memory blocks must be used exclusively + by buffers or used exclusively by images for data consistency to be + guaranteed. + ** Memory in sparse image mip tail regions cannot: access + aliased memory in a data consistent fashion. + ** Sparse images that alias the same physical memory must: have compatible + formats and be using the same block shape in order to access aliased + memory in a data consistent fashion. + +Failure to follow any of the above guidelines will require the application +to abide by the normal, non-sparse resource <>. In this case memory cannot be accessed in a data +consistent fashion. + +[NOTE] +.Note +==== +Enabling sparse resource memory aliasing can: be a way to lower physical +memory use, but it may: reduce performance on some implementations. An +application developer can: test on their target HW and balance the memory / +performance trade-offs measured. +==== + + +ifdef::implementation-guide[] +== Sparse Resource Implementation Guidelines + +**** +This section is Informative. It is included to aid in implementors' +understanding of sparse resources. + +.Device Virtual Address + +The basic pname:sparseBinding feature allows the resource to reserve its own +device virtual address range at resource creation time rather relying on a +bind operation to set this. Without any other creation flags, no other +constraints are relaxed compared to normal resources. All pages must: be +bound to physical memory before the device accesses the resource. + +The pname:sparseResidency feature allows the sparse resource to be used even +when not all pages are bound to memory. Hardware that supports access to +unbound pages without causing a fault may: support +pname:sparseResidencyNonResidentStrict. + +Not faulting on access to unbound pages is not enough to support +pname:sparseResidencyNonResidentStrict. An implementation must: also +guarantee that reads after writes to unbound regions of the resource always +return data for the read as if the memory contains zeros. Depending on the +cache implementation of the hardware this maynot: always be possible. + +Hardware that does not fault, but does not guarantee correct read values +will not require dummy pages, but also mustnot: support +pname:sparseResidencyNonResidentStrict. + +Hardware that cannot: access unbound pages without causing a fault will +require the implementation to bind the entire device virtual address range +to physical memory. Any pages that the application does not bind to memory +may: be bound to one (or more) ``dummy'' physical page(s) allocated by the +implementation. Given the following properties: + + * A process mustnot: access memory from another process + * Reads return undefined values + +It is sufficient for each host process to allocate these dummy +pages and use them for all resources in that process. Implementations may: +allocate more often (per instance, per device, or per resource). + + +.Binding Memory + +The byte size reported in sname:VkMemoryRequirements::pname:size must: be +greater than or equal to the amount of physical memory required: to fully +populate the resource. Some hardware requires ``holes'' in the device +virtual address range that are never accessed. These holes may: be included +in the pname:size reported for the resource. + +Including or not including the device virtual address holes in the resource +size will alter how the implementation provides support for +sname:VkSparseImageOpaqueMemoryBindInfo. This operation must: be supported +for all sparse images, even ones created with +ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT. + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +@ntrevett suggested expanding the NOTE tag below to encompass everything +from ``The cost is...'' in the first bullet point through the current note. +TBD. +==== +endif::editing-notes[] + + * If the holes are included in the size, this bind function becomes very + easy. In most cases the pname:resourceOffset is simply a device virtual + address offset and the implementation does not require any sophisticated + logic to determine what device virtual address to bind. The cost is that + the application can: allocate more physical memory for the resource than + it needs. + * If the holes are not included in the size, the application can: allocate + less physical memory than otherwise for the resource. However, in this + case the implementation must: account for the holes when mapping + pname:resourceOffset to the actual device virtual address intended to be + mapped. + +[NOTE] +.Note +==== +If the application always uses sname:VkSparseImageMemoryBindInfo to bind +memory for the non-mip-tail levels, any holes that are present in the +resource size may: never be bound. + +Since sname:VkSparseImageMemoryBindInfo uses pixel locations to determine +which device virtual addresses to bind, it is impossible to bind device +virtual address holes with this operation. +==== + +.Binding Metadata Memory + +All metadata for sparse images have their own sparse properties and is +embedded in the mip tail region for said properties. See the +<> section for details. + +Given that metadata is in a mip tail region, and the mip tail region must: +be reported as contiguous (either globally or per-array-layer), some +implementations will have to resort to complicated offset -> device virtual +address mapping for handling sname:VkSparseImageOpaqueMemoryBindInfo. + +To make this easier on the implementation, the +ename:VK_SPARSE_MEMORY_BIND_METADATA_BIT explicitly denotes when +metadata is bound with sname:VkSparseImageOpaqueMemoryBindInfo. When this +flag is not present, the pname:resourceOffset may: be treated as a strict +device virtual address offset. + +When ename:VK_SPARSE_MEMORY_BIND_METADATA_BIT is present, the +pname:resourceOffset must: have been derived explicitly from the +pname:imageMipTailOffset in the sparse resource properties returned for the +metadata aspect. By manipulating the value returned for +pname:imageMipTailOffset, the pname:resourceOffset does not have to +correlate directly to a device virtual address offset, and may: instead be +whatever values makes it easiest for the implementation to derive the +correct device virtual address. + +**** +endif::implementation-guide[] + + +[[sparsememory-resourceapi]] +== Sparse Resource API + +The APIs related to sparse resources are grouped into the following +categories: + +* <> +* <> +* <> +* <> +* <> +* <> + + +[[sparsememory-physicalfeatures]] +=== Physical Device Features + +Some sparse-resource related features are reported and enabled in +sname:VkPhysicalDeviceFeatures. These features must: be supported and +enabled on the sname:VkDevice object before applications can: use them. See +<> for information on how to get +and set enabled device features, and for more detailed explanations of these +features. + + +==== Sparse Physical Device Features + + * pname:sparseBinding: Support for creating sname:VkBuffer and + sname:VkImage objects with the ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT + and ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT flags, respectively. + * pname:sparseResidencyBuffer: Support for creating sname:VkBuffer + objects with the ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag. + * pname:sparseResidencyImage2D: Support for creating 2D single-sampled + sname:VkImage objects with ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT. + * pname:sparseResidencyImage3D: Support for creating 3D sname:VkImage + objects with ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT. + * pname:sparseResidency2Samples: Support for creating 2D sname:VkImage + objects with 2 samples and ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT. + * pname:sparseResidency4Samples: Support for creating 2D sname:VkImage + objects with 4 samples and ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT. + * pname:sparseResidency8Samples: Support for creating 2D sname:VkImage + objects with 8 samples and ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT. + * pname:sparseResidency16Samples: Support for creating 2D sname:VkImage + objects with 16 samples and ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT. + * pname:sparseResidencyAliased: Support for creating sname:VkBuffer and + sname:VkImage objects with the ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT + and ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT flags, respectively. + + +[[sparsememory-physicalprops]] +=== Physical Device Sparse Properties + +Some features of the implementation are not possible to disable, and are +reported to allow applications to alter their sparse resource usage +accordingly. These read-only capabilites are reported in the +pname:sparseProperties member of slink:VkPhysicalDeviceProperties. +The definition of pname:sparseProperties is + +include::../structs/VkPhysicalDeviceSparseProperties.txt[] + + * pname:residencyStandard2DBlockShape is ename:VK_TRUE if the physical + device will access all single-sample 2D sparse resources using the + standard block shapes (based on image format), as described in the + <> table. If this property is not supported the + value returned in the pname:imageGranularity member of the + sname:VkSparseImageFormatProperties structure for single-sample 2D + images is not required: to match the standard image block sizes listed + in the table. + * pname:residencyStandard2DMultisampleBlockShape is ename:VK_TRUE if the + physical device will access all multisample 2D sparse resources using + the standard block shapes (based on image format), as described in the + <> table. If this property is not supported, the value returned in + the pname:imageGranularity member of the + sname:VkSparseImageFormatProperties structure for multisample 2D images + is not required: to match the standard image block sizes listed in the + table. + * pname:residencyStandard3DBlockShape is ename:VK_TRUE if the physical + device will access all 3D sparse resources using the standard block + shapes (based on image format), as described in the + <> table. If this property is not supported, the + value returned in the pname:imageGranularity member of the + sname:VkSparseImageFormatProperties structure for 3D images is not + required: to match the standard image block sizes listed in the table. + * pname:residencyAlignedMipSize is ename:VK_TRUE if images with mip level + dimensions that are not a multiple of a block size may: be placed in the + mip tail. If this property is not reported, only mip levels with + dimensions smaller than the value of the pname:imageGranularity member + of the sname:VkSparseImageFormatProperties structure will be placed in + the mip tail. If this property is reported the implementation is allowed + to return ename:VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT in the + pname:flags member of sname:VkSparseImageFormatProperties, indicating + that mip level dimensions that are not a multiple of a block size will + be placed in the mip tail. + * pname:residencyNonResidentStrict specifies whether the physical device + can: consistently access non-resident regions of a resource. If this + property is ename:VK_TRUE, access to non-resident regions of resources + will be guaranteed to return values as if the resource were populated + with 0; writes to non-resident regions will be discarded. + +include::../validity/structs/VkPhysicalDeviceSparseProperties.txt[] + + +[[sparsememory-format-props]] +=== Sparse Image Format Properties + +Given that certain aspects of sparse image support, including the +sparse image block size, may: be implementation-dependent, +flink:vkGetPhysicalDeviceSparseImageFormatProperties can: be used to +query for sparse image format properties prior to resource creation. This +command is used to check whether a given set of sparse image parameters is +supported and what the sparse block shape will be. + + +==== Sparse Image Format Properties API + +include::../structs/VkSparseImageFormatProperties.txt[] + + * pname:aspectMask is a elink:VkImageAspectFlags specifying which + aspects of the image the properties apply to. + * pname:imageGranularity is the width, height, and depth of the + block in pixels / compressed blocks. + * pname:flags is a bitmask specifying additional information about + the sparse resource. Bits which can: be set include: ++ +-- +include::../enums/VkSparseImageFormatFlagBits.txt[] + + ** If ename:VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT is set, the image + uses a single mip tail region for all array layers. + ** If ename:VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT is set, the first + mip level that is not an exact multiple of the sparse image block size + begins the mip tail region. + ** If ename:VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT is set, the + image uses a non-standard sparse block size, and the + pname:imageGranularity values do not match the standard block size for + the given pixel format. +-- + +include::../validity/structs/VkSparseImageFormatProperties.txt[] + +fname:vkGetPhysicalDeviceSparseImageFormatProperties returns an +array of sname:VkSparseImageFormatProperties. Each element will describe +properties for one set of image aspects that are bound simultaneously in the +image. This is usually one element for each aspect in the image, but for +interleaved depth/stencil images there is only one element describing the +combined aspects. + +include::../protos/vkGetPhysicalDeviceSparseImageFormatProperties.txt[] + + * pname:physicalDevice is the physical device from which to query the + sparse image capabilities. + * pname:format is the image format. + * pname:type is the dimensionality of image. + * pname:samples is the number of samples per pixel as defined in + elink:VkSampleCountFlagBits. + * pname:usage is a bitfield describing the intended usage of the image. + * pname:tiling is the tiling arrangement of the data elements in memory. + * pname:pPropertyCount points to a variable specifying the length of the + pname:pProperties array, or a variable receiving the expected size of + the array if pname:pProperties is `NULL`. + * pname:pProperties is an array of pname:pPropertyCount + slink:VkSparseImageFormatProperties format property structures in which + values are returned. + +include::../validity/protos/vkGetPhysicalDeviceSparseImageFormatProperties.txt[] + +If pname:pProperties is `NULL`, then pname:pPropertyCount will be updated +with the required size of the array pointed by pname:pProperties. If +pname:pProperties is not `NULL`, then pname:pPropertyCount must: hold the +size of the array pointed to by pname:pProperties, and is overwritten with +the number of sname:VkSparseImageFormatProperties structures actually +written to pname:pProperties. If pname:pPropertyCount is smaller than the +number of sparse image properties for the given set of parameters, +ename:VK_INCOMPLETE will be returned instead of ename:VK_SUCCESS to indicate +that not all the available values were returned. + +If ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT is not supported for the given +arguments, pname:pPropertyCount will be set to zero upon return, and no data +will be written to pname:pProperties. + +Multiple aspects are returned for depth/stencil images that are implemented +as separate planes by the implementation. The depth and stencil data planes +each have unique sname:VkSparseImageFormatProperties data. + +Depth/stencil images with depth and stencil data interleaved into a single +plane will return a single sname:VkSparseImageFormatProperties structure +with the pname:aspectMask set to ename:VK_IMAGE_ASPECT_DEPTH_BIT | +ename:VK_IMAGE_ASPECT_STENCIL_BIT. + + +[[sparsememory-resource-creation]] +=== Sparse Resource Creation + +Sparse resources require that one or more sparse feature flags be specified +(as part of the sname:VkPhysicalDeviceFeatures structure described +previously in the <> +section) at CreateDevice time. When the appropriate device features are +enabled, the etext:VK_BUFFER_CREATE_SPARSE_* and +etext:VK_IMAGE_CREATE_SPARSE_* flags can: be used. See flink:vkCreateBuffer +and flink:vkCreateImage for details of the resource creation APIs. + +[NOTE] +.Note +==== +Specifying ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT or +ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT implies specifying +ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT or +ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT, respectively, as well. This means +that resources created with either (or both) flag(s) can: be used with the +sparse binding command (fname:vkQueueBindSparse). +==== + + +[[sparsememory-memory-requirements]] +=== Sparse Resource Memory Requirements + +Sparse resources have specific memory requirements related to binding sparse +memory. These memory requirements are reported differently for +sname:VkBuffer objects and sname:VkImage objects. + + +[[sparsememory-memory-buffer-fully-resident]] +==== Buffer and Fully-Resident Images + +Buffers (both fully and partially resident) and fully-resident images can: +be bound to memory using only the data from sname:VkMemoryRequirements. For +all sparse resources the sname:VkMemoryRequirements::pname:alignment member +denotes both the bindable block byte-size and required: alignment of +sname:VkDeviceMemory. + + +[[sparsememory-memory-partially-resident]] +==== Partially Resident Images + +Partially resident images have a different method for binding memory. As +with buffers and fully resident images, the +sname:VkMemoryRequirements::pname:alignment field denotes the bindable block +byte-size for the image. + +Requesting sparse memory requirements for sname:VkImage objects using +fname:vkGetImageSparseMemoryRequirements will return an array of one or more +sname:VkSparseImageMemoryRequirements structures. Each structure describes +the sparse memory requirements for a group of aspects of the image. + +The sparse image must: have been created using the +ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag to retrieve valid sparse +image memory requirements. + + +==== Sparse Image Memory Requirements + +include::../structs/VkSparseImageMemoryRequirements.txt[] + + * pname:formatProperties.aspectMask is the set of aspects of the image + that this sparse memory requirement applies to. This will usually have a + single aspect specified. However, depth/stencil images may: have depth + and stencil data interleaved into the same memory blocks, in which case + both ename:VK_IMAGE_ASPECT_DEPTH_BIT and + ename:VK_IMAGE_ASPECT_STENCIL_BIT would be present. + * pname:formatProperties.imageGranularity describes the size of a single + bindable block in pixel units. For aspect + ename:VK_IMAGE_ASPECT_METADATA_BIT, this region size will be zero + pixels. All metadata is located in the mip tail region. + * pname:formatProperties.flags contains members of + elink:VkSparseImageFormatFlags: + ** If ename:VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT is set the image + uses a single mip tail region for all array layers. + ** If ename:VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT is set the image + mip levels must: be an exact multiple of the sparse image block size + for levels not located in the mip tail. + ** If ename:VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT is set the + image uses a non-standard sparse block size. The + pname:formatProperties.imageGranularity values do not match the + standard block size for image's given pixel format. + * pname:imageMipTailFirstLod is the first mip level at which subresources + are included in the mip tail block. + * pname:imageMipTailSize is the memory size (in bytes) of the mip tail + block. If pname:formatProperties.flags contains + ename:VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT, this is the size of the + whole mip tail, otherwise this is the size of the mip tail of a single + array layer. This value is guaranteed to be a multiple of the block + byte-size. + * pname:imageMipTailOffset is the opaque memory offset used with + slink:VkSparseImageOpaqueMemoryBindInfo to bind the mip tail region(s). + * pname:imageMipTailStride is the offset stride between each array-layer's + mip tail, if pname:formatProperties.flags does not contain + ename:VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT (otherwise the value is + undefined). + +include::../validity/structs/VkSparseImageMemoryRequirements.txt[] + +Query sparse memory requirements for an image by calling: + +include::../protos/vkGetImageSparseMemoryRequirements.txt[] + + * pname:device is the logical device that owns the image. + * pname:image is the sname:VkImage object to get the memory requirements + for. + * pname:pSparseMemoryRequirementCount points to a variable specifying the + length of the pname:pSparseMemoryRequirements array, or a variable + receiving the expected size of the array if + pname:pSparseMemoryRequirements is `NULL`. + * pname:pSparseMemoryRequirements is an array of + pname:pSparseMemoryRequirementCount + slink:VkSparseImageMemoryRequirements structures to be written by the + API. + +include::../validity/protos/vkGetImageSparseMemoryRequirements.txt[] + +If pname:pSparseMemoryRequirements is `NULL`, then +pname:pSparseMemoryRequirementCount will be updated with the required size +of the array pointed by pname:pProperties. If +pname:pSparseMemoryRequirements is not `NULL`, then +pname:pSparseMemoryRequirementCount must: hold the size of the array pointed +to by pname:pSparseMemoryRequirements, and is overwritten with the number of +sname:VkSparseImageMemoryRequirements structures actually written to +pname:pSparseMemoryRequirements. If pname:pSparseMemoryRequirementCount is +smaller than the number of sparse memory requirements for the given set of +parameters, ename:VK_INCOMPLETE will be returned instead of ename:VK_SUCCESS +to indicate that not all the available values were returned. + +If the image was not created with ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT +then pname:pSparseMemoryRequirementCount will be set to zero and +pname:pSparseMemoryRequirements will not be written to. + +[NOTE] +.Note +==== +It is legal for an implementation to report a larger value in +sname:VkMemoryRequirements::pname:size than would be obtained by adding +together memory sizes for all sname:VkSparseImageMemoryRequirements returned +by fname:vkGetImageSparseMemoryRequirements. This may: occur when the +hardware requires unused padding in the address range describing the +resource. +==== + + +[[sparsememory-resource-binding]] +=== Binding Resource Memory + +Non-sparse resources are backed by a single physical allocation prior to +device use (via fname:vkBindImageMemory or fname:vkBindBufferMemory), and +their backing mustnot: be changed. On the other hand, sparse resources can +be bound to memory non-contiguously and these bindings can be altered +during the lifetime of the resource. + +[NOTE] +.Note +==== +It is important to note that freeing a sname:VkDeviceMemory object with +fname:vkFreeMemory will not cause resources (or resource regions) bound to +the memory object to become unbound. Access to resources that are bound to +memory objects that have been freed will result in undefined behavior, +potentially including application termination. + +Implementations must: ensure that no access to physical memory +owned by the system or another process will occur in this scenario. In other +words, accessing resources bound to freed memory may: result in application +termination, but mustnot: result in system termination or in reading +non-process-accessible memory. +==== + +Sparse memory bindings execute on a queue that includes the +ename:VK_QUEUE_SPARSE_BINDING_BIT bit. Applications must: use +<> +to guarantee that other queues do not access ranges of memory +concurrently with a binding change. Accessing memory in a range while it is +being rebound results in undefined behavior. It is valid to access other +ranges of the same resource while a bind operation is executing. + +[NOTE] +.Note +==== +Implementations must: provide a guarantee that simultaneously binding blocks +while another queue accesses those same blocks via a sparse resource +mustnot: access memory owned by another process or otherwise corrupt the +system. +==== + +While some implementations may: include ename:VK_QUEUE_SPARSE_BINDING_BIT +support in queue families that also include graphics and compute support, +other implementations may: only expose a +ename:VK_QUEUE_SPARSE_BINDING_BIT-only queue family. In either case, +applications must: use <> to +explicitly request any ordering dependencies between sparse memory binding +operations and other graphics/compute/transfer operations, as sparse binding +operations are not automatically ordered against command buffer execution, +even within a single queue. + +When binding memory explicitly for the ename:VK_IMAGE_ASPECT_METADATA_BIT +the application must: use the ename:VK_SPARSE_MEMORY_BIND_METADATA_BIT in +the sname:VkSparseMemoryBind::pname:flags field when binding memory. Binding +memory for metadata is done the same way as binding memory for the mip tail, +with the addition of the ename:VK_SPARSE_MEMORY_BIND_METADATA_BIT flag. + +Binding the mip tail for any aspect must: only be performed using +slink:VkSparseImageOpaqueMemoryBindInfo. If pname:formatProperties.flags +contains ename:VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT, then it can: be +bound with a single slink:VkSparseMemoryBind structure, with +pname:resourceOffset = pname:imageMipTailOffset and pname:size = +pname:imageMipTailSize. + +If pname:formatProperties.flags does not contain +ename:VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT then the offset for the mip +tail in each array layer is given as: + +[source,{basebackend@docbook:c++:cpp}] +-- +arrayMipTailOffset = imageMipTailOffset + arrayLayer * imageMipTailStride; +-- + +and the mip tail can: be bound with code:layerCount slink:VkSparseMemoryBind +structures, each using pname:size = pname:imageMipTailSize and +pname:resourceOffset = pname:arrayMipTailOffset as defined above. + +Sparse memory binding is handled by the following APIs and related data +structures. + + +[[sparsemem-memory-binding]] +==== Sparse Memory Binding Functions + +include::../enums/VkSparseMemoryBindFlagBits.txt[] +include::../flags/VkSparseMemoryBindFlags.txt[] + + * ename:VK_SPARSE_MEMORY_BIND_METADATA_BIT is used to indicate + that the memory being bound is only for the metadata aspect. + +include::../structs/VkSparseMemoryBind.txt[] + + * pname:resourceOffset is the offset into the resource. + * pname:size is the size of the memory region to be bound. + * pname:memory is the sname:VkDeviceMemory object that the range of the + resource is bound to. If pname:memory is sname:VK_NULL_HANDLE, the range + is unbound. + * pname:memoryOffset is the offset into the sname:VkDeviceMemory object to + bind the resource range to. If pname:memory is sname:VK_NULL_HANDLE, + this value is ignored. + * pname:flags are sparse memory binding flags. + +include::../validity/structs/VkSparseMemoryBind.txt[] + +The _binding range_ latexmath:[$[\mathit{resourceOffset}, +\mathit{resourceOffset} + \mathit{size})$] has different constraints based +on the value of pname:flags. If pname:flags contains +ename:VK_SPARSE_MEMORY_BIND_METADATA_BIT, the binding range must: be within +the mip tail region of the metadata aspect. This metadata region is defined +by: + +[latexmath] +++++++++++++++++++++++++++ +\begin{align*} +\mathit{metadataRegion} = [& + \mathit{imageMipTailOffset} + \mathit{imageMipTailStride} \times n,\\ + &\mathit{imageMipTailOffset} + + \mathit{imageMipTailStride} \times n + \mathit{imageMipTailSize}) +\end{align*} +++++++++++++++++++++++++++ + +Where pname:imageMipTailOffset, pname:imageMipTailSize, and +pname:imageMipTailStride values are from the +slink:VkSparseImageMemoryRequirements that correspond to the metadata aspect +of the image. The term latexmath:[$n$] is a valid array layer index for the +image. + +pname:imageMipTailStride is considered to be zero for aspects where +sname:VkSparseImageMemoryRequirements::pname:formatProperties.flags contains +ename:VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT. + +If pname:flags does not contain ename:VK_SPARSE_MEMORY_BIND_METADATA_BIT, +the binding range must: be within the range +latexmath:[$[0, {\mathit{VkMemoryRequirements}::\mathit{size}})$]. + +Memory is bound to sname:VkBuffer objects created with the +ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT or +ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flags using the following +structure: + +include::../structs/VkSparseBufferMemoryBindInfo.txt[] + + * pname:buffer is the sname:VkBuffer object to be bound. + * pname:bindCount is the number of sname:VkSparseMemoryBind structures in + the pname:pBinds array. + * pname:pBinds is a pointer to array of sname:VkSparseMemoryBind + structures. + +include::../validity/structs/VkSparseBufferMemoryBindInfo.txt[] + +Memory is bound to opaque regions of sname:VkImage objects created with the +ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT or +ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flags using the following +structure: + +include::../structs/VkSparseImageOpaqueMemoryBindInfo.txt[] + + * pname:image is the sname:VkImage object to be bound. + * pname:bindCount is the number of sname:VkSparseMemoryBind structures in + the pname:pBinds array. + * pname:pBinds is a pointer to array of sname:VkSparseMemoryBind + structures. + +include::../validity/structs/VkSparseImageOpaqueMemoryBindInfo.txt[] + +[NOTE] +.Note +================== +This operation is normally used to bind memory to fully-resident sparse +images or for mip tail regions of partially resident images. However, it +can: also be used to bind memory for the entire binding range of partially +resident images. + +In case pname:flags does not contain +ename:VK_SPARSE_MEMORY_BIND_METADATA_BIT, the pname:resourceOffset is in the +range latexmath:[$[0, {\mathit{VkMemoryRequirements}::\mathit{size}})$]. +This range includes data from all aspects of the image, including metadata. +For most implementations this will probably mean that the +pname:resourceOffset is a simple device address offset within the resource. +It is possible for an application to bind a range of memory that includes +both resource data and metadata. However, the application would not know +what part of the image the memory is used for, or if any range is being used +for metadata. + +When pname:flags contains ename:VK_SPARSE_MEMORY_BIND_METADATA_BIT, the +binding range specified must: be within the mip tail region of the metadata +aspect. In this case the pname:resourceOffset is not required: to be a +simple device address offset within the resource. However, it _is_ defined +to be within [imageMipTailOffset, imageMipTailOffset + imageMipTailSize) for +the metadata aspect. See slink:VkSparseMemoryBind for the full constraints +on binding region with this flag present. +================== + +Memory can: be bound to sparse image blocks of sname:VkImage objects created +with the ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag using the following +structure: + +include::../structs/VkSparseImageMemoryBindInfo.txt[] + + * pname:image is the sname:VkImage object to be bound + * pname:bindCount is the number of sname:VkSparseImageMemoryBind + structures in pBinds array + * pname:pBinds is a pointer to array of sname:VkSparseImageMemoryBind + structures + +include::../validity/structs/VkSparseImageMemoryBindInfo.txt[] + +Where sname:VkSparseImageMemoryBind is defined as follows: + +include::../structs/VkSparseImageMemoryBind.txt[] + + * pname:subresource is the aspectMask and region of interest in the image. + * pname:offset are the coordinates of the first texel within the + subresource to bind. + * pname:extent is the size in texels of the region within the subresource + to bind. The extent must: be a multiple of the block size, except when + binding blocks along the edge of a subresource it can: instead be such + that any coordinate of latexmath:[$\mathit{offset} + \mathit{extent}$] + equals the subresource size in that dimension. + * pname:memory is the sname:VkDeviceMemory object that the blocks of the + image are bound to. If pname:memory is sname:VK_NULL_HANDLE, the blocks + are unbound. + * pname:memoryOffset is an offset into sname:VkDeviceMemory object. If + pname:memory is sname:VK_NULL_HANDLE, this value is ignored. + * pname:flags are sparse memory binding flags. + +include::../validity/structs/VkSparseImageMemoryBind.txt[] + +Sparse binding operations are submitted to a queue for execution via the +command: + +include::../protos/vkQueueBindSparse.txt[] + + * pname:queue is the queue to submit the sparse binding operation to. + * pname:bindInfoCount is the size of the array pointed to by + pname:pBindInfo. + * pname:pBindInfo is an array of slink:VkBindSparseInfo structures + each specifying the parameters of a sparse binding operation batch as + described below. + * pname:fence, if not ename:VK_NULL_HANDLE, is a fence to be signaled + once the sparse binding operation completes. + +Each batch of sparse binding operations is represented by a list of +slink:VkSparseBufferMemoryBindInfo, slink:VkSparseImageOpaqueMemoryBindInfo, +and slink:VkSparseImageMemoryBindInfo structures (encapsulated in a +slink:VkBindSparseInfo structure), each preceded by a list of semaphores +upon which to wait before beginning execution of the operations, and +followed by a second list of semaphores to signal upon completion of the +operations. + +When all sparse binding operations in pname:pBindInfo have completed +execution, the status of pname:fence is set to signaled, providing certain +<>. + +Within a batch, a given range of a resource must: not be bound more than +once. Across batches, if a range is to be bound to one allocation and offset +and then to another allocation and offset, then the application must: +guarantee (usually using semaphores) that the binding operations are +executed in the correct order, as well as to order binding operations +against the execution of command buffer submissions. + +include::../validity/protos/vkQueueBindSparse.txt[] + +include::../structs/VkBindSparseInfo.txt[] + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:waitSemaphoreCount is the number of semaphores upon which to + wait before executing the sparse binding operations for the batch. + * pname:pWaitSemaphores is a pointer to an array of semaphores upon which + to wait before executing the sparse binding operations in the batch. + * pname:bufferBindCount is the number of sparse buffer bindings to + perform. + * pname:pBufferBinds is an array of slink:VkSparseBufferMemoryBindInfo + structures, indicating sparse buffer bindings to perform as described + above. + * pname:imageOpaqueBindCount is the number of opaque sparse image bindings + to perform. + * pname:pImageOpaqueBinds is an array of + slink:VkSparseImageOpaqueMemoryBindInfo structures, indicating opaque + sparse image bindings to perform as described above. + * pname:imageBindCount is the number of sparse image bindings to perform. + * pname:pImageBinds is an array of slink:VkSparseImageMemoryBindInfo + structures, indicating sparse image bindings to perform as described + above. + * pname:signalSemaphoreCount is the number of semaphores to be signaled + once the sparse binding operations specified by the structure have + completed execution. + * pname:pSignalSemaphores is a pointer to an array of semaphores which + will be signaled when the sparse binding operations for this batch have + completed execution. + +include::../validity/structs/VkBindSparseInfo.txt[] + + +[[sparsememory-examples]] +== Examples + +The following examples illustrate basic creation of sparse images and +binding them to physical memory. + + +[[sparsememory-examples-basic]] +=== Basic Sparse Resources + +This basic example creates a normal sname:VkImage object but uses +fine-grained memory allocation to back the resource with multiple memory +blocks. + +[source,{basebackend@docbook:c++:cpp}] +--------------------------------------------------- +VkDevice device; +VkQueue queue; +VkImage sparseImage; +VkMemoryRequirements memoryRequirements = {}; +VkDeviceSize offset = 0; +VkSparseMemoryBind binds[MAX_CHUNKS] = {}; // MAX_CHUNKS is NOT part of Vulkan +uint32_t bindCount = 0; + +// ... + +// Allocate image object +const VkImageCreateInfo sparseImageInfo = +{ + VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, // sType + NULL, // pNext + VK_IMAGE_CREATE_SPARSE_BINDING_BIT | ..., // flags + ... +}; +vkCreateImage(device, &sparseImageInfo, &sparseImage); + +// Get memory requirements +vkGetImageMemoryRequirements( + device, + sparseImage, + &memoryRequirements); + +// Bind memory in fine-grained fashion, find available memory blocks +// from potentially multiple VkDeviceMemory pools. +// (Illustration purposes only, can be optimized for perf) +while (memoryRequirements.size && bindCount < MAX_CHUNKS) +{ + VkSparseMemoryBind* pBind = &binds[bindCount]; + pBind->resourceOffset = offset; + + AllocateOrGetMemoryBlock( + device, + &memoryRequirements, + &pBind->memory, + &pBind->memoryOffset, + &pBind->size); + + // memory blocks must be sized as multiples of the alignment + assert(IsMultiple(pBind->size, memoryRequirements.alignment)); + assert(IsMultiple(pBind->memoryOffset, memoryRequirements.alignment)); + + memoryRequirements.size -= pBind->size; + offset += pBind->size; + bindCount++; +} + +// Ensure all image has backing +if (memoryRequirements.size) +{ + // Error condition - too many chunks +} + +const VkSparseImageOpaqueMemoryBindInfo opaqueBindInfo = +{ + sparseImage, // image + bindCount, // bindCount + binds // pBinds +}; + +const VkBindSparseInfo bindSparseInfo = +{ + VK_STRUCTURE_TYPE_BIND_SPARSE_INFO, // sType + NULL, // pNext + ... + 1, // imageOpaqueBindCount + &opaqueBindInfo, // pImageOpaqueBinds + ... +}; + +// vkQueueBindSparse is application synchronized per queue object. +AcquireQueueOwnership(queue); + +// Actually bind memory +vkQueueBindSparse(queue, 1, &bindSparseInfo, VK_NULL_HANDLE); + +ReleaseQueueOwnership(queue); +--------------------------------------------------- + + +[[sparsememory-examples-advanced]] +=== Advanced Sparse Resources + +This more advanced example creates an arrayed color attachment / texture +image and binds only LOD zero and the required: metadata to physical memory. + +[source,{basebackend@docbook:c++:cpp}] +--------------------------------------------------- +VkDevice device; +VkQueue queue; +VkImage sparseImage; +VkMemoryRequirements memoryRequirements = {}; +uint32_t sparseRequirementsCount = 0; +VkSparseImageMemoryRequirements* pSparseReqs = NULL; +VkSparseMemoryBind binds[MY_IMAGE_ARRAY_SIZE] = {}; +VkSparseImageMemoryBind imageBinds[MY_IMAGE_ARRAY_SIZE] = {}; +uint32_t bindCount = 0; + +// Allocate image object (both renderable and sampleable) +const VkImageCreateInfo sparseImageInfo = +{ + VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, // sType + NULL, // pNext + VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT | ..., // flags + ... + VK_FORMAT_R8G8B8A8_UNORM, // format + ... + MY_IMAGE_ARRAY_SIZE, // arrayLayers + ... + VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | + VK_IMAGE_USAGE_SAMPLED_BIT, // usage + ... +}; +vkCreateImage(device, &sparseImageInfo, &sparseImage); + +// Get memory requirements +vkGetImageMemoryRequirements( + device, + sparseImage, + &memoryRequirements); + +// Get sparse image aspect properties +vkGetImageSparseMemoryRequirements( + device, + sparseImage, + &sparseRequirementsCount, + NULL); + +pSparseReqs = (VkSparseImageMemoryRequirements*) + malloc(reqCount * sizeof(VkSparseImageMemoryRequirements)); + +vkGetImageSparseMemoryRequirements( + device, + sparseImage, + &sparseRequirementsCount, + pSparseReqs); + +// Bind LOD level 0 and any required metadata to memory +for (uint32_t i = 0; i < sparseRequirementsCount; ++i) +{ + if (pSparseReqs[i].formatProperties.aspectMask & + VK_IMAGE_ASPECT_METADATA_BIT) + { + // Metadata must not be combined with other aspects + assert(pSparseReqs[i].formatProperties.aspectMask == + VK_IMAGE_ASPECT_METADATA_BIT); + + if (pSparseReqs[i].formatProperties.flags & + VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT) + { + VkSparseMemoryBind* pBind = &binds[bindCount]; + pBind->memorySize = pSparseReqs[i].imageMipTailSize; + bindCount++; + + // ... Allocate memory block + + pBind->resourceOffset = pSparseReqs[i].imageMipTailOffset; + pBind->memoryOffset = /* allocated memoryOffset */; + pBind->memory = /* allocated memory */; + pBind->flags = VK_SPARSE_MEMORY_BIND_METADATA_BIT; + + } + else + { + // Need a mip tail block per array layer. + for (uint32_t a = 0; a < sparseImageInfo.arrayLayers; ++a) + { + VkSparseMemoryBind* pBind = &binds[bindCount]; + pBind->memorySize = pSparseReqs[i].imageMipTailSize; + bindCount++; + + // ... Allocate memory block + + pBind->resourceOffset = pSparseReqs[i].imageMipTailOffset + + (a * pSparseReqs[i].imageMipTailStride); + + pBind->memoryOffset = /* allocated memoryOffset */; + pBind->memory = /* allocated memory */ + pBind->flags = VK_SPARSE_MEMORY_BIND_METADATA_BIT; + } + } + } + else + { + // resource data + VkExtent3D lod0BlockSize = + { + AlignedDivide( + sparseImageInfo.extent.width, + pSparseReqs[i].formatProperties.imageGranularity.width); + AlignedDivide( + sparseImageInfo.extent.height, + pSparseReqs[i].formatProperties.imageGranularity.height); + AlignedDivide( + sparseImageInfo.extent.depth, + pSparseReqs[i].formatProperties.imageGranularity.depth); + } + size_t totalBlocks = + lod0BlockSize.width * + lod0BlockSize.height * + lod0BlockSize.depth; + + VkDeviceSize lod0MemSize = totalBlocks * memoryRequirements.alignment; + + // Allocate memory for each array layer + for (uint32_t a = 0; a < sparseImageInfo.arrayLayers; ++a) + { + // ... Allocate memory block + + VkSparseImageMemoryBind* pBind = &imageBinds[a]; + pBind->subresource.aspectMask = pSparseReqs[i].formatProperties.aspectMask; + pBind->subresource.mipLevel = 0; + pBind->subresource.arrayLayer = a; + + pBind->offset = (VkOffset3D){0, 0, 0}; + pBind->extent = sparseImageInfo.extent; + pBind->memoryOffset = /* allocated memoryOffset */; + pBind->memory = /* allocated memory */; + pBind->flags = 0; + } + } +} + +const VkSparseImageOpaqueMemoryBindInfo opaqueBindInfo = +{ + sparseImage, // image + bindCount, // bindCount + binds // pBinds +}; + +const VkSparseImageMemoryBindInfo imageBindInfo = +{ + sparseImage, // image + sparseImageInfo.arrayLayers, // bindCount + imageBinds // pBinds +}; + +const VkBindSparseInfo bindSparseInfo = +{ + VK_STRUCTURE_TYPE_BIND_SPARSE_INFO, // sType + NULL, // pNext + ... + 1, // imageOpaqueBindCount + &opaqueBindInfo, // pImageOpaqueBinds + 1, // imageBindCount + &imageBindInfo, // pImageBinds + ... +}; + +// vkQueueBindSparse is application synchronized per queue object. +AcquireQueueOwnership(queue); + +// Actually bind memory +vkQueueBindSparse(queue, 1, &bindSparseInfo, VK_NULL_HANDLE); + +ReleaseQueueOwnership(queue); +--------------------------------------------------- diff --git a/doc/specs/vulkan/chapters/synchronization.txt b/doc/specs/vulkan/chapters/synchronization.txt new file mode 100644 index 00000000..cdf7d644 --- /dev/null +++ b/doc/specs/vulkan/chapters/synchronization.txt @@ -0,0 +1,1232 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[synchronization]] += Synchronization and Cache Control + +Synchronization of access to resources is primarily the responsibility of +the application. In {apiname}, there are four forms of concurrency during +execution: between the host and device, between the queues, between +queue submissions, and between commands within a command buffer. +{apiname} provides the application with a set of +synchronization primitives for these purposes. Further, memory caches and +other optimizations mean that the normal flow of command execution does not +guarantee that all memory transactions from a command are immediately +visible to other agents with views into a given block of memory. {apiname} +also provides barrier operations to ensure this type of synchronization. + +Four synchronization primitive types are exposed by {apiname}. These are: + + * <> + * <> + * <> + * <> + +Each is covered in detail in its own subsection of this chapter. Fences +are used to communicate completion of execution of command buffer +submissions to queues back to the application. Fences can: therefore be used +as a coarse-grained synchronization mechanism. Semaphores are generally +associated with resources or groups of resources and can: be used to marshal +ownership of shared data. Their status is not visible to the host. Events +provide a finer-grained synchronization primitive which can: be signaled at +command level granularity by both device and host, and can: be waited upon +by either. Barriers provide execution and memory synchronization between +sets of commands. + + +[[synchronization-fences]] +== Fences + +Fences can: be used by the host to determine completion of execution of +submissions to queues performed with flink:vkQueueSubmit and +flink:vkQueueBindSparse. + +A fence's status is always either _signaled_ or _unsignaled_. The host can: +poll the status of a single fence, or wait for any or all of a group of +fences to become signaled. + +To create a new fence object, use the command + +include::../protos/vkCreateFence.txt[] + + * pname:device is the logical device that creates the fence. + * pname:pCreateInfo points to a slink:VkFenceCreateInfo structure + specifying the state of the fence object. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pFence points to a handle in which the resulting fence object is + returned. + +include::../validity/protos/vkCreateFence.txt[] + +The definition of sname:VkFenceCreateInfo is: + +include::../structs/VkFenceCreateInfo.txt[] + +The pname:flags member of the sname:VkFenceCreateInfo structure pointed to +by pname:pCreateInfo contains flags defining the initial state and behavior +of the fence. The flags are: + +include::../enums/VkFenceCreateFlagBits.txt[] + +If pname:flags contains ename:VK_FENCE_CREATE_SIGNALED_BIT then the fence +object is created in the signaled state. Otherwise it is created in the +unsignaled state. + +include::../validity/structs/VkFenceCreateInfo.txt[] + +A fence can: be passed as a parameter to the queue submission commands, and +when the associated queue submissions all complete execution the fence will +transition from the unsignaled to the signaled state. See +<> and +<>. + +To destroy a fence, call: + +include::../protos/vkDestroyFence.txt[] + + * pname:device is the logical device that destroys the fence. + * pname:fence is the handle of the fence to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroyFence.txt[] + +To query the status of a fence from the host, use the command + +include::../protos/vkGetFenceStatus.txt[] + + * pname:device is the logical device that owns the fence. + * pname:fence is the handle of the fence to query. + +include::../validity/protos/vkGetFenceStatus.txt[] + +Upon success, fname:vkGetFenceStatus returns the status of the fence, +which is one of: + + * ename:VK_SUCCESS indicates that the fence is signaled. + * ename:VK_NOT_READY indicates that the fence is unsignaled. + +To reset the status of one or more fences to the unsignaled state, so that +they can: be reused after a queue submission completes, use the command: + +include::../protos/vkResetFences.txt[] + + * pname:device is the logical device that owns the fences. + * pname:fenceCount is the number of fences to reset. + * pname:pFences is a pointer to an array of pname:fenceCount fence + handles to reset. + +include::../validity/protos/vkResetFences.txt[] + +To cause the host to wait until any one or all of a group of fences +is signaled, use the command: + +include::../protos/vkWaitForFences.txt[] + + * pname:device is the logical device that owns the fences. + * pname:fenceCount is the number of fences to wait on. + * pname:pFences is a pointer to an array of pname:fenceCount fence + handles. + * pname:waitAll is the condition that must: be satisfied to successfully + unblock the wait. If pname:waitAll is ename:VK_TRUE, then the condition + is that all fences in pname:pFences are signaled. Otherwise, the + condition is that at least one fence in pname:pFences is signaled. + * pname:timeout is the timeout period in units of nanoseconds. The value + of pname:timeout is adjusted to the closest value allowed by the + implementation-dependent timeout accuracy, which may: be substantially + longer than one nanosecond, and may: be longer than the requested + period. + +include::../validity/protos/vkWaitForFences.txt[] + +If the condition is satisfied when fname:vkWaitForFences is called, then +fname:vkWaitForFences returns immediately. If the condition is not satisfied +at the time fname:vkWaitForFences is called, then fname:vkWaitForFences will +block and wait up to pname:timeout nanoseconds for the condition to become +satisfied. + +If the value of pname:timeout is zero, then fname:vkWaitForFences does not +wait, but simply returns the current state of the fences. ename:VK_TIMEOUT +will be returned in this case if the condition is not satisfied, even though +no actual wait was performed. + +If the specified timeout period expires before the condition is satisfied, +fname:vkWaitForFences returns ename:VK_TIMEOUT. If the condition is +satisfied before pname:timeout nanoseconds has expired, +fname:vkWaitForFences returns ename:VK_SUCCESS. + +[[synchronization-fences-devicewrites]] +Fences become signaled when the device completes executing the work that was +submitted to a queue accompanied by the fence. But this alone is not +sufficient for the host to be guaranteed to see the results of device writes +to memory. To provide that guarantee, the application must: insert a +memory barrier between the device writes and the end of the submission +that will signal the fence, with pname:dstAccessMask having the +ename:VK_ACCESS_HOST_READ_BIT bit set, with pname:dstStageMask having the +ename:VK_PIPELINE_STAGE_HOST_BIT bit set, and with the appropriate +pname:srcStageMask and pname:srcAccessMask members set to guarantee +completion of the writes. If the memory was allocated without the +ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT set, then +fname:vkInvalidateMappedMemoryRanges must: be called after the fence is +signaled in order to ensure the writes are visible to the host, as described +in <>. + + +[[synchronization-semaphores]] +== Semaphores + +Semaphores are used to coordinate operations between queues and between +queue submissions within a single queue. An application +might associate semaphores with resources or groups of resources to marshal +ownership of shared data. A semaphore's status is always either _signaled_ +or _unsignaled_. Semaphores are signaled by queues and can: +also be waited on in the same or different queues until they are signaled. + +To create a new semaphore object, use the command + +include::../protos/vkCreateSemaphore.txt[] + + * pname:device is the logical device that creates the semaphore. + * pname:pCreateInfo points to a slink:VkSemaphoreCreateInfo structure + specifying the state of the semaphore object. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pSemaphore points to a handle in which the resulting + semaphore object is returned. The semaphore is created in the unsignaled + state. + +include::../validity/protos/vkCreateSemaphore.txt[] + +The definition of sname:VkSemaphoreCreateInfo is: + +include::../structs/VkSemaphoreCreateInfo.txt[] + +The members of sname:VkSemaphoreCreateInfo have the following meanings: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + +// @include::../enums/VkSemaphoreCreateFlagBits.txt[] + +include::../validity/structs/VkSemaphoreCreateInfo.txt[] + +To destroy a semaphore, call: + +include::../protos/vkDestroySemaphore.txt[] + + * pname:device is the logical device that destroys the semaphore. + * pname:semaphore is the handle of the semaphore to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroySemaphore.txt[] + +To signal a semaphore from a queue, include it in an element of the array +of slink:VkSubmitInfo structures passed through the pname:pSubmitInfo +parameter to a call to flink:vkQueueSubmit, or in an element of the array +of slink:VkBindSparseInfo structures passed through the pname:pBindInfo +parameter to a call to flink:vkQueueBindSparse. + +[[synchronization-semaphores-guarantees]] +Semaphores included in the pname:pSignalSemaphores array of one of the +elements of a queue submission are signaled once queue execution +reaches the signal operation, and all previous work in the queue completes. +Any operations waiting on that semaphore in other queues will be released +once it is signaled. + +Similarly, to wait on a semaphore from a queue, include it in the +pname:pWaitSemaphores array of one of the elements of a batch in a queue +submission. When queue execution reaches the wait operation, will stall +execution of subsequently submitted operations until the semaphore reaches +the signaled state due to a signaling operation. Once the semaphore is +signaled, the subsequent operations will be permitted to execute and the +status of the semaphore will be reset to the unsignaled state. + +In the case of slink:VkSubmitInfo, command buffers wait at specific pipeline +stages, rather than delaying the entire command buffer's execution, with the +pipeline stages determined by the value of the corresponding element of the +pname:pWaitDstStageMask member of sname:VkSubmitInfo. Execution of work by +those stages in subsequent commands is stalled until the corresponding +semaphore reaches the signaled state. Subsequent sparse binding operations +wait for the semaphore to become signaled, regardless of the values of +pname:pWaitDstStageMask. + +[NOTE] +.Note +==== +A common scenario for using pname:pWaitDstStageMask with values other than +ename:VK_PIPELINE_STAGE_ALL_COMMANDS_BIT is when synchronizing a window +system presentation operation against subsequent command buffers which +render the next frame. In this case, an image that was being presented +mustnot: be overwritten until the presentation operation completes, but +other pipeline stages can: execute without waiting. A mask of +ename:VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT prevents subsequent +color attachment writes from executing until the semaphore signals. +Some implementations may: be able to execute transfer operations and/or +vertex processing work before the semaphore is signaled. + +If an image layout transition needs to be performed on a swapchain image +before it is used in a framebuffer, that can be performed as the first +operation submitted to the queue after acquiring the image, +and shouldnot: prevent other work from overlapping with the presentation +operation. For example, a sname:VkImageMemoryBarrier could use: + + * pname:srcStageMask = ename:VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT + * pname:srcAccessMask = ename:VK_ACCESS_MEMORY_READ_BIT + * pname:dstStageMask = ename:VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT + * pname:dstAccessMask = ename:VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | + ename:VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT. + * pname:oldLayout = ename:VK_IMAGE_LAYOUT_PRESENT_SRC_KHR + * pname:newLayout = ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL + +Alternately, pname:oldLayout can: be ename:VK_IMAGE_LAYOUT_UNDEFINED, if +the image's contents need not be preserved. + +This barrier accomplishes a dependency chain between previous presentation +operations and subsequent color attachment output operations, with the +layout transition performed in between, and does not introduce a dependency +between previous work and any vertex processing stages. More precisely, the +semaphore signals after the presentation operation completes, then the +semaphore wait stalls the +ename:VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT stage, then there is a +dependency from that same stage to itself with the layout transition +performed in between. +==== + +When a queue signals or waits upon a semaphore, certain +<> are +provided. + +Semaphore operations maynot: make the side effects of commands visible to +the host. + + +[[synchronization-events]] +== Events + +Events represent a fine-grained synchronization primitive that can: be used +to gauge progress through a sequence of commands executed on a queue by +{apiname}. An event is initially in the unsignaled state. It can: be +signaled by a device, using commands inserted into the command buffer, or by +the host. It can: also be reset to the unsignaled state by a device or the +host. The host can: query the state of an event. A device can: wait for one +or more events to become signaled. + +To create an event, call: + +include::../protos/vkCreateEvent.txt[] + + * pname:device is the logical device that creates the event. + * pname:pCreateInfo is a pointer to an instance of the + sname:VkEventCreateInfo structure which contains information about how + the event is to be created. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pEvent points to a handle in which the resulting event object is + returned. + +include::../validity/protos/vkCreateEvent.txt[] + +The definition of sname:VkEventCreateInfo is: + +include::../structs/VkEventCreateInfo.txt[] + +The pname:flags member of the sname:VkEventCreateInfo structure pointed to +by pname:pCreateInfo contains flags defining the behavior of the event. +Currently, no flags are defined. +When created, the event object is in the unsignaled state. + +include::../validity/structs/VkEventCreateInfo.txt[] + +To destroy an event, call: + +include::../protos/vkDestroyEvent.txt[] + + * pname:device is the logical device that destroys the event. + * pname:event is the handle of the event to destroy. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + +include::../validity/protos/vkDestroyEvent.txt[] + +To query the state of an event from the host, call: + +include::../protos/vkGetEventStatus.txt[] + + * pname:device is the logical device that owns the event. + * pname:event is the handle of the event to query. + +include::../validity/protos/vkGetEventStatus.txt[] + +Upon success, fname:vkGetEventStatus returns the state of the event object +with the following return codes: + +[width="80%",options="header"] +|===== +| Status | Meaning +| ename:VK_EVENT_SET | The event specified by pname:event is signaled. +| ename:VK_EVENT_RESET | The event specified by pname:event is unsignaled. +|===== + +The state of an event can: be updated by the host. The state of the event is +immediately changed, and subsequent calls to fname:vkGetEventStatus will +return the new state. + +To set the state of an event to signaled from the host, call: + +include::../protos/vkSetEvent.txt[] + + * pname:device is the logical device that owns the event. + * pname:event is the event to set. + +include::../validity/protos/vkSetEvent.txt[] + +To set the state of an event to unsignaled from the host, call: + +include::../protos/vkResetEvent.txt[] + + * pname:device is the logical device that owns the event. + * pname:event is the event to reset. + +include::../validity/protos/vkResetEvent.txt[] + +The state of an event can: also be updated on the device by commands +inserted in command buffers. To set the state of an event to signaled from +a device, call: + +include::../protos/vkCmdSetEvent.txt[] + + * pname:commandBuffer is the command buffer into which the command is + recorded. + * pname:event is the event that will be signaled. + * pname:stageMask specifies the pipeline stage at which the state of + pname:event is updated as described below. + +include::../validity/protos/vkCmdSetEvent.txt[] + +To set the state of an event to unsignaled from a device, call: + +include::../protos/vkCmdResetEvent.txt[] + + * pname:commandBuffer is the command buffer into which the command is + recorded. + * pname:event is the event that will be reset. + * pname:stageMask specifies the pipeline stage at which the state of + pname:event is updated as described below. + +include::../validity/protos/vkCmdResetEvent.txt[] + +For both fname:vkCmdSetEvent and fname:vkCmdResetEvent, the status of +pname:event is updated once the pipeline stages specified by pname:stageMask +(see <>) have completed executing +prior commands. The command modifying the event is passed through the +pipeline bound to the command buffer at time of execution. + +To wait for one or more events to enter the signaled state on a device, +call: + +include::../protos/vkCmdWaitEvents.txt[] + + * pname:commandBuffer is the command buffer into which the command is + recorded. + * pname:eventCount is the length of the pname:pEvents array. + * pname:pEvents is an array of event object handles to wait on. + * pname:srcStageMask (see <>) is the + bitwise OR of the pipeline stages used to signal the event object + handles in pname:pEvents. + * pname:dstStageMask is the pipeline stages at which the wait will occur. + * pname:pMemoryBarriers is a pointer to an array of + pname:memoryBarrierCount sname:VkMemoryBarrier structures. + * pname:pBufferMemoryBarriers is a pointer to an array of + pname:bufferMemoryBarrierCount sname:VkBufferMemoryBarrier structures. + * pname:pImageMemoryBarriers is a pointer to an array of + pname:imageMemoryBarrierCount sname:VkImageMemoryBarrier structures. See + <> for more details about memory + barriers. + +include::../validity/protos/vkCmdWaitEvents.txt[] + +fname:vkCmdWaitEvents waits for events set by either fname:vkSetEvent or +fname:vkCmdSetEvent to become signaled. Logically, it has three phases: + + . Wait at the pipeline stages specified by pname:dstStageMask (see + <>) until the pname:eventCount + event objects specified by pname:pEvents become signaled. + Implementations may: wait for each event object to become signaled + in sequence (starting with the first event object in pname:pEvents, + and ending with the last), or wait for all of the event objects to + become signaled at the same time. + . Execute the memory barriers specified by pname:pMemoryBarriers, + pname:pBufferMemoryBarriers and pname:pImageMemoryBarriers (see + <>). + . Resume execution of pipeline stages specified by pname:dstStageMask + +Implementations maynot: execute commands in a pipelined manner, +so fname:vkCmdWaitEvents maynot: observe the results of a subsequent +fname:vkCmdSetEvent or fname:vkCmdResetEvent command, even if the stages +in pname:dstStageMask occur after the stages in pname:srcStageMask. + +Commands that update the state of events in different pipeline stages +may: execute out of order, unless the ordering is enforced by execution +dependencies. + +[NOTE] +.Note +==== +Applications should: be careful to avoid race conditions when using +events. For example, an event should: only be reset if no +fname:vkCmdWaitEvents command is executing that waits upon that event. +==== + +An act of setting or resetting an event in one queue maynot: affect or be +visible to other queues. For cross-queue synchronization, semaphores +can: be used. + + +[[synchronization-execution-and-memory-dependencies]] +== Execution And Memory Dependencies + +Synchronization commands introduce explicit execution and memory +dependencies between two sets of action commands, where the second set of +commands depends on the first set of commands. The two sets can: be: + + * First set: commands before a flink:vkCmdSetEvent command. ++ +Second set: commands after a flink:vkCmdWaitEvents command in the same +queue, using the same event. + + * First set: commands in a lower numbered subpass (or before a render pass + instance). ++ +Second set: commands in a higher numbered subpass (or after a render pass +instance), where there is a <> between the +two subpasses (or between a subpass and ename:VK_SUBPASS_EXTERNAL). + + * First set: commands before a + <>. ++ +Second set: commands after that pipeline barrier in the same queue (possibly + limited to within the same subpass). + +An _execution dependency_ is a single dependency between a set of source and +destination pipeline stages, which guarantees that all work performed by the +set of pipeline stages included in pname:srcStageMask (see +<>) of the first +set of commands completes before any work performed by the set of pipeline +stages included in pname:dstStageMask of the second set of commands begins. + +An _execution dependency chain_ from a set of source pipeline stages +latexmath:[$A$] to a set of destination pipeline stages latexmath:[$B$] is a +sequence of execution dependencies submitted to a queue in order between a +first set of commands and a second set of commands, satisfying the following +conditions: + + * the first dependency includes latexmath:[$A$] or + ename:VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT or + ename:VK_PIPELINE_STAGE_ALL_COMMANDS_BIT in the pname:srcStageMask. And, + * the final dependency includes latexmath:[$B$] or + ename:VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT or + ename:VK_PIPELINE_STAGE_ALL_COMMANDS_BIT in the pname:dstStageMask. And, + * for each dependency in the sequence (except the first) at least one of + the following conditions is true: + ** pname:srcStageMask of the current dependency includes at least one bit + latexmath:[$C$] that is present in the pname:dstStageMask of the + previous dependency. Or, + ** pname:srcStageMask of the current dependency includes + ename:VK_PIPELINE_STAGE_ALL_COMMANDS_BIT or + ename:VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT. Or, + ** pname:dstStageMask of the previous dependency includes + ename:VK_PIPELINE_STAGE_ALL_COMMANDS_BIT or + ename:VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT. Or, + ** pname:srcStageMask of the current dependency includes + ename:VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, and pname:dstStageMask of the + previous dependency includes at least one graphics pipeline stage. Or, + ** pname:dstStageMask of the previous dependency includes + ename:VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, and pname:srcStageMask of the + current dependency includes at least one graphics pipeline stage. + +A pair of consecutive execution dependencies in an execution dependency +chain accomplishes a dependency between the stages latexmath:[$A$] and +latexmath:[$B$] via intermediate stages latexmath:[$C$], even if no work is +executed between them that uses the pipeline stages included in +latexmath:[$C$]. + +An execution dependency chain guarantees that the work performed by the +pipeline stages latexmath:[$A$] in the first set of commands completes +before the work performed by pipeline stages latexmath:[$B$] in the second +set of commands begins. + +An execution dependency is _by-region_ if its pname:dependencyFlags +parameter includes ename:VK_DEPENDENCY_BY_REGION_BIT. Such a barrier +describes a per-region (x,y,layer) dependency. That is, for each region, the +implementation must: ensure that the source stages for the first set of +commands complete execution before any destination stages begin execution in +the second set of commands for the same region. Since fragment shader +invocations are not specified to run in any particular groupings, the size +of a region is implementation-dependent, not known to the application, and +must: be assumed to be no larger than a single pixel. If +pname:dependencyFlags does not include ename:VK_DEPENDENCY_BY_REGION_BIT, it +describes a global dependency, that is for all pixel regions, the source +stages must: have completed for preceding commands before any destination +stages starts for subsequent commands. + +[[synchronization-execution-and-memory-dependencies-available-and-visible]] +_Memory dependencies_ synchronize accesses to memory between two sets of +commands. They operate according to two ``halves'' of a dependency to +synchronize two sets of commands, the commands that execute first vs the +commands that execute second, as described above. The first half of the +dependency makes memory accesses using the set of access types in +pname:srcAccessMask performed in pipeline stages in pname:srcStageMask by +the first set of commands complete and writes be _available_ for subsequent +commands. The second half of the dependency makes any available writes from +previous commands _visible_ to pipeline stages in pname:dstStageMask using +the set of access types in pname:dstAccessMask for the second set of +commands, if those writes have been made available with the first half of +the same or a previous dependency. The two halves of a memory dependency +can: either be expressed as part of a single command, or can: be part of +separate barriers as long as there is an execution dependency chain between +them. The application must: use memory dependencies to make writes visible +before subsequent reads can rely on them, and before subsequent writes can +overwrite them. Failure to do so causes the result of the reads to be +undefined, and the order of writes to be undefined. + +[[synchronization-execution-and-memory-dependencies-types]] +<> apply to +all resources owned by the device. +<> and +<> apply to the +buffer range(s) or image subresource(s) included in the command. For +accesses to a byte of a buffer or subresource of an image to be synchronized +between two sets of commands, the byte or subresource must: be included in +both the first and second halves of the dependencies described above, but +need not be included in each step of the execution dependency chain between +them. + +An execution dependency chain is _by-region_ if all stages in all +dependencies in the chain are framebuffer-space pipeline stages, and if the +ename:VK_DEPENDENCY_BY_REGION_BIT bit is included in all dependencies in the +chain. Otherwise, the execution dependency chain is not by-region. The two +halves of a memory dependency form a by-region dependency if *all* execution +dependency chains between them are by-region. In other words, if there is +any execution dependency between two sets of commands that is not by-region, +then the memory dependency is not by-region. + +When an image memory barrier includes a layout transition, the barrier first +makes writes via pname:srcStageMask and pname:srcAccessMask available, then +performs the layout transition, then makes the contents of the image +subresource(s) in the new layout visible to memory accesses in +pname:dstStageMask and pname:dstAccessMask, as if there is an execution and +memory dependency between the source masks and the transition, as well as +between the transition and the destination masks. Any writes that have +previously been made available are included in the layout transition, but +any previous writes that have not been made available may: become lost or +corrupt the image. + +All dependencies must: include at least one bit in each of the +pname:srcStageMask and pname:dstStageMask. + +Memory dependencies are used to solve data hazards, e.g. to ensure that +write operations are visible to subsequent read operations (read-after-write +hazard), as well as write-after-write hazards. Write-after-read and +read-after-read hazards only require execution dependencies to synchronize. + + +[[synchronization-pipeline-barriers]] +== Pipeline Barriers + +A _pipeline barrier_ inserts an execution dependency and a set of memory +dependencies between a set of commands earlier in the command buffer and a +set of commands later in the command buffer. A pipeline barrier is recorded +by calling: + +include::../protos/vkCmdPipelineBarrier.txt[] + + * pname:commandBuffer is the command buffer into which the command is + recorded. + * pname:srcStageMask is a bitmask of elink:VkPipelineStageFlagBits + specifying a set of source pipeline stages (see + <>). + * pname:dstStageMask is a bitmask specifying a set of destination pipeline + stages. ++ +The pipeline barrier specifies an execution dependency such that all +work performed by the set of pipeline stages included in +pname:srcStageMask of the first set of commands completes before any +work performed by the set of pipeline stages included in +pname:dstStageMask of the second set of commands begins. + + * pname:dependencyFlags is a bitmask of elink:VkDependencyFlagBits. The + execution dependency is by-region if the mask includes + ename:VK_DEPENDENCY_BY_REGION_BIT. + * pname:memoryBarrierCount is the length of the pname:pMemoryBarriers + array. + * pname:pMemoryBarriers is a pointer to an array of slink:VkMemoryBarrier + structures. + * pname:bufferMemoryBarrierCount is the length of the + pname:pBufferMemoryBarriers array. + * pname:pBufferMemoryBarriers is a pointer to an array of + slink:VkBufferMemoryBarrier structures. + * pname:imageMemoryBarrierCount is the length of the + pname:pImageMemoryBarriers array. + * pname:pImageMemoryBarriers is a pointer to an array of + slink:VkImageMemoryBarrier structures. + +Each element of the pname:pMemoryBarriers, pname:pBufferMemoryBarriers and +pname:pImageMemoryBarriers arrays specifies two halves of a memory +dependency, as defined above. Specifics of each type of memory barrier and +the memory access types are defined further in +<>. + +If fname:vkCmdPipelineBarrier is called outside a render pass instance, then +the first set of commands is all prior commands submitted to the queue and +recorded in the command buffer and the second set of commands is all +subsequent commands recorded in the command buffer and submitted to the +queue. If fname:vkCmdPipelineBarrier is called inside a render pass +instance, then the first set of commands is all prior commands in the same +subpass and the second set of commands is all subsequent commands in the +same subpass. + +include::../validity/protos/vkCmdPipelineBarrier.txt[] + + +[[synchronization-pipeline-barriers-subpass-self-dependencies]] +=== Subpass Self-dependency + +If fname:vkCmdPipelineBarrier is called inside a render pass instance, +the following restrictions apply. For a given subpass to allow a pipeline +barrier, the render pass must: declare a _self-dependency_ from that subpass +to itself. That is, there must: exist a sname:VkSubpassDependency in the +subpass dependency list for the render pass with pname:srcSubpass and +pname:dstSubpass equal to that subpass index. More than one self-dependency +can: be declared for each subpass. Self-dependencies must: only include +pipeline stage bits that are graphics stages. Self-dependencies mustnot: +have any earlier pipeline stages depend on any later pipeline stages. More +precisely, this means that whatever is the last pipeline stage in +pname:srcStageMask must: be no later than whatever is the first pipeline +stage in pname:dstStageMask (the latest source stage can: be equal to the +earliest destination stage). If the source and destination stage masks both +include framebuffer-space stages, then pname:dependencyFlags must: include +ename:VK_DEPENDENCY_BY_REGION_BIT. + +A fname:vkCmdPipelineBarrier command inside a render pass instance must: be +a _subset_ of one of the self-dependencies of the subpass it is used in, +meaning that the stage masks and access masks must: each include only a +subset of the bits of the corresponding mask in that self-dependency. If the +self-dependency has ename:VK_DEPENDENCY_BY_REGION_BIT set, then so must: the +pipeline barrier. Pipeline barriers within a render pass instance can: only +be types sname:VkMemoryBarrier or sname:VkImageMemoryBarrier. If a +sname:VkImageMemoryBarrier is used, the image and subresource range +specified in the barrier must: be a subset of one of the image views used by +the framebuffer in the current subpass. Additionally, pname:oldLayout must: +be equal to pname:newLayout, and both the pname:srcQueueFamilyIndex and +pname:dstQueueFamilyIndex must: be ename:VK_QUEUE_FAMILY_IGNORED. + + +[[synchronization-pipeline-stage-flags]] +=== Pipeline Stage Flags + +Several of the event commands, fname:vkCmdPipelineBarrier, and +sname:VkSubpassDependency depend on being able to specify where in the +logical pipeline events can: be signaled or the source and destination of an +execution dependency. These pipeline stages are specified with the bitfield: + +include::../enums/VkPipelineStageFlagBits.txt[] + +The meaning of each bit is: + + * ename:VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT: + Stage of the pipeline where commands are initially received by the + queue. + * ename:VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT: + Stage of the pipeline where Draw/DispatchIndirect data structures are + consumed. + * ename:VK_PIPELINE_STAGE_VERTEX_INPUT_BIT: + Stage of the pipeline where vertex and index buffers are consumed. + * ename:VK_PIPELINE_STAGE_VERTEX_SHADER_BIT: + Vertex shader stage. + * ename:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT: + Tessellation control shader stage. + * ename:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT: + Tessellation evaluation shader stage. + * ename:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT: + Geometry shader stage. + * ename:VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT: + Fragment shader stage. + * ename:VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT: + Stage of the pipeline where early fragment tests (depth and stencil + tests before fragment shading) are performed. + * ename:VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT: + Stage of the pipeline where late fragment tests (depth and stencil tests + after fragment shading) are performed. + * ename:VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT: + Stage of the pipeline after blending where the final color values are + output from the pipeline. This stage also includes resolve operations + that occur at the end of a subpass. Note that this does not necessarily + indicate that the values have been committed to memory. + * [[synchronization-transfer]]ename:VK_PIPELINE_STAGE_TRANSFER_BIT: + Execution of copy commands. This includes the operations resulting from + all transfer commands. The set of transfer commands comprises + fname:vkCmdCopyBuffer, fname:vkCmdCopyImage, fname:vkCmdBlitImage, + fname:vkCmdCopyBufferToImage, fname:vkCmdCopyImageToBuffer, + fname:vkCmdUpdateBuffer, fname:vkCmdFillBuffer, + fname:vkCmdClearColorImage, fname:vkCmdClearDepthStencilImage, + fname:vkCmdResolveImage, and fname:vkCmdCopyQueryPoolResults. + * ename:VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT: + Execution of a compute shader. + * ename:VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT: + Final stage in the pipeline where commands complete execution. + * ename:VK_PIPELINE_STAGE_HOST_BIT: + A pseudo-stage indicating execution on the host of reads/writes of + device memory. + * ename:VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT: + Execution of all graphics pipeline stages. + * ename:VK_PIPELINE_STAGE_ALL_COMMANDS_BIT: + Execution of all stages supported on the queue. + +[NOTE] +.Note +==== +The ename:VK_PIPELINE_STAGE_ALL_COMMANDS_BIT and +ename:VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT differ from +ename:VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT in that they correspond to all +(or all graphics) stages, rather than to a specific stage at the end of the +pipeline. An execution dependency with only +ename:VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT in pname:dstStageMask will not +delay subsequent commands, while including either of the other two bits +will. Similarly, when defining a memory dependency, if the stage mask(s) +refer to all stages, then the indicated access types from all stages will be +made available and/or visible, but using only +ename:VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT would not make any accesses +available and/or visible because this stage doesn't access memory. The +ename:VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT is useful for accomplishing +memory barriers and layout transitions when the next accesses will be done +in a different queue or by a presentation engine; in these cases subsequent +commands in the same queue do not need to wait, but the barrier or +transition must complete before semaphores associated with the batch signal. +==== + +[NOTE] +.Note +==== +If an implementation is unable to update the state of an event at any +specific stage of the pipeline, it may: instead update the event at any +logically later stage. For example, if an implementation is unable to signal +an event immediately after vertex shader execution is complete, it may: +instead signal the event after color attachment output has completed. In the +limit, an event may: be signaled after all graphics stages complete. If an +implementation is unable to wait on an event at any specific stage of the +pipeline, it may: instead wait on it at any logically earlier stage. + +Similarly, if an implementation is unable to implement an execution +dependency at specific stages of the pipeline, it may: implement the +dependency in a way where additional source pipeline stages complete and/or +where additional destination pipeline stages' execution is blocked to +satisfy the dependency. + +If an implementation makes such a substitution, it mustnot: affect the +semantics of execution or memory dependencies or image and buffer memory +barriers. +==== + +Certain pipeline stages are only available on queues that support a +particular set of operations. The following table lists, for each pipeline +stage flag, which queue capability flag must: be supported by the +queue. When multiple flags are enumerated in the second column of the table, +it means that the pipeline stage is supported on the queue if it supports +any of the listed capability flags. For further details on queue +capabilities see <> and <>. + +.Supported pipeline stage flags +[width="100%",cols="69%,31%",options="header",align="center"] +|======================================== +|Pipeline stage flag | Required queue capability flag +|ename:VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT | None +|ename:VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT | ename:VK_QUEUE_GRAPHICS_BIT or ename:VK_QUEUE_COMPUTE_BIT +|ename:VK_PIPELINE_STAGE_VERTEX_INPUT_BIT | ename:VK_QUEUE_GRAPHICS_BIT +|ename:VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | ename:VK_QUEUE_GRAPHICS_BIT +|ename:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT | ename:VK_QUEUE_GRAPHICS_BIT +|ename:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT | ename:VK_QUEUE_GRAPHICS_BIT +|ename:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT | ename:VK_QUEUE_GRAPHICS_BIT +|ename:VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | ename:VK_QUEUE_GRAPHICS_BIT +|ename:VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | ename:VK_QUEUE_GRAPHICS_BIT +|ename:VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT | ename:VK_QUEUE_GRAPHICS_BIT +|ename:VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT | ename:VK_QUEUE_GRAPHICS_BIT +|ename:VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT | ename:VK_QUEUE_COMPUTE_BIT +|ename:VK_PIPELINE_STAGE_TRANSFER_BIT | ename:VK_QUEUE_GRAPHICS_BIT, ename:VK_QUEUE_COMPUTE_BIT or ename:VK_QUEUE_TRANSFER_BIT +|ename:VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT | None +|ename:VK_PIPELINE_STAGE_HOST_BIT | None +|ename:VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT | ename:VK_QUEUE_GRAPHICS_BIT +|ename:VK_PIPELINE_STAGE_ALL_COMMANDS_BIT | None +|======================================== + + +[[synchronization-memory-barriers]] +=== Memory Barriers + +_Memory barriers_ express the two halves of a memory dependency between an +earlier set of memory accesses against a later set of memory accesses. +{apiname} provides three types of memory barriers: global memory, buffer +memory, and image memory. + + +[[synchronization-global-memory-barrier]] +=== Global Memory Barriers + +The global memory barrier type is specified with an instance of the +sname:VkMemoryBarrier structure. This type of barrier applies to memory +accesses involving all memory objects that exist at the time of its +execution. The definition of sname:VkMemoryBarrier is: + +include::../structs/VkMemoryBarrier.txt[] + +The members of sname:VkMemoryBarrier have the following meanings: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:srcAccessMask is a mask of the classes of memory accesses + performed by the first set of commands that will participate in + the dependency. + * pname:dstAccessMask is a mask of the classes of memory accesses + performed by the second set of commands that will participate in + the dependency. + +include::../validity/structs/VkMemoryBarrier.txt[] + +pname:srcAccessMask and pname:dstAccessMask, along with pname:srcStageMask +and pname:dstStageMask from flink:vkCmdPipelineBarrier, define the two +halves of a memory dependency and an execution dependency. Memory accesses +using the set of access types in pname:srcAccessMask performed in pipeline +stages in pname:srcStageMask by the first set of commands must: complete and +be available to later commands. The side effects of the first set of +commands will be visible to memory accesses using the set of access types in +pname:dstAccessMask performed in pipeline stages in pname:dstStageMask by +the second set of commands. If the barrier is by-region, these requirements +only apply to invocations within the same framebuffer-space region, for +pipeline stages that perform framebuffer-space work. The execution +dependency guarantees that execution of work by the destination stages of +the second set of commands will not begin until execution of work by the +source stages of the first set of commands has completed. + +A common type of memory dependency is to avoid a read-after-write hazard. In +this case, the source access mask and stages will include writes from a +particular stage, and the destination access mask and stages will indicate +how those writes will be read in subsequent commands. However, barriers can: +also express write-after-read dependencies and write-after-write +dependencies, and are even useful to express read-after-read dependencies +across an image layout change. + +pname:srcAccessMask and pname:dstAccessMask are each masks of the following +bitfield: + +[[synchronization-access-flags]] +include::../enums/VkAccessFlagBits.txt[] + +elink:VkAccessFlagBits has the following meanings: + + * ename:VK_ACCESS_INDIRECT_COMMAND_READ_BIT indicates that the access is + an indirect command structure read as part of an indirect drawing + command. + * ename:VK_ACCESS_INDEX_READ_BIT indicates that the access is an index + buffer read. + * ename:VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT indicates that the access is a + read via the vertex input bindings. + * ename:VK_ACCESS_UNIFORM_READ_BIT indicates that the access is a read via + a uniform buffer or dynamic uniform buffer descriptor. + * ename:VK_ACCESS_INPUT_ATTACHMENT_READ_BIT indicates that the access is a + read via an input attachment descriptor. + * ename:VK_ACCESS_SHADER_READ_BIT indicates that the access is a read from + a shader via any other descriptor type. + * ename:VK_ACCESS_SHADER_WRITE_BIT indicates that the access is a write + or atomic from a shader via the same descriptor types as in + ename:VK_ACCESS_SHADER_READ_BIT. + * ename:VK_ACCESS_COLOR_ATTACHMENT_READ_BIT indicates that the access is a + read via a color attachment. + * ename:VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT indicates that the access is + a write via a color or resolve attachment. + * ename:VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT indicates that the + access is a read via a depth/stencil attachment. + * ename:VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT indicates that the + access is a write via a depth/stencil attachment. + * ename:VK_ACCESS_TRANSFER_READ_BIT indicates that the access is a read + from a transfer (copy, blit, resolve, etc.) operation. For the complete + set of transfer operations, see + <>. + * ename:VK_ACCESS_TRANSFER_WRITE_BIT indicates that the access is a write + from a transfer (copy, blit, resolve, etc.) operation. For the complete + set of transfer operations, see + <>. + * ename:VK_ACCESS_HOST_READ_BIT indicates that the access is a read via + the host. + * ename:VK_ACCESS_HOST_WRITE_BIT indicates that the access is a write via + the host. + * ename:VK_ACCESS_MEMORY_READ_BIT indicates that the access is a read via + a non-specific unit attached to the memory. This unit may: be external + to the Vulkan device or otherwise not part of the core Vulkan pipeline. + When included in pname:dstAccessMask, all writes using access types in + pname:srcAccessMask performed by pipeline stages in pname:srcStageMask + must: be visible in memory. + * ename:VK_ACCESS_MEMORY_WRITE_BIT indicates that the access is a write + via a non-specific unit attached to the memory. This unit may: be + external to the Vulkan device or otherwise not part of the core Vulkan + pipeline. When included in pname:srcAccessMask, all access types in + pname:dstAccessMask from pipeline stages in pname:dstStageMask will + observe the side effects of commands that executed before the barrier. + When included in pname:dstAccessMask all writes using access types in + pname:srcAccessMask performed by pipeline stages in pname:srcStageMask + must: be visible in memory. + +Color attachment reads and writes are automatically (without memory or +execution dependencies) coherent and ordered against themselves and each +other for a given sample within a subpass of a render pass instance, +executing in <>. Similarly, +depth/stencil attachment reads and writes are automatically coherent and +ordered against themselves and each other in the same circumstances. + +Shader reads and/or writes through two variables (in the same or different +shader invocations) decorated with code:Coherent and which use the same +image view or buffer view are automatically coherent with each other, but +require execution dependencies if a specific order is desired. Similarly, +shader atomic operations are coherent with each other and with code:Coherent +variables. Non-code:Coherent shader memory accesses require memory +dependencies for writes to be available and reads to be visible. + +Certain memory access types are only supported on queues that support a +particular set of operations. The following table lists, for each access +flag, which queue capability flag must: be supported by the queue. When +multiple flags are enumerated in the second column of the table it means +that the access type is supported on the queue if it supports any of the +listed capability flags. For further details on queue capabilities see +<> +and <>. + +.Supported access flags +[width="100%",cols="67%,33%",options="header",align="center"] +|======================================== +|Access flag | Required queue capability flag +|ename:VK_ACCESS_INDIRECT_COMMAND_READ_BIT | ename:VK_QUEUE_GRAPHICS_BIT or ename:VK_QUEUE_COMPUTE_BIT +|ename:VK_ACCESS_INDEX_READ_BIT | ename:VK_QUEUE_GRAPHICS_BIT +|ename:VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT | ename:VK_QUEUE_GRAPHICS_BIT +|ename:VK_ACCESS_UNIFORM_READ_BIT | ename:VK_QUEUE_GRAPHICS_BIT or ename:VK_QUEUE_COMPUTE_BIT +|ename:VK_ACCESS_INPUT_ATTACHMENT_READ_BIT | ename:VK_QUEUE_GRAPHICS_BIT +|ename:VK_ACCESS_SHADER_READ_BIT | ename:VK_QUEUE_GRAPHICS_BIT or ename:VK_QUEUE_COMPUTE_BIT +|ename:VK_ACCESS_SHADER_WRITE_BIT | ename:VK_QUEUE_GRAPHICS_BIT or ename:VK_QUEUE_COMPUTE_BIT +|ename:VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | ename:VK_QUEUE_GRAPHICS_BIT +|ename:VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | ename:VK_QUEUE_GRAPHICS_BIT +|ename:VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT | ename:VK_QUEUE_GRAPHICS_BIT +|ename:VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT | ename:VK_QUEUE_GRAPHICS_BIT +|ename:VK_ACCESS_TRANSFER_READ_BIT | ename:VK_QUEUE_GRAPHICS_BIT, ename:VK_QUEUE_COMPUTE_BIT or ename:VK_QUEUE_TRANSFER_BIT +|ename:VK_ACCESS_TRANSFER_WRITE_BIT | ename:VK_QUEUE_GRAPHICS_BIT, ename:VK_QUEUE_COMPUTE_BIT or ename:VK_QUEUE_TRANSFER_BIT +|ename:VK_ACCESS_HOST_READ_BIT | None +|ename:VK_ACCESS_HOST_WRITE_BIT | None +|ename:VK_ACCESS_MEMORY_READ_BIT | None +|ename:VK_ACCESS_MEMORY_WRITE_BIT | None +|======================================== + + +[[synchronization-buffer-memory-barrier]] +=== Buffer Memory Barriers + +The buffer memory barrier type is specified with an instance of the +sname:VkBufferMemoryBarrier structure. This type of barrier only applies to +memory accesses involving a specific range of the specified buffer object. +That is, a memory dependency formed from a buffer memory barrier is +<> to the +specified range of the buffer. It is also used to transfer ownership of a +buffer range from one queue family to another, as described in the +<> section. + +sname:VkBufferMemoryBarrier has the following definition: + +include::../structs/VkBufferMemoryBarrier.txt[] + +The members of sname:VkBufferMemoryBarrier have the following meanings: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:srcAccessMask is a mask of the classes of memory accesses + performed by the first set of commands that will participate in + the dependency. + * pname:dstAccessMask is a mask of the classes of memory accesses + performed by the second set of commands that will participate in + the dependency. + * pname:srcQueueFamilyIndex is the queue family that is relinquishing + ownership of the range of pname:buffer to another queue, or + ename:VK_QUEUE_FAMILY_IGNORED if there is no transfer of ownership. + * pname:dstQueueFamilyIndex is the queue family that is acquiring + ownership of the range of pname:buffer from another queue, or + ename:VK_QUEUE_FAMILY_IGNORED if there is no transfer of ownership. + * pname:buffer is a handle to the buffer whose backing memory is affected + by the barrier. + * pname:offset is an offset in bytes into the backing memory for + pname:buffer; this is relative to the base offset as bound to the buffer + (see flink:vkBindBufferMemory). + * pname:size is a size in bytes of the affected area of backing memory for + pname:buffer, or ename:VK_WHOLE_SIZE to use the range from pname:offset + to the end of the buffer. + +include::../validity/structs/VkBufferMemoryBarrier.txt[] + + +[[synchronization-image-memory-barrier]] +=== Image Memory Barriers + +The image memory barrier type is specified with an instance of the +sname:VkImageMemoryBarrier structure. This type of barrier only applies to +memory accesses involving a specific subresource range of the specified +image object. That is, a memory dependency formed from a image memory +barrier is +<> to the +specified subresources of the image. It is also used to perform a layout +transition for an image subresource range, or to transfer ownership of an +image subresource range from one queue family to another as described in the +<> section. + +sname:VkImageMemoryBarrier has the following definition: + +include::../structs/VkImageMemoryBarrier.txt[] + +The members of sname:VkImageMemoryBarrier have the following meanings: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:srcAccessMask is a mask of the classes of memory accesses + performed by the first set of commands that will participate in + the dependency. + * pname:dstAccessMask is a mask of the classes of memory accesses + performed by the second set of commands that will participate in + the dependency. + * pname:oldLayout describes the current layout of the image + subresource(s). + * pname:newLayout describes the new layout of the image subresource(s). + * pname:srcQueueFamilyIndex is the queue family that is relinquishing + ownership of the image subresource(s) to another queue, or + ename:VK_QUEUE_FAMILY_IGNORED if there is no transfer of ownership). + * pname:dstQueueFamilyIndex is the queue family that is acquiring + ownership of the image subresource(s) from another queue, or + ename:VK_QUEUE_FAMILY_IGNORED if there is no transfer of ownership). + * pname:image is a handle to the image whose backing memory is affected by + the barrier. + * pname:subresourceRange describes an area of the backing memory for + pname:image (see <> for the description of + sname:VkImageSubresourceRange), as well as the set of subresources whose + image layouts are modified. + +include::../validity/structs/VkImageMemoryBarrier.txt[] + +If pname:oldLayout differs from pname:newLayout, a layout transition occurs +as part of the image memory barrier, affecting the data contained in the +region of the image defined by the pname:subresourceRange. If +pname:oldLayout is ename:VK_IMAGE_LAYOUT_UNDEFINED, then the data is +undefined after the layout transition. This may: allow a more efficient +transition, since the data may: be discarded. The layout transition must: +occur after all operations using the old layout are completed and before all +operations using the new layout are started. This is achieved by ensuring +that there is a memory dependency between previous accesses and the layout +transition, as well as between the layout transition and subsequent +accesses, where the layout transition occurs between the two halves of a +memory dependency in an image memory barrier. + +Layout transitions that are performed via image memory barriers are +automatically ordered against other layout transitions, including those that +occur as part of a render pass instance. + +[NOTE] +.Note +==== +See <> for details on available image layouts +and their usages. +==== + + +[[synchronization-implicit-ordering]] +== Implicit Ordering Guarantees + +Submitting command buffers and sparse memory operations, signaling fences, +and signaling and waiting on semaphores each perform implicit memory +barriers. The following guarantees are made: + +After a fence or semaphore is signaled, it is guaranteed that: + + * All commands in any command buffer submitted to the queue before and + including the submission that signals the fence, or the batch that + signals the semaphore, have completed execution. + * The side effects of these commands are available to any commands or + sparse binding operations (on any queue) that follow a semaphore wait, + if the semaphore they wait upon was signaled at a later time than this + fence or semaphore, or that are submitted to any queue after the fence + is signaled. Those side effects are also visible to the same sparse + binding operations that follow the semaphore wait. If the semaphore wait + is part of a slink:VkSubmitInfo structure passed to flink:vkQueueSubmit, + they are also visible to the pipeline stages specified in the + pname:pWaitDstStageMask element corresponding to the semaphore wait, for + the same commands that follow the semaphore wait. If the semaphore wait + is part of a slink:VkSubmitInfo structure passed to + flink:vkQueueBindSparse, they are visible to all stages for the same + commands. + * All sparse binding operations submitted to the queue before and + including the submission that signals the fence, or the batch that + signals the semaphore, have completed. + * The bindings performed by these operations are available to any commands + or sparse binding operations (on any queue) that follow a semaphore + wait, if the semaphore they wait upon was signaled at a later time than + this fence or semaphore, or that are submitted to any queue after the + fence is signaled. Those bindings are also visible to the same sparse + binding operations that follow the semaphore wait. If the semaphore wait + is part of a slink:VkSubmitInfo structure passed to flink:vkQueueSubmit, + they are also visible to the pipeline stages specified in the + pname:pWaitDstStageMask element corresponding to the semaphore wait, for + the same commands that follows the semaphore wait. If the semaphore wait + is part of a slink:VkSubmitInfo structure passed to + flink:vkQueueBindSparse, they are visible to all stages for the same + commands. + * Objects that were used in previous command buffers in this queue before + the fence was signaled, or in another queue that has signaled a + semaphore after using the objects and before this fence or semaphore was + signaled, and which are not used in any subsequent command buffers, can: + be freed or destroyed, including the command buffers themselves. + * The fence can: be reset or destroyed. + * The semaphore can: be destroyed. + +These rules define how a signal and wait operation combine to form the two +halves of an implicit dependency. Signaling a fence or semaphore guarantees +that previous work is complete and the effects are available to later +operations. Waiting on a semaphore, waiting on a fence before submitting +further work, or some combination of the two (e.g. waiting on a fence in a +different queue, after using semaphores to synchronize between two queues) +guarantees that the effects of the work that came before the synchronization +primitive is visible to subsequent work that executes in the specified +pname:pWaitDstStageMask stages (in the case of commands following a +semaphore wait as part of a flink:vkQueueSubmit submission), or any stage +(for all the other cases). + +The rules are phrased in terms of wall clock time (_before_, _at a later +time_, etc.). However, for these rules to apply, the order in wall clock +time of two operations must: be enforced either by: + + * signaling a semaphore after the first operation and waiting on the + semaphore before the second operation + * signaling a fence after the first operation, waiting on the host for the + fence to be signaled, and then submitting command buffers or sparse + binding operations to perform the second operation + * a combination of two or more uses of these ordering rules applied + transitively. + +flink:vkQueueWaitIdle provides implicit ordering equivalent to having used a +fence in the most recent submission on the queue and then waiting on that +fence. flink:vkDeviceWaitIdle provides implicit ordering equivalent to using +flink:vkQueueWaitIdle on all queues owned by the device. + +Signaling a semaphore or fence does not guarantee that device writes +are <>. + +[[synchronization-implicit-ordering-hostwrites]] +When submitting batches of command buffers to a queue via +flink:vkQueueSubmit, it is guaranteed that: + + * Host writes to mappable device memory that occured before the call to + fname:vkQueueSubmit are visible to the command buffers in that + submission, if the device memory is coherent or if the memory range was + flushed with flink:vkFlushMappedMemoryRanges. diff --git a/doc/specs/vulkan/chapters/tessellation.txt b/doc/specs/vulkan/chapters/tessellation.txt new file mode 100644 index 00000000..f2efa39b --- /dev/null +++ b/doc/specs/vulkan/chapters/tessellation.txt @@ -0,0 +1,440 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[tessellation]] += Tessellation + +Tessellation involves three pipeline stages. First, a +<> transforms +control points of a patch and can: produce per-patch data. Second, a +fixed-function tessellator generates multiple primitives corresponding to a +tessellation of the patch in (u,v) or (u,v,w) parameter space. Third, a +<> +transforms the vertices of the tessellated patch, for example to compute +their positions and attributes as part of the tessellated surface. The +tessellator is enabled when the pipeline contains both a tessellation +control shader and a tessellation evaluation shader. + + +== Tessellator + +If a pipeline includes both tessellation shaders (control and evaluation), +the tessellator consumes each input patch (after vertex shading) and +produces a new set of independent primitives (points, lines, or triangles). +These primitives are logically produced by subdividing a geometric primitive +(rectangle or triangle) according to the per-patch tessellation levels +written by the tessellation control shader. This subdivision is performed in +an implementation-dependent manner. If no tessellation shaders are present +in the pipeline, the tessellator is disabled and incoming primitives are +passed through without modification. + +The type of subdivision performed by the tessellator is +specified by an code:OpExecutionMode instruction in the tessellation +evaluation or tessellation control shader using one of execution modes +code:Triangles, code:Quads, and code:IsoLines. Other +tessellation-related execution modes can: also be specified in either the +tessellation control or tessellation evaluation shaders, and if they are +specified in both then the modes must: be the same. + +Tessellation execution modes include: + + * code:Triangles, code:Quads, and code:IsoLines. These control the type of + subdivision and topology of the output primitives. One mode must: be set + in at least one of the tessellation shader stages. + * code:VertexOrderCw and code:VertexOrderCcw. These control the + orientation of triangles generated by the tessellator. One mode must: be + set in at least one of the tessellation shader stages. + * code:PointMode. Controls generation of points rather than triangles or + lines. This functionality defaults to disabled, and is enabled if either + shader stage includes the execution mode. + * code:SpacingEqual, code:SpacingFractionalEven, and + code:SpacingFractionalOdd. Controls the spacing of segments on the edges + of tessellated primitives. One mode must: be set in at least one of the + tessellation shader stages. + * code:OutputVertices. Controls the size of the output patch of the + tessellation control shader. One value must: be set in at least one of + the tessellation shader stages. + +For triangles, the tessellator subdivides a triangle primitive into +smaller triangles. For quads, the tessellator subdivides a rectangle +primitive into smaller triangles. For isolines, the tessellator +subdivides a rectangle primitive into a collection of line segments arranged +in strips stretching across the rectangle in the latexmath:[$u$] dimension +(i.e. the coordinates in code:TessCoord are of the form (0,x) through (1,x) +for all tessellation evaluation shader invocations that share a line). + +Each vertex produced by the tessellator has an associated (u,v,w) or (u,v) +position in a normalized parameter space, with parameter values in the +latexmath:[$[0,1\]$], as illustrated in figure +<>. + +[[img-tessellation-topology,Domain parameterization for tessellation primitive modes]] +.Domain parameterization for tessellation primitive modes +image:images/tessparam.{svgpdf}["Domain parameterization for tessellation primitive modes",{fullimagewidth}] + +For triangles, the vertex's position is a barycentric coordinate (u,v,w), +where u + v + w = 1.0, and indicates the relative influence of the three +vertices of the triangle on the position of the vertex. For quads and +isolines, the position is a (u,v) coordinate indicating the relative +horizontal and vertical position of the vertex relative to the subdivided +rectangle. The subdivision process is explained in more detail in subsequent +sections. + + +== Tessellator Patch Discard + +A patch is discarded by the tessellator if any +relevant outer tessellation level is less than or equal to zero. + +Patches will also be discarded if any relevant outer tessellation level +corresponds to a floating-point NaN (not a number) in implementations +supporting NaN. + +No new primitives are generated and the tessellation evaluation shader is +not executed for patches that are discarded. For code:Quads, all four outer +levels are relevant. For code:Triangles and code:IsoLines, only the first +three or two outer levels, respectively, are relevant. Negative inner levels +will not cause a patch to be discarded; they will be clamped as described +below. + + +[[tessellation-tessellator-spacing]] +== Tessellator Spacing + +Each of the tessellation levels is used to determine the number and +spacing of segments used to subdivide a corresponding edge. The method +used to derive the number and spacing of segments is specified by an +code:OpExecutionMode in the tessellation control or tessellation evaluation +shader using one of the identifiers code:SpacingEqual, +code:SpacingFractionalEven, or code:SpacingFractionalOdd. + +If code:SpacingEqual is used, the floating-point tessellation level is first +clamped to latexmath:[$[1,\mathit{maxLevel}\]$], where +latexmath:[$\mathit{maxLevel}$] is the implementation-dependent maximum +tessellation level +(sname:VkPhysicalDeviceLimits::pname:maxTessellationGenerationLevel). The +result is rounded up to the nearest integer latexmath:[$n$], and the +corresponding edge is divided into latexmath:[$n$] segments of equal length +in (u,v) space. + +If code:SpacingFractionalEven is used, the tessellation level is first +clamped to latexmath:[$[2,\mathit{maxLevel}\]$] and then rounded up to the +nearest even integer latexmath:[$n$]. If code:SpacingFractionalOdd is used, +the tessellation level is clamped to latexmath:[$[1,\mathit{maxLevel}-1\]$] +and then rounded up to the nearest odd integer latexmath:[$n$]. If +latexmath:[$n$] is one, the edge will not be subdivided. Otherwise, the +corresponding edge will be divided into latexmath:[$n-2$] segments of equal +length, and two additional segments of equal length that are typically +shorter than the other segments. The length of the two additional segments +relative to the others will decrease monotonically with the value of +latexmath:[$n-f$], where latexmath:[$f$] is the clamped floating-point +tessellation level. When latexmath:[$n-f$] is zero, the additional segments +will have equal length to the other segments. As latexmath:[$n-f$] +approaches 2.0, the relative length of the additional segments approaches +zero. The two additional segments should: be placed symmetrically on +opposite sides of the subdivided edge. The relative location of these two +segments is implementation-dependent, but must: be identical for any pair of +subdivided edges with identical values of . + +When the tessellator produces triangles (in the code:Triangles or +code:Quads modes), the orientation of all triangles is specified with +an code:OpExecutionMode of code:VertexOrderCw or code:VertexOrderCcw in the +tessellation control or tessellation evaluation shaders. If the order is +code:VertexOrderCw, the vertices of all generated triangles will have a +clockwise ordering in (u,v) or (u,v,w) space. If the order is +code:VertexOrderCcw, the vertices will be generated with counter-clockwise +order. + +The vertices of a triangle are defined to be in counter-clockwise ordering +of the value +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\[ + a = u_0 v_1 - u_1 v_0 + u_1 v_2 - u_2 v_1 + u_2 v_0 - u_0 v_2 +\] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +is positive, where latexmath:[$u_i$] and latexmath:[$v_i$] are the +latexmath:[$u$] and latexmath:[$v$] coordinates in normalized parameter +space of the latexmath:[$i$]th vertex of the triangle. If the value +latexmath:[$a$] is negative, the vertices of the triangle are defined to be +in clockwise ordering. + +[NOTE] +.Note +==== +The value latexmath:[$a$] is proportional (with a positive factor) to the +signed area of the triangle. + +In code:Triangles mode, even though the vertex coordinates have a +latexmath:[$w$] value, it does not participate directly in the computation +of latexmath:[$a$], being an affine combination of latexmath:[$u$] and +latexmath:[$v$]. +==== + +For all primitive modes, the tessellator is capable of generating points +instead of lines or triangles. If the tessellation control or tessellation +evaluation shader specifies the code:OpExecutionMode code:PointMode, the +primitive generator will generate one point for each distinct vertex +produced by tessellation. Otherwise, the tessellator will produce a +collection of line segments or triangles according to the primitive mode. +When tessellating triangles or quads in point mode with fractional odd +spacing, the tessellator may: produce _interior vertices_ that are +positioned on the edge of the patch if an inner tessellation level is less +than or equal to one. Such vertices are considered distinct from vertices +produced by subdividing the outer edge of the patch, even if there are pairs +of vertices with identical coordinates. + +The points, lines, or triangles produced by the tessellator +are passed to subsequent pipeline stages in an +implementation-dependent order. + + +[[tessellation-triangle-tessellation]] +== Triangle Tessellation + +If the tessellation primitive mode is code:Triangles, an equilateral +triangle is subdivided into a collection of triangles covering the area of +the original triangle. First, the original triangle is subdivided into a +collection of concentric equilateral triangles. The edges of each of these +triangles are subdivided, and the area between each triangle pair is filled +by triangles produced by joining the vertices on the subdivided edges. The +number of concentric triangles and the number of subdivisions along each +triangle except the outermost is derived from the first inner tessellation +level. The edges of the outermost triangle are subdivided independently, +using the first, second, and third outer tessellation levels to control the +number of subdivisions of the latexmath:[$u=0$] (left), latexmath:[$v=0$] +(bottom), and latexmath:[$w=0$] (right) edges, respectively. The second +inner tessellation level and the fourth outer tessellation level have no +effect in this mode. + +If the first inner tessellation level and all three outer tessellation +levels are exactly one after clamping and rounding, only a single triangle +with (u,v,w) coordinates of (0,0,1), (1,0,0), and (0,1,0) is generated. +If the inner tessellation level is one and any of the outer tessellation +levels is greater than one, the inner tessellation level is treated as +though it were originally specified as latexmath:[$1+\epsilon$] and will +result in a two- or three-segment subdivision depending on the tessellation +spacing. When used with fractional odd spacing, the three-segment +subdivision may: produce _inner vertices_ positioned on the edge of the +triangle. + +If any tessellation level is greater than one, tessellation begins by +producing a set of concentric inner triangles and subdividing their edges. +First, the three outer edges are temporarily subdivided using the clamped +and rounded first inner tessellation level and the specified tessellation +spacing, generating latexmath:[$n$] segments. For the outermost inner +triangle, the inner triangle is degenerate -- a single point at the center +of the triangle -- if latexmath:[$n$] is two. Otherwise, for each corner of +the outer triangle, an inner triangle corner is produced at the intersection +of two lines extended perpendicular to the corner's two adjacent edges +running through the vertex of the subdivided outer edge nearest that corner. +If latexmath:[$n$] is three, the edges of the inner triangle are not +subdivided and is the final triangle in the set of concentric triangles. +Otherwise, each edge of the inner triangle is divided into latexmath:[$n-2$] +segments, with the latexmath:[$n-1$] vertices of this subdivision produced +by intersecting the inner edge with lines perpendicular to the edge running +through the latexmath:[$n-1$] innermost vertices of the subdivision of the +outer edge. Once the outermost inner triangle is subdivided, the previous +subdivision process repeats itself, using the generated triangle as an outer +triangle. This subdivision process is illustrated in <>. + +[[img-innertri,Inner Triangle Tessellation]] +.Inner Triangle Tessellation +image:images/innertri.{svgpdf}["Inner Triangle Tessellation",{fullimagewidth}] + +// TODO: Add caption: +// Inner triangle tessellation with inner tessellation +// levels of (a) five and (b) four, respectively (not to scale). Solid +// black circles depict vertices along the edges of the concentric +// triangles. The edges of inner triangles are subdivided by intersecting +// the edge with segments perpendicular to the edge passing through each +// inner vertex of the subdivided outer edge. Dotted lines depict edges +// connecting corresponding vertices on the inner and outer triangle +// edges. + +Once all the concentric triangles are produced and their edges are +subdivided, the area between each pair of adjacent inner triangles is +filled completely with a set of non-overlapping triangles. In this +subdivision, two of the three vertices of each triangle are taken from +adjacent vertices on a subdivided edge of one triangle; the third is one +of the vertices on the corresponding edge of the other triangle. If the +innermost triangle is degenerate (i.e., a point), the triangle containing +it is subdivided into six triangles by connecting each of the six vertices +on that triangle with the center point. If the innermost triangle is not +degenerate, that triangle is added to the set of generated triangles +as-is. + +After the area corresponding to any inner triangles is filled, the +tessellator generates triangles to cover the area between the outermost +triangle and the outermost inner triangle. To do this, the temporary +subdivision of the outer triangle edge above is discarded. Instead, the +latexmath:[$u=0$], latexmath:[$v=0$], and latexmath:[$w=0$] edges are +subdivided according to the first, second, and third outer tessellation +levels, respectively, and the tessellation spacing. The original subdivision +of the first inner triangle is retained. The area between the outer and +first inner triangles is completely filled by non-overlapping triangles as +described above. If the first (and only) inner triangle is degenerate, a set +of triangles is produced by connecting each vertex on the outer triangle +edges with the center point. + +After all triangles are generated, each vertex in the subdivided triangle +is assigned a barycentric (u,v,w) coordinate based on its location +relative to the three vertices of the outer triangle. + +The algorithm used to subdivide the triangular domain in (u,v,w) space into +individual triangles is implementation-dependent. However, the set of +triangles produced will completely cover the domain, and no portion of the +domain will be covered by multiple triangles. The order in which the +generated triangles passed to subsequent pipeline stages and the order of +the vertices in those triangles are both implementation-dependent. However, +when depicted in a manner similar to <>, the order of the vertices in the generated triangles will be +either all clockwise or all counter-clockwise, according to the vertex order +layout declaration. + + +[[tessellation-quad-tessellation]] +== Quad Tessellation + +If the tessellation primitive mode is code:Quads, a rectangle is subdivided +into a collection of triangles covering the area of the original rectangle. +First, the original rectangle is subdivided into a regular mesh of +rectangles, where the number of rectangles along the latexmath:[$u=0$] and +latexmath:[$u=1$] (vertical) and latexmath:[$v=0$] and latexmath:[$v=1$] +(horizontal) edges are derived from the first and second inner tessellation +levels, respectively. All rectangles, except those adjacent to one of the +outer rectangle edges, are decomposed into triangle pairs. The outermost +rectangle edges are subdivided independently, using the first, second, +third, and fourth outer tessellation levels to control the number of +subdivisions of the latexmath:[$u=0$] (left), latexmath:[$v=0$] (bottom), +latexmath:[$u=1$] (right), and latexmath:[$v=1$] (top) edges, respectively. +The area between the inner rectangles of the mesh and the outer rectangle +edges are filled by triangles produced by joining the vertices on the +subdivided outer edges to the vertices on the edge of the inner rectangle +mesh. + +If both clamped inner tessellation levels and all four clamped outer +tessellation levels are exactly one, only a single triangle pair covering +the outer rectangle is generated. Otherwise, if either clamped inner +tessellation level is one, that tessellation level is treated as though it +were originally specified as latexmath:[$1+\epsilon$] and will result in a +two- or three-segment subdivision depending on the tessellation spacing. +When used with fractional odd spacing, the three-segment subdivision may: +produce _inner vertices_ positioned on the edge of the rectangle. + +If any tessellation level is greater than one, tessellation begins by +subdividing the latexmath:[$u=0$] and latexmath:[$u=1$] edges of the outer +rectangle into latexmath:[$m$] segments using the clamped and rounded first +inner tessellation level and the tessellation spacing. The latexmath:[$v=0$] +and latexmath:[$v=1$] edges are subdivided into latexmath:[$n$] segments +using the second inner tessellation level. Each vertex on the +latexmath:[$u=0$] and latexmath:[$v=0$] edges are joined with the +corresponding vertex on the latexmath:[$u=1$] and latexmath:[$v=1$] edges to +produce a set of vertical and horizontal lines that divide the rectangle +into a grid of smaller rectangles. The primitive generator emits a pair of +non-overlapping triangles covering each such rectangle not adjacent to an +edge of the outer rectangle. The boundary of the region covered by these +triangles forms an inner rectangle, the edges of which are subdivided by the +grid vertices that lie on the edge. If either latexmath:[$m$] or +latexmath:[$n$] is two, the inner rectangle is degenerate, and one or both +of the rectangle's _edges_ consist of a single point. This subdivision is +illustrated in Figure <>. + +[[img-innerquad,Inner Quad Tessellation]] +.Inner Quad Tessellation +image:images/innerquad.{svgpdf}["Inner Quad Tessellation",{fullimagewidth}] + +// TODO: Add caption: +// Inner quad tessellation with inner tessellation +// levels of +// (a) $(4,2)$ and (b) $(7,4)$, respectively. Gray regions on the +// bottom figure +// depict the 10 inner rectangles, each of which will be subdivided +// into two triangles. +// Solid black circles depict vertices on the boundary of the outer and +// inner rectangles, +// where the inner rectangle on the top figure +// is degenerate (a single line segment). Dotted lines depict the +// horizontal and vertical edges connecting corresponding +// vertices on the inner and outer rectangle edges. + +After the area corresponding to the inner rectangle is filled, the +tessellator must: produce triangles to cover the area between the inner and +outer rectangles. To do this, the subdivision of the outer rectangle edge +above is discarded. Instead, the latexmath:[$u=0$], latexmath:[$v=0$], +latexmath:[$u=1$], and latexmath:[$v=1$] edges are subdivided according to +the first, second, third, and fourth outer tessellation levels, +respectively, and the tessellation spacing. The original subdivision of the +inner rectangle is retained. The area between the outer and inner rectangles +is completely filled by non-overlapping triangles. Two of the three vertices +of each triangle are adjacent vertices on a subdivided edge of one +rectangle; the third is one of the vertices on the corresponding edge of the +other triangle. If either edge of the innermost rectangle is degenerate, the +area near the corresponding outer edges is filled by connecting each vertex +on the outer edge with the single vertex making up the _inner edge_. + +The algorithm used to subdivide the rectangular domain in (u,v) space into +individual triangles is implementation-dependent. However, the set of +triangles produced will completely cover the domain, and no portion of the +domain will be covered by multiple triangles. The order in which the +generated triangles passed to subsequent pipeline stages and the order of +the vertices in those triangles are both implementation-dependent. +However, when depicted in a manner similar to <>, the order of the vertices in the generated triangles will be +either all clockwise or all counter-clockwise, according to the vertex order +layout declaration. + + +[[tessellation-isoline-tessellation]] +== Isoline Tessellation + +If the tessellation primitive mode is code:IsoLines, a set of independent +horizontal line segments is drawn. The segments are arranged into +connected strips called _isolines_, where the vertices of each isoline +have a constant v coordinate and u coordinates covering the full range +[0,1]. The number of isolines generated is derived from the first outer +tessellation level; the number of segments in each isoline is derived from +the second outer tessellation level. Both inner tessellation levels and +the third and fourth outer tessellation levels have no effect in this +mode. + +As with quad tessellation above, isoline tessellation begins with a +rectangle. The latexmath:[$u=0$] and latexmath:[$u=1$] edges of the +rectangle are subdivided according to the first outer tessellation level. +For the purposes of this subdivision, the tessellation spacing mode is +ignored and treated as equal_spacing. An isoline is drawn connecting each +vertex on the latexmath:[$u=0$] rectangle edge to the corresponding vertex +on the latexmath:[$u=1$] rectangle edge, except that no line is drawn +between (0,1) and (1,1). If the number of isolines on the subdivided +latexmath:[$u=0$] and latexmath:[$u=1$] edges is latexmath:[$n$], this +process will result in latexmath:[$n$] equally spaced lines with constant v +coordinates of 0, latexmath:[$\frac{1}{n}, \frac{2}{n}, \ldots, +\frac{n-1}{n}$]. + +Each of the latexmath:[$n$] isolines is then subdivided according to the +second outer tessellation level and the tessellation spacing, resulting in +latexmath:[$m$] line segments. Each segment of each line is emitted by the +tessellator. + +The order in which the generated line segments are passed to subsequent +pipeline stages and the order of the vertices in each generated line +segment are both implementation-dependent. + + +== Tessellation Pipeline State + +The pname:pTessellationState member of slink:VkGraphicsPipelineCreateInfo is +of type sname:VkPipelineTessellationStateCreateInfo: + +include::../structs/VkPipelineTessellationStateCreateInfo.txt[] + +The members of the sname:VkPipelineTessellationStateCreateInfo structure are +as follows: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:patchControlPoints number of control points per patch. + +include::../validity/structs/VkPipelineTessellationStateCreateInfo.txt[] diff --git a/doc/specs/vulkan/chapters/textures.txt b/doc/specs/vulkan/chapters/textures.txt new file mode 100644 index 00000000..79525d5c --- /dev/null +++ b/doc/specs/vulkan/chapters/textures.txt @@ -0,0 +1,1724 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[textures]] += Image Operations + +== Image Operations Overview + +Image Operations are steps performed by SPIR-V image instructions, where +those instructions which take an code:OpTypeImage (representing a +sname:VkImageView) or code:OpTypeImageSampler (representing a +(sname:VkImageView, sname:VkSampler) pair) and texel coordinates as +operands, and return a value based on one or more neighboring texture +elements (_texels_) in the image. + +[NOTE] +.Note +================== +Texel is a term which is a combination of the words texture and element. +Early interactive computer graphics supported texture operations on +textures, a small subset of the image operations on images described here. +The discrete samples remain essentially equivalent, however, so we retain +the historical term texel to refer to them. +================== + +SPIR-V Image Instructions include the following functionality: + + * code:OpImageSample* and code:OpImageSparseSample* read one or more + neighboring texels of the image, and <> + the texel values based on the state of the sampler. + ** Instructions with code:ImplicitLod in the name + <> the level of detail + used in the sampling operation based on the coordinates used in + neighboring fragments. + ** Instructions with code:ExplicitLod in the name + <> the level of detail + used in the sampling operation based on additional coordinates. + ** Instructions with code:Proj in the name apply homogeneous + <> to the coordinates. + * code:OpImageFetch and code:OpImageSparseFetch returns a single texel of + the image. No sampler is used. + * code:OpImage*code:Gather and code:OpImageSparse*code:Gather read + neighboring texels and <> of + each. + * code:OpImageRead (and code:OpImageSparseRead) and code:OpImageWrite read + and write, respectively, a texel in the image. No sampler is used. + * Instructions with code:Dref in the name apply + <> on the texel + values. + * Instructions with code:Sparse in the name additionally return a + <> code. + + +=== Texel Coordinate Systems + +Images are addressed by _texel coordinates_. There are three _texel +coordinate systems_: + + * normalized texel coordinates (coordinates ranging from 0 to 1 span the + image), + * unnormalized texel coordinates (floating point coordinates ranging from + 0 to width/height/depth span the image), and + * integer texel coordinates (integer coordinates ranging from 0 to + width-1/height-1/depth-1 address the texels within the image). + +SPIR-V code:OpImageFetch, code:OpImageSparseFetch, code:OpImageRead, +code:OpImageSparseRead, and code:OpImageWrite instructions use integer texel +coordinates. Other image instructions can: use either normalized or +unnormalized texel coordinates (selected by the +pname:unnormalizedCoordinates state of the sampler used in the instruction), +but there are <> on what +operations, image state, and sampler state is supported. Normalized +coordinates are logically <> +to unnormalized as part of image operations, and +<> are only performed on +normalized coordinates. The array layer coordinate is always treated as +unnormalized even when other coordinates are normalized. + +Normalized texel coordinates are referred to as latexmath:[$(s,t,r,q,a)$], +with the coordinates having the following meanings: + + * s: Coordinate in the first dimension of an image. + * t: Coordinate in the second dimension of an image. + * r: Coordinate in the third dimension of an image. + ** (s,t,r) are interpreted as a direction vector for Cube images. + * q: Fourth coordinate, for homogeneous (projective) coordinates. + * a: Coordinate for array layer. + +The coordinates are extracted from the SPIR-V operand based on the +dimensionality of the image variable and type of instruction. For code:Proj +instructions, the components are in order (s, [t,] [r,] q) with t and r +being conditionally present based on the code:Dim of the image. For +non-code:Proj instructions, the coordinates are (s [,t] [,r] [,a]), with t +and r being conditionally present based on the code:Dim of the image and a +being conditionally present based on the code:Arrayed property of the image. +Projective image instructions are not supported on code:Arrayed images. + +Unnormalized texel coordinates are referred to as latexmath:[$(u,v,w,a)$], +with the coordinates having the following meanings: + + * u: Coordinate in the first dimension of an image. + * v: Coordinate in the second dimension of an image. + * w: Coordinate in the third dimension of an image. + * a: Coordinate for array layer. + +Only the u and v coordinates are directly extracted from the SPIR-V operand, +because only 1D and 2D (non-code:Arrayed) dimensionalities support +unnormalized coordinates. The components are in order (u [,v]), with v being +conditionally present when the dimensionality is 2D. When normalized +coordinates are converted to unnormalized coordinates, all four coordinates +are used. + +Integer texel coordinates are referred to as latexmath:[$(i,j,k,l,n)$], and +the first four in that order have the same meanings as unnormalized texel +coordinates. They are extracted from the SPIR-V operand in order (i, [,j], +[,k], [,l]), with j and k conditionally present based on the code:Dim of the +image, and l conditionally present based on the code:Arrayed property of the +image. n is the sample index and is taken from the code:Sample image +operand. + +For all coordinate types, unused coordinates are assigned a value of zero. + +[[textures-texel-coordinate-systems-diagrams]] +image::images/vulkantexture0.png[Title="Texel Coordinate Systems", align="left", scaledwidth="80%"] +The Texel Coordinate Systems - For the example shown of an 8x4 texel two dimensional image. + + * Normalized texel coordinates: + ** The s coordinate goes from 0.0 to 1.0, left to right. + ** The t coordinate goes from 0.0 to 1.0, top to bottom. + * Unnormalized texel coordinates: + ** The u coordinate goes from -1.0 to 9.0, left to right. The u coordinate + within the range 0.0 to 8.0 is within the image, otherwise it is within + the border. + ** The v coordinate goes from -1.0 to 5.0, top to bottom. The v coordinate + within the range 0.0 to 4.0 is within the image, otherwise it is within + the border. + * Integer texel coordinates: + ** The i coordinate goes from -1 to 8, left to right. The i coordinate + within the range 0 to 7 addresses texels within the image, otherwise it + addresses a border texel. + ** The j coordinate goes from -1 to 5, top to bottom. The j coordinate + within the range 0 to 3 addresses texels within the image, otherwise it + addresses a border texel. + * Also shown for linear filtering: + ** Given the unnormalized coordinates (u,v), the four texels selected are + i0j0, i1j0, i0j1 and i1j1. + ** The weights latexmath:[$\alpha$] and latexmath:[$\beta$]. + ** Given the offset latexmath:[$\Delta_{i}$] and latexmath:[$\Delta_{j}$], + the four texels selected by the offset are i0j0', i1j0', i0j1' and + i1j1'. + +image::images/vulkantexture1.png[Title="Texel Coordinate Systems", align="left", scaledwidth="80%"] + +The Texel Coordinate Systems - For the example shown of an 8x4 texel two +dimensional image. + + * Texel coordinates as above. Also shown for nearest filtering: + ** Given the unnormalized coordinates (u,v), the texel selected is ij. + ** Given the offset latexmath:[$\Delta_{i}$] and latexmath:[$\Delta_{j}$], + the texel selected by the offset is ij'. + + +== Conversion Formulas + +ifdef::editing-notes[] +[NOTE] +.editing-note +================== +(Bill) These Conversion Formulas will likely move to Section 2.7 Fixed-Point +Data Conversions (RGB to sRGB and sRGB to RGB) and section 2.6 Numeric +Representation and Computation (RGB to Shared Exponent and Shared Exponent +to RGB) +================== +endif::editing-notes[] + + +[[textures-RGB-sexp]] +=== RGB to Shared Exponent Conversion + +An RGB color latexmath:[$(red, green, blue)$] is transformed to a shared +exponent color latexmath:[$(red_{shared}, green_{shared}, blue_{shared}, +exp_{shared})$] as follows: + +First, the components latexmath:[$(red, green, blue)$] are clamped to +latexmath:[$(red_{clamped}, green_{clamped}, blue_{clamped})$] as: +[latexmath] ++++++++++++++++++++ +\begin{align*} +red_{clamped} & = \max(0,min(sharedexp_{max},red)) \\ +green_{clamped} & = \max(0,min(sharedexp_{max},green)) \\ +blue_{clamped} & = \max(0,min(sharedexp_{max},blue)) +\end{align*} ++++++++++++++++++++ + +Where: + +[latexmath] ++++++++++++++++++++ +\begin{align*} +N & = 9 & \textrm{number of mantissa bits per component} \\ +B & = 15 & \textrm{exponent bias} \\ +E_{max} & = 31 & \textrm{maximum possible biased exponent value} \\ +sharedexp_{max} & = \frac{(2^N-1)}{2^N} \times 2^{(E_{max}-B)} +\end{align*} ++++++++++++++++++++ + +[NOTE] +.Note +================== +latexmath:[$NaN$], if supported, is handled as in IEEE 754-2008 minNum() and +maxNum(). That is the result is a latexmath:[$NaN$] is mapped to zero. +================== + +The largest clamped component, latexmath:[$max_{clamped}$] is determined: + +[latexmath] ++++++++++++++++++++ +\begin{align*} +max_{clamped} = \max(red_{clamped},green_{clamped},blue_{clamped}) +\end{align*} ++++++++++++++++++++ + +A preliminary shared exponent latexmath:[$exp'$] is computed: +[latexmath] ++++++++++++++++++++ +\begin{align*} +exp' = \max(-B-1, +\left \lfloor +\log_2(max_{clamped}+1+B) +\right \rfloor) +\end{align*} ++++++++++++++++++++ + +The shared exponent latexmath:[$exp_{shared}$] is computed: + +[latexmath] ++++++++++++++++++++ +\begin{align*} +max_{shared} = +\left \lfloor +\frac{max_{clamped}}{2^{(exp'-B-N)}}+\frac{1}{2} +\right \rfloor +\end{align*} ++++++++++++++++++++ + +[latexmath] ++++++++++++++++++++ +\begin{align*} +exp_{shared} = + \begin{cases} + exp' & \textrm{for } 0 \leq max_{shared} < 2^N \\ + exp'+1 & \textrm{for } max_{shared} = 2^N + \end{cases} +\end{align*} ++++++++++++++++++++ + +Finally, three integer values in the range latexmath:[$0$] to +latexmath:[$2^N$] are computed: + +[latexmath] ++++++++++++++++++++ +\begin{align*} +red_{shared} & = + \left \lfloor + \frac{red_{clamped}}{2^{(exp_{shared}-B-N)}}+ \frac{1}{2} + \right \rfloor \\ +green_{shared} & = + \left \lfloor + \frac{green_{clamped}}{2^{(exp_{shared}-B-N)}}+ \frac{1}{2} + \right \rfloor \\ +blue_{shared} & = + \left \lfloor + \frac{blue_{clamped}}{2^{(exp_{shared}-B-N)}}+ \frac{1}{2} + \right \rfloor +\end{align*} ++++++++++++++++++++ + + +[[textures-sexp-RGB]] +=== Shared Exponent to RGB + +A shared exponent color latexmath:[$(red_{shared}, green_{shared}, +blue_{shared}, exp_{shared})$] is transformed to an RGB color +latexmath:[$(red, green, blue)$] as follows: + +[latexmath] ++++++++++++++++++++ +\begin{align*} +red & = red_{shared}\times 2^{(exp_{shared}-B-N)} \\ +green & = green_{shared}\times 2^{(exp_{shared}-B-N)} \\ +blue & = blue_{shared}\times 2^{(exp_{shared}-B-N)} \\ +\end{align*} ++++++++++++++++++++ + +Where: + +[latexmath] ++++++++++++++++++++ +\begin{align*} +N & = 9 & \textrm{number of mantissa bits per component} \\ +B & = 15 & \textrm{exponent bias} +\end{align*} ++++++++++++++++++++ + + +== Texel Input Operations + +_Texel input instructions_ are SPIR-V image instructions that read from an +image. _Texel input operations_ are a set of steps that are performed on +state, coordinates, and texel values while processing a texel input +instruction, and which are common to some or all texel input instructions. +They include the following steps, which are performed in the listed order: + + * <> + ** <> + ** <> + ** <> + * <> + * <> + * <> + * <> + * <> + +For texel input instructions involving multiple texels (for sampling or +gathering), these steps are applied for each texel that is used in the +instruction. Depending on the type of image instruction, other steps are +conditionally performed between these steps or involving multiple coordinate +or texel values. + + +[[textures-input-validation]] +=== Texel Input Validation Operations + +_Texel input validation operations_ inspect instruction/image/sampler state +or coordinates, and in certain circumstances cause the texel value to be +replaced or become undefined. There are a series of validations that the +texel undergoes. + + +[[textures-operation-validation]] +==== Instruction/Sampler/Image Validation + +There are a number of cases where a SPIR-V instruction can: mismatch with +the sampler, the image, or both. There are a number of cases where the +sampler can: mismatch with the image. In such cases the value of the texel +returned is undefined. + +These cases include: + + * The sampler pname:borderColor is an integer type and the image + pname:format is not one of the elink:VkFormat integer types or a stencil + aspect of a depth/stencil format. + * The sampler pname:borderColor is a float type and the image pname:format + is not one of the elink:VkFormat float types or a depth aspect of a + depth/stencil format. + * The sampler pname:borderColor is one of the opaque black colors + (ename:VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK or + ename:VK_BORDER_COLOR_INT_OPAQUE_BLACK) and the image + elink:VkComponentSwizzle for any of the slink:VkComponentMapping + components is not ename:VK_COMPONENT_SWIZZLE_IDENTITY. + * If the instruction is code:OpImageRead or code:OpImageSparseRead and the + pname:shaderStorageImageReadWithoutFormat feature is not enabled, or the + instruction is code:OpImageWrite and the + pname:shaderStorageImageWriteWithoutFormat feature is not enabled, then + the SPIR-V Image Format must be <> + with the image view's pname:format. + * The sampler pname:unnormalizedCoordinates is ename:VK_TRUE and any of + the <> are violated. + * The SPIR-V instruction is one of the code:OpImage*code:Dref* + instructions and the sampler pname:compareEnable is ename:VK_FALSE + * The SPIR-V instruction is not one of the code:OpImage*code:Dref* + instructions and the sampler pname:compareEnable is ename:VK_TRUE + * The SPIR-V instruction is one of the code:OpImage*code:Dref* + instructions and the image pname:format is not one of the depth/stencil + formats with a depth component, or the image aspect is not + ename:VK_IMAGE_ASPECT_DEPTH_BIT. + * The SPIR-V instruction's image variable's properties are not compatible + with the image view: + ** Rules for pname:viewType: + *** ename:VK_IMAGE_VIEW_TYPE_1D must: have code:Dim = 1D, code:Arrayed = + 0, code:MS = 0. + *** ename:VK_IMAGE_VIEW_TYPE_2D must: have code:Dim = 2D, code:Arrayed = 0. + *** ename:VK_IMAGE_VIEW_TYPE_3D must: have code:Dim = 3D, code:Arrayed = + 0, code:MS = 0. + *** ename:VK_IMAGE_VIEW_TYPE_CUBE must: have code:Dim = Cube, code:Arrayed + = 0, code:MS = 0. + *** ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY must: have code:Dim = 1D, + code:Arrayed = 1, code:MS = 0. + *** ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY must: have code:Dim = 2D, + code:Arrayed = 1. + *** ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY must: have code:Dim = Cube, + code:Arrayed = 1, code:MS = 0. + ** If the image's pname:samples is not equal to + ename:VK_SAMPLE_COUNT_1_BIT, the instruction must: have code:MS = 1. + + +[[textures-integer-coordinate-validation]] +==== Integer Texel Coordinate Validation + +Integer texel coordinates are validated against the size of the image level, +and the number of layers and number of samples in the image. For SPIR-V +instructions that use integer texel coordinates, this is performed directly +on the integer coordinates. For instructions that use normalized or +unnormalized texel coordinates, this is performed on the coordinates that +result after <> to integer +texel coordinates. + +If the integer texel coordinates satifies any of the conditions +[latexmath] ++++++++++++++++++++ +\begin{align*} +i & < 0 & i \geq w_{s} \\ +j & < 0 & j \geq h_{s} \\ +k & < 0 & k \geq d_{s} \\ +l & < 0 & l \geq layers \\ +n & < 0 & n \geq samples +\end{align*} ++++++++++++++++++++ +where: +[latexmath] ++++++++++++++++++++ +\begin{align*} +& w_{s} & = \textrm{width of the image level} \\ +& h_{s} & = \textrm{height of the image level} \\ +& d_{s} & = \textrm{depth of the image level} \\ +& layers & = \textrm{number of layers in the image} \\ +& samples & = \textrm{number of samples per texel in the image} +\end{align*} ++++++++++++++++++++ + +then the texel fails integer texel coordinate validation. + +There are four cases to consider: + +* Valid Texel Coordinates + +** If the texel coordinates pass validation (that is, the coordinates lie +within the image), ++ +then the texel value comes from the value in image memory. + +* Border Texel + +** If the texel coordinates fail validation, and +** If the read is the result of an image sample instruction or image gather + instruction, and +** If the image is not a cube image, ++ +then the texel is a border texel and +<> is performed. + +* Invalid Texel + +** If the texel coordinates fail validation, and +** If the read is the result of an image fetch instruction, image read + instruction, or atomic instruction, ++ +then the texel is an invalid texel and <> is performed. + +* Cube Map Edge or Corner + +** Otherwise the texel coordinates lie on the borders along the edges and +corners of a cube map image, and +<> is performed. + + +[[textures-cubemapedge]] +==== Cube Map Edge Handling + +If the texel coordinates lie on the borders along the edges and corners of a +cube map image, the following steps are performed. Note that this only +occurs when using ename:VK_FILTER_LINEAR filtering within a miplevel, since +ename:VK_FILTER_NEAREST is treated as using +ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE. + +* Cube Map Edge Texel + +** If the texel lies along the border in either only latexmath:[$i$] or only + latexmath:[$j$] ++ +then the texel lies along an edge, so the coordinates latexmath:[$(i,j)$] +and the array layer latexmath:[$l$] are transformed to select the adjacent +texel from the appropriate neighboring face. + +* Cube Map Corner Texel +** If the texel lies along the border in both latexmath:[$i$] and + latexmath:[$j$] ++ +then the texel lies at the corner and there is no unique neighboring face +from which to read that texel. The texel should: be replaced by the average +of the three values of the adjacent texels in each incident face. However, +implementations may: replace the cube map corner texel by other methods, +subject to the constraint that if the three available samples have the same +value, the replacement texel also has that value. + + +[[textures-sparse-validation]] +==== Sparse Validation + +If the texel reads from an unbound region of a sparse image, the texel is a +_sparse unbound texel_, and processing continues with +<>. + + +[[textures-format-conversion]] +=== Format Conversion + +Texels undergo a format conversion from the elink:VkFormat of the image view +to a vector of either floating point or signed or unsigned integer +components, with the number of components based on the number of components +present in the format. + + * Color formats have one, two, three, or four components, according to the + format. + * Depth/stencil formats are one component. The depth or stencil component + is selected by the pname:aspectMask of the image view. + +Each component is converted based on its type and size (as defined in the +<> section for each +elink:VkFormat), using the appropriate equations in +<>, +<>, +<>, +<>, and +<>. + +If the image format is sRGB, the color components are first converted as if +they are UNORM, and then sRGB to linear conversion is applied to the R, G, +and B components as described in the ``KHR_DF_TRANSFER_SRGB`` section of the +Khronos Data Format Specification. The A component, if present, is +unchanged. + +If the image view format is block-compressed, then the texel value is first +decoded, then converted based on the type and number of components defined +by the compressed format. + + +[[textures-texel-replacement]] +=== Texel Replacement + +A texel is replaced if it is one (and only one) of: + + * a border texel, or + * an invalid texel, or + * a sparse unbound texel. + +Border texels are replaced with a value based on the image format and the +pname:borderColor of the sampler. The border color is: + +[[textures-border-replacement-color]] +.Border Color latexmath:[$B$] +[options="header",cols="60%,40%"] +|==== +| Sampler pname:borderColor | Corresponding Border Color +| ename:VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK | latexmath:[$B = (0.0, 0.0, 0.0, 0.0)$] +| ename:VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK | latexmath:[$B = (0.0, 0.0, 0.0, 1.0)$] +| ename:VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE | latexmath:[$B = (1.0, 1.0, 1.0, 1.0)$] +| ename:VK_BORDER_COLOR_INT_TRANSPARENT_BLACK | latexmath:[$B = (0, 0, 0, 0)$] +| ename:VK_BORDER_COLOR_INT_OPAQUE_BLACK | latexmath:[$B = (0, 0, 0, 1)$] +| ename:VK_BORDER_COLOR_INT_OPAQUE_WHITE | latexmath:[$B = (1, 1, 1, 1)$] +|==== + +This is substituted for the texel value by replacing the number of components +in the image format + +[[textures-border-replacement-table]] +.Border Texel Components After Replacement +[width="80%",options="header"] +|==== +| Texel Aspect or Format | Component Assignment +| Depth aspect | latexmath:[$D = (B_{r})$] +| Stencil aspect | latexmath:[$S = (B_{r})$] +| One component color format | latexmath:[$C_{r} = (B_{r})$] +| Two component color format | latexmath:[$C_{rg} = (B_{r},B_{g})$] +| Three component color format| latexmath:[$C_{rgb} = (B_{r},B_{g},B_{b})$] +| Four component color format | latexmath:[$C_{rgba} = (B_{r},B_{g},B_{b},B_{a})$] +|==== + +If the read operation is from a buffer resource, and the +pname:robustBufferAccess feature is enabled, an invalid texel is replaced as +described <>. + +If the pname:robustBufferAccess feature is not enabled, the value of an +invalid texel is undefined. + +ifdef::editing-notes[] +[NOTE] +.editing-note +================== +(Bill) This is not currently catching this significant case. + +For opImageFetch, which fetches from an *image* not a buffer, the +result is defined if pname:robustBufferAccess is enabled. +================== +endif::editing-notes[] + +If the sname:VkPhysicalDeviceSparseProperties property +pname:residencyNonResidentStrict is true, a sparse unbound texel is replaced +with zero values in the same fashion as described for reads from buffer +resources above. + +If pname:residencyNonResidentStrict is false, the read must: be safe, but +the value of the sparse unbound texel is undefined. + + +[[textures-depth-compare-operation]] +=== Depth Compare Operation + +If the image view's format is depth and the operation is a code:Dref +instruction, a depth comparison is performed. The initial value of the +result latexmath:[$r$] is latexmath:[$0.0$], which is replaced with +latexmath:[$1.0$] if the result of the compare operation is +latexmath:[$true$]. The compare operation is selected by the pname:compareOp +member of the sampler. + +[latexmath] ++++++++++++++++++++ +\begin{align*} +r & = 0.0 & \textrm{initial value} \\ +r & = 1.0 + \begin{cases} + D_{ref} \leq D_{t} & \textrm{for LEQUAL} \\ + D_{ref} \geq D_{t} & \textrm{for GEQUAL} \\ + D_{ref} < D_{t} & \textrm{for LESS} \\ + D_{ref} > D_{t} & \textrm{for GREATER} \\ + D_{ref} = D_{t} & \textrm{for EQUAL} \\ + D_{ref} \neq D_{t} & \textrm{for NOTEQUAL} \\ + true & \textrm{for ALWAYS} \\ + false & \textrm{for NEVER} + \end{cases} +\end{align*} ++++++++++++++++++++ + +where: + +[latexmath] ++++++++++++++++++++ +\begin{align*} +& D_{ref} = shaderOp.D_{ref} & \textrm{(from optional SPIR-V operand)} \\ +& D_{t} & \textrm{texel depth value} +\end{align*} ++++++++++++++++++++ + + +[[textures-conversion-to-rgba]] +=== Conversion to RGBA + +The texel is expanded from one, two, or three to four components based on +the image base color: + +[[textures-border-rgba-replacement-table]] +.Border Texel Components After Replacement +[options="header"] +|==== +| Texel Aspect or Format | RGBA Color +| Depth aspect | latexmath:[$C_{rgba} = (D,0,0,one)$] +| Stencil aspect | latexmath:[$C_{rgba} = (S,0,0,one)$] +| One component color format | latexmath:[$C_{rgba} = (C_{r},0,0,one)$] +| Two component color format | latexmath:[$C_{rgba} = (C_{rg},0,one)$] +| Three component color format| latexmath:[$C_{rgba} = (C_{rgb},one)$] +| Four component color format | latexmath:[$C_{rgba} = C_{rgba}$] +|==== + +where latexmath:[$one = 1.0f$] for floating-point formats and depth aspects, +and latexmath:[$one = 1$] for integer formats and stencil aspects. + + +[[textures-component-swizzle]] +=== Component Swizzle + +All texel input instructions apply a _swizzle_ based on the +elink:VkComponentSwizzle enums in the pname:components member of the +slink:VkImageViewCreateInfo structure for the image being read. The swizzle +can: rearrange the components of the texel, or substitute zero and one for +any components. It is defined as follows for the R component, and operates +similarly for the other components. + + +[latexmath] ++++++++++++++++++++ +\begin{align*} +C'_{rgba}[R] & = + \begin{cases} + C_{rgba}[R] & \textrm{for RED swizzle} \\ + C_{rgba}[G] & \textrm{for GREEN swizzle} \\ + C_{rgba}[B] & \textrm{for BLUE swizzle} \\ + C_{rgba}[A] & \textrm{for ALPHA swizzle} \\ + 0 & \textrm{for ZERO swizzle} \\ + one & \textrm{for ONE swizzle} \\ + C_{rgba}[R] & \textrm{for IDENTITY swizzle} + \end{cases} +\end{align*} ++++++++++++++++++++ + +where: + +[latexmath] ++++++++++++++++++++ +\begin{align*} +C_{rgba}[R] & \textrm{is the RED component} \\ +C_{rgba}[G] & \textrm{is the GREEN component} \\ +C_{rgba}[B] & \textrm{is the BLUE component} \\ +C_{rgba}[A] & \textrm{is the ALPHA component} \\ +one & = 1.0\textrm{f} & \textrm{for floating point components} \\ +one & = 1 & \textrm{for integer components} +\end{align*} ++++++++++++++++++++ + +For each component this is applied to, the +ename:VK_COMPONENT_SWIZZLE_IDENTITY swizzle selects the corresponding +component from latexmath:[$C_{rgba}$]. + +If the border color is one of the etext:VK_BORDER_COLOR_*_OPAQUE_BLACK enums +and the elink:VkComponentSwizzle is not ename:VK_COMPONENT_SWIZZLE_IDENTITY +for all components (or the +<>), +the value of the texel after swizzle is undefined. + + +[[textures-sparse-residency]] +=== Sparse Residency + +code:OpImageSparse* instructions return a struct which includes a +_residency code_ indicating whether any texels accessed by the instruction +are sparse unbound texels. This code can: be interpreted by the +code:OpImageSparseTexelsResident instruction which converts the residency +code to a boolean value. + + +== Texel Output Operations + +_Texel output instructions_ are SPIR-V image instructions that write to an +image. _Texel output operations_ are a set of steps that are performed on +state, coordinates, and texel values while processing a texel output +instruction, and which are common to some or all texel ouitput instructions. +They include the following steps, which are performed in the listed order: + + * <> + ** <> + ** <> + ** <> + * <> + + +[[textures-output-validation]] +=== Texel Output Validation Operations + +_Texel output validation operations_ inspect instruction/image state or +coordinates, and in certain circumstances cause the write to have no effect. +There are a series of validations that the texel undergoes. + + +[[textures-format-validation]] +==== Texel Format Validation + +If the image format of the pname:OpTypeImage is not compatible with the +sname:VkImageView's pname:format, the effect of the write on the image +view's memory is undefined, but the write mustnot: access memory outside of +the image view. + + +[[textures-output-coordinate-validation]] +=== Integer Texel Coordinate Validation + +The integer texel coordinates are validated according to the same rules as +for texel input +<>. + +If the texel fails integer texel coordinate validation, then the write has +no effect. + + +[[textures-output-sparse-validation]] +=== Sparse Texel Operation + +If the texel attempts to write to an unbound region of a sparse image, the +texel is a sparse unbound texel. In such a case, if the +sname:VkPhysicalDeviceSparseProperties property +pname:residencyNonResidentStrict is ename:VK_TRUE, the sparse unbound texel +write has no effect. If pname:residencyNonResidentStrict is ename:VK_FALSE, +the effect of the write is undefined but must: be safe. In addition, the +write may: have a side effect that is visible to other image instructions, +but mustnot: be written to any device memory allocation. + + +[[textures-output-format-conversion]] +=== Texel Output Format Conversion + +Texels undergo a format conversion from the floating point, signed, or +unsigned integer type of the texel data to the elink:VkFormat of the image +view. Any unused components are ignored. + +Each component is converted based on its type and size (as defined in the +<> section for each +elink:VkFormat), using the appropriate equations in +<> and +<>. + + +== Derivative Operations + +SPIR-V derivative instructions include code:OpDPdx, code:OpDPdy, +code:OpDPdxFine, code:OpDPdyFine, code:OpDPdxCoarse, and code:OpDPdyCoarse. +Derivative instructions are only available in a fragment shader. + +image::images/vulkantexture2.png[Title="Implicit derivatives",align="left", scaledwidth="50%"] + +Derivatives are computed as if there is a 2x2 neighborhood of fragments for +each fragment shader invocation. These neighboring fragments are used to +compute derivatives with the assumption that the values of P in the +neighborhood are piecewise linear. It is further assumed that the values of +P in the neighborhood are locally continuous, therefore derivatives in +non-uniform control flow are undefined. + +[latexmath] ++++++++++++++++++++ +\begin{align*} +dPdx_{i_1,j_0} & = dPdx_{i_0,j_0} & = P_{i_1,j_0} - P_{i_0,j_0} \\ +dPdx_{i_1,j_1} & = dPdx_{i_0,j_1} & = P_{i_1,j_1} - P_{i_0,j_1} \\ +\\ +dPdy_{i_0,j_1} & = dPdy_{i_0,j_0} & = P_{i_0,j_1} - P_{i_0,j_0} \\ +dPdy_{i_1,j_1} & = dPdy_{i_1,j_0} & = P_{i_1,j_1} - P_{i_1,j_0} +\end{align*} ++++++++++++++++++++ + +The code:Fine derivative instructions must: return the values above, for a +group of fragments in a 2x2 neighborhood. Coarse derivatives may: return +only two values. In this case, the values should: be: + +[latexmath] ++++++++++++++++++++ +\begin{align*} +dPdx & = + \begin{cases} + dPdx_{i_0,j_0} & \textrm{preferred}\\ + dPdx_{i_0,j_1} + \end{cases} \\ +dPdy & = + \begin{cases} + dPdy_{i_0,j_0} & \textrm{preferred}\\ + dPdy_{i_1,j_0} + \end{cases} +\end{align*} ++++++++++++++++++++ + +code:OpDPdx and code:OpDPdy must return: the same result as either +code:OpDPdxFine or code:OpDPdxCoarse and either code:OpDPdyFine or +code:OpDPdyCoarse, respectively. Implementations must: make the same choice +of either coarse or fine for both code:OpDPdx and code:OpDPdy, and +implementations should: make the choice that is more efficient to compute. + + +[[textures-normalized-operations]] +== Normalized Texel Coordinate Operations + +If the image sampler instruction provides normalized texel coordinates, some +of the following operations are performed. + + +[[textures-projection]] +=== Projection Operation + +For code:Proj image operations, the normalized texel coordinates +latexmath:[$(s,t,r,q,a)$] and (if present) the latexmath:[$D_{ref}$] +coordinate are transformed as follows: + +[latexmath] ++++++++++++++++++++ +\begin{align*} +s & = \frac{s}{q}, & \textrm{for 1D, 2D, or 3D image} \\ +\\ +t & = \frac{t}{q}, & \textrm{for 2D or 3D image} \\ +\\ +r & = \frac{r}{q}, & \textrm{for 3D image} \\ +\\ +D_{ref} & = \frac{D_{ref}}{q}, & \textrm{if provided} +\end{align*} ++++++++++++++++++++ + + +=== Derivative Image Operations + +Derivatives are used for level-of-detail selection. These derivatives are +either implicit (in an code:ImplicitLod image instruction in a fragment +shader) or explicit (provided explicitly by shader to the image instruction +in any shader). + +For implicit derivatives image instructions, the derivatives of texel +coordinates are calculated in the same manner as derivative operations +above. That is: + +[latexmath] ++++++++++++++++++++ +\begin{align*} +\partial{s}/\partial{x} & = dPdx(s), & \partial{s}/\partial{y} & = dPdy(s), & \textrm{for 1D, 2D, Cube, or 3D image} \\ +\partial{t}/\partial{x} & = dPdx(t), & \partial{t}/\partial{y} & = dPdy(t), & \textrm{for 2D, Cube, or 3D image} \\ +\partial{u}/\partial{x} & = dPdx(u), & \partial{u}/\partial{y} & = dPdy(u), & \textrm{for Cube or 3D image} +\end{align*} ++++++++++++++++++++ + +Partial derivatives not defined above for certain image dimensionalities are +set to zero. + +For explicit level-of-detail image instructions, if the optional: SPIR-V +operand latexmath:[$Grad$] is provided, then the operand values are used for +the derivatives. The number of components present in each derivative for a +given image dimensionality matches the number of partial derivatives +computed above. + +If the optional: SPIR-V operand latexmath:[$Lod$] is provided, then +derivatives are set to zero, the cube map derivative transformation is +skipped, and the scale factor operation is skipped. Instead, the floating +point scalar coordinate is directly assigned to latexmath:[$\lambda_{base}$] +as described in <>. + + +=== Cube Map Face Selection and Transformations + +For cube map image instructions, the latexmath:[$(s,t,r)$] coordinates are +treated as a direction vector latexmath:[$(r_{x},r_{y},r_{z})$]. The +direction vector is used to select a cube map face. The direction vector is +transformed to a per-face texel coordinate system +latexmath:[$(s_{face},t_{face})$]. The direction vector is also used to +transform the derivatives to per-face derivatives. + + +=== Cube Map Face Selection + +The direction vector selects one of the cube maps face's layers based on the +largest magnitude coordinate direction (the major axis direction). Since two +or more coordinates can: have identical magnitude, the implementation must: +have rules to disambiguate this situation. + +The rules should: have as the first rule that latexmath:[$r_{z}$] wins over +latexmath:[$r_{y}$] and latexmath:[$r_{x}$], and the second rule that +latexmath:[$r_{y}$] wins over latexmath:[$r_{x}$]. An implementation may: +choose other rules, but the rules must: be deterministic and depend only on +latexmath:[$(r_{x},r_{y},r_{z})$]. + +The layer number (corresponding to a cube map face), the coordinate +selections for latexmath:[$s_{c}$], latexmath:[$t_{c}$], +latexmath:[$r_{c}$], and the selection of derivatives, are determined by the +major axis direction as specified in the following two tables. + +.Cube map face and coordinate selection +[width="75%",frame="all",options="header"] +|====================== +|Major Axis Direction|Layer Number|Cube Map Face|latexmath:[$s_{c}$]|latexmath:[$t_{c}$]|latexmath:[$r_{c}$] + +|latexmath:[$+r_{x}$]|latexmath:[$0$]|latexmath:[$Positive X$]|latexmath:[$-r_{z}$]|latexmath:[$-r_{y}$]|latexmath:[$r_{x}$] + +|latexmath:[$-r_{x}$]|latexmath:[$1$]|latexmath:[$Negative X$]|latexmath:[$+r_{z}$]|latexmath:[$-r_{y}$]|latexmath:[$r_{x}$] + +|latexmath:[$+r_{y}$]|latexmath:[$2$]|latexmath:[$Positive Y$]|latexmath:[$+r_{x}$]|latexmath:[$+r_{z}$]|latexmath:[$r_{y}$] + +|latexmath:[$-r_{y}$]|latexmath:[$3$]|latexmath:[$Negative Y$]|latexmath:[$+r_{x}$]|latexmath:[$-r_{z}$]|latexmath:[$r_{y}$] + +|latexmath:[$+r_{z}$]|latexmath:[$4$]|latexmath:[$Positive Z$]|latexmath:[$+r_{x}$]|latexmath:[$-r_{y}$]|latexmath:[$r_{z}$] + +|latexmath:[$-r_{z}$]|latexmath:[$5$]|latexmath:[$Negative Z$]|latexmath:[$-r_{x}$]|latexmath:[$-r_{y}$]|latexmath:[$r_{z}$] + +|====================== + + +.Cube map derivative selection +[width="75%",frame="all",options="header"] +|====================== +|Major Axis Direction|latexmath:[$\partial{s_{c}}/\partial{x}$]|latexmath:[$\partial{s_{c}}/\partial{y}$]|latexmath:[$\partial{t_{c}}/\partial{x}$]|latexmath:[$\partial{t_{c}}/\partial{y}$]|latexmath:[$\partial{r_{c}}/\partial{x}$]|latexmath:[$\partial{r_{c}}/\partial{y}$] + +|latexmath:[$+r_{x}$] +|latexmath:[$-\partial{r_{z}}/\partial{x}$]|latexmath:[$-\partial{r_{z}}/\partial{y}$] +|latexmath:[$-\partial{r_{y}}/\partial{x}$]|latexmath:[$-\partial{r_{y}}/\partial{y}$] +|latexmath:[$+\partial{r_{x}}/\partial{x}$]|latexmath:[$+\partial{r_{x}}/\partial{y}$] + +|latexmath:[$-r_{x}$] +|latexmath:[$+\partial{r_{z}}/\partial{x}$]|latexmath:[$+\partial{r_{z}}/\partial{y}$] +|latexmath:[$-\partial{r_{y}}/\partial{x}$]|latexmath:[$-\partial{r_{y}}/\partial{y}$] +|latexmath:[$-\partial{r_{x}}/\partial{x}$]|latexmath:[$-\partial{r_{x}}/\partial{y}$] + +|latexmath:[$+r_{y}$] +|latexmath:[$+\partial{r_{x}}/\partial{x}$]|latexmath:[$+\partial{r_{x}}/\partial{y}$] +|latexmath:[$+\partial{r_{z}}/\partial{x}$]|latexmath:[$+\partial{r_{z}}/\partial{y}$] +|latexmath:[$+\partial{r_{y}}/\partial{x}$]|latexmath:[$+\partial{r_{y}}/\partial{y}$] + +|latexmath:[$-r_{y}$] +|latexmath:[$+\partial{r_{x}}/\partial{x}$]|latexmath:[$+\partial{r_{x}}/\partial{y}$] +|latexmath:[$-\partial{r_{z}}/\partial{x}$]|latexmath:[$-\partial{r_{z}}/\partial{y}$] +|latexmath:[$-\partial{r_{y}}/\partial{x}$]|latexmath:[$-\partial{r_{y}}/\partial{y}$] + +|latexmath:[$+r_{z}$] +|latexmath:[$+\partial{r_{x}}/\partial{x}$]|latexmath:[$+\partial{r_{x}}/\partial{y}$] +|latexmath:[$-\partial{r_{y}}/\partial{x}$]|latexmath:[$-\partial{r_{y}}/\partial{y}$] +|latexmath:[$+\partial{r_{z}}/\partial{x}$]|latexmath:[$+\partial{r_{z}}/\partial{y}$] + +|latexmath:[$-r_{z}$] +|latexmath:[$-\partial{r_{x}}/\partial{x}$]|latexmath:[$-\partial{r_{x}}/\partial{y}$] +|latexmath:[$-\partial{r_{y}}/\partial{x}$]|latexmath:[$-\partial{r_{y}}/\partial{y}$] +|latexmath:[$-\partial{r_{z}}/\partial{x}$]|latexmath:[$-\partial{r_{z}}/\partial{y}$] +|====================== + +=== Cube Map Coordinate Transformation + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +s_{face} & = + \frac{1}{2} \times \frac{s_c}{|r_c|} + \frac{1}{2} \\ +t_{face} & = + \frac{1}{2} \times \frac{t_c}{|r_c|} + \frac{1}{2} \\ +\end{align*} +++++++++++++++++++++++++ + + +=== Cube Map Derivative Transformation + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +\frac{\partial{s_{face}}}{\partial{x}} &= + \frac{\partial}{\partial{x}} \left ( \frac{1}{2} \times \frac{s_{c}}{|r_{c}|} + + \frac{1}{2}\right ) \\ +\frac{\partial{s_{face}}}{\partial{x}} &= + \frac{1}{2} \times \frac{\partial}{\partial{x}} + \left ( \frac{s_{c}}{|r_{c}|} \right ) \\ +\frac{\partial{s_{face}}}{\partial{x}} &= + \frac{1}{2} \times + \left ( + \frac{ + |r_{c}| \times \partial{s_c}/\partial{x} + -s_c \times {\partial{r_{c}}}/{\partial{x}}} + {\left ( r_{c} \right )^2} + \right ) +\end{align*} +++++++++++++++++++++++++ + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +\frac{\partial{s_{face}}}{\partial{y}} &= + \frac{1}{2} \times + \left ( + \frac{ + |r_{c}| \times \partial{s_c}/\partial{y} + -s_c \times {\partial{r_{c}}}/{\partial{y}}} + {\left ( r_{c} \right )^2} + \right )\\ +\frac{\partial{t_{face}}}{\partial{x}} &= + \frac{1}{2} \times + \left ( + \frac{ + |r_{c}| \times \partial{t_c}/\partial{x} + -t_c \times {\partial{r_{c}}}/{\partial{x}}} + {\left ( r_{c} \right )^2} + \right ) \\ +\frac{\partial{t_{face}}}{\partial{y}} &= + \frac{1}{2} \times + \left ( + \frac{ + |r_{c}| \times \partial{t_c}/\partial{y} + -t_c \times {\partial{r_{c}}}/{\partial{y}}} + {\left ( r_{c} \right )^2} + \right ) +\end{align*} +++++++++++++++++++++++++ + +ifdef::editing-notes[] +[NOTE] +.editing-note +================== +(Bill) Note that we never revisited ARB_texture_cubemap after we introduced +dependent texture fetches (ARB_fragment_program and ARB_fragment_shader). + +The derivatives of latexmath:[$s_{face}$] and latexmath:[$t_{face}$] are +only valid for non-dependent texture fetches (pre OpenGL 2.0). +================== +endif::editing-notes[] + + +=== Scale Factor Operation, Level-of-Detail Operation and Image Level(s) Selection + +Level-of-detail selection can: be either explicit (provided explicitly by +the image instruction) or implicit (determined from a scale factor +calculated from the derivatives). + + +[[textures-scale-factor]] +==== Scale Factor Operation + +The magnitude of the derivatives are calculated by: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +m_{ux} & = \left | \partial s / \partial x \right | \times w_{base} \\ +m_{vx} & = \left | \partial t / \partial x \right | \times h_{base} \\ +m_{wx} & = \left | \partial r / \partial x \right | \times d_{base} \\ +\\ +m_{uy} & = \left | \partial s / \partial y \right | \times w_{base} \\ +m_{vy} & = \left | \partial t / \partial y \right | \times h_{base} \\ +m_{wy} & = \left | \partial r / \partial y \right | \times d_{base} +\end{align*} +++++++++++++++++++++++++ + + +where: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +\partial t / \partial x & = \partial t / \partial y = 0 & \textrm{(for 1D image)} \\ +\partial r / \partial x & = \partial r / \partial y = 0 & \textrm{(for 1D, 2D or Cube image)} \\ +\\ +w_{base} & = image.w \\ +h_{base} & = image.h \\ +d_{base} & = image.d \\ + & \textrm{of the } baseMipLevel & \textrm{(from image descriptor)} +\end{align*} +++++++++++++++++++++++++ + +The _scale factors_ latexmath:[$(\rho_{x}, \rho{y})$] should: be calculated +by: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +\rho_{x} & = \sqrt{ m_{ux} ^{2} + m_{vx} ^{2} + m_{wx} ^{2} } \\ +\rho_{y} & = \sqrt{ m_{uy} ^{2} + m_{vy} ^{2} + m_{wy} ^{2} } +\end{align*} +++++++++++++++++++++++++ + +The ideal functions latexmath:[$\rho_{x}$] and latexmath:[$\rho_{y}$] may: +be approximated with functions latexmath:[$f_x$] and latexmath:[$f_y$], +subject to the following constraints: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +& f_x \textrm{ is continuous and monotonically increasing in each of } + m_{ux}, + m_{vx}, \textrm{ and } + m_{wx} \\ +& f_y \textrm{ is continuous and monotonically increasing in each of } + m_{uy}, + m_{vy}, \textrm{ and } + m_{wy} +\end{align*} + +\begin{align*} +\max \left ( + \left | m_{ux} \right | , + \left | m_{vx} \right | , + \left | m_{wx} \right | + \right ) \leq +& f_x \leq + \left | m_{ux} \right | + + \left | m_{vx} \right | + + \left | m_{wx} \right | \\ +\max \left ( + \left | m_{uy} \right | , + \left | m_{vy} \right | , + \left | m_{wy} \right | + \right ) \leq +& f_y \leq + \left | m_{uy} \right | + + \left | m_{vy} \right | + + \left | m_{wy} \right | +\end{align*} +++++++++++++++++++++++++ + +ifdef::editing-notes[] +[NOTE] +.editing-note +================== +(Bill) For reviewers only - anticipating questions. + +We only support implicit derivatives for normalized texel coordinates. + +So we are documenting the derivatives in s,t,r (normalized texel +coordinates) rather than u,v,w (unnormalized texel coordinates) as in OpenGL +and OpenGL ES specifications. (I know, u,v,w is the way it has been +documented since OpenGL V1.0.) + +Also there's no reason to have conditional application of +latexmath:[$w_{base} , h_{base} , d_{base}$] for rectangle textures either, +since they don't support implicit derivatives. +================== +endif::editing-notes[] + + +The minimum and maximum scale factors latexmath:[$(\rho_{min},\rho_{max})$] +are determined by: +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +\rho_{max} & = \max( \rho_{x} , \rho_{y} ) \\ +\rho_{min} & = \min( \rho_{x} , \rho_{y} ) +\end{align*} +++++++++++++++++++++++++ + +The sampling rate is determined by: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +N & = \min \left (\left \lceil \frac{\rho_{max}}{\rho_{min}} \right \rceil ,max_{Aniso} \right ) +\end{align*} +++++++++++++++++++++++++ + +where: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +sampler.max_{Aniso} & = maxAnisotropy & \textrm{(from sampler descriptor)} \\ +limits.max_{Aniso} & = maxSamplerAnisotropy & \textrm{(from physical device limits)} \\ +max_{Aniso} & = \min \left ( sampler.max_{Aniso}, limits.max_{Aniso} \right ) +\end{align*} +++++++++++++++++++++++++ + +If latexmath:[$\rho_{max} = \rho_{min} = 0$], then all the partial +derivatives are zero, the fragment's footprint in texel space is a point, +and latexmath:[$N$] should: be treated as 1. If +latexmath:[$\rho_{max} \neq 0 \textrm{ and } \rho_{min} = 0$] then all +partial derivatives along one axis are zero, the fragment's footprint in +texel space is a line segment, and latexmath:[$N$] should: be treated as +latexmath:[$max_{Aniso}$]. However, anytime the footprint is small in texel +space the implementation may: use a smaller value of latexmath:[$N$], even +when latexmath:[$\rho_{min}$] is zero or close to zero. + +An implementation may: round latexmath:[$N$] up to the nearest supported +sampling rate. + +If latexmath:[$N=1$], sampling is isotropic. If latexmath:[$N>1$], sampling +is anistropic. + + +[[textures-level-of-detail-operation]] +==== Level-of-Detail Operation + +The _level-of-detail_ parameter latexmath:[$\lambda$] is computed as +follows: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +\lambda_{base}(x,y) & = + \begin{cases} + shaderOp.Lod & \textrm{(from optional SPIR-V operand)} \\ + \log_2 \left ( \frac{\rho_{max}}{N} \right ) & \textrm{otherwise} + \end{cases} \\ +\lambda'(x,y) & = \lambda_{base} + \operatorname{clamp}(sampler.bias + shaderOp.bias) \\ +\lambda & = + \begin{cases} + lod_{max}, & \lambda' > lod_{max} \\ + \lambda', & lod_{min} \leq \lambda' \leq lod_{max} \\ + lod_{min}, & \lambda' < lod_{min} \\ + undefined, & lod_{min} > lod_{max} \\ + \end{cases} +\end{align*} +++++++++++++++++++++++++ + +where: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +sampler.bias & = mipLodBias & \textrm{(from sampler descriptor)} \\ +shaderOp.bias & = + \begin{cases} + Bias & \textrm{(from optional SPIR-V operand)} \\ + 0 & \textrm{otherwise} + \end{cases} \\ +sampler.lod_{min} & = minLod & \textrm{(from sampler descriptor)} \\ +shaderOp.lod_{min} & = + \begin{cases} + MinLod & \textrm{(from optional SPIR-V operand)} \\ + 0 & \textrm{otherwise} + \end{cases} \\ +\\ +lod_{min} & = \max(sampler.lod_{min}, shaderOp.lod_{min}) \\ +lod_{max} & = maxLod & \textrm{(from sampler descriptor)} +\end{align*} +++++++++++++++++++++++++ + + +==== Image Level(s) Selection + +The image level(s) latexmath:[$d, d_{hi},\textrm{ and }d_{lo}$] which texels +are read from are selected based on the level-of-detail parameter, as +follows. If the sampler's pname:mipmapMode is +ename:VK_SAMPLER_MIPMAP_MODE_NEAREST, then level d is used: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +d = + \begin{cases} + level_{base}, & \lambda \leq \frac{1}{2} \\ + nearest(\lambda), & \lambda > \frac{1}{2}, + level_{base} + \lambda \leq + q + \frac{1}{2} \\ + q, & \lambda > \frac{1}{2}, level_{base} + \lambda > q + \frac{1}{2} + \end{cases} +\end{align*} +++++++++++++++++++++++++ + +where: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +nearest(\lambda) & = + \begin{cases} + \left \lceil level_{base}+\lambda + \frac{1}{2}\right \rceil - 1, & + \textrm{preferred} \\ + \left \lfloor level_{base}+\lambda + \frac{1}{2}\right \rfloor, & + \textrm{alternative} + \end{cases} +\end{align*} +++++++++++++++++++++++++ + +and where q is the pname:levelCount from the pname:subresourceRange of the +image view. + +If the sampler's pname:mipmapMode is ename:VK_SAMPLER_MIPMAP_MODE_LINEAR, +two neighboring levels are selected: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +d_{hi} & = + \begin{cases} + q, & level_{base} + \lambda \geq q \\ + \left \lfloor level_{base}+\lambda \right \rfloor, & \textrm{otherwise} + \end{cases} \\ +d_{lo} & = + \begin{cases} + q, & level_{base} + \lambda \geq q \\ + d_{hi}+1, & \textrm{otherwise} + \end{cases} +\end{align*} +++++++++++++++++++++++++ + +latexmath:[$\delta$] is the fractional value used for linear filtering +between levels. + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +\delta & = \operatorname{frac}(\lambda) +\end{align*} +++++++++++++++++++++++++ + +[[textures-normalized-to-unnormalized]] +=== (s,t,r,q,a) to (u,v,w,a) Transformation + +The normalized texel coordinates are scaled by the image level dimensions +and the array layer is selected. This transformation is performed once for +each level (latexmath:[$d\textrm{ or }d_{hi}\textrm{ and }d_{lo}$]) used in +<>. + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +u(x,y) & = s(x,y) \times width_{level} \\ +v(x,y) & = + \begin{cases} + 0 & \textrm{for 1D images} \\ + t(x,y) \times height_{level} & \textrm{otherwise} + \end{cases} \\ +w(x,y) & = + \begin{cases} + 0 & \textrm{for 2D or Cube images} \\ + r(x,y) \times depth_{level} & \textrm{otherwise} + \end{cases} \\ +\\ +a(x,y) & = + \begin{cases} + a(x,y) & \textrm{for array images} \\ + 0 & \textrm{otherwise} + \end{cases} +\end{align*} +++++++++++++++++++++++++ + +Operations then proceed to Unnormalized Texel Coordinate Operations. + + +== Unnormalized Texel Coordinate Operations + + +[[textures-unnormalized-to-integer]] +=== (u,v,w,a) to (i,j,k,l,n) Transformation And Array Layer Selection + +The unnormalized texel coordinates are transformed to integer texel +coordinates relative to the selected mipmap level. + +The layer index l is computed as: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +l & = \operatorname{clamp}( \operatorname{RNE}(a), 0, layerCount - 1 ) + baseArrayLayer +\end{align*} +++++++++++++++++++++++++ + +where pname:layerCount is the number of layers in the subresource range of +the image view, pname:baseArrayLayer is the first layer from the subresource +range, and where: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +\operatorname{RNE}(a) & = + \begin{cases} + \operatorname{roundTiesToEven}(a) & \textrm{preferred, from IEEE Std 754-2008 Floating-Point Arithmetic} \\ + \left \lfloor a + \frac{1}{2} \right \rfloor & \textrm{alternative} + \end{cases} +\end{align*} +++++++++++++++++++++++++ + +The sample index n is assigned the value zero. + +Nearest filtering (ename:VK_FILTER_NEAREST) computes the integer texel +coordinates that the unnormalized coordinates lie within: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +i & = \left \lfloor u \right \rfloor \\ +j & = \left \lfloor v \right \rfloor \\ +k & = \left \lfloor w \right \rfloor +\end{align*} +++++++++++++++++++++++++ + +Linear filtering (ename:VK_FILTER_LINEAR) computes a set of neighboring +coordinates which bound the unnormalized coordinates. The integer texel +coordinates are combinations of +latexmath:[$i_0\textrm{ or }i_1,j_0\textrm{ or }j_1,k_0\textrm{ or }k_1$], +as well as weights latexmath:[$\alpha, \beta, and \gamma$]. + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +i_{0} & = \left \lfloor u - \frac{1}{2} \right \rfloor & i_{1} & = i_{0} + 1 \\ +j_{0} & = \left \lfloor v - \frac{1}{2} \right \rfloor & j_{1} & = j_{0} + 1 \\ +k_{0} & = \left \lfloor w - \frac{1}{2} \right \rfloor & k_{1} & = k_{0} + 1 \\ +\\ +\alpha & = \operatorname{frac} \left ( u - \frac{1}{2} \right ) \\ +\beta & = \operatorname{frac} \left ( v - \frac{1}{2} \right ) \\ +\gamma & = \operatorname{frac} \left ( w - \frac{1}{2} \right ) +\end{align*} +++++++++++++++++++++++++ + +If the image instruction includes a latexmath:[$ConstOffset$] operand, the +constant offsets latexmath:[$(\Delta_{i},\Delta_{j},\Delta_{k})$] are added +to latexmath:[$(i,j,k)$] components of the integer texel coordinates. + + +== Image Sample Operations + + +[[textures-wrapping-operation]] +=== Wrapping Operation + +code:Cube images ignore the wrap modes specified in the sampler. Instead, if +ename:VK_FILTER_NEAREST is used within a miplevel then +ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE is used, and if +ename:VK_FILTER_LINEAR is used within a miplevel then sampling at the edges +is performed as described earlier in the +<> section. + +The first integer texel coordinate i is transformed based on the +pname:addressModeU parameter of the sampler. + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +i &= + \begin{cases} + i \operatorname{mod} size & \textrm{for repeat} \\ + (size-1) - \operatorname{mirror}((i \operatorname{mod} (2 \times size)) - size) & \textrm{for mirrored repeat} \\ + \operatorname{clamp}(i,0,size-1) & \textrm{for clamp to edge} \\ + \operatorname{clamp}(i,-1,size) & \textrm{for clamp to border} \\ + \operatorname{clamp}(\operatorname{mirror}(i),0,size-1) & \textrm{for mirror clamp to edge} + \end{cases} +\end{align*} +++++++++++++++++++++++++ + +where: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +&\operatorname{mirror}(n) = + \begin{cases} + n & \textrm{for }n \geq 0 \\ + -(1+n) &\textrm{otherwise} \\ + \end{cases} +\end{align*} +++++++++++++++++++++++++ + +latexmath:[$j$] (for 2D and Cube image) and latexmath:[$k$] (for 3D image) +are similarly transformed based on the pname:addressModeV and +pname:addressModeW parameters of the sampler, respectively. + + +[[textures-gather]] +=== Texel Gathering + +SPIR-V instructions with code:Gather in the name return a vector derived +from a 2x2 block of texels in the base level of the image view. The rules +for the etext:LINEAR minification filter are applied to identify the four +selected texels. Each texel is then converted to an RGBA value according to +<> and then +<>. A four-component vector is then +assembled by taking the component indicated by the code:Component value in +the instruction from the swizzled color value of the four texels: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +\tau[R] &= \tau_{i0j1}[level_{base}][comp] \\ +\tau[G] &= \tau_{i1j1}[level_{base}][comp] \\ +\tau[B] &= \tau_{i1j0}[level_{base}][comp] \\ +\tau[A] &= \tau_{i0j0}[level_{base}][comp] +\end{align*} +++++++++++++++++++++++++ + +where: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +\tau[level_{base}][comp] &= + \begin{cases} + \tau[level_{base}][R], &\textrm{for } comp = 0 \\ + \tau[level_{base}][G], &\textrm{for } comp = 1 \\ + \tau[level_{base}][B], &\textrm{for } comp = 2 \\ + \tau[level_{base}][A], &\textrm{for } comp = 3 + \end{cases}\\ +comp &\textrm{ from SPIR-V operand Component} +\end{align*} +++++++++++++++++++++++++ + + +[[textures-texel-filtering]] +=== Texel Filtering + +If latexmath:[$\lambda$] is less than or equal to zero, the texture is said +to be _magnified_, and the filter mode within a mip level is selected by the +pname:magFilter in the sampler. If latexmath:[$\lambda$] is greater than +zero, the texture is said to be _minified_, and the filter mode within a mip +level is selected by the pname:minFilter in the sampler. + +Within a miplevel, etext:NEAREST filtering selects a single value using the +latexmath:[$(i,j,k)$] texel coordinates, with all texels taken from layer l. + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +\tau[level] &= + \begin{cases} + \tau_{ijk}[level], &\textrm{for 3D image} \\ + \tau_{ij}[level], &\textrm{for 2D or Cube image} \\ + \tau_{i}[level], &\textrm{for 1D image} + \end{cases} +\end{align*} +++++++++++++++++++++++++ + +Within a miplevel, etext:LINEAR filtering computes a weighted average of 8 +(for 3D), 4 (for 2D or ube), or 2 (for 1D) texel values, using the weights +computed earlier: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +\tau_{3D}[level] & = (1-\alpha)(1-\beta)(1-\gamma)\tau_{i0j0k0}[level] \\ + & \, + (\alpha)(1-\beta)(1-\gamma)\tau_{i1j0k0}[level] \\ + & \, + (1-\alpha)(\beta)(1-\gamma)\tau_{i0j1k0}[level] \\ + & \, + (\alpha)(\beta)(1-\gamma)\tau_{i1j1k0}[level] \\ + & \, + (1-\alpha)(1-\beta)(\gamma)\tau_{i0j0k1}[level] \\ + & \, + (\alpha)(1-\beta)(\gamma)\tau_{i1j0k1}[level] \\ + & \, + (1-\alpha)(\beta)(\gamma)\tau_{i0j1k1}[level] \\ + & \, + (\alpha)(\beta)(\gamma)\tau_{i1j1k1}[level] +\end{align*} +++++++++++++++++++++++++ + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +\tau_{2D}[level] & = (1-\alpha)(1-\beta)\tau_{i0j0}[level] \\ + & \, + (\alpha)(1-\beta)\tau_{i1j0}[level] \\ + & \, + (1-\alpha)(\beta)\tau_{i0j1}[level] \\ + & \, + (\alpha)(\beta)\tau_{i1j1}[level] +\end{align*} +++++++++++++++++++++++++ + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +\tau_{1D}[level] & = (1-\alpha)\tau_{i0}[level] \\ + & \, + (\alpha)\tau_{i1}[level] +\end{align*} +++++++++++++++++++++++++ + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +\tau[level] &= + \begin{cases} + \tau_{3D}[level], &\textrm{for 3D image} \\ + \tau_{2D}[level], &\textrm{for 2D or Cube image} \\ + \tau_{1D}[level], &\textrm{for 1D image} + \end{cases} +\end{align*} +++++++++++++++++++++++++ + +Finally, mipmap filtering either selects a value from one miplevel or +computes a weighted average between neighboring miplevels: + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +\tau &= + \begin{cases} + \tau[d], &\textrm{for mipmode BASE or NEAREST} \\ + (1-\delta)\tau[d_{hi}]+\delta\tau[d_{lo}], &\textrm{for mipmode LINEAR} + \end{cases} +\end{align*} +++++++++++++++++++++++++ + + +[[textures-texel-anisotropic-filtering]] +=== Texel Anisotropic Filtering +Anisotropic filtering is enabled by the pname:anisotropyEnable in the +sampler. When enabled, the image filtering scheme accounts for a degree of +anisotropy. + +The particular scheme for anisotropic texture filtering is implementation +dependent. Implementations should: consider the pname:magFilter, +pname:minFilter and pname:mipmapMode of the sampler to control the specifics +of the anisotropic filtering scheme used. In addition, implementations +should: consider pname:minLod and pname:maxLod of the sampler. + +The following describes one particular approach to implementing anisotropic +filtering for the 2D Image case, implementations may: choose other methods: + +Given a pname:magFilter, pname:minFilter of etext:LINEAR and a +pname:mipmapMode of etext:NEAREST, + +Instead of a single isotropic sample, N isotropic samples are be sampled +within the image footprint of the image level d to approximate an +anisotropic filter. The sum latexmath:[$\tau_{2Daniso}$] is defined using +the single isotropic latexmath:[$\tau_{2D}$](u,v) at level d. + +[latexmath] +++++++++++++++++++++++++ +\begin{align*} +\tau_{2Daniso} & = + \frac{1}{N}\sum_{i=1}^{N} + {\tau_{2D}\left ( + u \left ( x - \frac{1}{2} + \frac{i}{N+1} , y \right ), + \left ( v \left (x-\frac{1}{2}+\frac{i}{N+1} \right ), y +\right ) + \right )}, + &\textrm{when } \rho_{x} > \rho_{y} \\ +\tau_{2Daniso} &= + \frac{1}{N}\sum_{i=1}^{N} + {\tau_{2D}\left ( + u \left ( x, y - \frac{1}{2} + \frac{i}{N+1} \right ), + \left ( v \left (x,y-\frac{1}{2}+\frac{i}{N+1} \right ) +\right ) + \right )}, + &\textrm{when } \rho_{y} \geq \rho_{x} +\end{align*} +++++++++++++++++++++++++ + +ifdef::editing-notes[] +[NOTE] +.editing-note +================== +(Bill) EXT_texture_filter_anisotropic has not been updated since 2000, +except for ES extension number (2007) and a minor speeling (sic) correction +(2014), neither of which are functional changes. It is showing its age. + +In particular, there's an open issue about 3D textures. + +There are no interactions with ARB_texture_cube_map (approved 1999, promoted +to core OpenGL 1.3 in 2001), let alone interactions with +ARB_seamless_cube_map (approved and promoted to core OpenGL 3.2 in 2009). + +There are no interactions with texture offsets or texture gather. +================== +endif::editing-notes[] + + +[[textures-instructions]] +== Image Operation Steps + +Each step described in this chapter is performed by a subset of the image +instructions: + + * Texel Input Validation Operations, Format Conversion, Texel + Replacement, Conversion to RGBA, and Component + Swizzle: Performed by all instructions except code:OpImageWrite. + * Depth Comparison: Performed by code:OpImage*code:Dref instructions. + * All Texel output operations: Performed by code:OpImageWrite. + * Projection: Performed by all code:OpImage*code:Proj instructions. + * Derivative Image Operations, Cube Map Operations, Scale Factor + Operation, Level-of-Detail Operation and Image Level(s) Selection, and + Texel Anisotropic Filtering: + Performed by all code:OpImageSample* and code:OpImageSparseSample* + instructions. + * (s,t,r,q,a) to (u,v,w,a) Transformation, Wrapping, and (u,v,w,a) to + (i,j,k,l,n) Transformation And Array Layer Selection: Performed by all + code:OpImageSample, code:OpImageSparseSample, and + code:OpImage*code:Gather instructions. + * Texel Gathering: Performed by code:OpImage*code:Gather instructions. + * Texel Filtering: Performed by all code:OpImageSample* and + code:OpImageSparseSample* instructions. + * Sparse Residency: Performed by all code:OpImageSparse* instructions. diff --git a/doc/specs/vulkan/chapters/vertexpostproc.txt b/doc/specs/vulkan/chapters/vertexpostproc.txt new file mode 100644 index 00000000..0abae71a --- /dev/null +++ b/doc/specs/vulkan/chapters/vertexpostproc.txt @@ -0,0 +1,401 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[[vertexpostproc]] += Fixed-Function Vertex Post-Processing + +After programmable vertex processing, the following fixed-function +operations are applied to vertices of the resulting primitives: + + * Flatshading (see <>). + * Primitive clipping, including client-defined half-spaces (see + <>). + * Shader output attribute clipping (see + <>). + * Perspective division on clip coordinates (see + <>). + * Viewport mapping, including depth range scaling (see + <>). + * Front face determination for polygon primitives (see + <>). + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +TODO:Odd that this one link to a different chapter is in this list. +==== +endif::editing-notes[] + +Next, rasterization is performed on primitives as described in chapter +<>. + + +[[vertexpostproc-flatshading]] +== Flatshading + +_Flatshading_ a vertex output attribute means to assign all vertices of the +primitive the same value for that output. + +The output values assigned are those of the _provoking vertex_ of the +primitive. The provoking vertex depends on the primitive topology, and is +generally the ``first'' vertex of the primitive. For primitives not +processed by tessellation or geometry shaders, the provoking vertex is +selected from the input vertices according to the following table. + +<<< + +.Provoking vertex selection +[align="center",cols="75%,25%"] +|======================================== +|Primitive type of primitive latexmath:[$i$] | Provoking vertex number +|ename:VK_PRIMITIVE_TOPOLOGY_POINT_LIST | latexmath:[$i$] +|ename:VK_PRIMITIVE_TOPOLOGY_LINE_LIST | latexmath:[$2 i$] +|ename:VK_PRIMITIVE_TOPOLOGY_LINE_STRIP | latexmath:[$i$] +|ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST | latexmath:[$3 i$] +|ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP | latexmath:[$i$] +|ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN | latexmath:[$i + 1$] +|ename:VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY | latexmath:[$4 i + 1$] +|ename:VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY | latexmath:[$i + 1$] +|ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY | latexmath:[$6 i$] +|ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY | latexmath:[$2 i$] +|======================================== + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +TODO: Add full caption: + +Provoking vertex selection. The output values used for flatshading the i^th^ +primitive generated by drawing commands with the indicated primitive type +are derived from the corresponding values of the vertex whose index is shown +in the table. Primitives and vertices are numbered starting from zero. +==== +endif::editing-notes[] + +Flatshading is applied to those vertex attributes that +<> fragment input attributes +which are decorated as code:Flat. + +If a geometry shader is active, the output primitive topology is either +points, line strips, or triangle strips, and the selection of the provoking +vertex behaves according to the corresponding row of the table. If a +tessellation evaluation shader is active and a geometry shader is not +active, the provoking vertex is undefined but must: be one of the vertices +of the primitive. + + +[[vertexpostproc-clipping]] +== Primitive Clipping + +Primitives are culled against the _cull volume_ and then clipped to the +_clip volume_. In clip coordinates, the _view volume_ is defined by: + +latexmath:[$ + \begin{array}{c} + -w_c \leq x_c \leq w_c \\ + -w_c \leq y_c \leq w_c \\ + 0 \leq z_c \leq w_c \\ + \end{array} +$] + +This view volume can: be further restricted by as many as +sname:VkPhysicalDeviceLimits::pname:maxClipDistances client-defined +half-spaces. + +The cull volume is the intersection of up to +sname:VkPhysicalDeviceLimits::pname:maxCullDistances client-defined +half-spaces (if no client-defined cull half-spaces are enabled, culling +against the cull volume is skipped). + +A shader must: write a single cull distance for each enabled cull half-space +to elements of the code:CullDistance array. If the cull distance for any +enabled cull half-space is negative for all of the vertices of the primitive +under consideration, the primitive is discarded. Otherwise the primitive is +clipped against the clip volume as defined below. + +The clip volume is the intersection of up to the value of +sname:VkPhysicalDeviceLimits::pname:maxClipDistances client-defined +half-spaces with the view volume (if no client-defined clip half-spaces are +enabled, the clip volume is the view volume). + +A shader must: write a single clip distance for each enabled clip +half-space to elements of the code:ClipDistance array. Clip half-space +latexmath:[$i$] is then given by the set of points satisfying the inequality + +latexmath:[$c_i(P) \geq 0$] + +where latexmath:[$c_i(P)$] is the value of clip distance latexmath:[$i$] at +point latexmath:[$P$]. For point primitives, latexmath:[$c_i(P)$] is simply +the clip distance for the vertex in question. For line and triangle +primitives, per-vertex clip distances are interpolated using a weighted +mean, with weights derived according to the algorithms described in sections +<> and +<>, using the +perspective interpolation equations. + +The number of client-defined clip and cull half-spaces that are enabled is +determined by the explicit size of the built-in arrays code:ClipDistance and +code:CullDistance, respectively, declared as an output in the interface of +the entry point of the final shader stage before clipping. + +Depth clamping is enabled or disabled via the pname:depthClampEnable enable +of the sname:VkPipelineRasterizationStateCreateInfo structure. If depth +clamping is enabled, the plane equation + +latexmath:[$0 \leq z_c \leq w_c$] + +(see the clip volume definition above) is ignored by view +volume clipping (effectively, there is no near or far plane clipping). + +If the primitive under consideration is a point, then clipping passes it +unchanged if it lies within the clip volume; otherwise, it is discarded. + +If the primitive is a line segment, then clipping does nothing to it if it +lies entirely within the clip volume, and discards it if it lies entirely +outside the volume. + +If part of the line segment lies in the volume and part lies outside, then +the line segment is clipped and new vertex coordinates are computed for one +or both vertices. A clipped line segment endpoint lies on both the original +line segment and the boundary of the clip volume. + +This clipping produces a value, latexmath:[$0 \leq t \leq 1$], for each +clipped vertex. If the coordinates of a clipped vertex are +latexmath:[${\textbf P}$] and the original vertices' coordinates are +latexmath:[${\textbf P}_1$] and latexmath:[${\textbf P}_2$], then +latexmath:[$t$] is given by + +latexmath:[${\textbf P} = t{\textbf P}_1 + (1-t){\textbf P}_2.$] + +The value of latexmath:[$t$] is used to clip vertex output attributes as +described in <>. + +If the primitive is a polygon, it passes unchanged if every one of its edges +lie entirely inside the clip volume, and it is discarded if every one of its +edges lie entirely outside the clip volume. If the edges of the polygon +intersect the boundary of the clip volume, the intersecting edges are +reconnected by new edges that lie along the boundary of the clip volume - +in some cases requiring the introduction of new vertices into a polygon. + +If a polygon intersects an edge of the clip volume's boundary, the clipped +polygon must: include a point on this boundary edge. + +Primitives rendered with user-defined half-spaces must: satisfy a +complementarity criterion. Suppose a series of primitives is drawn where +each vertex latexmath:[$i$] has a single specified clip distance +latexmath:[$d_i$] (or a number of similarly specified clip distances, if +multiple half-spaces are enabled). Next, suppose that the same series of +primitives are drawn again with each such clip distance replaced by +latexmath:[$-d_i$] (and the graphics pipeline is otherwise the same). In +this case, primitives mustnot: be missing any pixels, and pixels mustnot: be +drawn twice in regions where those primitives are cut by the clip planes. + + +[[vertexpostproc-clipping-shader-outputs]] +== Clipping Shader Outputs + +Next, vertex output attributes are clipped. The output values associated +with a vertex that lies within the clip volume are unaffected by clipping. +If a primitive is clipped, however, the output values assigned to vertices +produced by clipping are clipped. + +Let the output values assigned to the two vertices latexmath:[${\textbf +P}_1$] and latexmath:[${\textbf P}_2$] of an unclipped edge be +latexmath:[${\textbf c}_1$] and latexmath:[${\textbf c}_2$]. The value of +latexmath:[$t$] (see <>) for a +clipped point latexmath:[${\textbf P}$] is used to obtain the output value +associated with latexmath:[${\textbf P}$] as + +latexmath:[${\textbf c} = t {\textbf c}_1 + (1-t){\textbf c}_2. $] + +(Multiplying an output value by a scalar means multiplying each of _x_, _y_, +_z_, and _w_ by the scalar.) + +Since this computation is performed in clip space before division by +latexmath:[$w_c$], clipped output values are perspective-correct. + +Polygon clipping creates a clipped vertex along an edge of the clip +volume's boundary. This situation is handled by noting that polygon clipping +proceeds by clipping against one half-space at a time. Output value clipping +is done in the same way, so that clipped points always occur at the +intersection of polygon edges (possibly already clipped) with the clip +volume's boundary. + +For vertex output attributes whose matching fragment input attributes are +decorated with code:NoPerspective, the value +of latexmath:[$t$] used to obtain the output value associated with +latexmath:[${\textbf P}$] will be adjusted to produce results that vary +linearly in framebuffer space. + +Output attributes of integer or unsigned integer type must: always be +flatshaded. Flatshaded attributes are constant over the primitive being +rasterized (see <> +and <>), and no +interpolation is performed. The output value latexmath:[${\textbf c}$] is +taken from either latexmath:[${\textbf c}_1$] or latexmath:[${\textbf +c}_2$], since flatshading has already occured and the two values are +identical. + + +[[vertexpostproc-coord-transform]] +== Coordinate Transformations + +_Clip coordinates_ for a vertex result from shader execution, which yields a +vertex coordinate code:Position. + +Perspective division on clip coordinates yields _normalized device +coordinates_, followed by a _viewport_ transformation (see +<>) to convert these +coordinates into _framebuffer coordinates_. + +If a vertex in clip coordinates has a position given by + +latexmath:[$\left(\begin{array}{c} x_c \\ y_c \\ z_c \\ w_c \end{array}\right)$] + +then the vertex's normalized device coordinates are + +latexmath:[$ + \left(\begin{array}{c} x_d \\ y_d \\ z_d \end{array}\right) = + \left(\begin{array}{c} \frac{x_c}{w_c} \\ \frac{y_c}{w_c} \\ \frac{z_c}{w_c} \end{array}\right) +$] + + +[[vertexpostproc-viewport]] +== Controlling the Viewport + +The viewport transformation is determined by the selected viewport's width +and height in pixels, latexmath:[$p_x$] and latexmath:[$p_y$], respectively, +and its center latexmath:[$(o_x, o_y)$] (also in pixels), as well as its +depth range min and max determining a depth range scale value +latexmath:[$p_z$] and a depth range bias value latexmath:[$o_z$] (defined +below). The vertex's framebuffer coordinates, + latexmath:[$\left(\begin{array}{c} x_f \\ y_f \\ z_f \end{array}\right),$] +are given by + +latexmath:[$ + \left(\begin{array}{c} x_f \\ y_f \\ z_f \end{array}\right) = + \left(\begin{array}{c} + \frac{ p_x }{ 2 } x_d + o_x \\ + \frac{ p_y }{ 2 } y_d + o_y \\ + p_z \times z_d + o_z + \end{array}\right). +$] + +Multiple viewports are available and are numbered zero up to the value of +sname:VkPhysicalDeviceLimits::pname:maxViewports. The number of viewports +used by a pipeline is controlled by the pname:viewportCount member of the +sname:VkPipelineViewportStateCreateInfo structure used in pipeline creation: + +include::../structs/VkPipelineViewportStateCreateInfo.txt[] + +The members of the sname:VkPipelineViewportStateCreateInfo structure are as +follows: + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is reserved for future use. + * pname:viewportCount is the number of viewports used by the pipeline. + * pname:pViewports is a pointer to an array of slink:VkViewport structs, + defining the viewport transforms. If the viewport state is dynamic, this + member is ignored. + * pname:scissorCount is the number of <> and + must: match the number of viewports. + * pname:pScissors is a pointer to an array of sname:VkRect2D structs which + define the rectangular bounds of the scissor for the corresponding + viewport. If the scissor state is dynamic, this member is ignored. + +include::../validity/structs/VkPipelineViewportStateCreateInfo.txt[] + +If a geometry shader is active and has an output variable decorated with +code:ViewportIndex, the viewport transformation uses the viewport +corresponding to the value assigned to code:ViewportIndex taken from an +implementation-dependent vertex of each primitive. If the value of +code:ViewportIndex is outside the range zero to the value of +pname:viewportCount minus one for a primitive, or if the geometry shader did +not assign a value to code:ViewportIndex for all vertices of a primitive due +to flow control, the results of the viewport transformation of the vertices +of such primitives are undefined. If no geometry shader is active, or if the +geometry shader does not have an output decorated with code:ViewportIndex, +the viewport numbered zero is used by the viewport transformation. + +A single vertex can: be used in more than one individual primitive, in +primitives such as ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP. In this case, +the viewport transformation is applied separately for each primitive. + +If the bound pipeline state object was not created with the +ename:VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled, viewport +transformation parameters are specified using the pname:pViewports +member of sname:VkPipelineViewportStateCreateInfo in the pipeline state +object. If the pipeline state object was created with the +ename:VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled, the viewport +transformation parameters are dynamically set and changed with the command: + +include::../protos/vkCmdSetViewport.txt[] + + * pname:commandBuffer is the command buffer into which the command will be + recorded. + * pname:firstViewport is the index of the first viewport whose parameters + are updated by the command. + * pname:viewportCount is the number of viewports whose parameters are + updated by the command. + * pname:pViewports is a pointer to an array of slink:VkViewport structures + specifying viewport parameters. + +The viewport parameters taken from element latexmath:[$i$] of +pname:pViewports replace the current state for the viewport index +latexmath:[$\mathit{firstViewport}+i$], for latexmath:[$i$] in +latexmath:[$[0, viewportCount)$]. + +include::../validity/protos/vkCmdSetViewport.txt[] + +Either of these methods of setting the viewport transformation parameters +use the sname:VkViewport struct: + +include::../structs/VkViewport.txt[] + + * pname:x and pname:y are the viewport's upper left corner + latexmath:[$(x,y)$]. + * pname:width and pname:height are the viewport's width and height, + respectively. + * pname:minDepth and pname:maxDepth are the depth range for the viewport. + It is valid for pname:minDepth to be greater than or equal to + pname:maxDepth. + +include::../validity/structs/VkViewport.txt[] + +The framebuffer depth coordinate latexmath:[$z_f$] may: be represented using +either a fixed-point or floating-point representation. However, a +floating-point representation must: be used if the depth/stencil attachment +has a floating-point depth component. If an latexmath:[$m$]-bit fixed-point +representation is used, we assume that it represents each value +latexmath:[$\frac{k}{2^m - 1}$], where latexmath:[$k \in \{ 0,1, \ldots, +2^m-1 \}$], as latexmath:[$k$] (e.g. 1.0 is represented in binary as a +string of all ones). + +The viewport parameters shown in the above equations are found from these +values as + +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +\begin{align*} + o_x & = x + \frac{width}{2} \\ + o_y & = y + \frac{height}{2} \\ + o_z & = minDepth \\ + p_x & = width \\ + p_y & = height \\ + p_z & = maxDepth - minDepth. +\end{align*} +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +The width and height of the <> must: be greater +than or equal to the width and height of the largest image which can: be +created and attached to a framebuffer. + +The floating-point viewport bounds are represented with an +<>. + + diff --git a/doc/specs/vulkan/checkLinks.py b/doc/specs/vulkan/checkLinks.py new file mode 100755 index 00000000..8c2d8e9a --- /dev/null +++ b/doc/specs/vulkan/checkLinks.py @@ -0,0 +1,312 @@ +#!/usr/bin/python3 +# +# Copyright (c) 2015-2016 The Khronos Group Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and/or associated documentation files (the +# "Materials"), to deal in the Materials without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Materials, and to +# permit persons to whom the Materials are furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Materials. +# +# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +# checkLinks.py - validate link/reference API constructs in files +# +# Usage: checkLinks.py files > logfile +# +# Uses vkapi.py, which is a Python representation of relevant parts +# of the Vulkan API. + +import copy, os, pdb, re, string, sys +from vkapi import * + +global curFile, curLine, sectionDepth +global errCount, warnCount, emittedPrefix, printInfo + +curFile = '???' +curLine = -1 +sectionDepth = 0 +errCount = 0 +warnCount = 0 +emittedPrefix = {} +printInfo = False + +# Called before printing a warning or error. Only prints once prior +# to output for a given file. +def emitPrefix(): + global curFile, curLine, emittedPrefix + if (curFile not in emittedPrefix.keys()): + emittedPrefix[curFile] = None + print('Checking file:', curFile) + print('-------------------------------') + +def info(*args, **kwargs): + global curFile, curLine, printInfo + if (printInfo): + + emitPrefix() + print('INFO: %s line %d:' % (curFile, curLine), + ' '.join([str(arg) for arg in args])) + +# Print a validation warning found in a file +def warning(*args, **kwargs): + global curFile, curLine, warnCount + + warnCount = warnCount + 1 + emitPrefix() + print('WARNING: %s line %d:' % (curFile, curLine), + ' '.join([str(arg) for arg in args])) + +# Print a validation error found in a file +def error(*args, **kwargs): + global curFile, curLine, errCount + + errCount = errCount + 1 + emitPrefix() + print('ERROR: %s line %d:' % (curFile, curLine), + ' '.join([str(arg) for arg in args])) + +# See if a tag value exists in the specified dictionary and +# suggest it as an alternative if so. +def checkTag(tag, value, dict, dictName, tagName): + if (value in dict.keys()): + warning(value, 'exists in the API but not as a', + tag + ': .', 'Try using the', tagName + ': tag.') + +# Report an error due to an asciidoc tag which doesn't match +# a corresponding API entity. +def foundError(errType, tag, value): + global curFile, curLine + error('no such', errType, tag + ':' + value) + # Try some heuristics to detect likely problems such as missing vk + # prefixes or the wrong tag. + + # Look in all the dictionaries in vkapi.py to see if the tag + # is just wrong but the API entity actually exists. + checkTag(tag, value, flags, 'flags', 'elink') + checkTag(tag, value, enums, 'enums', 'elink') + checkTag(tag, value, structs, 'structs', 'slink/sname') + checkTag(tag, value, consts, 'consts', 'ename') + checkTag(tag, value, protos, 'protos', 'flink/fname') + checkTag(tag, value, funcpointers, 'funcpointers', 'tlink/tname') + + # Look for missing vk prefixes (quirky since it's case-dependent) + # NOT DONE YET + +# Look for param in the list of all parameters of the specified functions +# Returns True if found, False otherwise +def findParam(param, funclist): + for f in funclist: + if (param in protos[f]): + info('parameter:', param, 'found in function:', f) + return True + return False + +# Initialize tracking state for checking links/includes +def initChecks(): + global curFile, curLine, curFuncs, curStruct, accumFunc, sectionDepth + global errCount, warnCount + global incPat, linkPat, pathPat, sectionPat + + # Matches asciidoc single-line section tags + sectionPat = re.compile('^(=+) ') + + # Matches any asciidoc include:: directive + pathPat = re.compile('^include::([\w./_]+)\[\]') + + # Matches asciidoc include:: directives used in spec/ref pages (and also + # others such as validity) + incPat = re.compile('^\.\./(\w+)/(\w+)\.txt') + + # Lists of current /protos/ (functions) and /structs/ includes. There + # can be several protos contiguously for different forms of a command + curFuncs = [] + curStruct = None + + # Tag if we should accumulate funcs or start a new list. Any intervening + # pname: tags or struct includes will restart the list. + accumFunc = False + + # Matches all link names in the current spec/man pages. Assumes these + # macro names are not trailing subsets of other macros. Used to + # precede the regexp with [^A-Za-z], but this didn't catch macros + # at start of line. + linkPat = re.compile('([efpst](name|link)):(\w*)') + + # Total error/warning counters + errCount = 0 + warnCount = 0 + +# Validate asciidoc internal links in specified file. +# infile - filename to validate +# follow - if True, recursively follow include:: directives +# included - if True, function was called recursively +# Links checked are: +# fname:vkBlah - Vulkan command name (generates internal link) +# flink:vkBlah - Vulkan command name +# sname:VkBlah - Vulkan struct name (generates internal link) +# slink:VkBlah - Vulkan struct name +# elink:VkEnumName - Vulkan enumeration ('enum') type name +# ename:VK_BLAH - Vulkan enumerant token name +# pname:name - parameter name to a command or a struct member +# tlink:name - Other Vulkan type name (generates internal link) +# tname:name - Other Vulkan type name +def checkLinks(infile, follow = False, included = False): + global curFile, curLine, curFuncs, curStruct, accumFunc, sectionDepth + global errCount, warnCount + global incPat, linkPat, pathPat, sectionPat + + # Global state which gets saved and restored by this function + oldCurFile = curFile + oldCurLine = curLine + curFile = infile + curLine = 0 + + # N.b. dirname() returns an empty string for a path with no directories, + # unlike the shell dirname(1). + if (not os.path.exists(curFile)): + error('No such file', curFile, '- skipping check') + # Restore global state before exiting the function + curFile = oldCurFile + curLine = oldCurLine + return + + inPath = os.path.dirname(curFile) + fp = open(curFile, 'r') + + for line in fp: + curLine = curLine + 1 + + # Track changes up and down section headers, and forget + # the current functions/structure when popping up a level + match = sectionPat.search(line) + if (match): + depth = len(match.group(1)) + if (depth < sectionDepth): + info('Resetting current function/structure for section:', line) + curFuncs = [] + curStruct = None + sectionDepth = depth + + match = pathPat.search(line) + if (match): + incpath = match.group(1) + # An include:: directive. First check if it looks like a + # function or struct include file, and modify the corresponding + # current function or struct state accordingly. + match = incPat.search(incpath) + if (match): + # For prototypes, if it is preceded by + # another include:: directive with no intervening link: tags, + # add to the current function list. Otherwise start a new list. + # There is only one current structure. + category = match.group(1) + tag = match.group(2) + # @ Validate tag! + # @ Arguably, any intervening text should shift to accumFuncs = False, + # e.g. only back-to-back includes separated by blank lines would be + # accumulated. + if (category == 'protos'): + if (tag in protos.keys()): + if (accumFunc): + curFuncs.append(tag) + else: + curFuncs = [ tag ] + # Restart accumulating functions + accumFunc = True + info('curFuncs =', curFuncs, 'accumFunc =', accumFunc) + else: + error('include of nonexistent function', tag) + elif (category == 'structs'): + if (tag in structs.keys()): + curStruct = tag + # Any /structs/ include means to stop accumulating /protos/ + accumFunc = False + info('curStruct =', curStruct) + else: + error('include of nonexistent struct', tag) + if (follow): + # Actually process the included file now, recursively + newpath = os.path.normpath(os.path.join(inPath, incpath)) + info(curFile, ': including file:', newpath) + checkLinks(newpath, follow, included=True) + + matches = linkPat.findall(line) + for match in matches: + # Start actual validation work. Depending on what the + # asciidoc tag name is, look up the value in the corresponding + # dictionary. + tag = match[0] + value = match[2] + if (tag == 'fname' or tag == 'flink'): + if (value not in protos.keys()): + foundError('function', tag, value) + elif (tag == 'sname' or tag == 'slink'): + if (value not in structs.keys()): + foundError('aggregate/scalar type', tag, value) + elif (tag == 'ename'): + if (value not in consts.keys()): + foundError('enumerant/constant', tag, value) + elif (tag == 'elink'): + if (value not in enums.keys() and value not in flags.keys()): + foundError('enum/bitflag type', tag, value) + elif (tag == 'tlink' or tag == 'tname'): + if (value not in funcpointers.keys()): + foundError('function pointer/other type', tag, value) + elif (tag == 'pname'): + # Any pname: tag means to stop accumulating /protos/ + accumFunc = False + # See if this parameter is in the current proto(s) and struct + foundParam = False + if (curStruct and value in structs[curStruct]): + info('parameter', value, 'found in struct', curStruct) + elif (curFuncs and findParam(value, curFuncs)): + True + else: + warning('parameter', value, 'not found. curStruct =', + curStruct, 'curFuncs =', curFuncs) + else: + # This is a logic error + error('unknown tag', tag + ':' + value) + fp.close() + + if (errCount > 0 or warnCount > 0): + if (not included): + print('Errors found:', errCount, 'Warnings found:', warnCount) + print('') + + if (included): + info('----- returning from:', infile, 'to parent file', '-----') + + # Don't generate any output for files without errors + # else: + # print(curFile + ': No errors found') + + # Restore global state before exiting the function + curFile = oldCurFile + curLine = oldCurLine + +if __name__ == '__main__': + follow = False + if (len(sys.argv) > 1): + for file in sys.argv[1:]: + if (file == '-follow'): + follow = True + elif (file == '-info'): + printInfo = True + else: + initChecks() + checkLinks(file, follow) + else: + print('Need arguments: [-follow] [-info] infile [infile...]', file=sys.stderr) diff --git a/doc/specs/vulkan/config/README b/doc/specs/vulkan/config/README new file mode 100644 index 00000000..43a46395 --- /dev/null +++ b/doc/specs/vulkan/config/README @@ -0,0 +1,76 @@ +There's apparently some sort of parsing issue with comments in vkspec.conf, +so they are pulled out here for now. + +// The [efs]link macros insert named xrefs to the specified target +// enumerated type, function, or structure name, and are also used +// for validation. +// Could also use + +// The [efsp]text macros insert the specified target enumerant, function, +// structure or parameter name, and are NOT used for validation. They are +// otherwise identical to the [efsp]name macros above, and are intended +// to get the proper formatting for terms that are *not* actually API +// features, e.g. wildcards or partial names. + +// The [efsp]name macros insert the specified target enumerant, function, +// structure or parameter name, and are also used for validation. + +// The basetype macro inserts text for the specified base (scalar) type. It +// is not currently used for validation, but will be eventually + +// The code macro inserts text for the specified shader code function or +// variable. + +// I have no idea what the old 'vkkeyword' macro does, but it appears +// to be unused, so removed it and archived here for the moment. +// +// (?u)^(?P):(?P\S*?)(\[(?P.*?)\])$=vkkeyword +// +// [vkkeyword-inlinemacro] +// {passtext} + +--------------- PDF Generation ---------------- + +vkspec-dblatex.xsl is XSL specific to a2x->dblatex->PDF spec generation. +It is a very slightly modified version of +/etc/asciidoc/dblatex/asciidoc-dblatex.xsl, as follows: + +> colorlinks,linkcolor=black,pdfstartview=FitH +> 0 +> 0 + +and has been simplified to just those parameters. Additional templates +replacing those under + /usr/share/xml/docbook/stylesheet/dblatex/xsl/* can be added here. + +--------------- XHTML Generation ---------------- + +vkspec-xhtml.css is CSS for the xhtml and chunked targets. It is pulled +in from docbook-xsl/common.xsl. This gives us direct control over the +CSS for the document, including support for markup styles. + +--------------- Asciibook Stylesheets ---------------- + +docbook-xsl/chunked.xsl +docbook-xsl/common.xsl +docbook-xsl/xhtml.xsl + replace parts of the asciibook stylesheets normally found under +/etc/asciidoc/docbook-xsl + in order to generate consistent IDs on sections and to insert +MathJax + + + diff --git a/doc/specs/vulkan/config/docbook-xsl/common.xsl b/doc/specs/vulkan/config/docbook-xsl/common.xsl new file mode 100644 index 00000000..14db3546 --- /dev/null +++ b/doc/specs/vulkan/config/docbook-xsl/common.xsl @@ -0,0 +1,110 @@ + + + + + + + + + + 1 + 0 + + + + + + +images/icons/ +0 + + + + 0 + #E0E0E0 + + + +images/icons/ + + + margin-left: 0; margin-right: 10%; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +article toc,title +book toc,title,figure,table,example,equation + + +chapter toc,title +part toc,title +preface toc,title +qandadiv toc +qandaset toc +reference toc,title +sect1 toc +sect2 toc +sect3 toc +sect4 toc +sect5 toc +section toc +set toc,title + + + +article nop +book nop + + + + + diff --git a/doc/specs/vulkan/config/docbook-xsl/xhtml.xsl b/doc/specs/vulkan/config/docbook-xsl/xhtml.xsl new file mode 100644 index 00000000..a9f9dade --- /dev/null +++ b/doc/specs/vulkan/config/docbook-xsl/xhtml.xsl @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + diff --git a/doc/specs/vulkan/config/manpages.conf b/doc/specs/vulkan/config/manpages.conf new file mode 100644 index 00000000..3dc2f2da --- /dev/null +++ b/doc/specs/vulkan/config/manpages.conf @@ -0,0 +1,140 @@ +# Copyright (c) 2015-2016 The Khronos Group Inc. +# Copyright notice at https://www.khronos.org/registry/speccopyright.html + +[attributes] +author="Khronos Group" +max-width="1024px" + +[macros] +(?su)(?Pcan):(?P\w*)=normative +(?su)(?Pcannot):(?P\w*)=normative +(?su)(?Pmay):(?P\w*)=normative +(?su)(?Pmaynot):(?P\w*)=maynot +(?su)(?Pmust):(?P\w*)=normative +(?su)(?Pmustnot):(?P\w*)=mustnot +(?su)(?Poptional):(?P\w*)=normative +(?su)(?Poptionally):(?P\w*)=normative +(?su)(?Precommend):(?P\w*)=normative +(?su)(?Prequired):(?P\w*)=normative +(?su)(?Pshould):(?P\w*)=normative +(?su)(?Pshouldnot):(?P\w*)=shouldnot +(?su)(?Pflink):(?P\w+)= +(?su)(?Pfname):(?P\w+)= +(?su)(?Psname):(?P\w+)= +(?su)(?Pslink):(?P\w+)= +(?su)(?Pename):(?P\w+)= +(?su)(?Ppname):(?P\w+)= +(?su)(?Pelink):(?P\w+)= +(?su)(?Petext):(?P\w+)= +(?su)(?Ppname):(?P(\w[\w.]*)*\w+)= +(?su)(?Pptext):(?P(\w[\w.]*)*\w+)= +(?su)(?Pbasetype):(?P\w+)= +(?su)(?Pcode):(?P\w+)= + +[normative-inlinemacro] +ifdef::basebackend-docbook[] +{name} +endif::basebackend-docbook[] +ifdef::basebackend-html[] +{name} +endif::basebackend-html[] + +[maynot-inlinemacro] +ifdef::basebackend-docbook[] +may not +endif::basebackend-docbook[] +ifdef::basebackend-html[] +may not +endif::basebackend-html[] + +[mustnot-inlinemacro] +ifdef::basebackend-docbook[] +must not +endif::basebackend-docbook[] +ifdef::basebackend-html[] +must not +endif::basebackend-html[] + +[shouldnot-inlinemacro] +ifdef::basebackend-docbook[] +should not +endif::basebackend-docbook[] +ifdef::basebackend-html[] +should not +endif::basebackend-html[] + +[flink-inlinemacro] +ifdef::basebackend-docbook[] +{target} +endif::basebackend-docbook[] + +[fname-inlinemacro] +ifdef::basebackend-docbook[] +{target} +endif::basebackend-docbook[] + +[sname-inlinemacro] +ifdef::basebackend-docbook[] +{target} +endif::basebackend-docbook[] + +[slink-inlinemacro] +ifdef::basebackend-docbook[] +{target} +endif::basebackend-docbook[] + +[pname-inlinemacro] +ifdef::basebackend-docbook[] +{target} +endif::basebackend-docbook[] + +[ename-inlinemacro] +ifdef::basebackend-docbook[] +{target} +endif::basebackend-docbook[] + +[elink-inlinemacro] +ifdef::basebackend-docbook[] +{target} +endif::basebackend-docbook[] + +[ftext-inlinemacro] +ifdef::basebackend-docbook[] +{target} +endif::basebackend-docbook[] +ifdef::basebackend-html[] +{target} +endif::basebackend-html[] + +[stext-inlinemacro] +ifdef::basebackend-docbook[] +{target} +endif::basebackend-docbook[] +ifdef::basebackend-html[] +{target} +endif::basebackend-html[] + +[etext-inlinemacro] +ifdef::basebackend-docbook[] +{target} +endif::basebackend-docbook[] +ifdef::basebackend-html[] +{target} +endif::basebackend-html[] + +[ptext-inlinemacro] +ifdef::basebackend-docbook[] +{target} +endif::basebackend-docbook[] +ifdef::basebackend-html[] +{target} +endif::basebackend-html[] + +[basetype-inlinemacro] +{target} + +[code-inlinemacro] +{target} + +[must-inlinemacro] +must {target} diff --git a/doc/specs/vulkan/config/mathjax-asciidoc.conf b/doc/specs/vulkan/config/mathjax-asciidoc.conf new file mode 100644 index 00000000..20d6ea78 --- /dev/null +++ b/doc/specs/vulkan/config/mathjax-asciidoc.conf @@ -0,0 +1,10 @@ +# adoc.conf - add some asciidoc-specific (non-a2x) config stuff for html5.conf + +# Override html5.conf definition +[latexmath-inlinemacro] +{passtext} + +[docinfo] +ifdef::mathjax[] +include1::mathjax.js[] +endif::[] diff --git a/doc/specs/vulkan/config/mathjax-docbook.conf b/doc/specs/vulkan/config/mathjax-docbook.conf new file mode 100644 index 00000000..f2572830 --- /dev/null +++ b/doc/specs/vulkan/config/mathjax-docbook.conf @@ -0,0 +1,56 @@ +# testdb.conf - override some Docbook-specific config stuff + +# Override docbook45 definition to not encapsulate LaTeX math +# This requires some cleverness in the latexmath macros to include +# the equation source in the alt block for PDF output, and in +# a Docbook block tag otherwise, using the a2x-format variable. + +# a2x-format can be one of: chunked, docbook, dvi, epub, htmlhelp, manpage, +# pdf (default), ps, tex, text, xhtml. + +[blockdef-pass] +ifeval::["{a2x-format}"=="pdf"] +latexmath-style=template="latexmathblock",subs=() +endif::[] +ifeval::["{a2x-format}"!="pdf"] +latexmath-style=template="latexmathblock" +subs=specialcharacters +endif::[] + +[latexmath-inlinemacro] + +ifeval::["{a2x-format}"=="pdf"] + +endif::[] + +ifeval::["{a2x-format}"!="pdf"] +{passtext} +endif::[] + + + +[latexmath-blockmacro] + +ifeval::["{a2x-format}"=="pdf"] + +endif::[] + +ifeval::["{a2x-format}"!="pdf"] +{passtext} +endif::[] + + + +[latexmathblock] +{title#}{title} +{title%} +ifeval::["{a2x-format}"=="pdf"] + +endif::[] + +ifeval::["{a2x-format}"!="pdf"] +| +endif::[] + +{title#} +{title%} diff --git a/doc/specs/vulkan/config/mathjax.js b/doc/specs/vulkan/config/mathjax.js new file mode 100644 index 00000000..a455cc06 --- /dev/null +++ b/doc/specs/vulkan/config/mathjax.js @@ -0,0 +1,8 @@ + + diff --git a/doc/specs/vulkan/config/vkspec-dblatex.sty b/doc/specs/vulkan/config/vkspec-dblatex.sty new file mode 100644 index 00000000..4b613873 --- /dev/null +++ b/doc/specs/vulkan/config/vkspec-dblatex.sty @@ -0,0 +1,125 @@ +%% +%% This style is derived from the docbook one. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{asciidoc}[2008/06/05 AsciiDoc DocBook Style] + +\usepackage[english]{babel} +\usepackage{framed} +\def\lt{<} +\def\gt{>} + +% Set page geometry +\usepackage[ + letterpaper, + hmargin=0.9in, + bmargin=1in, + twoside +]{geometry} +\raggedbottom +\raggedright + +%% Just use the original package and pass the options. +\RequirePackageWithOptions{docbook} + +% Sidebar is a boxed minipage that can contain verbatim. +% Changed shadow box to double box. +\renewenvironment{sidebar}[1][0.95\textwidth]{ + \hspace{0mm}\newline% + \noindent\begin{framed}% + \setlength\parskip{\medskipamount}% +}{ + \end{framed}% +} + +\renewcommand\_{\textunderscore\allowbreak} + +\lstdefinelanguage{GLSL} +{ + sensitive=true, + morekeywords=[1]{ + attribute, const, uniform, varying, + layout, centroid, flat, smooth, + noperspective, break, continue, do, + for, while, switch, case, default, if, + else, in, out, inout, float, int, void, + bool, true, false, invariant, discard, + return, mat2, mat3, mat4, mat2x2, mat2x3, + mat2x4, mat3x2, mat3x3, mat3x4, mat4x2, + mat4x3, mat4x4, vec2, vec3, vec4, ivec2, + ivec3, ivec4, bvec2, bvec3, bvec4, uint, + uvec2, uvec3, uvec4, lowp, mediump, highp, + precision, sampler1D, sampler2D, sampler3D, + samplerCube, sampler1DShadow, + sampler2DShadow, samplerCubeShadow, + sampler1DArray, sampler2DArray, + sampler1DArrayShadow, sampler2DArrayShadow, + isampler1D, isampler2D, isampler3D, + isamplerCube, isampler1DArray, + isampler2DArray, usampler1D, usampler2D, + usampler3D, usamplerCube, usampler1DArray, + usampler2DArray, sampler2DRect, + sampler2DRectShadow, isampler2DRect, + usampler2DRect, samplerBuffer, + isamplerBuffer, usamplerBuffer, sampler2DMS, + isampler2DMS, usampler2DMS, + sampler2DMSArray, isampler2DMSArray, + usampler2DMSArray, struct}, + morekeywords=[2]{ + radians,degrees,sin,cos,tan,asin,acos,atan, + atan,sinh,cosh,tanh,asinh,acosh,atanh,pow, + exp,log,exp2,log2,sqrt,inversesqrt,abs,sign, + floor,trunc,round,roundEven,ceil,fract,mod,modf, + min,max,clamp,mix,step,smoothstep,isnan,isinf, + floatBitsToInt,floatBitsToUint,intBitsToFloat, + uintBitsToFloat,length,distance,dot,cross, + normalize,faceforward,reflect,refract, + matrixCompMult,outerProduct,transpose, + determinant,inverse,lessThan,lessThanEqual, + greaterThan,greaterThanEqual,equal,notEqual, + any,all,not,textureSize,texture,textureProj, + textureLod,textureOffset,texelFetch, + texelFetchOffset,textureProjOffset, + textureLodOffset,textureProjLod, + textureProjLodOffset,textureGrad, + textureGradOffset,textureProjGrad, + textureProjGradOffset,texture1D,texture1DProj, + texture1DProjLod,texture2D,texture2DProj, + texture2DLod,texture2DProjLod,texture3D, + texture3DProj,texture3DLod,texture3DProjLod, + textureCube,textureCubeLod,shadow1D,shadow2D, + shadow1DProj,shadow2DProj,shadow1DLod, + shadow2DLod,shadow1DProjLod,shadow2DProjLod, + dFdx,dFdy,fwidth,noise1,noise2,noise3,noise4, + EmitVertex,EndPrimitive}, + morekeywords=[3]{ + gl_VertexID,gl_InstanceID,gl_Position, + gl_PointSize,gl_ClipDistance,gl_PerVertex, + gl_Layer,gl_ClipVertex,gl_FragCoord, + gl_FrontFacing,gl_ClipDistance,gl_FragColor, + gl_FragData,gl_MaxDrawBuffers,gl_FragDepth, + gl_PointCoord,gl_PrimitiveID, + gl_MaxVertexAttribs,gl_MaxVertexUniformComponents, + gl_MaxVaryingFloats,gl_MaxVaryingComponents, + gl_MaxVertexOutputComponents, + gl_MaxGeometryInputComponents, + gl_MaxGeometryOutputComponents, + gl_MaxFragmentInputComponents, + gl_MaxVertexTextureImageUnits, + gl_MaxCombinedTextureImageUnits, + gl_MaxTextureImageUnits, + gl_MaxFragmentUniformComponents, + gl_MaxDrawBuffers,gl_MaxClipDistances, + gl_MaxGeometryTextureImageUnits, + gl_MaxGeometryOutputVertices, + gl_MaxGeometryOutputVertices, + gl_MaxGeometryTotalOutputComponents, + gl_MaxGeometryUniformComponents, + gl_MaxGeometryVaryingComponents,gl_DepthRange}, + morecomment=[l]{//}, + morecomment=[s]{/*}{*/}, + morecomment=[l][keywordstyle4]{\#}, +} + +% For DocBook literallayout elements, see `./dblatex/dblatex-readme.txt`. +\usepackage{alltt} diff --git a/doc/specs/vulkan/config/vkspec-dblatex.xsl b/doc/specs/vulkan/config/vkspec-dblatex.xsl new file mode 100644 index 00000000..4394b218 --- /dev/null +++ b/doc/specs/vulkan/config/vkspec-dblatex.xsl @@ -0,0 +1,14 @@ + + + + + colorlinks,linkcolor=black,pdfstartview=FitH + 0 + 0 + + + + diff --git a/doc/specs/vulkan/config/vkspec-xhtml.css b/doc/specs/vulkan/config/vkspec-xhtml.css new file mode 100644 index 00000000..e5f026ff --- /dev/null +++ b/doc/specs/vulkan/config/vkspec-xhtml.css @@ -0,0 +1,358 @@ +/* + CSS stylesheet for XHTML produced by DocBook XSL stylesheets. + + This is branched from /etc/asciidoc/stylesheets/docbook-xsl.css with a few + tweaks from the asciidoc.css modified for the SPIR-V specification - see + /repos/util/trunk/SpecificationTemplates/Asciidoc/specStyle/asciidoc.css +*/ + +/* Vulkan modifications and additions */ + +/* For showing added material in a document */ +div.added { color: red; } +p.added { color: red; } +span.added { color: red; } + +/* For showing removed material in a document */ +div.removed { color: red; text-decoration: line-through; } +p.removed { color: red; text-decoration: line-through; } +span.removed { color: red; text-decoration: line-through; } + +/* For showing changed material in a document */ +div.change { color: red; } +p.change { color: red; } +span.change { color: red; } + +/* For marking the "normative" terms like must:, can:, etc. */ +div.normative { color: purple; } +p.normative { color: purple; } +span.normative { color: purple; } + +/* Use a sans-serif font. This needs to be in a smaller point size. */ +body { + font-family: Arial,sans-serif; +} + +/* End Vulkan modifications and additions */ + +code, pre { + font-family: "Courier New", Courier, monospace; +} + +span.strong { + font-weight: bold; +} + +body blockquote { + margin-top: .75em; + line-height: 1.5; + margin-bottom: .75em; +} + +html body { + margin: 1em 5% 1em 5%; + line-height: 1.2; +} + +body div { + margin: 0; +} + +h1, h2, h3, h4, h5, h6 +{ + color: #527bbd; + font-family: Arial,Helvetica,sans-serif; +} + +div.toc p:first-child, +div.list-of-figures p:first-child, +div.list-of-tables p:first-child, +div.list-of-examples p:first-child, +div.example p.title, +div.sidebar p.title +{ + font-weight: bold; + color: #527bbd; + font-family: Arial,Helvetica,sans-serif; + margin-bottom: 0.2em; +} + +body h1 { + margin: .0em 0 0 -4%; + line-height: 1.3; + border-bottom: 2px solid silver; +} + +body h2 { + margin: 0.5em 0 0 -4%; + line-height: 1.3; + border-bottom: 2px solid silver; +} + +body h3 { + margin: .8em 0 0 -3%; + line-height: 1.3; +} + +body h4 { + margin: .8em 0 0 -3%; + line-height: 1.3; +} + +body h5 { + margin: .8em 0 0 -2%; + line-height: 1.3; +} + +body h6 { + margin: .8em 0 0 -1%; + line-height: 1.3; +} + +body hr { + border: none; /* Broken on IE6 */ +} +div.footnotes hr { + border: 1px solid silver; +} + +div.navheader th, div.navheader td, div.navfooter td { + font-family: Arial,Helvetica,sans-serif; + font-size: 0.9em; + font-weight: bold; + color: #527bbd; +} +div.navheader img, div.navfooter img { + border-style: none; +} +div.navheader a, div.navfooter a { + font-weight: normal; +} +div.navfooter hr { + border: 1px solid silver; +} + +body td { + line-height: 1.2 +} + +body th { + line-height: 1.2; +} + +ol { + line-height: 1.2; +} + +ul, body dir, body menu { + line-height: 1.2; +} + +html { + margin: 0; + padding: 0; +} + +body h1, body h2, body h3, body h4, body h5, body h6 { + margin-left: 0 +} + +body pre { + margin: 0.5em 10% 0.5em 1em; + line-height: 1.0; + color: navy; +} + +tt.literal, code.literal { + color: navy; +} + +.programlisting, .screen { + border: 1px solid silver; + background: #f4f4f4; + margin: 0.5em 10% 0.5em 0; + padding: 0.5em 1em; +} + +div.sidebar { + background: #ffffee; + margin: 1.0em 10% 0.5em 0; + padding: 0.5em 1em; + border: 1px solid silver; +} +div.sidebar * { padding: 0; } +div.sidebar div { margin: 0; } +div.sidebar p.title { + margin-top: 0.5em; + margin-bottom: 0.2em; +} + +div.bibliomixed { + margin: 0.5em 5% 0.5em 1em; +} + +div.glossary dt { + font-weight: bold; +} +div.glossary dd p { + margin-top: 0.2em; +} + +dl { + margin: .8em 0; + line-height: 1.2; +} + +dt { + margin-top: 0.5em; +} + +dt span.term { + font-style: normal; + color: navy; +} + +div.variablelist dd p { + margin-top: 0; +} + +div.itemizedlist li, div.orderedlist li { + margin-left: -0.8em; + margin-top: 0.5em; +} + +ul, ol { + list-style-position: outside; +} + +div.sidebar ul, div.sidebar ol { + margin-left: 2.8em; +} + +div.itemizedlist p.title, +div.orderedlist p.title, +div.variablelist p.title +{ + margin-bottom: -0.8em; +} + +div.revhistory table { + border-collapse: collapse; + border: none; +} +div.revhistory th { + border: none; + color: #527bbd; + font-family: Arial,Helvetica,sans-serif; +} +div.revhistory td { + border: 1px solid silver; +} + +/* Keep TOC and index lines close together. */ +div.toc dl, div.toc dt, +div.list-of-figures dl, div.list-of-figures dt, +div.list-of-tables dl, div.list-of-tables dt, +div.indexdiv dl, div.indexdiv dt +{ + line-height: normal; + margin-top: 0; + margin-bottom: 0; +} + +/* + Table styling does not work because of overriding attributes in + generated HTML. +*/ +div.table table, +div.informaltable table +{ + margin-left: 0; + margin-right: 5%; + margin-bottom: 0.8em; +} +div.informaltable table +{ + margin-top: 0.4em +} +div.table thead, +div.table tfoot, +div.table tbody, +div.informaltable thead, +div.informaltable tfoot, +div.informaltable tbody +{ + /* No effect in IE6. */ + border-top: 3px solid #527bbd; + border-bottom: 3px solid #527bbd; +} +div.table thead, div.table tfoot, +div.informaltable thead, div.informaltable tfoot +{ + font-weight: bold; +} + +div.mediaobject img { + margin-bottom: 0.8em; +} +div.figure p.title, +div.table p.title +{ + margin-top: 1em; + margin-bottom: 0.4em; +} + +div.calloutlist p +{ + margin-top: 0em; + margin-bottom: 0.4em; +} + +a img { + border-style: none; +} + +@media print { + div.navheader, div.navfooter { display: none; } +} + +span.aqua { color: aqua; } +span.black { color: black; } +span.blue { color: blue; } +span.fuchsia { color: fuchsia; } +span.gray { color: gray; } +span.green { color: green; } +span.lime { color: lime; } +span.maroon { color: maroon; } +span.navy { color: navy; } +span.olive { color: olive; } +span.purple { color: purple; } +span.red { color: red; } +span.silver { color: silver; } +span.teal { color: teal; } +span.white { color: white; } +span.yellow { color: yellow; } + +span.aqua-background { background: aqua; } +span.black-background { background: black; } +span.blue-background { background: blue; } +span.fuchsia-background { background: fuchsia; } +span.gray-background { background: gray; } +span.green-background { background: green; } +span.lime-background { background: lime; } +span.maroon-background { background: maroon; } +span.navy-background { background: navy; } +span.olive-background { background: olive; } +span.purple-background { background: purple; } +span.red-background { background: red; } +span.silver-background { background: silver; } +span.teal-background { background: teal; } +span.white-background { background: white; } +span.yellow-background { background: yellow; } + +span.big { font-size: 2em; } +span.small { font-size: 0.6em; } + +span.underline { text-decoration: underline; } +span.overline { text-decoration: overline; } +span.line-through { text-decoration: line-through; } diff --git a/doc/specs/vulkan/config/vkspec.conf b/doc/specs/vulkan/config/vkspec.conf new file mode 100644 index 00000000..c7d3c17d --- /dev/null +++ b/doc/specs/vulkan/config/vkspec.conf @@ -0,0 +1,109 @@ +# Copyright (c) 2015-2016 The Khronos Group Inc. +# Copyright notice at https://www.khronos.org/registry/speccopyright.html +# +# The 'normative' macros below (can: through shouldnot:) serve mostly +# to tag that those terms have been validated against their normative +# definitions. They ignore any arguments, and don't yet do anything +# but expand to their names. +# +# The remaining macros tag API terms (f = function, s = struct, e = enum, +# p = parameter, t = other type) and expand in various ways determined by +# the name following the = in the macro definition: +# +# 'link' macros format as code and create an xref/link to the target +# 'code' macros format as code, but do not link +# 'strong' macros format as , and do not link +# 'param' macros format as , and do not link + +[macros] +(?su)(?Pcan):(?P\w*)=normative +(?su)(?Pcannot):(?P\w*)=normative +(?su)(?Pmay):(?P\w*)=normative +(?su)(?Pmaynot):(?P\w*)=maynot +(?su)(?Pmust):(?P\w*)=normative +(?su)(?Pmustnot):(?P\w*)=mustnot +(?su)(?Poptional):(?P\w*)=normative +(?su)(?Poptionally):(?P\w*)=normative +(?su)(?Precommend):(?P\w*)=normative +(?su)(?Prequired):(?P\w*)=normative +(?su)(?Pshould):(?P\w*)=normative +(?su)(?Pshouldnot):(?P\w*)=shouldnot +(?su)(?Pflink):(?P\w+)=link +(?su)(?Pfname):(?P\w+)=strong +(?su)(?Pftext):(?P[\w*]+(\.[\w*]+)*)=strong +(?su)(?Psname):(?P\w+)=code +(?su)(?Pslink):(?P\w+)=link +(?su)(?Pstext):(?P[\w*]+(\.[\w*]+)*)=code +(?su)(?Pename):(?P\w+)=code +(?su)(?Pelink):(?P\w+)=link +(?su)(?Petext):(?P[\w*]+(\.[\w*]+)*)=code +(?su)(?Ppname):(?P(\w[\w.]*)*\w+)=param +(?su)(?Pptext):(?P[\w*]+(\.[\w*]+)*)=param +(?su)(?Ptlink):(?P\w+)=link +(?su)(?Ptname):(?P\w+)=strong +(?su)(?Pbasetype):(?P\w+)=code +(?su)(?Pcode):(?P\w+)=strong + +[normative-inlinemacro] +ifdef::basebackend-docbook[] +{name} +endif::basebackend-docbook[] +ifdef::basebackend-html[] +{name} +endif::basebackend-html[] + +[maynot-inlinemacro] +ifdef::basebackend-docbook[] +may not +endif::basebackend-docbook[] +ifdef::basebackend-html[] +may not +endif::basebackend-html[] + +[mustnot-inlinemacro] +ifdef::basebackend-docbook[] +must not +endif::basebackend-docbook[] +ifdef::basebackend-html[] +must not +endif::basebackend-html[] + +[shouldnot-inlinemacro] +ifdef::basebackend-docbook[] +should not +endif::basebackend-docbook[] +ifdef::basebackend-html[] +should not +endif::basebackend-html[] + +[link-inlinemacro] +ifdef::basebackend-docbook[] +{target} +endif::basebackend-docbook[] +ifdef::basebackend-html[] +{target} +endif::basebackend-html[] + +[code-inlinemacro] +ifdef::basebackend-docbook[] +{target} +endif::basebackend-docbook[] +ifdef::basebackend-html[] +{target} +endif::basebackend-html[] + +[strong-inlinemacro] +ifdef::basebackend-docbook[] +{target} +endif::basebackend-docbook[] +ifdef::basebackend-html[] +{target} +endif::basebackend-html[] + +[param-inlinemacro] +ifdef::basebackend-docbook[] +{target} +endif::basebackend-docbook[] +ifdef::basebackend-html[] +{target} +endif::basebackend-html[] diff --git a/doc/specs/vulkan/copyright.txt b/doc/specs/vulkan/copyright.txt new file mode 100644 index 00000000..9d45fbb5 --- /dev/null +++ b/doc/specs/vulkan/copyright.txt @@ -0,0 +1,67 @@ +Copyright (C) 2014-2016 The Khronos Group Inc. All Rights Reserved. + +This specification is protected by copyright laws and contains material proprietary +to the Khronos Group, Inc. It or any components may not be reproduced, republished, +distributed, transmitted, displayed, broadcast or otherwise exploited in any +manner without the express prior written permission of Khronos Group. You may +use this specification for implementing the functionality therein, without altering or +removing any trademark, copyright or other notice from the specification, but the +receipt or possession of this specification does not convey any rights to reproduce, +disclose, or distribute its contents, or to manufacture, use, or sell anything that it +may describe, in whole or in part. + +Khronos Group grants express permission to any current Promoter, Contributor +or Adopter member of Khronos to copy and redistribute UNMODIFIED versions +of this specification in any fashion, provided that NO CHARGE is made for the +specification and the latest available update of the specification for any version +of the API is used whenever possible. Such distributed specification may be reformatted +AS LONG AS the contents of the specification are not changed in any +way. The specification may be incorporated into a product that is sold as long as +such product includes significant independent work developed by the seller. A link +to the current version of this specification on the Khronos Group web-site should +be included whenever possible with specification distributions. + +This specification has been created under the Khronos Intellectual Property Rights Policy, +which is Attachment A of the Khronos Group Membership Agreement available at +www.khronos.org/files/member_agreement.pdf. This specification contains substantially +unmodified functionality from, and is a successor to, Khronos specifications including +OpenGL, OpenGL ES and OpenCL. + +Some parts of this Specification are purely informative and do not define requirements +necessary for compliance and so are outside the Scope of this Specification. These +parts of the Specification are marked by the “Note” icon or designated “Informative”. + +Where this Specification uses terms, defined in the Glossary or otherwise, that refer to +enabling technologies that are not expressly set forth as being required for compliance, +those enabling technologies are outside the Scope of this Specification. + +Where this Specification uses the terms “may”, or “optional”, such features or +behaviors do not define requirements necessary for compliance and so are outside the +Scope of this Specification. + +Where this Specification uses the terms “not required”, such features or +behaviors may be omitted from certain implementations, but when they are included, they +define requirements necessary for compliance and so are INCLUDED in the Scope of this +Specification. + +Where this Specification includes normative references to external documents, the +specifically identified sections and functionality of those external documents are in +Scope. Requirements defined by external documents not created by Khronos may contain +contributions from non-members of Khronos not covered by the Khronos Intellectual +Property Rights Policy. + +Khronos Group makes no, and expressly disclaims any, representations or warranties, +express or implied, regarding this specification, including, without limitation, +any implied warranties of merchantability or fitness for a particular purpose +or non-infringement of any intellectual property. Khronos Group makes no, and +expressly disclaims any, warranties, express or implied, regarding the correctness, +accuracy, completeness, timeliness, and reliability of the specification. Under no +circumstances will the Khronos Group, or any of its Promoters, Contributors or +Members or their respective partners, officers, directors, employees, agents or +representatives be liable for any damages, whether direct, indirect, special or +consequential damages for lost revenues, lost profits, or otherwise, arising from or in +connection with these materials. + +Khronos and {apiname} are trademarks of The Khronos Group Inc. OpenCL is a trademark of +Apple Inc. and OpenGL is a registered trademark of Silicon Graphics International, both +used under license by Khronos. diff --git a/doc/specs/vulkan/enums/VkAccessFlagBits.txt b/doc/specs/vulkan/enums/VkAccessFlagBits.txt new file mode 100644 index 00000000..639dda7b --- /dev/null +++ b/doc/specs/vulkan/enums/VkAccessFlagBits.txt @@ -0,0 +1,29 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkAccessFlagBits,VkAccessFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkAccessFlagBits { + VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001, + VK_ACCESS_INDEX_READ_BIT = 0x00000002, + VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004, + VK_ACCESS_UNIFORM_READ_BIT = 0x00000008, + VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010, + VK_ACCESS_SHADER_READ_BIT = 0x00000020, + VK_ACCESS_SHADER_WRITE_BIT = 0x00000040, + VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080, + VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100, + VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200, + VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400, + VK_ACCESS_TRANSFER_READ_BIT = 0x00000800, + VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000, + VK_ACCESS_HOST_READ_BIT = 0x00002000, + VK_ACCESS_HOST_WRITE_BIT = 0x00004000, + VK_ACCESS_MEMORY_READ_BIT = 0x00008000, + VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000, +} VkAccessFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkAttachmentDescriptionFlagBits.txt b/doc/specs/vulkan/enums/VkAttachmentDescriptionFlagBits.txt new file mode 100644 index 00000000..19e5fdf4 --- /dev/null +++ b/doc/specs/vulkan/enums/VkAttachmentDescriptionFlagBits.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkAttachmentDescriptionFlagBits,VkAttachmentDescriptionFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkAttachmentDescriptionFlagBits { + VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001, +} VkAttachmentDescriptionFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkAttachmentLoadOp.txt b/doc/specs/vulkan/enums/VkAttachmentLoadOp.txt new file mode 100644 index 00000000..41b98018 --- /dev/null +++ b/doc/specs/vulkan/enums/VkAttachmentLoadOp.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkAttachmentLoadOp,VkAttachmentLoadOp]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkAttachmentLoadOp { + VK_ATTACHMENT_LOAD_OP_LOAD = 0, + VK_ATTACHMENT_LOAD_OP_CLEAR = 1, + VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2, +} VkAttachmentLoadOp; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkAttachmentStoreOp.txt b/doc/specs/vulkan/enums/VkAttachmentStoreOp.txt new file mode 100644 index 00000000..83291c12 --- /dev/null +++ b/doc/specs/vulkan/enums/VkAttachmentStoreOp.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkAttachmentStoreOp,VkAttachmentStoreOp]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkAttachmentStoreOp { + VK_ATTACHMENT_STORE_OP_STORE = 0, + VK_ATTACHMENT_STORE_OP_DONT_CARE = 1, +} VkAttachmentStoreOp; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkBlendFactor.txt b/doc/specs/vulkan/enums/VkBlendFactor.txt new file mode 100644 index 00000000..4fc63281 --- /dev/null +++ b/doc/specs/vulkan/enums/VkBlendFactor.txt @@ -0,0 +1,31 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkBlendFactor,VkBlendFactor]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkBlendFactor { + VK_BLEND_FACTOR_ZERO = 0, + VK_BLEND_FACTOR_ONE = 1, + VK_BLEND_FACTOR_SRC_COLOR = 2, + VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3, + VK_BLEND_FACTOR_DST_COLOR = 4, + VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5, + VK_BLEND_FACTOR_SRC_ALPHA = 6, + VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7, + VK_BLEND_FACTOR_DST_ALPHA = 8, + VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9, + VK_BLEND_FACTOR_CONSTANT_COLOR = 10, + VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11, + VK_BLEND_FACTOR_CONSTANT_ALPHA = 12, + VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13, + VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14, + VK_BLEND_FACTOR_SRC1_COLOR = 15, + VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16, + VK_BLEND_FACTOR_SRC1_ALPHA = 17, + VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18, +} VkBlendFactor; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkBlendOp.txt b/doc/specs/vulkan/enums/VkBlendOp.txt new file mode 100644 index 00000000..50f6e1f2 --- /dev/null +++ b/doc/specs/vulkan/enums/VkBlendOp.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkBlendOp,VkBlendOp]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkBlendOp { + VK_BLEND_OP_ADD = 0, + VK_BLEND_OP_SUBTRACT = 1, + VK_BLEND_OP_REVERSE_SUBTRACT = 2, + VK_BLEND_OP_MIN = 3, + VK_BLEND_OP_MAX = 4, +} VkBlendOp; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkBorderColor.txt b/doc/specs/vulkan/enums/VkBorderColor.txt new file mode 100644 index 00000000..3e694876 --- /dev/null +++ b/doc/specs/vulkan/enums/VkBorderColor.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkBorderColor,VkBorderColor]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkBorderColor { + VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0, + VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1, + VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2, + VK_BORDER_COLOR_INT_OPAQUE_BLACK = 3, + VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4, + VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5, +} VkBorderColor; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkBufferCreateFlagBits.txt b/doc/specs/vulkan/enums/VkBufferCreateFlagBits.txt new file mode 100644 index 00000000..dec9bdc4 --- /dev/null +++ b/doc/specs/vulkan/enums/VkBufferCreateFlagBits.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkBufferCreateFlagBits,VkBufferCreateFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkBufferCreateFlagBits { + VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, + VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, + VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, +} VkBufferCreateFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkBufferUsageFlagBits.txt b/doc/specs/vulkan/enums/VkBufferUsageFlagBits.txt new file mode 100644 index 00000000..bc8c45c0 --- /dev/null +++ b/doc/specs/vulkan/enums/VkBufferUsageFlagBits.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkBufferUsageFlagBits,VkBufferUsageFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkBufferUsageFlagBits { + VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, + VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, + VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, + VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, + VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, + VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, + VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, + VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, + VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, +} VkBufferUsageFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkColorComponentFlagBits.txt b/doc/specs/vulkan/enums/VkColorComponentFlagBits.txt new file mode 100644 index 00000000..4554ec01 --- /dev/null +++ b/doc/specs/vulkan/enums/VkColorComponentFlagBits.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkColorComponentFlagBits,VkColorComponentFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkColorComponentFlagBits { + VK_COLOR_COMPONENT_R_BIT = 0x00000001, + VK_COLOR_COMPONENT_G_BIT = 0x00000002, + VK_COLOR_COMPONENT_B_BIT = 0x00000004, + VK_COLOR_COMPONENT_A_BIT = 0x00000008, +} VkColorComponentFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkCommandBufferLevel.txt b/doc/specs/vulkan/enums/VkCommandBufferLevel.txt new file mode 100644 index 00000000..fa78754e --- /dev/null +++ b/doc/specs/vulkan/enums/VkCommandBufferLevel.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkCommandBufferLevel,VkCommandBufferLevel]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkCommandBufferLevel { + VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0, + VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1, +} VkCommandBufferLevel; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkCommandBufferResetFlagBits.txt b/doc/specs/vulkan/enums/VkCommandBufferResetFlagBits.txt new file mode 100644 index 00000000..e1ac6049 --- /dev/null +++ b/doc/specs/vulkan/enums/VkCommandBufferResetFlagBits.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkCommandBufferResetFlagBits,VkCommandBufferResetFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkCommandBufferResetFlagBits { + VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, +} VkCommandBufferResetFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkCommandBufferUsageFlagBits.txt b/doc/specs/vulkan/enums/VkCommandBufferUsageFlagBits.txt new file mode 100644 index 00000000..04df0b8c --- /dev/null +++ b/doc/specs/vulkan/enums/VkCommandBufferUsageFlagBits.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkCommandBufferUsageFlagBits,VkCommandBufferUsageFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkCommandBufferUsageFlagBits { + VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001, + VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002, + VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004, +} VkCommandBufferUsageFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkCommandPoolCreateFlagBits.txt b/doc/specs/vulkan/enums/VkCommandPoolCreateFlagBits.txt new file mode 100644 index 00000000..a25e8150 --- /dev/null +++ b/doc/specs/vulkan/enums/VkCommandPoolCreateFlagBits.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkCommandPoolCreateFlagBits,VkCommandPoolCreateFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkCommandPoolCreateFlagBits { + VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, + VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, +} VkCommandPoolCreateFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkCommandPoolResetFlagBits.txt b/doc/specs/vulkan/enums/VkCommandPoolResetFlagBits.txt new file mode 100644 index 00000000..0927d771 --- /dev/null +++ b/doc/specs/vulkan/enums/VkCommandPoolResetFlagBits.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkCommandPoolResetFlagBits,VkCommandPoolResetFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkCommandPoolResetFlagBits { + VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, +} VkCommandPoolResetFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkCompareOp.txt b/doc/specs/vulkan/enums/VkCompareOp.txt new file mode 100644 index 00000000..18b3f94c --- /dev/null +++ b/doc/specs/vulkan/enums/VkCompareOp.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkCompareOp,VkCompareOp]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkCompareOp { + VK_COMPARE_OP_NEVER = 0, + VK_COMPARE_OP_LESS = 1, + VK_COMPARE_OP_EQUAL = 2, + VK_COMPARE_OP_LESS_OR_EQUAL = 3, + VK_COMPARE_OP_GREATER = 4, + VK_COMPARE_OP_NOT_EQUAL = 5, + VK_COMPARE_OP_GREATER_OR_EQUAL = 6, + VK_COMPARE_OP_ALWAYS = 7, +} VkCompareOp; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkComponentSwizzle.txt b/doc/specs/vulkan/enums/VkComponentSwizzle.txt new file mode 100644 index 00000000..cd5e8da0 --- /dev/null +++ b/doc/specs/vulkan/enums/VkComponentSwizzle.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkComponentSwizzle,VkComponentSwizzle]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkComponentSwizzle { + VK_COMPONENT_SWIZZLE_IDENTITY = 0, + VK_COMPONENT_SWIZZLE_ZERO = 1, + VK_COMPONENT_SWIZZLE_ONE = 2, + VK_COMPONENT_SWIZZLE_R = 3, + VK_COMPONENT_SWIZZLE_G = 4, + VK_COMPONENT_SWIZZLE_B = 5, + VK_COMPONENT_SWIZZLE_A = 6, +} VkComponentSwizzle; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkCullModeFlagBits.txt b/doc/specs/vulkan/enums/VkCullModeFlagBits.txt new file mode 100644 index 00000000..72d142ca --- /dev/null +++ b/doc/specs/vulkan/enums/VkCullModeFlagBits.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkCullModeFlagBits,VkCullModeFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkCullModeFlagBits { + VK_CULL_MODE_NONE = 0, + VK_CULL_MODE_FRONT_BIT = 0x00000001, + VK_CULL_MODE_BACK_BIT = 0x00000002, + VK_CULL_MODE_FRONT_AND_BACK = 0x3, +} VkCullModeFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkDependencyFlagBits.txt b/doc/specs/vulkan/enums/VkDependencyFlagBits.txt new file mode 100644 index 00000000..6f7bb8ba --- /dev/null +++ b/doc/specs/vulkan/enums/VkDependencyFlagBits.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDependencyFlagBits,VkDependencyFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkDependencyFlagBits { + VK_DEPENDENCY_BY_REGION_BIT = 0x00000001, +} VkDependencyFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkDescriptorPoolCreateFlagBits.txt b/doc/specs/vulkan/enums/VkDescriptorPoolCreateFlagBits.txt new file mode 100644 index 00000000..d9dd3e6f --- /dev/null +++ b/doc/specs/vulkan/enums/VkDescriptorPoolCreateFlagBits.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDescriptorPoolCreateFlagBits,VkDescriptorPoolCreateFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkDescriptorPoolCreateFlagBits { + VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001, +} VkDescriptorPoolCreateFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkDescriptorType.txt b/doc/specs/vulkan/enums/VkDescriptorType.txt new file mode 100644 index 00000000..bbee4ba9 --- /dev/null +++ b/doc/specs/vulkan/enums/VkDescriptorType.txt @@ -0,0 +1,23 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDescriptorType,VkDescriptorType]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkDescriptorType { + VK_DESCRIPTOR_TYPE_SAMPLER = 0, + VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1, + VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2, + VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 3, + VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 4, + VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 5, + VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 6, + VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7, + VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 8, + VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 9, + VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 10, +} VkDescriptorType; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkDynamicState.txt b/doc/specs/vulkan/enums/VkDynamicState.txt new file mode 100644 index 00000000..103fa584 --- /dev/null +++ b/doc/specs/vulkan/enums/VkDynamicState.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDynamicState,VkDynamicState]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkDynamicState { + VK_DYNAMIC_STATE_VIEWPORT = 0, + VK_DYNAMIC_STATE_SCISSOR = 1, + VK_DYNAMIC_STATE_LINE_WIDTH = 2, + VK_DYNAMIC_STATE_DEPTH_BIAS = 3, + VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4, + VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5, + VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6, + VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7, + VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8, +} VkDynamicState; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkFenceCreateFlagBits.txt b/doc/specs/vulkan/enums/VkFenceCreateFlagBits.txt new file mode 100644 index 00000000..955fd1bb --- /dev/null +++ b/doc/specs/vulkan/enums/VkFenceCreateFlagBits.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkFenceCreateFlagBits,VkFenceCreateFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkFenceCreateFlagBits { + VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001, +} VkFenceCreateFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkFilter.txt b/doc/specs/vulkan/enums/VkFilter.txt new file mode 100644 index 00000000..1800c83e --- /dev/null +++ b/doc/specs/vulkan/enums/VkFilter.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkFilter,VkFilter]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkFilter { + VK_FILTER_NEAREST = 0, + VK_FILTER_LINEAR = 1, +} VkFilter; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkFormat.txt b/doc/specs/vulkan/enums/VkFormat.txt new file mode 100644 index 00000000..a585d235 --- /dev/null +++ b/doc/specs/vulkan/enums/VkFormat.txt @@ -0,0 +1,197 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkFormat,VkFormat]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkFormat { + VK_FORMAT_UNDEFINED = 0, + VK_FORMAT_R4G4_UNORM_PACK8 = 1, + VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2, + VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3, + VK_FORMAT_R5G6B5_UNORM_PACK16 = 4, + VK_FORMAT_B5G6R5_UNORM_PACK16 = 5, + VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6, + VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7, + VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8, + VK_FORMAT_R8_UNORM = 9, + VK_FORMAT_R8_SNORM = 10, + VK_FORMAT_R8_USCALED = 11, + VK_FORMAT_R8_SSCALED = 12, + VK_FORMAT_R8_UINT = 13, + VK_FORMAT_R8_SINT = 14, + VK_FORMAT_R8_SRGB = 15, + VK_FORMAT_R8G8_UNORM = 16, + VK_FORMAT_R8G8_SNORM = 17, + VK_FORMAT_R8G8_USCALED = 18, + VK_FORMAT_R8G8_SSCALED = 19, + VK_FORMAT_R8G8_UINT = 20, + VK_FORMAT_R8G8_SINT = 21, + VK_FORMAT_R8G8_SRGB = 22, + VK_FORMAT_R8G8B8_UNORM = 23, + VK_FORMAT_R8G8B8_SNORM = 24, + VK_FORMAT_R8G8B8_USCALED = 25, + VK_FORMAT_R8G8B8_SSCALED = 26, + VK_FORMAT_R8G8B8_UINT = 27, + VK_FORMAT_R8G8B8_SINT = 28, + VK_FORMAT_R8G8B8_SRGB = 29, + VK_FORMAT_B8G8R8_UNORM = 30, + VK_FORMAT_B8G8R8_SNORM = 31, + VK_FORMAT_B8G8R8_USCALED = 32, + VK_FORMAT_B8G8R8_SSCALED = 33, + VK_FORMAT_B8G8R8_UINT = 34, + VK_FORMAT_B8G8R8_SINT = 35, + VK_FORMAT_B8G8R8_SRGB = 36, + VK_FORMAT_R8G8B8A8_UNORM = 37, + VK_FORMAT_R8G8B8A8_SNORM = 38, + VK_FORMAT_R8G8B8A8_USCALED = 39, + VK_FORMAT_R8G8B8A8_SSCALED = 40, + VK_FORMAT_R8G8B8A8_UINT = 41, + VK_FORMAT_R8G8B8A8_SINT = 42, + VK_FORMAT_R8G8B8A8_SRGB = 43, + VK_FORMAT_B8G8R8A8_UNORM = 44, + VK_FORMAT_B8G8R8A8_SNORM = 45, + VK_FORMAT_B8G8R8A8_USCALED = 46, + VK_FORMAT_B8G8R8A8_SSCALED = 47, + VK_FORMAT_B8G8R8A8_UINT = 48, + VK_FORMAT_B8G8R8A8_SINT = 49, + VK_FORMAT_B8G8R8A8_SRGB = 50, + VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51, + VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52, + VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53, + VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54, + VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55, + VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56, + VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57, + VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58, + VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59, + VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60, + VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61, + VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62, + VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63, + VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64, + VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65, + VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66, + VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67, + VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68, + VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69, + VK_FORMAT_R16_UNORM = 70, + VK_FORMAT_R16_SNORM = 71, + VK_FORMAT_R16_USCALED = 72, + VK_FORMAT_R16_SSCALED = 73, + VK_FORMAT_R16_UINT = 74, + VK_FORMAT_R16_SINT = 75, + VK_FORMAT_R16_SFLOAT = 76, + VK_FORMAT_R16G16_UNORM = 77, + VK_FORMAT_R16G16_SNORM = 78, + VK_FORMAT_R16G16_USCALED = 79, + VK_FORMAT_R16G16_SSCALED = 80, + VK_FORMAT_R16G16_UINT = 81, + VK_FORMAT_R16G16_SINT = 82, + VK_FORMAT_R16G16_SFLOAT = 83, + VK_FORMAT_R16G16B16_UNORM = 84, + VK_FORMAT_R16G16B16_SNORM = 85, + VK_FORMAT_R16G16B16_USCALED = 86, + VK_FORMAT_R16G16B16_SSCALED = 87, + VK_FORMAT_R16G16B16_UINT = 88, + VK_FORMAT_R16G16B16_SINT = 89, + VK_FORMAT_R16G16B16_SFLOAT = 90, + VK_FORMAT_R16G16B16A16_UNORM = 91, + VK_FORMAT_R16G16B16A16_SNORM = 92, + VK_FORMAT_R16G16B16A16_USCALED = 93, + VK_FORMAT_R16G16B16A16_SSCALED = 94, + VK_FORMAT_R16G16B16A16_UINT = 95, + VK_FORMAT_R16G16B16A16_SINT = 96, + VK_FORMAT_R16G16B16A16_SFLOAT = 97, + VK_FORMAT_R32_UINT = 98, + VK_FORMAT_R32_SINT = 99, + VK_FORMAT_R32_SFLOAT = 100, + VK_FORMAT_R32G32_UINT = 101, + VK_FORMAT_R32G32_SINT = 102, + VK_FORMAT_R32G32_SFLOAT = 103, + VK_FORMAT_R32G32B32_UINT = 104, + VK_FORMAT_R32G32B32_SINT = 105, + VK_FORMAT_R32G32B32_SFLOAT = 106, + VK_FORMAT_R32G32B32A32_UINT = 107, + VK_FORMAT_R32G32B32A32_SINT = 108, + VK_FORMAT_R32G32B32A32_SFLOAT = 109, + VK_FORMAT_R64_UINT = 110, + VK_FORMAT_R64_SINT = 111, + VK_FORMAT_R64_SFLOAT = 112, + VK_FORMAT_R64G64_UINT = 113, + VK_FORMAT_R64G64_SINT = 114, + VK_FORMAT_R64G64_SFLOAT = 115, + VK_FORMAT_R64G64B64_UINT = 116, + VK_FORMAT_R64G64B64_SINT = 117, + VK_FORMAT_R64G64B64_SFLOAT = 118, + VK_FORMAT_R64G64B64A64_UINT = 119, + VK_FORMAT_R64G64B64A64_SINT = 120, + VK_FORMAT_R64G64B64A64_SFLOAT = 121, + VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122, + VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123, + VK_FORMAT_D16_UNORM = 124, + VK_FORMAT_X8_D24_UNORM_PACK32 = 125, + VK_FORMAT_D32_SFLOAT = 126, + VK_FORMAT_S8_UINT = 127, + VK_FORMAT_D16_UNORM_S8_UINT = 128, + VK_FORMAT_D24_UNORM_S8_UINT = 129, + VK_FORMAT_D32_SFLOAT_S8_UINT = 130, + VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131, + VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132, + VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133, + VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134, + VK_FORMAT_BC2_UNORM_BLOCK = 135, + VK_FORMAT_BC2_SRGB_BLOCK = 136, + VK_FORMAT_BC3_UNORM_BLOCK = 137, + VK_FORMAT_BC3_SRGB_BLOCK = 138, + VK_FORMAT_BC4_UNORM_BLOCK = 139, + VK_FORMAT_BC4_SNORM_BLOCK = 140, + VK_FORMAT_BC5_UNORM_BLOCK = 141, + VK_FORMAT_BC5_SNORM_BLOCK = 142, + VK_FORMAT_BC6H_UFLOAT_BLOCK = 143, + VK_FORMAT_BC6H_SFLOAT_BLOCK = 144, + VK_FORMAT_BC7_UNORM_BLOCK = 145, + VK_FORMAT_BC7_SRGB_BLOCK = 146, + VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147, + VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148, + VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149, + VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150, + VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151, + VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152, + VK_FORMAT_EAC_R11_UNORM_BLOCK = 153, + VK_FORMAT_EAC_R11_SNORM_BLOCK = 154, + VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155, + VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156, + VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157, + VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158, + VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159, + VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160, + VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161, + VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162, + VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163, + VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164, + VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165, + VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166, + VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167, + VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168, + VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169, + VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170, + VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171, + VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172, + VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173, + VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174, + VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175, + VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176, + VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177, + VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178, + VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179, + VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180, + VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181, + VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182, + VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183, + VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184, +} VkFormat; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkFormatFeatureFlagBits.txt b/doc/specs/vulkan/enums/VkFormatFeatureFlagBits.txt new file mode 100644 index 00000000..345fc229 --- /dev/null +++ b/doc/specs/vulkan/enums/VkFormatFeatureFlagBits.txt @@ -0,0 +1,25 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkFormatFeatureFlagBits,VkFormatFeatureFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkFormatFeatureFlagBits { + VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, + VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, + VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, + VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, + VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, + VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, + VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, + VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, + VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, + VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, + VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, + VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800, + VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000, +} VkFormatFeatureFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkFrontFace.txt b/doc/specs/vulkan/enums/VkFrontFace.txt new file mode 100644 index 00000000..66f237c0 --- /dev/null +++ b/doc/specs/vulkan/enums/VkFrontFace.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkFrontFace,VkFrontFace]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkFrontFace { + VK_FRONT_FACE_COUNTER_CLOCKWISE = 0, + VK_FRONT_FACE_CLOCKWISE = 1, +} VkFrontFace; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkImageAspectFlagBits.txt b/doc/specs/vulkan/enums/VkImageAspectFlagBits.txt new file mode 100644 index 00000000..61990408 --- /dev/null +++ b/doc/specs/vulkan/enums/VkImageAspectFlagBits.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageAspectFlagBits,VkImageAspectFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkImageAspectFlagBits { + VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001, + VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, + VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, + VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008, +} VkImageAspectFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkImageCreateFlagBits.txt b/doc/specs/vulkan/enums/VkImageCreateFlagBits.txt new file mode 100644 index 00000000..75dafb72 --- /dev/null +++ b/doc/specs/vulkan/enums/VkImageCreateFlagBits.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageCreateFlagBits,VkImageCreateFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkImageCreateFlagBits { + VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, + VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, + VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004, + VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, + VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010, +} VkImageCreateFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkImageLayout.txt b/doc/specs/vulkan/enums/VkImageLayout.txt new file mode 100644 index 00000000..817e9664 --- /dev/null +++ b/doc/specs/vulkan/enums/VkImageLayout.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageLayout,VkImageLayout]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkImageLayout { + VK_IMAGE_LAYOUT_UNDEFINED = 0, + VK_IMAGE_LAYOUT_GENERAL = 1, + VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2, + VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3, + VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4, + VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5, + VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6, + VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7, + VK_IMAGE_LAYOUT_PREINITIALIZED = 8, +} VkImageLayout; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkImageTiling.txt b/doc/specs/vulkan/enums/VkImageTiling.txt new file mode 100644 index 00000000..03d2c67f --- /dev/null +++ b/doc/specs/vulkan/enums/VkImageTiling.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageTiling,VkImageTiling]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkImageTiling { + VK_IMAGE_TILING_OPTIMAL = 0, + VK_IMAGE_TILING_LINEAR = 1, +} VkImageTiling; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkImageType.txt b/doc/specs/vulkan/enums/VkImageType.txt new file mode 100644 index 00000000..976ea74c --- /dev/null +++ b/doc/specs/vulkan/enums/VkImageType.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageType,VkImageType]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkImageType { + VK_IMAGE_TYPE_1D = 0, + VK_IMAGE_TYPE_2D = 1, + VK_IMAGE_TYPE_3D = 2, +} VkImageType; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkImageUsageFlagBits.txt b/doc/specs/vulkan/enums/VkImageUsageFlagBits.txt new file mode 100644 index 00000000..7e200cdc --- /dev/null +++ b/doc/specs/vulkan/enums/VkImageUsageFlagBits.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageUsageFlagBits,VkImageUsageFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkImageUsageFlagBits { + VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, + VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, + VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, + VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, + VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, + VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, + VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, + VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, +} VkImageUsageFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkImageViewType.txt b/doc/specs/vulkan/enums/VkImageViewType.txt new file mode 100644 index 00000000..0a9eb697 --- /dev/null +++ b/doc/specs/vulkan/enums/VkImageViewType.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageViewType,VkImageViewType]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkImageViewType { + VK_IMAGE_VIEW_TYPE_1D = 0, + VK_IMAGE_VIEW_TYPE_2D = 1, + VK_IMAGE_VIEW_TYPE_3D = 2, + VK_IMAGE_VIEW_TYPE_CUBE = 3, + VK_IMAGE_VIEW_TYPE_1D_ARRAY = 4, + VK_IMAGE_VIEW_TYPE_2D_ARRAY = 5, + VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 6, +} VkImageViewType; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkIndexType.txt b/doc/specs/vulkan/enums/VkIndexType.txt new file mode 100644 index 00000000..e11e380f --- /dev/null +++ b/doc/specs/vulkan/enums/VkIndexType.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkIndexType,VkIndexType]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkIndexType { + VK_INDEX_TYPE_UINT16 = 0, + VK_INDEX_TYPE_UINT32 = 1, +} VkIndexType; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkInternalAllocationType.txt b/doc/specs/vulkan/enums/VkInternalAllocationType.txt new file mode 100644 index 00000000..d8af6cf8 --- /dev/null +++ b/doc/specs/vulkan/enums/VkInternalAllocationType.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkInternalAllocationType,VkInternalAllocationType]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkInternalAllocationType { + VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0, +} VkInternalAllocationType; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkLogicOp.txt b/doc/specs/vulkan/enums/VkLogicOp.txt new file mode 100644 index 00000000..728402eb --- /dev/null +++ b/doc/specs/vulkan/enums/VkLogicOp.txt @@ -0,0 +1,28 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkLogicOp,VkLogicOp]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkLogicOp { + VK_LOGIC_OP_CLEAR = 0, + VK_LOGIC_OP_AND = 1, + VK_LOGIC_OP_AND_REVERSE = 2, + VK_LOGIC_OP_COPY = 3, + VK_LOGIC_OP_AND_INVERTED = 4, + VK_LOGIC_OP_NO_OP = 5, + VK_LOGIC_OP_XOR = 6, + VK_LOGIC_OP_OR = 7, + VK_LOGIC_OP_NOR = 8, + VK_LOGIC_OP_EQUIVALENT = 9, + VK_LOGIC_OP_INVERT = 10, + VK_LOGIC_OP_OR_REVERSE = 11, + VK_LOGIC_OP_COPY_INVERTED = 12, + VK_LOGIC_OP_OR_INVERTED = 13, + VK_LOGIC_OP_NAND = 14, + VK_LOGIC_OP_SET = 15, +} VkLogicOp; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkMemoryHeapFlagBits.txt b/doc/specs/vulkan/enums/VkMemoryHeapFlagBits.txt new file mode 100644 index 00000000..61adb8a5 --- /dev/null +++ b/doc/specs/vulkan/enums/VkMemoryHeapFlagBits.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkMemoryHeapFlagBits,VkMemoryHeapFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkMemoryHeapFlagBits { + VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001, +} VkMemoryHeapFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkMemoryPropertyFlagBits.txt b/doc/specs/vulkan/enums/VkMemoryPropertyFlagBits.txt new file mode 100644 index 00000000..dfd55c24 --- /dev/null +++ b/doc/specs/vulkan/enums/VkMemoryPropertyFlagBits.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkMemoryPropertyFlagBits,VkMemoryPropertyFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkMemoryPropertyFlagBits { + VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001, + VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002, + VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004, + VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008, + VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010, +} VkMemoryPropertyFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkPhysicalDeviceType.txt b/doc/specs/vulkan/enums/VkPhysicalDeviceType.txt new file mode 100644 index 00000000..ce452c84 --- /dev/null +++ b/doc/specs/vulkan/enums/VkPhysicalDeviceType.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPhysicalDeviceType,VkPhysicalDeviceType]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkPhysicalDeviceType { + VK_PHYSICAL_DEVICE_TYPE_OTHER = 0, + VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1, + VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2, + VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 3, + VK_PHYSICAL_DEVICE_TYPE_CPU = 4, +} VkPhysicalDeviceType; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkPipelineBindPoint.txt b/doc/specs/vulkan/enums/VkPipelineBindPoint.txt new file mode 100644 index 00000000..58f57af7 --- /dev/null +++ b/doc/specs/vulkan/enums/VkPipelineBindPoint.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineBindPoint,VkPipelineBindPoint]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkPipelineBindPoint { + VK_PIPELINE_BIND_POINT_GRAPHICS = 0, + VK_PIPELINE_BIND_POINT_COMPUTE = 1, +} VkPipelineBindPoint; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkPipelineCacheHeaderVersion.txt b/doc/specs/vulkan/enums/VkPipelineCacheHeaderVersion.txt new file mode 100644 index 00000000..44124680 --- /dev/null +++ b/doc/specs/vulkan/enums/VkPipelineCacheHeaderVersion.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineCacheHeaderVersion,VkPipelineCacheHeaderVersion]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkPipelineCacheHeaderVersion { + VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1, +} VkPipelineCacheHeaderVersion; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkPipelineCreateFlagBits.txt b/doc/specs/vulkan/enums/VkPipelineCreateFlagBits.txt new file mode 100644 index 00000000..f17ef59e --- /dev/null +++ b/doc/specs/vulkan/enums/VkPipelineCreateFlagBits.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineCreateFlagBits,VkPipelineCreateFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkPipelineCreateFlagBits { + VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001, + VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002, + VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004, +} VkPipelineCreateFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkPipelineStageFlagBits.txt b/doc/specs/vulkan/enums/VkPipelineStageFlagBits.txt new file mode 100644 index 00000000..ac88e8c5 --- /dev/null +++ b/doc/specs/vulkan/enums/VkPipelineStageFlagBits.txt @@ -0,0 +1,29 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineStageFlagBits,VkPipelineStageFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkPipelineStageFlagBits { + VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, + VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, + VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, + VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, + VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, + VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, + VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, + VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, + VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, + VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, + VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, + VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, + VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, + VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000, + VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, + VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, + VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, +} VkPipelineStageFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkPolygonMode.txt b/doc/specs/vulkan/enums/VkPolygonMode.txt new file mode 100644 index 00000000..0774a56a --- /dev/null +++ b/doc/specs/vulkan/enums/VkPolygonMode.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPolygonMode,VkPolygonMode]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkPolygonMode { + VK_POLYGON_MODE_FILL = 0, + VK_POLYGON_MODE_LINE = 1, + VK_POLYGON_MODE_POINT = 2, +} VkPolygonMode; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkPrimitiveTopology.txt b/doc/specs/vulkan/enums/VkPrimitiveTopology.txt new file mode 100644 index 00000000..cae52474 --- /dev/null +++ b/doc/specs/vulkan/enums/VkPrimitiveTopology.txt @@ -0,0 +1,23 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPrimitiveTopology,VkPrimitiveTopology]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkPrimitiveTopology { + VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0, + VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1, + VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2, + VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3, + VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4, + VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5, + VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6, + VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7, + VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8, + VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9, + VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10, +} VkPrimitiveTopology; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkQueryControlFlagBits.txt b/doc/specs/vulkan/enums/VkQueryControlFlagBits.txt new file mode 100644 index 00000000..6f931822 --- /dev/null +++ b/doc/specs/vulkan/enums/VkQueryControlFlagBits.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkQueryControlFlagBits,VkQueryControlFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkQueryControlFlagBits { + VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001, +} VkQueryControlFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkQueryPipelineStatisticFlagBits.txt b/doc/specs/vulkan/enums/VkQueryPipelineStatisticFlagBits.txt new file mode 100644 index 00000000..d757bfa6 --- /dev/null +++ b/doc/specs/vulkan/enums/VkQueryPipelineStatisticFlagBits.txt @@ -0,0 +1,23 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkQueryPipelineStatisticFlagBits,VkQueryPipelineStatisticFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkQueryPipelineStatisticFlagBits { + VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, + VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, + VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, + VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, + VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, + VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, + VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, + VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, + VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, + VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, + VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, +} VkQueryPipelineStatisticFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkQueryResultFlagBits.txt b/doc/specs/vulkan/enums/VkQueryResultFlagBits.txt new file mode 100644 index 00000000..58cd1983 --- /dev/null +++ b/doc/specs/vulkan/enums/VkQueryResultFlagBits.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkQueryResultFlagBits,VkQueryResultFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkQueryResultFlagBits { + VK_QUERY_RESULT_64_BIT = 0x00000001, + VK_QUERY_RESULT_WAIT_BIT = 0x00000002, + VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, + VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, +} VkQueryResultFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkQueryType.txt b/doc/specs/vulkan/enums/VkQueryType.txt new file mode 100644 index 00000000..64e1d796 --- /dev/null +++ b/doc/specs/vulkan/enums/VkQueryType.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkQueryType,VkQueryType]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkQueryType { + VK_QUERY_TYPE_OCCLUSION = 0, + VK_QUERY_TYPE_PIPELINE_STATISTICS = 1, + VK_QUERY_TYPE_TIMESTAMP = 2, +} VkQueryType; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkQueueFlagBits.txt b/doc/specs/vulkan/enums/VkQueueFlagBits.txt new file mode 100644 index 00000000..e659bd25 --- /dev/null +++ b/doc/specs/vulkan/enums/VkQueueFlagBits.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkQueueFlagBits,VkQueueFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkQueueFlagBits { + VK_QUEUE_GRAPHICS_BIT = 0x00000001, + VK_QUEUE_COMPUTE_BIT = 0x00000002, + VK_QUEUE_TRANSFER_BIT = 0x00000004, + VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, +} VkQueueFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkResult.txt b/doc/specs/vulkan/enums/VkResult.txt new file mode 100644 index 00000000..abada18b --- /dev/null +++ b/doc/specs/vulkan/enums/VkResult.txt @@ -0,0 +1,29 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkResult,VkResult]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkResult { + VK_SUCCESS = 0, + VK_NOT_READY = 1, + VK_TIMEOUT = 2, + VK_EVENT_SET = 3, + VK_EVENT_RESET = 4, + VK_INCOMPLETE = 5, + VK_ERROR_OUT_OF_HOST_MEMORY = -1, + VK_ERROR_OUT_OF_DEVICE_MEMORY = -2, + VK_ERROR_INITIALIZATION_FAILED = -3, + VK_ERROR_DEVICE_LOST = -4, + VK_ERROR_MEMORY_MAP_FAILED = -5, + VK_ERROR_LAYER_NOT_PRESENT = -6, + VK_ERROR_EXTENSION_NOT_PRESENT = -7, + VK_ERROR_FEATURE_NOT_PRESENT = -8, + VK_ERROR_INCOMPATIBLE_DRIVER = -9, + VK_ERROR_TOO_MANY_OBJECTS = -10, + VK_ERROR_FORMAT_NOT_SUPPORTED = -11, +} VkResult; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkSampleCountFlagBits.txt b/doc/specs/vulkan/enums/VkSampleCountFlagBits.txt new file mode 100644 index 00000000..bc336985 --- /dev/null +++ b/doc/specs/vulkan/enums/VkSampleCountFlagBits.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSampleCountFlagBits,VkSampleCountFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkSampleCountFlagBits { + VK_SAMPLE_COUNT_1_BIT = 0x00000001, + VK_SAMPLE_COUNT_2_BIT = 0x00000002, + VK_SAMPLE_COUNT_4_BIT = 0x00000004, + VK_SAMPLE_COUNT_8_BIT = 0x00000008, + VK_SAMPLE_COUNT_16_BIT = 0x00000010, + VK_SAMPLE_COUNT_32_BIT = 0x00000020, + VK_SAMPLE_COUNT_64_BIT = 0x00000040, +} VkSampleCountFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkSamplerAddressMode.txt b/doc/specs/vulkan/enums/VkSamplerAddressMode.txt new file mode 100644 index 00000000..1ff7a8c2 --- /dev/null +++ b/doc/specs/vulkan/enums/VkSamplerAddressMode.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSamplerAddressMode,VkSamplerAddressMode]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkSamplerAddressMode { + VK_SAMPLER_ADDRESS_MODE_REPEAT = 0, + VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1, + VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2, + VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3, + VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 4, +} VkSamplerAddressMode; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkSamplerMipmapMode.txt b/doc/specs/vulkan/enums/VkSamplerMipmapMode.txt new file mode 100644 index 00000000..174a8102 --- /dev/null +++ b/doc/specs/vulkan/enums/VkSamplerMipmapMode.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSamplerMipmapMode,VkSamplerMipmapMode]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkSamplerMipmapMode { + VK_SAMPLER_MIPMAP_MODE_NEAREST = 0, + VK_SAMPLER_MIPMAP_MODE_LINEAR = 1, +} VkSamplerMipmapMode; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkShaderStageFlagBits.txt b/doc/specs/vulkan/enums/VkShaderStageFlagBits.txt new file mode 100644 index 00000000..59582dce --- /dev/null +++ b/doc/specs/vulkan/enums/VkShaderStageFlagBits.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkShaderStageFlagBits,VkShaderStageFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkShaderStageFlagBits { + VK_SHADER_STAGE_VERTEX_BIT = 0x00000001, + VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002, + VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004, + VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008, + VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010, + VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020, + VK_SHADER_STAGE_ALL_GRAPHICS = 0x1F, + VK_SHADER_STAGE_ALL = 0x7FFFFFFF, +} VkShaderStageFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkSharingMode.txt b/doc/specs/vulkan/enums/VkSharingMode.txt new file mode 100644 index 00000000..d85e4549 --- /dev/null +++ b/doc/specs/vulkan/enums/VkSharingMode.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSharingMode,VkSharingMode]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkSharingMode { + VK_SHARING_MODE_EXCLUSIVE = 0, + VK_SHARING_MODE_CONCURRENT = 1, +} VkSharingMode; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkSparseImageFormatFlagBits.txt b/doc/specs/vulkan/enums/VkSparseImageFormatFlagBits.txt new file mode 100644 index 00000000..09d2c650 --- /dev/null +++ b/doc/specs/vulkan/enums/VkSparseImageFormatFlagBits.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSparseImageFormatFlagBits,VkSparseImageFormatFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkSparseImageFormatFlagBits { + VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, + VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 0x00000002, + VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, +} VkSparseImageFormatFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkSparseMemoryBindFlagBits.txt b/doc/specs/vulkan/enums/VkSparseMemoryBindFlagBits.txt new file mode 100644 index 00000000..bc080e5f --- /dev/null +++ b/doc/specs/vulkan/enums/VkSparseMemoryBindFlagBits.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSparseMemoryBindFlagBits,VkSparseMemoryBindFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkSparseMemoryBindFlagBits { + VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001, +} VkSparseMemoryBindFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkStencilFaceFlagBits.txt b/doc/specs/vulkan/enums/VkStencilFaceFlagBits.txt new file mode 100644 index 00000000..2366ce2f --- /dev/null +++ b/doc/specs/vulkan/enums/VkStencilFaceFlagBits.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkStencilFaceFlagBits,VkStencilFaceFlagBits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkStencilFaceFlagBits { + VK_STENCIL_FACE_FRONT_BIT = 0x00000001, + VK_STENCIL_FACE_BACK_BIT = 0x00000002, + VK_STENCIL_FRONT_AND_BACK = 0x3, +} VkStencilFaceFlagBits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkStencilOp.txt b/doc/specs/vulkan/enums/VkStencilOp.txt new file mode 100644 index 00000000..53375ff1 --- /dev/null +++ b/doc/specs/vulkan/enums/VkStencilOp.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkStencilOp,VkStencilOp]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkStencilOp { + VK_STENCIL_OP_KEEP = 0, + VK_STENCIL_OP_ZERO = 1, + VK_STENCIL_OP_REPLACE = 2, + VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3, + VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4, + VK_STENCIL_OP_INVERT = 5, + VK_STENCIL_OP_INCREMENT_AND_WRAP = 6, + VK_STENCIL_OP_DECREMENT_AND_WRAP = 7, +} VkStencilOp; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkStructureType.txt b/doc/specs/vulkan/enums/VkStructureType.txt new file mode 100644 index 00000000..3260a7cc --- /dev/null +++ b/doc/specs/vulkan/enums/VkStructureType.txt @@ -0,0 +1,61 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkStructureType,VkStructureType]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkStructureType { + VK_STRUCTURE_TYPE_APPLICATION_INFO = 0, + VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1, + VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2, + VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3, + VK_STRUCTURE_TYPE_SUBMIT_INFO = 4, + VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5, + VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6, + VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7, + VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8, + VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9, + VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10, + VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11, + VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12, + VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13, + VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14, + VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15, + VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16, + VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17, + VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18, + VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19, + VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, + VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21, + VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22, + VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23, + VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24, + VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25, + VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26, + VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27, + VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28, + VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29, + VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30, + VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31, + VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32, + VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33, + VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34, + VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35, + VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36, + VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37, + VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38, + VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39, + VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40, + VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41, + VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42, + VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43, + VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44, + VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45, + VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46, + VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47, + VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48, +} VkStructureType; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkSubpassContents.txt b/doc/specs/vulkan/enums/VkSubpassContents.txt new file mode 100644 index 00000000..05fabb9d --- /dev/null +++ b/doc/specs/vulkan/enums/VkSubpassContents.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSubpassContents,VkSubpassContents]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkSubpassContents { + VK_SUBPASS_CONTENTS_INLINE = 0, + VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1, +} VkSubpassContents; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkSystemAllocationScope.txt b/doc/specs/vulkan/enums/VkSystemAllocationScope.txt new file mode 100644 index 00000000..ea99e918 --- /dev/null +++ b/doc/specs/vulkan/enums/VkSystemAllocationScope.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSystemAllocationScope,VkSystemAllocationScope]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkSystemAllocationScope { + VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0, + VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1, + VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 2, + VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 3, + VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 4, +} VkSystemAllocationScope; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/enums/VkVertexInputRate.txt b/doc/specs/vulkan/enums/VkVertexInputRate.txt new file mode 100644 index 00000000..7139e139 --- /dev/null +++ b/doc/specs/vulkan/enums/VkVertexInputRate.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkVertexInputRate,VkVertexInputRate]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef enum VkVertexInputRate { + VK_VERTEX_INPUT_RATE_VERTEX = 0, + VK_VERTEX_INPUT_RATE_INSTANCE = 1, +} VkVertexInputRate; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkAccessFlags.txt b/doc/specs/vulkan/flags/VkAccessFlags.txt new file mode 100644 index 00000000..f32cba4a --- /dev/null +++ b/doc/specs/vulkan/flags/VkAccessFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkAccessFlags,VkAccessFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkAccessFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkAttachmentDescriptionFlags.txt b/doc/specs/vulkan/flags/VkAttachmentDescriptionFlags.txt new file mode 100644 index 00000000..3b94af2f --- /dev/null +++ b/doc/specs/vulkan/flags/VkAttachmentDescriptionFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkAttachmentDescriptionFlags,VkAttachmentDescriptionFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkAttachmentDescriptionFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkBufferCreateFlags.txt b/doc/specs/vulkan/flags/VkBufferCreateFlags.txt new file mode 100644 index 00000000..206274e2 --- /dev/null +++ b/doc/specs/vulkan/flags/VkBufferCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkBufferCreateFlags,VkBufferCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkBufferCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkBufferUsageFlags.txt b/doc/specs/vulkan/flags/VkBufferUsageFlags.txt new file mode 100644 index 00000000..37330436 --- /dev/null +++ b/doc/specs/vulkan/flags/VkBufferUsageFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkBufferUsageFlags,VkBufferUsageFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkBufferUsageFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkBufferViewCreateFlags.txt b/doc/specs/vulkan/flags/VkBufferViewCreateFlags.txt new file mode 100644 index 00000000..75da1af5 --- /dev/null +++ b/doc/specs/vulkan/flags/VkBufferViewCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkBufferViewCreateFlags,VkBufferViewCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkBufferViewCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkColorComponentFlags.txt b/doc/specs/vulkan/flags/VkColorComponentFlags.txt new file mode 100644 index 00000000..44e133c6 --- /dev/null +++ b/doc/specs/vulkan/flags/VkColorComponentFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkColorComponentFlags,VkColorComponentFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkColorComponentFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkCommandBufferResetFlags.txt b/doc/specs/vulkan/flags/VkCommandBufferResetFlags.txt new file mode 100644 index 00000000..f7fe337d --- /dev/null +++ b/doc/specs/vulkan/flags/VkCommandBufferResetFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkCommandBufferResetFlags,VkCommandBufferResetFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkCommandBufferResetFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkCommandBufferUsageFlags.txt b/doc/specs/vulkan/flags/VkCommandBufferUsageFlags.txt new file mode 100644 index 00000000..77906053 --- /dev/null +++ b/doc/specs/vulkan/flags/VkCommandBufferUsageFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkCommandBufferUsageFlags,VkCommandBufferUsageFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkCommandBufferUsageFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkCommandPoolCreateFlags.txt b/doc/specs/vulkan/flags/VkCommandPoolCreateFlags.txt new file mode 100644 index 00000000..9cc534cb --- /dev/null +++ b/doc/specs/vulkan/flags/VkCommandPoolCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkCommandPoolCreateFlags,VkCommandPoolCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkCommandPoolCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkCommandPoolResetFlags.txt b/doc/specs/vulkan/flags/VkCommandPoolResetFlags.txt new file mode 100644 index 00000000..57c0e61f --- /dev/null +++ b/doc/specs/vulkan/flags/VkCommandPoolResetFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkCommandPoolResetFlags,VkCommandPoolResetFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkCommandPoolResetFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkCullModeFlags.txt b/doc/specs/vulkan/flags/VkCullModeFlags.txt new file mode 100644 index 00000000..9860fac4 --- /dev/null +++ b/doc/specs/vulkan/flags/VkCullModeFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkCullModeFlags,VkCullModeFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkCullModeFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkDependencyFlags.txt b/doc/specs/vulkan/flags/VkDependencyFlags.txt new file mode 100644 index 00000000..99a63b11 --- /dev/null +++ b/doc/specs/vulkan/flags/VkDependencyFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDependencyFlags,VkDependencyFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkDependencyFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkDescriptorPoolCreateFlags.txt b/doc/specs/vulkan/flags/VkDescriptorPoolCreateFlags.txt new file mode 100644 index 00000000..78e93af8 --- /dev/null +++ b/doc/specs/vulkan/flags/VkDescriptorPoolCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDescriptorPoolCreateFlags,VkDescriptorPoolCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkDescriptorPoolCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkDescriptorPoolResetFlags.txt b/doc/specs/vulkan/flags/VkDescriptorPoolResetFlags.txt new file mode 100644 index 00000000..aa435498 --- /dev/null +++ b/doc/specs/vulkan/flags/VkDescriptorPoolResetFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDescriptorPoolResetFlags,VkDescriptorPoolResetFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkDescriptorPoolResetFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkDescriptorSetLayoutCreateFlags.txt b/doc/specs/vulkan/flags/VkDescriptorSetLayoutCreateFlags.txt new file mode 100644 index 00000000..56b53413 --- /dev/null +++ b/doc/specs/vulkan/flags/VkDescriptorSetLayoutCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDescriptorSetLayoutCreateFlags,VkDescriptorSetLayoutCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkDescriptorSetLayoutCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkDeviceCreateFlags.txt b/doc/specs/vulkan/flags/VkDeviceCreateFlags.txt new file mode 100644 index 00000000..0af0cc69 --- /dev/null +++ b/doc/specs/vulkan/flags/VkDeviceCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDeviceCreateFlags,VkDeviceCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkDeviceCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkDeviceQueueCreateFlags.txt b/doc/specs/vulkan/flags/VkDeviceQueueCreateFlags.txt new file mode 100644 index 00000000..f3a5d700 --- /dev/null +++ b/doc/specs/vulkan/flags/VkDeviceQueueCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDeviceQueueCreateFlags,VkDeviceQueueCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkDeviceQueueCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkEventCreateFlags.txt b/doc/specs/vulkan/flags/VkEventCreateFlags.txt new file mode 100644 index 00000000..f22ff575 --- /dev/null +++ b/doc/specs/vulkan/flags/VkEventCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkEventCreateFlags,VkEventCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkEventCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkFenceCreateFlags.txt b/doc/specs/vulkan/flags/VkFenceCreateFlags.txt new file mode 100644 index 00000000..0fa66105 --- /dev/null +++ b/doc/specs/vulkan/flags/VkFenceCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkFenceCreateFlags,VkFenceCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkFenceCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkFormatFeatureFlags.txt b/doc/specs/vulkan/flags/VkFormatFeatureFlags.txt new file mode 100644 index 00000000..c8b65c29 --- /dev/null +++ b/doc/specs/vulkan/flags/VkFormatFeatureFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkFormatFeatureFlags,VkFormatFeatureFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkFormatFeatureFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkFramebufferCreateFlags.txt b/doc/specs/vulkan/flags/VkFramebufferCreateFlags.txt new file mode 100644 index 00000000..c415f4b0 --- /dev/null +++ b/doc/specs/vulkan/flags/VkFramebufferCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkFramebufferCreateFlags,VkFramebufferCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkFramebufferCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkImageAspectFlags.txt b/doc/specs/vulkan/flags/VkImageAspectFlags.txt new file mode 100644 index 00000000..24619cd2 --- /dev/null +++ b/doc/specs/vulkan/flags/VkImageAspectFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageAspectFlags,VkImageAspectFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkImageAspectFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkImageCreateFlags.txt b/doc/specs/vulkan/flags/VkImageCreateFlags.txt new file mode 100644 index 00000000..dfc8e9a1 --- /dev/null +++ b/doc/specs/vulkan/flags/VkImageCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageCreateFlags,VkImageCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkImageCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkImageUsageFlags.txt b/doc/specs/vulkan/flags/VkImageUsageFlags.txt new file mode 100644 index 00000000..235d34c3 --- /dev/null +++ b/doc/specs/vulkan/flags/VkImageUsageFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageUsageFlags,VkImageUsageFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkImageUsageFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkImageViewCreateFlags.txt b/doc/specs/vulkan/flags/VkImageViewCreateFlags.txt new file mode 100644 index 00000000..cd00ddb1 --- /dev/null +++ b/doc/specs/vulkan/flags/VkImageViewCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageViewCreateFlags,VkImageViewCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkImageViewCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkInstanceCreateFlags.txt b/doc/specs/vulkan/flags/VkInstanceCreateFlags.txt new file mode 100644 index 00000000..fd253f89 --- /dev/null +++ b/doc/specs/vulkan/flags/VkInstanceCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkInstanceCreateFlags,VkInstanceCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkInstanceCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkMemoryHeapFlags.txt b/doc/specs/vulkan/flags/VkMemoryHeapFlags.txt new file mode 100644 index 00000000..108c5c86 --- /dev/null +++ b/doc/specs/vulkan/flags/VkMemoryHeapFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkMemoryHeapFlags,VkMemoryHeapFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkMemoryHeapFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkMemoryMapFlags.txt b/doc/specs/vulkan/flags/VkMemoryMapFlags.txt new file mode 100644 index 00000000..6dcb141a --- /dev/null +++ b/doc/specs/vulkan/flags/VkMemoryMapFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkMemoryMapFlags,VkMemoryMapFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkMemoryMapFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkMemoryPropertyFlags.txt b/doc/specs/vulkan/flags/VkMemoryPropertyFlags.txt new file mode 100644 index 00000000..5d2347c2 --- /dev/null +++ b/doc/specs/vulkan/flags/VkMemoryPropertyFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkMemoryPropertyFlags,VkMemoryPropertyFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkMemoryPropertyFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkPipelineCacheCreateFlags.txt b/doc/specs/vulkan/flags/VkPipelineCacheCreateFlags.txt new file mode 100644 index 00000000..0c99887b --- /dev/null +++ b/doc/specs/vulkan/flags/VkPipelineCacheCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineCacheCreateFlags,VkPipelineCacheCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkPipelineCacheCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkPipelineColorBlendStateCreateFlags.txt b/doc/specs/vulkan/flags/VkPipelineColorBlendStateCreateFlags.txt new file mode 100644 index 00000000..f40f9a9e --- /dev/null +++ b/doc/specs/vulkan/flags/VkPipelineColorBlendStateCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineColorBlendStateCreateFlags,VkPipelineColorBlendStateCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkPipelineColorBlendStateCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkPipelineCreateFlags.txt b/doc/specs/vulkan/flags/VkPipelineCreateFlags.txt new file mode 100644 index 00000000..98f69fa9 --- /dev/null +++ b/doc/specs/vulkan/flags/VkPipelineCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineCreateFlags,VkPipelineCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkPipelineCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkPipelineDepthStencilStateCreateFlags.txt b/doc/specs/vulkan/flags/VkPipelineDepthStencilStateCreateFlags.txt new file mode 100644 index 00000000..cfef1e89 --- /dev/null +++ b/doc/specs/vulkan/flags/VkPipelineDepthStencilStateCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineDepthStencilStateCreateFlags,VkPipelineDepthStencilStateCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkPipelineDepthStencilStateCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkPipelineDynamicStateCreateFlags.txt b/doc/specs/vulkan/flags/VkPipelineDynamicStateCreateFlags.txt new file mode 100644 index 00000000..a4b97304 --- /dev/null +++ b/doc/specs/vulkan/flags/VkPipelineDynamicStateCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineDynamicStateCreateFlags,VkPipelineDynamicStateCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkPipelineDynamicStateCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkPipelineInputAssemblyStateCreateFlags.txt b/doc/specs/vulkan/flags/VkPipelineInputAssemblyStateCreateFlags.txt new file mode 100644 index 00000000..5ed39948 --- /dev/null +++ b/doc/specs/vulkan/flags/VkPipelineInputAssemblyStateCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineInputAssemblyStateCreateFlags,VkPipelineInputAssemblyStateCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkPipelineInputAssemblyStateCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkPipelineLayoutCreateFlags.txt b/doc/specs/vulkan/flags/VkPipelineLayoutCreateFlags.txt new file mode 100644 index 00000000..2d918f11 --- /dev/null +++ b/doc/specs/vulkan/flags/VkPipelineLayoutCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineLayoutCreateFlags,VkPipelineLayoutCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkPipelineLayoutCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkPipelineMultisampleStateCreateFlags.txt b/doc/specs/vulkan/flags/VkPipelineMultisampleStateCreateFlags.txt new file mode 100644 index 00000000..3f3c8d0c --- /dev/null +++ b/doc/specs/vulkan/flags/VkPipelineMultisampleStateCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineMultisampleStateCreateFlags,VkPipelineMultisampleStateCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkPipelineMultisampleStateCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkPipelineRasterizationStateCreateFlags.txt b/doc/specs/vulkan/flags/VkPipelineRasterizationStateCreateFlags.txt new file mode 100644 index 00000000..230d2015 --- /dev/null +++ b/doc/specs/vulkan/flags/VkPipelineRasterizationStateCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineRasterizationStateCreateFlags,VkPipelineRasterizationStateCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkPipelineRasterizationStateCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkPipelineShaderStageCreateFlags.txt b/doc/specs/vulkan/flags/VkPipelineShaderStageCreateFlags.txt new file mode 100644 index 00000000..f616bb64 --- /dev/null +++ b/doc/specs/vulkan/flags/VkPipelineShaderStageCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineShaderStageCreateFlags,VkPipelineShaderStageCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkPipelineShaderStageCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkPipelineStageFlags.txt b/doc/specs/vulkan/flags/VkPipelineStageFlags.txt new file mode 100644 index 00000000..1a623ec7 --- /dev/null +++ b/doc/specs/vulkan/flags/VkPipelineStageFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineStageFlags,VkPipelineStageFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkPipelineStageFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkPipelineTessellationStateCreateFlags.txt b/doc/specs/vulkan/flags/VkPipelineTessellationStateCreateFlags.txt new file mode 100644 index 00000000..061ce958 --- /dev/null +++ b/doc/specs/vulkan/flags/VkPipelineTessellationStateCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineTessellationStateCreateFlags,VkPipelineTessellationStateCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkPipelineTessellationStateCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkPipelineVertexInputStateCreateFlags.txt b/doc/specs/vulkan/flags/VkPipelineVertexInputStateCreateFlags.txt new file mode 100644 index 00000000..2b152b03 --- /dev/null +++ b/doc/specs/vulkan/flags/VkPipelineVertexInputStateCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineVertexInputStateCreateFlags,VkPipelineVertexInputStateCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkPipelineVertexInputStateCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkPipelineViewportStateCreateFlags.txt b/doc/specs/vulkan/flags/VkPipelineViewportStateCreateFlags.txt new file mode 100644 index 00000000..32547c26 --- /dev/null +++ b/doc/specs/vulkan/flags/VkPipelineViewportStateCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineViewportStateCreateFlags,VkPipelineViewportStateCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkPipelineViewportStateCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkQueryControlFlags.txt b/doc/specs/vulkan/flags/VkQueryControlFlags.txt new file mode 100644 index 00000000..9508c146 --- /dev/null +++ b/doc/specs/vulkan/flags/VkQueryControlFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkQueryControlFlags,VkQueryControlFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkQueryControlFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkQueryPipelineStatisticFlags.txt b/doc/specs/vulkan/flags/VkQueryPipelineStatisticFlags.txt new file mode 100644 index 00000000..4a19cffe --- /dev/null +++ b/doc/specs/vulkan/flags/VkQueryPipelineStatisticFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkQueryPipelineStatisticFlags,VkQueryPipelineStatisticFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkQueryPipelineStatisticFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkQueryPoolCreateFlags.txt b/doc/specs/vulkan/flags/VkQueryPoolCreateFlags.txt new file mode 100644 index 00000000..6f935b60 --- /dev/null +++ b/doc/specs/vulkan/flags/VkQueryPoolCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkQueryPoolCreateFlags,VkQueryPoolCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkQueryPoolCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkQueryResultFlags.txt b/doc/specs/vulkan/flags/VkQueryResultFlags.txt new file mode 100644 index 00000000..85bbcade --- /dev/null +++ b/doc/specs/vulkan/flags/VkQueryResultFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkQueryResultFlags,VkQueryResultFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkQueryResultFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkQueueFlags.txt b/doc/specs/vulkan/flags/VkQueueFlags.txt new file mode 100644 index 00000000..2bb6a48d --- /dev/null +++ b/doc/specs/vulkan/flags/VkQueueFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkQueueFlags,VkQueueFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkQueueFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkRenderPassCreateFlags.txt b/doc/specs/vulkan/flags/VkRenderPassCreateFlags.txt new file mode 100644 index 00000000..2f985a22 --- /dev/null +++ b/doc/specs/vulkan/flags/VkRenderPassCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkRenderPassCreateFlags,VkRenderPassCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkRenderPassCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkSampleCountFlags.txt b/doc/specs/vulkan/flags/VkSampleCountFlags.txt new file mode 100644 index 00000000..fdc2afd0 --- /dev/null +++ b/doc/specs/vulkan/flags/VkSampleCountFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSampleCountFlags,VkSampleCountFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkSampleCountFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkSamplerCreateFlags.txt b/doc/specs/vulkan/flags/VkSamplerCreateFlags.txt new file mode 100644 index 00000000..a244f96d --- /dev/null +++ b/doc/specs/vulkan/flags/VkSamplerCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSamplerCreateFlags,VkSamplerCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkSamplerCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkSemaphoreCreateFlags.txt b/doc/specs/vulkan/flags/VkSemaphoreCreateFlags.txt new file mode 100644 index 00000000..415e5c4e --- /dev/null +++ b/doc/specs/vulkan/flags/VkSemaphoreCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSemaphoreCreateFlags,VkSemaphoreCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkSemaphoreCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkShaderModuleCreateFlags.txt b/doc/specs/vulkan/flags/VkShaderModuleCreateFlags.txt new file mode 100644 index 00000000..17adce2e --- /dev/null +++ b/doc/specs/vulkan/flags/VkShaderModuleCreateFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkShaderModuleCreateFlags,VkShaderModuleCreateFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkShaderModuleCreateFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkShaderStageFlags.txt b/doc/specs/vulkan/flags/VkShaderStageFlags.txt new file mode 100644 index 00000000..7cf9e47a --- /dev/null +++ b/doc/specs/vulkan/flags/VkShaderStageFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkShaderStageFlags,VkShaderStageFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkShaderStageFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkSparseImageFormatFlags.txt b/doc/specs/vulkan/flags/VkSparseImageFormatFlags.txt new file mode 100644 index 00000000..a2c232fa --- /dev/null +++ b/doc/specs/vulkan/flags/VkSparseImageFormatFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSparseImageFormatFlags,VkSparseImageFormatFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkSparseImageFormatFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkSparseMemoryBindFlags.txt b/doc/specs/vulkan/flags/VkSparseMemoryBindFlags.txt new file mode 100644 index 00000000..54328dc8 --- /dev/null +++ b/doc/specs/vulkan/flags/VkSparseMemoryBindFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSparseMemoryBindFlags,VkSparseMemoryBindFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkSparseMemoryBindFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkStencilFaceFlags.txt b/doc/specs/vulkan/flags/VkStencilFaceFlags.txt new file mode 100644 index 00000000..6f705fd0 --- /dev/null +++ b/doc/specs/vulkan/flags/VkStencilFaceFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkStencilFaceFlags,VkStencilFaceFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkStencilFaceFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/flags/VkSubpassDescriptionFlags.txt b/doc/specs/vulkan/flags/VkSubpassDescriptionFlags.txt new file mode 100644 index 00000000..8555270a --- /dev/null +++ b/doc/specs/vulkan/flags/VkSubpassDescriptionFlags.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSubpassDescriptionFlags,VkSubpassDescriptionFlags]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef VkFlags VkSubpassDescriptionFlags; + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/funcpointers/PFN_vkAllocationFunction.txt b/doc/specs/vulkan/funcpointers/PFN_vkAllocationFunction.txt new file mode 100644 index 00000000..d8ea9828 --- /dev/null +++ b/doc/specs/vulkan/funcpointers/PFN_vkAllocationFunction.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[PFN_vkAllocationFunction,PFN_vkAllocationFunction]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)( + void* pUserData, + size_t size, + size_t alignment, + VkSystemAllocationScope allocationScope); + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/funcpointers/PFN_vkFreeFunction.txt b/doc/specs/vulkan/funcpointers/PFN_vkFreeFunction.txt new file mode 100644 index 00000000..9add2ef1 --- /dev/null +++ b/doc/specs/vulkan/funcpointers/PFN_vkFreeFunction.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[PFN_vkFreeFunction,PFN_vkFreeFunction]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef void (VKAPI_PTR *PFN_vkFreeFunction)( + void* pUserData, + void* pMemory); + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/funcpointers/PFN_vkInternalAllocationNotification.txt b/doc/specs/vulkan/funcpointers/PFN_vkInternalAllocationNotification.txt new file mode 100644 index 00000000..75014524 --- /dev/null +++ b/doc/specs/vulkan/funcpointers/PFN_vkInternalAllocationNotification.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[PFN_vkInternalAllocationNotification,PFN_vkInternalAllocationNotification]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)( + void* pUserData, + size_t size, + VkInternalAllocationType allocationType, + VkSystemAllocationScope allocationScope); + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/funcpointers/PFN_vkInternalFreeNotification.txt b/doc/specs/vulkan/funcpointers/PFN_vkInternalFreeNotification.txt new file mode 100644 index 00000000..d5b59a50 --- /dev/null +++ b/doc/specs/vulkan/funcpointers/PFN_vkInternalFreeNotification.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[PFN_vkInternalFreeNotification,PFN_vkInternalFreeNotification]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)( + void* pUserData, + size_t size, + VkInternalAllocationType allocationType, + VkSystemAllocationScope allocationScope); + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/funcpointers/PFN_vkReallocationFunction.txt b/doc/specs/vulkan/funcpointers/PFN_vkReallocationFunction.txt new file mode 100644 index 00000000..e099b1d2 --- /dev/null +++ b/doc/specs/vulkan/funcpointers/PFN_vkReallocationFunction.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[PFN_vkReallocationFunction,PFN_vkReallocationFunction]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef void* (VKAPI_PTR *PFN_vkReallocationFunction)( + void* pUserData, + void* pOriginal, + size_t size, + size_t alignment, + VkSystemAllocationScope allocationScope); + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/funcpointers/PFN_vkVoidFunction.txt b/doc/specs/vulkan/funcpointers/PFN_vkVoidFunction.txt new file mode 100644 index 00000000..536b0356 --- /dev/null +++ b/doc/specs/vulkan/funcpointers/PFN_vkVoidFunction.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[PFN_vkVoidFunction,PFN_vkVoidFunction]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void); + +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/genRelease b/doc/specs/vulkan/genRelease new file mode 100755 index 00000000..049c0080 --- /dev/null +++ b/doc/specs/vulkan/genRelease @@ -0,0 +1,86 @@ +#!/usr/bin/python3 + +import time +from datetime import * + +# This script builds a full release package including XHTML and PDF +# versions of the specified branches (usually 1.0 and 1.0-wsi_extensions, +# but tags or commits can be used as well). Other files in the release +# directory are removed, including man pages, XHTML chunked, HTML, +# validity output, etc. +# +# Both branches must be fully committed and up to date when the script +# is run, with no outstanding un-added / un-committed files. Both +# branches must have fully regnerated all automatically-regeneratable +# files. After completing the build, the current branch is set to +# the first (core) branch and suggestions for creating tags are printed out. + +# branch = branch or commit or tag name +# label = textual label to apply +# outdir = directory to generate specs in +def buildRelease(branch,label,outdir,targets): + global root, xml, spec + + print('echo Info: Generating branch=' + branch, + 'label=' + label, + 'outdir=' + outdir) + print('git checkout', branch) + + print('echo Info: Generating headers and spec include files') + print('cd', xml) + print('make clobber full_install') + + print('echo Info: Cleaning spec in', outdir) + print('cd', spec) + print('rm -rf', + outdir + '/man', + outdir + '/xhtml', + outdir + '/pdf', + outdir + '/chunked', + outdir + '/vkspec.html', + 'specversion.txt') + + print('echo Info: Generating spec') + print('make specversion.txt') + print('make -j 4 OUTDIR=' + outdir, ' NOTEOPTS="-a implementation-guide"', targets) + print('rm', outdir + '/pdf/vkspec.xml') + +# Main + +global root, xml, spec + +# Root of the Vulkan git repo containing the specs +root = '/home/tree/git/vulkan' +# Directory with vk.xml and generation tools +xml = root + '/src/spec' +# Directory with spec sources +spec = root + '/doc/specs/vulkan' + +# Output directory, which does not have to be in the repo +outdir = '/home/tree/git/Vulkan-Web-Registry/specs/' + +# These can be changed to tags, etc. +corebranch = '1.0' +wsibranch = '1.0-wsi_extensions' + +# date in YYYYMMDD format +now = datetime.today().strftime('%Y%m%d') + +# Generate specs +coretargets='xhtml pdf styleguide manhtml manpdf manhtmlpages' +buildRelease(corebranch, corebranch, outdir + corebranch, coretargets) + +wsitargets='xhtml pdf' +buildRelease(wsibranch, wsibranch, outdir + wsibranch, wsitargets) + +print('echo Info: post-generation cleanup') + +print('git checkout ' + corebranch) + +print('echo To tag the spec branches, execute these commands:') +print('echo git checkout', corebranch) +print('echo git tag -a -m \\"Tag core API specification for', now, 'release\\"', 'v1.0-core-' + now) + +print('echo git checkout', wsibranch) +print('echo git tag -a -m \\"Tag core+WSI API specification for', now, 'release\\"', 'v1.0-core+wsi-' + now) +print('echo git push --tags') diff --git a/doc/specs/vulkan/hostsynctable/implicit.txt b/doc/specs/vulkan/hostsynctable/implicit.txt new file mode 100644 index 00000000..2eb602ab --- /dev/null +++ b/doc/specs/vulkan/hostsynctable/implicit.txt @@ -0,0 +1,51 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +.Implicit Externally Synchronized Parameters +******************************************************************************** +* All sname:VkQueue objects created from pname:device in flink:vkDeviceWaitIdle +* Any sname:VkDescriptorSet objects allocated from pname:descriptorPool in flink:vkResetDescriptorPool +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdBindPipeline +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdSetViewport +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdSetScissor +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdSetLineWidth +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdSetDepthBias +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdSetBlendConstants +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdSetDepthBounds +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdSetStencilCompareMask +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdSetStencilWriteMask +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdSetStencilReference +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdBindDescriptorSets +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdBindIndexBuffer +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdBindVertexBuffers +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdDraw +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdDrawIndexed +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdDrawIndirect +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdDrawIndexedIndirect +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdDispatch +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdDispatchIndirect +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdCopyBuffer +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdCopyImage +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdBlitImage +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdCopyBufferToImage +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdCopyImageToBuffer +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdUpdateBuffer +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdFillBuffer +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdClearColorImage +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdClearDepthStencilImage +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdClearAttachments +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdResolveImage +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdSetEvent +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdResetEvent +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdWaitEvents +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdPipelineBarrier +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdBeginQuery +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdEndQuery +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdResetQueryPool +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdWriteTimestamp +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdCopyQueryPoolResults +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdPushConstants +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdBeginRenderPass +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdNextSubpass +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdEndRenderPass +* The sname:VkCommandPool that pname:commandBuffer was allocated from, in flink:vkCmdExecuteCommands +******************************************************************************** + diff --git a/doc/specs/vulkan/hostsynctable/parameterlists.txt b/doc/specs/vulkan/hostsynctable/parameterlists.txt new file mode 100644 index 00000000..a9fdcf35 --- /dev/null +++ b/doc/specs/vulkan/hostsynctable/parameterlists.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +.Externally Synchronized Parameter Lists +******************************************************************************** +* Each element of the pname:pWaitSemaphores member of each element of the pname:pSubmits parameter in flink:vkQueueSubmit +* Each element of the pname:pSignalSemaphores member of each element of the pname:pSubmits parameter in flink:vkQueueSubmit +* Each element of the pname:pWaitSemaphores member of each element of the pname:pBindInfo parameter in flink:vkQueueBindSparse +* Each element of the pname:pSignalSemaphores member of each element of the pname:pBindInfo parameter in flink:vkQueueBindSparse +* The pname:buffer member of each element of the pname:pBufferBinds member of each element of the pname:pBindInfo parameter in flink:vkQueueBindSparse +* The pname:image member of each element of the pname:pImageOpaqueBinds member of each element of the pname:pBindInfo parameter in flink:vkQueueBindSparse +* The pname:image member of each element of the pname:pImageBinds member of each element of the pname:pBindInfo parameter in flink:vkQueueBindSparse +* Each element of the pname:pFences parameter in flink:vkResetFences +* Each element of the pname:pDescriptorSets parameter in flink:vkFreeDescriptorSets +* The pname:dstSet member of each element of the pname:pDescriptorWrites parameter in flink:vkUpdateDescriptorSets +* The pname:dstSet member of each element of the pname:pDescriptorCopies parameter in flink:vkUpdateDescriptorSets +* Each element of the pname:pCommandBuffers parameter in flink:vkFreeCommandBuffers +******************************************************************************** + diff --git a/doc/specs/vulkan/hostsynctable/parameters.txt b/doc/specs/vulkan/hostsynctable/parameters.txt new file mode 100644 index 00000000..5aa94fb5 --- /dev/null +++ b/doc/specs/vulkan/hostsynctable/parameters.txt @@ -0,0 +1,90 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +.Externally Synchronized Parameters +******************************************************************************** +* The pname:instance parameter in flink:vkDestroyInstance +* The pname:device parameter in flink:vkDestroyDevice +* The pname:queue parameter in flink:vkQueueSubmit +* The pname:fence parameter in flink:vkQueueSubmit +* The pname:memory parameter in flink:vkFreeMemory +* The pname:memory parameter in flink:vkMapMemory +* The pname:memory parameter in flink:vkUnmapMemory +* The pname:buffer parameter in flink:vkBindBufferMemory +* The pname:image parameter in flink:vkBindImageMemory +* The pname:queue parameter in flink:vkQueueBindSparse +* The pname:fence parameter in flink:vkQueueBindSparse +* The pname:fence parameter in flink:vkDestroyFence +* The pname:semaphore parameter in flink:vkDestroySemaphore +* The pname:event parameter in flink:vkDestroyEvent +* The pname:event parameter in flink:vkSetEvent +* The pname:event parameter in flink:vkResetEvent +* The pname:queryPool parameter in flink:vkDestroyQueryPool +* The pname:buffer parameter in flink:vkDestroyBuffer +* The pname:bufferView parameter in flink:vkDestroyBufferView +* The pname:image parameter in flink:vkDestroyImage +* The pname:imageView parameter in flink:vkDestroyImageView +* The pname:shaderModule parameter in flink:vkDestroyShaderModule +* The pname:pipelineCache parameter in flink:vkDestroyPipelineCache +* The pname:dstCache parameter in flink:vkMergePipelineCaches +* The pname:pipeline parameter in flink:vkDestroyPipeline +* The pname:pipelineLayout parameter in flink:vkDestroyPipelineLayout +* The pname:sampler parameter in flink:vkDestroySampler +* The pname:descriptorSetLayout parameter in flink:vkDestroyDescriptorSetLayout +* The pname:descriptorPool parameter in flink:vkDestroyDescriptorPool +* The pname:descriptorPool parameter in flink:vkResetDescriptorPool +* The pname:descriptorPool member of the pname:pAllocateInfo parameter in flink:vkAllocateDescriptorSets +* The pname:descriptorPool parameter in flink:vkFreeDescriptorSets +* The pname:framebuffer parameter in flink:vkDestroyFramebuffer +* The pname:renderPass parameter in flink:vkDestroyRenderPass +* The pname:commandPool parameter in flink:vkDestroyCommandPool +* The pname:commandPool parameter in flink:vkResetCommandPool +* The pname:commandPool member of the pname:pAllocateInfo parameter in flink:vkAllocateCommandBuffers +* The pname:commandPool parameter in flink:vkFreeCommandBuffers +* The pname:commandBuffer parameter in flink:vkBeginCommandBuffer +* The pname:commandBuffer parameter in flink:vkEndCommandBuffer +* The pname:commandBuffer parameter in flink:vkResetCommandBuffer +* The pname:commandBuffer parameter in flink:vkCmdBindPipeline +* The pname:commandBuffer parameter in flink:vkCmdSetViewport +* The pname:commandBuffer parameter in flink:vkCmdSetScissor +* The pname:commandBuffer parameter in flink:vkCmdSetLineWidth +* The pname:commandBuffer parameter in flink:vkCmdSetDepthBias +* The pname:commandBuffer parameter in flink:vkCmdSetBlendConstants +* The pname:commandBuffer parameter in flink:vkCmdSetDepthBounds +* The pname:commandBuffer parameter in flink:vkCmdSetStencilCompareMask +* The pname:commandBuffer parameter in flink:vkCmdSetStencilWriteMask +* The pname:commandBuffer parameter in flink:vkCmdSetStencilReference +* The pname:commandBuffer parameter in flink:vkCmdBindDescriptorSets +* The pname:commandBuffer parameter in flink:vkCmdBindIndexBuffer +* The pname:commandBuffer parameter in flink:vkCmdBindVertexBuffers +* The pname:commandBuffer parameter in flink:vkCmdDraw +* The pname:commandBuffer parameter in flink:vkCmdDrawIndexed +* The pname:commandBuffer parameter in flink:vkCmdDrawIndirect +* The pname:commandBuffer parameter in flink:vkCmdDrawIndexedIndirect +* The pname:commandBuffer parameter in flink:vkCmdDispatch +* The pname:commandBuffer parameter in flink:vkCmdDispatchIndirect +* The pname:commandBuffer parameter in flink:vkCmdCopyBuffer +* The pname:commandBuffer parameter in flink:vkCmdCopyImage +* The pname:commandBuffer parameter in flink:vkCmdBlitImage +* The pname:commandBuffer parameter in flink:vkCmdCopyBufferToImage +* The pname:commandBuffer parameter in flink:vkCmdCopyImageToBuffer +* The pname:commandBuffer parameter in flink:vkCmdUpdateBuffer +* The pname:commandBuffer parameter in flink:vkCmdFillBuffer +* The pname:commandBuffer parameter in flink:vkCmdClearColorImage +* The pname:commandBuffer parameter in flink:vkCmdClearDepthStencilImage +* The pname:commandBuffer parameter in flink:vkCmdClearAttachments +* The pname:commandBuffer parameter in flink:vkCmdResolveImage +* The pname:commandBuffer parameter in flink:vkCmdSetEvent +* The pname:commandBuffer parameter in flink:vkCmdResetEvent +* The pname:commandBuffer parameter in flink:vkCmdWaitEvents +* The pname:commandBuffer parameter in flink:vkCmdPipelineBarrier +* The pname:commandBuffer parameter in flink:vkCmdBeginQuery +* The pname:commandBuffer parameter in flink:vkCmdEndQuery +* The pname:commandBuffer parameter in flink:vkCmdResetQueryPool +* The pname:commandBuffer parameter in flink:vkCmdWriteTimestamp +* The pname:commandBuffer parameter in flink:vkCmdCopyQueryPoolResults +* The pname:commandBuffer parameter in flink:vkCmdPushConstants +* The pname:commandBuffer parameter in flink:vkCmdBeginRenderPass +* The pname:commandBuffer parameter in flink:vkCmdNextSubpass +* The pname:commandBuffer parameter in flink:vkCmdEndRenderPass +* The pname:commandBuffer parameter in flink:vkCmdExecuteCommands +******************************************************************************** + diff --git a/doc/specs/vulkan/images/Makefile b/doc/specs/vulkan/images/Makefile new file mode 100644 index 00000000..3035cd0c --- /dev/null +++ b/doc/specs/vulkan/images/Makefile @@ -0,0 +1,38 @@ +# This Makefile should be used to regenerate alternate forms of +# documents when the source changes. Note that pipeline.* is +# treated specially since its original source format is .pptx +# +# Targets: +# all - regenerate all images from source formats +# clean - remove all generated images +# individual files in $(TARGETS) below + +# Default rules go from Inkscape SVG -> PDF. +# Some bashing is required for vulkanpipeline.*, which originally +# comes from PowerPoint -> export to PDF -> convert to SVG. Converting +# the other way using inkscape just does not work - horrible drop +# shadows everywhere. + +#.SUFFIXES: .pdf .svg + +#.svg.pdf: ; $(INKSCAPE) -f $< -A $@ + +# Tool to convert image formats +INKSCAPE ?= inkscape + +# PDFs to regenerate from SVGs - everything except pipeline.pdf +SVGEXCLUDES = pipeline.svg vulkantexture0.svg +SVGSRC = $(filter-out $(SVGEXCLUDES),$(wildcard [A-Za-z]*.svg)) +PDFDST = $(SVGSRC:%.svg=%.pdf) +SVGDST = pipeline.svg + +all: $(PDFDST) $(SVGDST) + +$(PDFDST): %.pdf: %.svg + $(INKSCAPE) -f $< -A $@ + +pipeline.svg: pipeline.pdf + $(INKSCAPE) -f $< -l $@ + +clean: + -rm -f $(PDFDST) $(SVGDST) diff --git a/doc/specs/vulkan/images/README b/doc/specs/vulkan/images/README new file mode 100644 index 00000000..824a8f60 --- /dev/null +++ b/doc/specs/vulkan/images/README @@ -0,0 +1,22 @@ +Figures for the Vulkan spec. With the exception of pipeline.pptx, the +current source format for all figures is Inkscape SVG, which is +converted to PDF by the Makefile. + +For the pipeline figure, the source is .pptx, which must be manually +exported to PDF (using Powerpoint) and then to SVG (using Inkscape). + +Many figures were originally generated in the open source "Dia" drawing +program format. The .dia files are now in oldSource/*.dia, since we're +trying to centralize on Inkscape SVG -> PDF wherever possible. The main +drawback of this is that all the connectivity information in the .dia +file is lost, so modifying these figures in Inkscape will be very +painful. It might be best to edit the original .dia file if anything +nontrivial needs to be done. + +To convert .dia -> Inkscape SVG, you can use + + inkscape -f oldSource/file.dia -A file.svg + +followed by running Inkscape on file.svg, setting the bounding box of +the figure to the contents using the File / Preferences dialog, and +overwriting file.svg. diff --git a/doc/specs/vulkan/images/diamond_exit.pdf b/doc/specs/vulkan/images/diamond_exit.pdf new file mode 100644 index 00000000..7aba2e70 Binary files /dev/null and b/doc/specs/vulkan/images/diamond_exit.pdf differ diff --git a/doc/specs/vulkan/images/diamond_exit.svg b/doc/specs/vulkan/images/diamond_exit.svg new file mode 100644 index 00000000..4f46cf53 --- /dev/null +++ b/doc/specs/vulkan/images/diamond_exit.svg @@ -0,0 +1,261 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/specs/vulkan/images/icons/caution.png b/doc/specs/vulkan/images/icons/caution.png new file mode 100644 index 00000000..9a8c515a Binary files /dev/null and b/doc/specs/vulkan/images/icons/caution.png differ diff --git a/doc/specs/vulkan/images/icons/example.png b/doc/specs/vulkan/images/icons/example.png new file mode 100644 index 00000000..1199e864 Binary files /dev/null and b/doc/specs/vulkan/images/icons/example.png differ diff --git a/doc/specs/vulkan/images/icons/home.png b/doc/specs/vulkan/images/icons/home.png new file mode 100644 index 00000000..37a5231b Binary files /dev/null and b/doc/specs/vulkan/images/icons/home.png differ diff --git a/doc/specs/vulkan/images/icons/important.png b/doc/specs/vulkan/images/icons/important.png new file mode 100644 index 00000000..be685cc4 Binary files /dev/null and b/doc/specs/vulkan/images/icons/important.png differ diff --git a/doc/specs/vulkan/images/icons/next.png b/doc/specs/vulkan/images/icons/next.png new file mode 100644 index 00000000..64e126bd Binary files /dev/null and b/doc/specs/vulkan/images/icons/next.png differ diff --git a/doc/specs/vulkan/images/icons/note.png b/doc/specs/vulkan/images/icons/note.png new file mode 100644 index 00000000..7c1f3e2f Binary files /dev/null and b/doc/specs/vulkan/images/icons/note.png differ diff --git a/doc/specs/vulkan/images/icons/prev.png b/doc/specs/vulkan/images/icons/prev.png new file mode 100644 index 00000000..3e8f12fe Binary files /dev/null and b/doc/specs/vulkan/images/icons/prev.png differ diff --git a/doc/specs/vulkan/images/icons/tip.png b/doc/specs/vulkan/images/icons/tip.png new file mode 100644 index 00000000..f087c73b Binary files /dev/null and b/doc/specs/vulkan/images/icons/tip.png differ diff --git a/doc/specs/vulkan/images/icons/up.png b/doc/specs/vulkan/images/icons/up.png new file mode 100644 index 00000000..2db1ce62 Binary files /dev/null and b/doc/specs/vulkan/images/icons/up.png differ diff --git a/doc/specs/vulkan/images/icons/warning.png b/doc/specs/vulkan/images/icons/warning.png new file mode 100644 index 00000000..d41edb9a Binary files /dev/null and b/doc/specs/vulkan/images/icons/warning.png differ diff --git a/doc/specs/vulkan/images/innerquad.dia b/doc/specs/vulkan/images/innerquad.dia new file mode 100644 index 00000000..5b4c4331 Binary files /dev/null and b/doc/specs/vulkan/images/innerquad.dia differ diff --git a/doc/specs/vulkan/images/innerquad.pdf b/doc/specs/vulkan/images/innerquad.pdf new file mode 100644 index 00000000..660a76a1 Binary files /dev/null and b/doc/specs/vulkan/images/innerquad.pdf differ diff --git a/doc/specs/vulkan/images/innerquad.svg b/doc/specs/vulkan/images/innerquad.svg new file mode 100644 index 00000000..560235cc --- /dev/null +++ b/doc/specs/vulkan/images/innerquad.svg @@ -0,0 +1,278 @@ + + + + + + + + + + + + + + + + (0,1) + + + (0,0) + + + (1,1) + + + (1,0) + + + + (0,1) + + + (0,0) + + + (1,1) + + + (1,0) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (a) + + + (b) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/specs/vulkan/images/innertri.dia b/doc/specs/vulkan/images/innertri.dia new file mode 100644 index 00000000..db44130d --- /dev/null +++ b/doc/specs/vulkan/images/innertri.dia @@ -0,0 +1,2752 @@ + + + + + + + + + + + + + #Letter# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #(a)# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #(b)# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #(0,0,1)# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #(0,1,0)# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #(1,0,0)# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #(0,0,1)# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #(0,1,0)# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #(1,0,0)# + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/specs/vulkan/images/innertri.pdf b/doc/specs/vulkan/images/innertri.pdf new file mode 100644 index 00000000..8a1b6c4e Binary files /dev/null and b/doc/specs/vulkan/images/innertri.pdf differ diff --git a/doc/specs/vulkan/images/innertri.svg b/doc/specs/vulkan/images/innertri.svg new file mode 100644 index 00000000..d3b1a37e --- /dev/null +++ b/doc/specs/vulkan/images/innertri.svg @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (a) + + + (b) + + + (0,0,1) + + + (0,1,0) + + + (1,0,0) + + + (0,0,1) + + + (0,1,0) + + + (1,0,0) + + diff --git a/doc/specs/vulkan/images/lineadj.dia b/doc/specs/vulkan/images/lineadj.dia new file mode 100644 index 00000000..54c4d286 Binary files /dev/null and b/doc/specs/vulkan/images/lineadj.dia differ diff --git a/doc/specs/vulkan/images/lineadj.pdf b/doc/specs/vulkan/images/lineadj.pdf new file mode 100644 index 00000000..eec055e7 Binary files /dev/null and b/doc/specs/vulkan/images/lineadj.pdf differ diff --git a/doc/specs/vulkan/images/lineadj.svg b/doc/specs/vulkan/images/lineadj.svg new file mode 100644 index 00000000..4c7dc29c --- /dev/null +++ b/doc/specs/vulkan/images/lineadj.svg @@ -0,0 +1,459 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + 0 + + 1 + + + + + 2 + + 3 + + + + 4 + + 5 + + + + + 6 + + 7 + (a) + + + 0 + + 1 + + + + + 2 + + 3 + + + 4 + + 5 + + + + + + + (b) + diff --git a/doc/specs/vulkan/images/non_strict_lines.pdf b/doc/specs/vulkan/images/non_strict_lines.pdf new file mode 100644 index 00000000..361d53c5 Binary files /dev/null and b/doc/specs/vulkan/images/non_strict_lines.pdf differ diff --git a/doc/specs/vulkan/images/non_strict_lines.svg b/doc/specs/vulkan/images/non_strict_lines.svg new file mode 100644 index 00000000..8cdb7096 --- /dev/null +++ b/doc/specs/vulkan/images/non_strict_lines.svg @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + Xa, Ya, Za + Ab, Yb, Zb + + + + + + + + Minor axis + Major axis + Edge 0 + Edge 1 + Edge 3 + Edge 2 + Line width + Original line + + diff --git a/doc/specs/vulkan/images/oldSource/tessparam.dia b/doc/specs/vulkan/images/oldSource/tessparam.dia new file mode 100644 index 00000000..f26c5d55 Binary files /dev/null and b/doc/specs/vulkan/images/oldSource/tessparam.dia differ diff --git a/doc/specs/vulkan/images/oldSource/triadj.dia b/doc/specs/vulkan/images/oldSource/triadj.dia new file mode 100644 index 00000000..1e49f71d Binary files /dev/null and b/doc/specs/vulkan/images/oldSource/triadj.dia differ diff --git a/doc/specs/vulkan/images/oldSource/tstripadj.dia b/doc/specs/vulkan/images/oldSource/tstripadj.dia new file mode 100644 index 00000000..d2aa4f81 Binary files /dev/null and b/doc/specs/vulkan/images/oldSource/tstripadj.dia differ diff --git a/doc/specs/vulkan/images/pipeline.pdf b/doc/specs/vulkan/images/pipeline.pdf new file mode 100644 index 00000000..04ee503a Binary files /dev/null and b/doc/specs/vulkan/images/pipeline.pdf differ diff --git a/doc/specs/vulkan/images/pipeline.pptx b/doc/specs/vulkan/images/pipeline.pptx new file mode 100644 index 00000000..c4b11794 Binary files /dev/null and b/doc/specs/vulkan/images/pipeline.pptx differ diff --git a/doc/specs/vulkan/images/pipeline.svg b/doc/specs/vulkan/images/pipeline.svg new file mode 100644 index 00000000..4e254ffa --- /dev/null +++ b/doc/specs/vulkan/images/pipeline.svg @@ -0,0 +1,2296 @@ + + + +image/svg+xmlLegend +Color Attachment +Draw +Vertex Shader +Tessellation Control Shader +Tessellation Primitive Generator +Geometry Shader +Rasterization +Fragment Shader +Indirect +Buffer Binding +Color/Blending Operations +Storage Image +Storage Texel Buffer +Storage Buffer +Sampled Image +Uniform Texel Buffer +Index +Buffer +Binding +Vertex +Buffer +Binding +Image +Buffer +Programmable Stage +Fixed Function Stage +Tessellation Evaluation Shader +Dispatch +Compute Shader +Uniform Buffer +Input Attachment +Input +Assembler +Tessellation Assembler +Geometry Assembler +Primitive Assembler +Pre +- +Fragment Operations +Fragment Assembler +Post +- +Fragment Operations +Compute Assembler +Depth/Stencil Attachment +Constants +Push Constants +Descriptor Sets +Framebuffer + \ No newline at end of file diff --git a/doc/specs/vulkan/images/sparseimage.pdf b/doc/specs/vulkan/images/sparseimage.pdf new file mode 100644 index 00000000..015c3645 Binary files /dev/null and b/doc/specs/vulkan/images/sparseimage.pdf differ diff --git a/doc/specs/vulkan/images/sparseimage.svg b/doc/specs/vulkan/images/sparseimage.svg new file mode 100644 index 00000000..fca5aed9 --- /dev/null +++ b/doc/specs/vulkan/images/sparseimage.svg @@ -0,0 +1,4219 @@ + + + + + Vulkan Sparse Image + + + + + + + + + + + + + + Page-1 + + + Sheet.3158 + Arrayed Sparse Image + + + + Arrayed Sparse Image + + Sheet.3127 + Mip Level 0 + + + + Mip Level 0 + + Sheet.3128 + Mip Level 1 + + + + Mip Level 1 + + Sheet.3129 + Mip Level 2 + + + + Mip Level 2 + + Sheet.3130 + Mip Level 3 + + + + Mip Level 3 + + Sheet.3132 + Mip Tail + + + + Mip Tail + + Square.595 + + + + + + + Square.605 + + + + + + + Square.615 + + + + + + + Square.625 + + + + + + + Square.635 + + + + + + + Square.645 + + + + + + + Square.655 + + + + + + + Square.665 + + + + + + + Square.675 + + + + + + + Square.685 + + + + + + + Square + + + + + + + Square.2 + + + + + + + Square.3 + + + + + + + Square.4 + + + + + + + Square.5 + + + + + + + Square.6 + + + + + + + Square.7 + + + + + + + Square.8 + + + + + + + Square.9 + + + + + + + Square.10 + + + + + + + Square.11 + + + + + + + Square.12 + + + + + + + Square.13 + + + + + + + Square.14 + + + + + + + Square.15 + + + + + + + Square.16 + + + + + + + Square.17 + + + + + + + Square.18 + + + + + + + Square.19 + + + + + + + Square.20 + + + + + + + Square.21 + + + + + + + Square.22 + + + + + + + Square.23 + + + + + + + Square.24 + + + + + + + Square.25 + + + + + + + Square.26 + + + + + + + Square.27 + + + + + + + Square.28 + + + + + + + Square.29 + + + + + + + Square.30 + + + + + + + Square.31 + + + + + + + Square.32 + + + + + + + Square.33 + + + + + + + Square.34 + + + + + + + Square.35 + + + + + + + Square.36 + + + + + + + Square.37 + + + + + + + Square.38 + + + + + + + Square.39 + + + + + + + Square.40 + + + + + + + Square.41 + + + + + + + Square.42 + + + + + + + Square.43 + + + + + + + Square.44 + + + + + + + Square.45 + + + + + + + Square.46 + + + + + + + Square.47 + + + + + + + Square.48 + + + + + + + Square.49 + + + + + + + Square.50 + + + + + + + Square.51 + + + + + + + Square.52 + + + + + + + Square.53 + + + + + + + Square.54 + + + + + + + Square.55 + + + + + + + Square.56 + + + + + + + Square.57 + + + + + + + Square.58 + + + + + + + Square.59 + + + + + + + Square.60 + + + + + + + Square.61 + + + + + + + Square.62 + + + + + + + Square.63 + + + + + + + Square.64 + + + + + + + Square.65 + + + + + + + Square.66 + + + + + + + Square.67 + + + + + + + Square.68 + + + + + + + Square.69 + + + + + + + Square.70 + + + + + + + Square.71 + + + + + + + Square.72 + + + + + + + Square.73 + + + + + + + Square.74 + + + + + + + Square.75 + + + + + + + Square.76 + + + + + + + Square.77 + + + + + + + Square.78 + + + + + + + Square.79 + + + + + + + Square.80 + + + + + + + Square.81 + + + + + + + Square.82 + + + + + + + Square.83 + + + + + + + Square.84 + + + + + + + Square.85 + + + + + + + Square.86 + + + + + + + Square.87 + + + + + + + Square.88 + + + + + + + Square.89 + + + + + + + Square.90 + + + + + + + Square.91 + + + + + + + Square.92 + + + + + + + Square.93 + + + + + + + Square.94 + + + + + + + Square.95 + + + + + + + Square.96 + + + + + + + Square.97 + + + + + + + Square.98 + + + + + + + Square.99 + + + + + + + Square.100 + + + + + + + Square.126 + + + + + + + Square.127 + + + + + + + Square.128 + + + + + + + Square.129 + + + + + + + Square.130 + + + + + + + Square.131 + + + + + + + Square.132 + + + + + + + Square.133 + + + + + + + Square.134 + + + + + + + Square.135 + + + + + + + Square.136 + + + + + + + Square.137 + + + + + + + Square.138 + + + + + + + Square.139 + + + + + + + Square.140 + + + + + + + Square.141 + + + + + + + Square.142 + + + + + + + Square.143 + + + + + + + Square.144 + + + + + + + Square.145 + + + + + + + Square.146 + + + + + + + Square.147 + + + + + + + Square.148 + + + + + + + Square.149 + + + + + + + Square.150 + + + + + + + Square.151 + + + + + + + Square.152 + + + + + + + Square.153 + + + + + + + Square.154 + + + + + + + Square.155 + + + + + + + Square.156 + + + + + + + Square.157 + + + + + + + Square.158 + + + + + + + Square.159 + + + + + + + Square.164 + + + + + + + Square.165 + + + + + + + Square.306 + + + + + + + Square.307 + + + + + + + Square.308 + + + + + + + Square.309 + + + + + + + Square.310 + + + + + + + Square.311 + + + + + + + Square.312 + + + + + + + Square.313 + + + + + + + Square.314 + + + + + + + Square.315 + + + + + + + Square.316 + + + + + + + Square.317 + + + + + + + Square.318 + + + + + + + Square.319 + + + + + + + Square.320 + + + + + + + Square.321 + + + + + + + Square.322 + + + + + + + Square.323 + + + + + + + Square.324 + + + + + + + Square.325 + + + + + + + Square.326 + + + + + + + Square.327 + + + + + + + Square.328 + + + + + + + Square.329 + + + + + + + Square.330 + + + + + + + Square.331 + + + + + + + Square.332 + + + + + + + Square.333 + + + + + + + Square.334 + + + + + + + Square.335 + + + + + + + Square.336 + + + + + + + Square.337 + + + + + + + Square.338 + + + + + + + Square.339 + + + + + + + Square.340 + + + + + + + Square.341 + + + + + + + Square.342 + + + + + + + Square.343 + + + + + + + Square.344 + + + + + + + Square.345 + + + + + + + Square.346 + + + + + + + Square.347 + + + + + + + Square.348 + + + + + + + Square.349 + + + + + + + Square.350 + + + + + + + Square.351 + + + + + + + Square.352 + + + + + + + Square.353 + + + + + + + Square.354 + + + + + + + Square.355 + + + + + + + Square.356 + + + + + + + Square.357 + + + + + + + Square.358 + + + + + + + Square.359 + + + + + + + Square.360 + + + + + + + Square.361 + + + + + + + Square.362 + + + + + + + Square.363 + + + + + + + Square.364 + + + + + + + Square.365 + + + + + + + Square.366 + + + + + + + Square.367 + + + + + + + Square.368 + + + + + + + Square.369 + + + + + + + Square.370 + + + + + + + Square.371 + + + + + + + Square.372 + + + + + + + Square.373 + + + + + + + Square.374 + + + + + + + Square.375 + + + + + + + Square.376 + + + + + + + Square.377 + + + + + + + Square.378 + + + + + + + Square.379 + + + + + + + Square.380 + + + + + + + Square.381 + + + + + + + Square.382 + + + + + + + Square.383 + + + + + + + Square.384 + + + + + + + Square.385 + + + + + + + Square.386 + + + + + + + Square.387 + + + + + + + Square.388 + + + + + + + Square.389 + + + + + + + Square.390 + + + + + + + Square.391 + + + + + + + Square.392 + + + + + + + Square.393 + + + + + + + Square.394 + + + + + + + Square.395 + + + + + + + Square.396 + + + + + + + Square.397 + + + + + + + Square.398 + + + + + + + Square.399 + + + + + + + Square.400 + + + + + + + Square.401 + + + + + + + Square.402 + + + + + + + Square.403 + + + + + + + Square.404 + + + + + + + Square.405 + + + + + + + Square.406 + + + + + + + Square.407 + + + + + + + Square.408 + + + + + + + Square.409 + + + + + + + Square.410 + + + + + + + Square.411 + + + + + + + Square.412 + + + + + + + Square.413 + + + + + + + Square.414 + + + + + + + Square.415 + + + + + + + Square.416 + + + + + + + Square.417 + + + + + + + Square.418 + + + + + + + Square.419 + + + + + + + Square.420 + + + + + + + Square.421 + + + + + + + Square.422 + + + + + + + Square.423 + + + + + + + Square.424 + + + + + + + Square.425 + + + + + + + Square.426 + + + + + + + Square.427 + + + + + + + Square.428 + + + + + + + Square.429 + + + + + + + Square.430 + + + + + + + Square.431 + + + + + + + Square.432 + + + + + + + Square.433 + + + + + + + Square.434 + + + + + + + Square.435 + + + + + + + Square.436 + + + + + + + Square.437 + + + + + + + Square.438 + + + + + + + Square.439 + + + + + + + Square.440 + + + + + + + Square.441 + + + + + + + Square.442 + + + + + + + Square.443 + + + + + + + Square.444 + + + + + + + Square.445 + + + + + + + Square.446 + + + + + + + Square.447 + + + + + + + Square.448 + + + + + + + Square.449 + + + + + + + Square.450 + + + + + + + Square.451 + + + + + + + Square.452 + + + + + + + Square.453 + + + + + + + Square.454 + + + + + + + Square.455 + + + + + + + Square.456 + + + + + + + Square.457 + + + + + + + Square.458 + + + + + + + Square.459 + + + + + + + Square.460 + + + + + + + Square.461 + + + + + + + Square.462 + + + + + + + Square.463 + + + + + + + Square.464 + + + + + + + Square.465 + + + + + + + Square.466 + + + + + + + Square.467 + + + + + + + Square.468 + + + + + + + Square.469 + + + + + + + Square.470 + + + + + + + Square.471 + + + + + + + Square.472 + + + + + + + Square.473 + + + + + + + Square.474 + + + + + + + Square.475 + + + + + + + Square.476 + + + + + + + Square.477 + + + + + + + Square.478 + + + + + + + Square.479 + + + + + + + Square.480 + + + + + + + Square.481 + + + + + + + Square.482 + + + + + + + Square.483 + + + + + + + Square.484 + + + + + + + Square.485 + + + + + + + Square.486 + + + + + + + Square.487 + + + + + + + Square.488 + + + + + + + Square.489 + + + + + + + Square.490 + + + + + + + Square.491 + + + + + + + Square.492 + + + + + + + Square.493 + + + + + + + Square.494 + + + + + + + Square.495 + + + + + + + Square.496 + + + + + + + Square.497 + + + + + + + Square.498 + + + + + + + Square.499 + + + + + + + Square.500 + + + + + + + Square.501 + + + + + + + Square.502 + + + + + + + Square.503 + + + + + + + Square.504 + + + + + + + Square.505 + + + + + + + Square.506 + + + + + + + Square.507 + + + + + + + Square.508 + + + + + + + Square.509 + + + + + + + Square.510 + + + + + + + Square.511 + + + + + + + Square.512 + + + + + + + Square.513 + + + + + + + Square.514 + + + + + + + Square.515 + + + + + + + Square.516 + + + + + + + Square.517 + + + + + + + Square.518 + + + + + + + Square.519 + + + + + + + Square.520 + + + + + + + Square.521 + + + + + + + Square.522 + + + + + + + Square.523 + + + + + + + Square.524 + + + + + + + Square.525 + + + + + + + Square.526 + + + + + + + Square.527 + + + + + + + Square.528 + + + + + + + Square.529 + + + + + + + Square.530 + + + + + + + Square.531 + + + + + + + Square.532 + + + + + + + Square.533 + + + + + + + Square.534 + + + + + + + Square.535 + + + + + + + Square.536 + + + + + + + Square.537 + + + + + + + Square.538 + + + + + + + Square.539 + + + + + + + Square.540 + + + + + + + Square.541 + + + + + + + Square.542 + + + + + + + Square.543 + + + + + + + Square.544 + + + + + + + Square.545 + + + + + + + Square.546 + + + + + + + Square.547 + + + + + + + Square.548 + + + + + + + Square.549 + + + + + + + Square.550 + + + + + + + Square.551 + + + + + + + Square.552 + + + + + + + Square.553 + + + + + + + Square.554 + + + + + + + Square.555 + + + + + + + Square.556 + + + + + + + Square.557 + + + + + + + Square.558 + + + + + + + Square.559 + + + + + + + Square.560 + + + + + + + Square.561 + + + + + + + Square.562 + + + + + + + Square.563 + + + + + + + Square.564 + + + + + + + Square.565 + + + + + + + Square.566 + + + + + + + Square.567 + + + + + + + Square.568 + + + + + + + Square.569 + + + + + + + Square.570 + + + + + + + Square.571 + + + + + + + Square.572 + + + + + + + Square.573 + + + + + + + Square.574 + + + + + + + Square.575 + + + + + + + Square.576 + + + + + + + Square.577 + + + + + + + Square.578 + + + + + + + Square.579 + + + + + + + Square.580 + + + + + + + Square.581 + + + + + + + Square.582 + + + + + + + Square.583 + + + + + + + Square.584 + + + + + + + Square.585 + + + + + + + Square.586 + + + + + + + Square.587 + + + + + + + Square.588 + + + + + + + Square.589 + + + + + + + Square.590 + + + + + + + Square.591 + + + + + + + Square.592 + + + + + + + Square.593 + + + + + + + Square.594 + + + + + + + Square.596 + + + + + + + Square.597 + + + + + + + Square.598 + + + + + + + Square.599 + + + + + + + Square.600 + + + + + + + Square.601 + + + + + + + Square.602 + + + + + + + Square.603 + + + + + + + Square.604 + + + + + + + Square.606 + + + + + + + Square.607 + + + + + + + Square.608 + + + + + + + Square.609 + + + + + + + Square.610 + + + + + + + Square.611 + + + + + + + Square.612 + + + + + + + Square.613 + + + + + + + Square.614 + + + + + + + Square.616 + + + + + + + Square.617 + + + + + + + Square.618 + + + + + + + Square.619 + + + + + + + Square.620 + + + + + + + Square.621 + + + + + + + Square.622 + + + + + + + Square.623 + + + + + + + Square.624 + + + + + + + Square.626 + + + + + + + Square.627 + + + + + + + Square.628 + + + + + + + Square.629 + + + + + + + Square.630 + + + + + + + Square.631 + + + + + + + Square.632 + + + + + + + Square.633 + + + + + + + Square.634 + + + + + + + Square.636 + + + + + + + Square.637 + + + + + + + Square.638 + + + + + + + Square.639 + + + + + + + Square.640 + + + + + + + Square.641 + + + + + + + Square.642 + + + + + + + Square.643 + + + + + + + Square.644 + + + + + + + Square.646 + + + + + + + Square.647 + + + + + + + Square.648 + + + + + + + Square.649 + + + + + + + Square.650 + + + + + + + Square.651 + + + + + + + Square.652 + + + + + + + Square.653 + + + + + + + Square.654 + + + + + + + Square.656 + + + + + + + Square.657 + + + + + + + Square.658 + + + + + + + Square.659 + + + + + + + Square.660 + + + + + + + Square.661 + + + + + + + Square.662 + + + + + + + Square.663 + + + + + + + Square.664 + + + + + + + Square.666 + + + + + + + Square.667 + + + + + + + Square.668 + + + + + + + Square.669 + + + + + + + Square.670 + + + + + + + Square.671 + + + + + + + Square.672 + + + + + + + Square.673 + + + + + + + Square.674 + + + + + + + Square.676 + + + + + + + Square.677 + + + + + + + Square.678 + + + + + + + Square.679 + + + + + + + Square.680 + + + + + + + Square.681 + + + + + + + Square.682 + + + + + + + Square.683 + + + + + + + Square.684 + + + + + + + Square.686 + + + + + + + Square.687 + + + + + + + Square.688 + + + + + + + Square.689 + + + + + + + Square.690 + + + + + + + Square.691 + + + + + + + Square.692 + + + + + + + Square.693 + + + + + + + Square.694 + + + + + + + Square.695 + + + + + + + Square.696 + + + + + + + Square.697 + + + + + + + Square.698 + + + + + + + Square.699 + + + + + + + Square.700 + + + + + + + Square.701 + + + + + + + Square.702 + + + + + + + Square.703 + + + + + + + Square.704 + + + + + + + Square.705 + + + + + + + Square.706 + + + + + + + Square.707 + + + + + + + Square.708 + + + + + + + Square.709 + + + + + + + Square.710 + + + + + + + Square.711 + + + + + + + Square.712 + + + + + + + Square.713 + + + + + + + Square.714 + + + + + + + Square.715 + + + + + + + Square.716 + + + + + + + Square.717 + + + + + + + Square.718 + + + + + + + Square.719 + + + + + + + Square.720 + + + + + + + Square.721 + + + + + + + Square.722 + + + + + + + Square.723 + + + + + + + Square.724 + + + + + + + Square.725 + + + + + + + Square.727 + + + + + + + Square.728 + + + + + + + Square.729 + + + + + + + Square.733 + + + + + + + Square.734 + + + + + + + Square.735 + + + + + + + Square.736 + + + + + + + Square.737 + + + + + + + Square.738 + + + + + + + Square.739 + + + + + + + Square.740 + + + + + + + Square.742 + + + + + + + Square.743 + + + + + + + Square.744 + + + + + + + Square.730 + + + + + + + Sheet.3110 + Array Layer 0 + + + + Array Layer 0 + + Sheet.3112 + Array Layer 1 + + + + Array Layer 1 + + Sheet.3113 + Array Layer 2 + + + + Array Layer 2 + + Sheet.3114 + Array Layer 3 + + + + Array Layer 3 + + Square.160 + + + + + + + Square.161 + + + + + + + Square.162 + + + + + + + Square.163 + + + + + + + Square.741 + + + + + + + Rectangle + + + + + + + Rectangle.3164 + + + + + + + Rectangle.3165 + + + + + + + Rectangle.3166 + + + + + + + Sheet.3168 + + Sheet.3169 + + Square.3160 + + + + + + + Sheet.3171 + Mip Tail Data + + + + Mip Tail Data + + + Sheet.3172 + + Square.3154 + + + + + + + Sheet.3174 + Image Pixel Data + + + + Image Pixel Data + + + Sheet.3175 + + Square.3155 + + + + + + + Sheet.3177 + Sparse Memory Block + + + + Sparse Memory Block + + + + diff --git a/doc/specs/vulkan/images/sparseimage.vsdx b/doc/specs/vulkan/images/sparseimage.vsdx new file mode 100644 index 00000000..36f789b1 Binary files /dev/null and b/doc/specs/vulkan/images/sparseimage.vsdx differ diff --git a/doc/specs/vulkan/images/sparseimage_alignedmipsize.pdf b/doc/specs/vulkan/images/sparseimage_alignedmipsize.pdf new file mode 100644 index 00000000..02a16e36 Binary files /dev/null and b/doc/specs/vulkan/images/sparseimage_alignedmipsize.pdf differ diff --git a/doc/specs/vulkan/images/sparseimage_alignedmipsize.svg b/doc/specs/vulkan/images/sparseimage_alignedmipsize.svg new file mode 100644 index 00000000..af4fdfe6 --- /dev/null +++ b/doc/specs/vulkan/images/sparseimage_alignedmipsize.svg @@ -0,0 +1,4157 @@ + + + + + Vulkan Sparse Image + + + + + + + + + + + + + + Page-1 + + + Square.745 + + + + + + + Square.746 + + + + + + + Square.747 + + + + + + + Square.748 + + + + + + + Square.749 + + + + + + + Square.750 + + + + + + + Square.751 + + + + + + + Square.752 + + + + + + + Square.753 + + + + + + + Square.754 + + + + + + + Square.755 + + + + + + + Square.756 + + + + + + + Square.757 + + + + + + + Square.758 + + + + + + + Square.759 + + + + + + + Square.760 + + + + + + + Square.761 + + + + + + + Square.762 + + + + + + + Square.763 + + + + + + + Square.764 + + + + + + + Square.765 + + + + + + + Square.766 + + + + + + + Square.767 + + + + + + + Square.768 + + + + + + + Square.769 + + + + + + + Square.770 + + + + + + + Square.771 + + + + + + + Square.772 + + + + + + + Square.773 + + + + + + + Square.774 + + + + + + + Square.775 + + + + + + + Square.776 + + + + + + + Square.777 + + + + + + + Square.778 + + + + + + + Square.779 + + + + + + + Square.780 + + + + + + + Square.781 + + + + + + + Square.782 + + + + + + + Square.783 + + + + + + + Square.784 + + + + + + + Square.785 + + + + + + + Square.786 + + + + + + + Square.787 + + + + + + + Square.788 + + + + + + + Square.789 + + + + + + + Square.790 + + + + + + + Square.791 + + + + + + + Square.792 + + + + + + + Square.793 + + + + + + + Square.794 + + + + + + + Square.795 + + + + + + + Square.796 + + + + + + + Square.797 + + + + + + + Square.798 + + + + + + + Square.799 + + + + + + + Square.800 + + + + + + + Square.801 + + + + + + + Square.802 + + + + + + + Square.803 + + + + + + + Square.804 + + + + + + + Square.805 + + + + + + + Square.806 + + + + + + + Square.807 + + + + + + + Square.808 + + + + + + + Square.809 + + + + + + + Square.810 + + + + + + + Square.811 + + + + + + + Square.812 + + + + + + + Square.813 + + + + + + + Square.814 + + + + + + + Square.815 + + + + + + + Square.816 + + + + + + + Square.817 + + + + + + + Square.818 + + + + + + + Square.819 + + + + + + + Square.820 + + + + + + + Square.821 + + + + + + + Square.822 + + + + + + + Square.823 + + + + + + + Square.824 + + + + + + + Square.825 + + + + + + + Square.826 + + + + + + + Square.827 + + + + + + + Square.828 + + + + + + + Square.829 + + + + + + + Square.830 + + + + + + + Square.831 + + + + + + + Square.832 + + + + + + + Square.833 + + + + + + + Square.834 + + + + + + + Square.835 + + + + + + + Square.836 + + + + + + + Square.837 + + + + + + + Square.838 + + + + + + + Square.839 + + + + + + + Square.840 + + + + + + + Square.841 + + + + + + + Square.842 + + + + + + + Square.843 + + + + + + + Square.844 + + + + + + + Square.845 + + + + + + + Square.846 + + + + + + + Square.847 + + + + + + + Square.848 + + + + + + + Square.849 + + + + + + + Square.850 + + + + + + + Square.851 + + + + + + + Square.852 + + + + + + + Square.853 + + + + + + + Square.854 + + + + + + + Square.855 + + + + + + + Square.856 + + + + + + + Square.857 + + + + + + + Square.858 + + + + + + + Square.859 + + + + + + + Square.860 + + + + + + + Square.861 + + + + + + + Square.862 + + + + + + + Square.863 + + + + + + + Square.864 + + + + + + + Square.865 + + + + + + + Square.866 + + + + + + + Square.867 + + + + + + + Square.868 + + + + + + + Square.869 + + + + + + + Square.870 + + + + + + + Square.871 + + + + + + + Square.872 + + + + + + + Square.873 + + + + + + + Square.874 + + + + + + + Square.875 + + + + + + + Square.876 + + + + + + + Square.877 + + + + + + + Square.878 + + + + + + + Square.885 + + + + + + + Square.886 + + + + + + + Square.887 + + + + + + + Square.888 + + + + + + + Square.889 + + + + + + + Square.890 + + + + + + + Square.891 + + + + + + + Square.892 + + + + + + + Square.893 + + + + + + + Square.894 + + + + + + + Square.895 + + + + + + + Square.896 + + + + + + + Square.897 + + + + + + + Square.898 + + + + + + + Square.899 + + + + + + + Square.900 + + + + + + + Square.901 + + + + + + + Square.902 + + + + + + + Square.903 + + + + + + + Square.904 + + + + + + + Square.905 + + + + + + + Square.906 + + + + + + + Square.907 + + + + + + + Square.908 + + + + + + + Square.909 + + + + + + + Square.910 + + + + + + + Square.911 + + + + + + + Square.912 + + + + + + + Square.913 + + + + + + + Square.914 + + + + + + + Square.915 + + + + + + + Square.916 + + + + + + + Square.917 + + + + + + + Square.918 + + + + + + + Square.919 + + + + + + + Square.920 + + + + + + + Square.921 + + + + + + + Square.922 + + + + + + + Square.923 + + + + + + + Square.924 + + + + + + + Square.925 + + + + + + + Square.926 + + + + + + + Square.927 + + + + + + + Square.928 + + + + + + + Square.929 + + + + + + + Square.930 + + + + + + + Square.931 + + + + + + + Square.932 + + + + + + + Square.933 + + + + + + + Square.934 + + + + + + + Square.935 + + + + + + + Square.936 + + + + + + + Square.937 + + + + + + + Square.938 + + + + + + + Square.939 + + + + + + + Square.940 + + + + + + + Square.941 + + + + + + + Square.942 + + + + + + + Square.943 + + + + + + + Square.944 + + + + + + + Square.945 + + + + + + + Square.946 + + + + + + + Square.947 + + + + + + + Square.948 + + + + + + + Square.949 + + + + + + + Square.950 + + + + + + + Square.951 + + + + + + + Square.952 + + + + + + + Square.953 + + + + + + + Square.954 + + + + + + + Square.955 + + + + + + + Square.956 + + + + + + + Square.957 + + + + + + + Square.958 + + + + + + + Square.959 + + + + + + + Square.960 + + + + + + + Square.961 + + + + + + + Square.962 + + + + + + + Square.963 + + + + + + + Square.964 + + + + + + + Square.965 + + + + + + + Square.966 + + + + + + + Square.967 + + + + + + + Square.968 + + + + + + + Square.969 + + + + + + + Square.970 + + + + + + + Square.971 + + + + + + + Square.972 + + + + + + + Square.973 + + + + + + + Square.974 + + + + + + + Square.975 + + + + + + + Square.976 + + + + + + + Square.977 + + + + + + + Square.978 + + + + + + + Square.979 + + + + + + + Square.980 + + + + + + + Square.981 + + + + + + + Square.982 + + + + + + + Square.983 + + + + + + + Square.984 + + + + + + + Square.985 + + + + + + + Square.986 + + + + + + + Square.987 + + + + + + + Square.988 + + + + + + + Square.989 + + + + + + + Square.990 + + + + + + + Square.991 + + + + + + + Square.992 + + + + + + + Square.993 + + + + + + + Square.994 + + + + + + + Square.995 + + + + + + + Square.996 + + + + + + + Square.997 + + + + + + + Square.998 + + + + + + + Square.999 + + + + + + + Square.1000 + + + + + + + Square.1001 + + + + + + + Square.1002 + + + + + + + Square.1003 + + + + + + + Square.1004 + + + + + + + Square.1005 + + + + + + + Square.1006 + + + + + + + Square.1007 + + + + + + + Square.1008 + + + + + + + Square.1009 + + + + + + + Square.1010 + + + + + + + Square.1011 + + + + + + + Square.1012 + + + + + + + Square.1013 + + + + + + + Square.1014 + + + + + + + Square.1015 + + + + + + + Square.1016 + + + + + + + Square.1017 + + + + + + + Square.1018 + + + + + + + Square.1025 + + + + + + + Square.1026 + + + + + + + Square.1027 + + + + + + + Square.1028 + + + + + + + Square.1029 + + + + + + + Square.1030 + + + + + + + Square.1031 + + + + + + + Square.1032 + + + + + + + Square.1033 + + + + + + + Square.1034 + + + + + + + Square.1035 + + + + + + + Square.1036 + + + + + + + Square.1037 + + + + + + + Square.1038 + + + + + + + Square.1039 + + + + + + + Square.1040 + + + + + + + Square.1041 + + + + + + + Square.1042 + + + + + + + Square.1043 + + + + + + + Square.1044 + + + + + + + Square.1045 + + + + + + + Square.1046 + + + + + + + Square.1047 + + + + + + + Square.1048 + + + + + + + Square.1049 + + + + + + + Square.1050 + + + + + + + Square.1051 + + + + + + + Square.1052 + + + + + + + Square.1053 + + + + + + + Square.1054 + + + + + + + Square.1055 + + + + + + + Square.1056 + + + + + + + Square.1057 + + + + + + + Square.1058 + + + + + + + Square.1059 + + + + + + + Square.1060 + + + + + + + Square.1061 + + + + + + + Square.1062 + + + + + + + Square.1063 + + + + + + + Square.1064 + + + + + + + Square.1065 + + + + + + + Square.1066 + + + + + + + Square.1067 + + + + + + + Square.1068 + + + + + + + Square.1069 + + + + + + + Square.1070 + + + + + + + Square.1071 + + + + + + + Square.1072 + + + + + + + Square.1073 + + + + + + + Square.1074 + + + + + + + Square.1075 + + + + + + + Square.1076 + + + + + + + Square.1077 + + + + + + + Square.1078 + + + + + + + Square.1079 + + + + + + + Square.1080 + + + + + + + Square.1081 + + + + + + + Square.1082 + + + + + + + Square.1083 + + + + + + + Square.1084 + + + + + + + Square.1085 + + + + + + + Square.1086 + + + + + + + Square.1087 + + + + + + + Square.1088 + + + + + + + Square.1089 + + + + + + + Square.1090 + + + + + + + Square.1091 + + + + + + + Square.1092 + + + + + + + Square.1093 + + + + + + + Square.1094 + + + + + + + Square.1095 + + + + + + + Square.1096 + + + + + + + Square.1097 + + + + + + + Square.1098 + + + + + + + Square.1099 + + + + + + + Square.1100 + + + + + + + Square.1101 + + + + + + + Square.1102 + + + + + + + Square.1103 + + + + + + + Square.1104 + + + + + + + Square.1105 + + + + + + + Square.1106 + + + + + + + Square.1107 + + + + + + + Square.1108 + + + + + + + Square.1109 + + + + + + + Square.1110 + + + + + + + Square.1111 + + + + + + + Square.1112 + + + + + + + Square.1113 + + + + + + + Square.1114 + + + + + + + Square.1115 + + + + + + + Square.1116 + + + + + + + Square.1117 + + + + + + + Square.1118 + + + + + + + Square.1119 + + + + + + + Square.1120 + + + + + + + Square.1121 + + + + + + + Square.1122 + + + + + + + Square.1123 + + + + + + + Square.1124 + + + + + + + Square.1125 + + + + + + + Square.1126 + + + + + + + Square.1127 + + + + + + + Square.1128 + + + + + + + Square.1129 + + + + + + + Square.1130 + + + + + + + Square.1131 + + + + + + + Square.1132 + + + + + + + Square.1133 + + + + + + + Square.1134 + + + + + + + Square.1135 + + + + + + + Square.1136 + + + + + + + Square.1137 + + + + + + + Square.1138 + + + + + + + Square.1139 + + + + + + + Square.1140 + + + + + + + Square.1141 + + + + + + + Square.1142 + + + + + + + Square.1143 + + + + + + + Square.1144 + + + + + + + Square.1145 + + + + + + + Square.1146 + + + + + + + Square.1147 + + + + + + + Square.1148 + + + + + + + Square.1149 + + + + + + + Square.1150 + + + + + + + Square.1151 + + + + + + + Square.1152 + + + + + + + Square.1153 + + + + + + + Square.1154 + + + + + + + Square.1155 + + + + + + + Square.1156 + + + + + + + Square.1157 + + + + + + + Square.1158 + + + + + + + Square.1165 + + + + + + + Square.1166 + + + + + + + Square.1167 + + + + + + + Square.1168 + + + + + + + Square.1169 + + + + + + + Square.1170 + + + + + + + Square.1171 + + + + + + + Square.1172 + + + + + + + Square.1173 + + + + + + + Square.1174 + + + + + + + Square.1175 + + + + + + + Square.1176 + + + + + + + Square.1177 + + + + + + + Square.1178 + + + + + + + Square.1179 + + + + + + + Square.1180 + + + + + + + Square.1181 + + + + + + + Square.1182 + + + + + + + Square.1183 + + + + + + + Square.1184 + + + + + + + Square.1185 + + + + + + + Square.1186 + + + + + + + Square.1187 + + + + + + + Square.1188 + + + + + + + Square.1189 + + + + + + + Square.1190 + + + + + + + Square.1191 + + + + + + + Square.1192 + + + + + + + Square.1193 + + + + + + + Square.1194 + + + + + + + Square.1195 + + + + + + + Square.1196 + + + + + + + Square.1197 + + + + + + + Square.1198 + + + + + + + Square.1199 + + + + + + + Square.1200 + + + + + + + Square.1201 + + + + + + + Square.1202 + + + + + + + Square.1203 + + + + + + + Square.1204 + + + + + + + Square.1205 + + + + + + + Square.1206 + + + + + + + Square.1207 + + + + + + + Square.1208 + + + + + + + Square.1209 + + + + + + + Square.1210 + + + + + + + Square.1211 + + + + + + + Square.1212 + + + + + + + Square.1213 + + + + + + + Square.1214 + + + + + + + Square.1215 + + + + + + + Square.1216 + + + + + + + Square.1217 + + + + + + + Square.1218 + + + + + + + Square.1219 + + + + + + + Square.1220 + + + + + + + Square.1221 + + + + + + + Square.1222 + + + + + + + Square.1223 + + + + + + + Square.1224 + + + + + + + Square.1225 + + + + + + + Square.1226 + + + + + + + Square.1227 + + + + + + + Square.1228 + + + + + + + Square.1229 + + + + + + + Square.1230 + + + + + + + Square.1231 + + + + + + + Square.1232 + + + + + + + Square.1233 + + + + + + + Square.1234 + + + + + + + Square.1235 + + + + + + + Square.1236 + + + + + + + Square.1237 + + + + + + + Square.1238 + + + + + + + Square.1239 + + + + + + + Square.1240 + + + + + + + Square.1241 + + + + + + + Square.1242 + + + + + + + Square.1243 + + + + + + + Square.1244 + + + + + + + Square.1245 + + + + + + + Square.1246 + + + + + + + Square.1247 + + + + + + + Square.1248 + + + + + + + Square.1249 + + + + + + + Square.1250 + + + + + + + Square.1251 + + + + + + + Square.1252 + + + + + + + Square.1253 + + + + + + + Square.1254 + + + + + + + Square.1255 + + + + + + + Square.1256 + + + + + + + Square.1257 + + + + + + + Square.1258 + + + + + + + Square.1259 + + + + + + + Square.1260 + + + + + + + Square.1261 + + + + + + + Square.1262 + + + + + + + Square.1263 + + + + + + + Square.1264 + + + + + + + Square.1265 + + + + + + + Square.1266 + + + + + + + Square.1267 + + + + + + + Square.1268 + + + + + + + Square.1269 + + + + + + + Square.1270 + + + + + + + Square.1271 + + + + + + + Square.1272 + + + + + + + Square.1273 + + + + + + + Square.1274 + + + + + + + Square.1275 + + + + + + + Square.1276 + + + + + + + Square.1277 + + + + + + + Square.1278 + + + + + + + Square.1279 + + + + + + + Square.1280 + + + + + + + Square.1281 + + + + + + + Square.1282 + + + + + + + Square.1283 + + + + + + + Square.1284 + + + + + + + Square.1285 + + + + + + + Square.1286 + + + + + + + Square.1287 + + + + + + + Square.1288 + + + + + + + Square.1289 + + + + + + + Square.1290 + + + + + + + Square.1291 + + + + + + + Square.1292 + + + + + + + Square.1293 + + + + + + + Square.1294 + + + + + + + Square.1295 + + + + + + + Square.1296 + + + + + + + Square.1297 + + + + + + + Square.1298 + + + + + + + Square.1305 + + + + + + + Square.1306 + + + + + + + Square.1307 + + + + + + + Square.1308 + + + + + + + Square.1309 + + + + + + + Square.1310 + + + + + + + Square.1311 + + + + + + + Square.1312 + + + + + + + Square.1321 + + + + + + + Square.1322 + + + + + + + Square.1323 + + + + + + + Square.1324 + + + + + + + Square.1325 + + + + + + + Square.1326 + + + + + + + Square.1327 + + + + + + + Square.1328 + + + + + + + Square.1329 + + + + + + + Square.1330 + + + + + + + Square.1331 + + + + + + + Square.1332 + + + + + + + Square.1333 + + + + + + + Square.1334 + + + + + + + Square.1335 + + + + + + + Square.1336 + + + + + + + Square.1337 + + + + + + + Square.1338 + + + + + + + Square.1339 + + + + + + + Square.1340 + + + + + + + Square.1341 + + + + + + + Square.1342 + + + + + + + Square.1343 + + + + + + + Square.1344 + + + + + + + Sheet.3119 + Array Layer 0 + + + + Array Layer 0 + + Sheet.3120 + Array Layer 1 + + + + Array Layer 1 + + Sheet.3121 + Array Layer 2 + + + + Array Layer 2 + + Sheet.3122 + Array Layer 3 + + + + Array Layer 3 + + Sheet.3138 + Mip Level 0 + + + + Mip Level 0 + + Sheet.3139 + Mip Level 1 + + + + Mip Level 1 + + Sheet.3142 + Mip Tail + + + + Mip Tail + + Sheet.3167 + VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT + + + + VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT + + Sheet.3168 + Arrayed Sparse Image + + + + Arrayed Sparse Image + + Sheet.3170 + + Sheet.3171 + + Square.3160 + + + + + + + Sheet.3173 + Mip Tail Data + + + + Mip Tail Data + + + Sheet.3174 + + Square.3154 + + + + + + + Sheet.3176 + Image Pixel Data + + + + Image Pixel Data + + + Sheet.3177 + + Square.3155 + + + + + + + Sheet.3179 + Sparse Memory Block + + + + Sparse Memory Block + + + + Rectangle + + + + + + + Rectangle.3181 + + + + + + + Rectangle.3182 + + + + + + + Rectangle.3183 + + + + + + + diff --git a/doc/specs/vulkan/images/sparseimage_alignedmipsize.vsdx b/doc/specs/vulkan/images/sparseimage_alignedmipsize.vsdx new file mode 100644 index 00000000..a53b61de Binary files /dev/null and b/doc/specs/vulkan/images/sparseimage_alignedmipsize.vsdx differ diff --git a/doc/specs/vulkan/images/sparseimage_alignedmipsize_singlemiptail.pdf b/doc/specs/vulkan/images/sparseimage_alignedmipsize_singlemiptail.pdf new file mode 100644 index 00000000..4b64a006 Binary files /dev/null and b/doc/specs/vulkan/images/sparseimage_alignedmipsize_singlemiptail.pdf differ diff --git a/doc/specs/vulkan/images/sparseimage_alignedmipsize_singlemiptail.svg b/doc/specs/vulkan/images/sparseimage_alignedmipsize_singlemiptail.svg new file mode 100644 index 00000000..2c90fbd1 --- /dev/null +++ b/doc/specs/vulkan/images/sparseimage_alignedmipsize_singlemiptail.svg @@ -0,0 +1,4143 @@ + + + + + Vulkan Sparse Image + + + + + + + + + + + + + + Page-1 + + + Square.1913 + + + + + + + Square.1914 + + + + + + + Square.1915 + + + + + + + Square.1916 + + + + + + + Square.1917 + + + + + + + Square.1918 + + + + + + + Square.1919 + + + + + + + Square.1920 + + + + + + + Square.1921 + + + + + + + Square.1922 + + + + + + + Square.1923 + + + + + + + Square.1924 + + + + + + + Square.1925 + + + + + + + Square.1926 + + + + + + + Square.1927 + + + + + + + Square.1928 + + + + + + + Square.1929 + + + + + + + Square.1930 + + + + + + + Square.1931 + + + + + + + Square.1932 + + + + + + + Square.1933 + + + + + + + Square.1934 + + + + + + + Square.1935 + + + + + + + Square.1936 + + + + + + + Square.1937 + + + + + + + Square.1938 + + + + + + + Square.1939 + + + + + + + Square.1940 + + + + + + + Square.1941 + + + + + + + Square.1942 + + + + + + + Square.1943 + + + + + + + Square.1944 + + + + + + + Square.1945 + + + + + + + Square.1946 + + + + + + + Square.1947 + + + + + + + Square.1948 + + + + + + + Square.1949 + + + + + + + Square.1950 + + + + + + + Square.1951 + + + + + + + Square.1952 + + + + + + + Square.1953 + + + + + + + Square.1954 + + + + + + + Square.1955 + + + + + + + Square.1956 + + + + + + + Square.1957 + + + + + + + Square.1958 + + + + + + + Square.1959 + + + + + + + Square.1960 + + + + + + + Square.1961 + + + + + + + Square.1962 + + + + + + + Square.1963 + + + + + + + Square.1964 + + + + + + + Square.1965 + + + + + + + Square.1966 + + + + + + + Square.1967 + + + + + + + Square.1968 + + + + + + + Square.1969 + + + + + + + Square.1970 + + + + + + + Square.1971 + + + + + + + Square.1972 + + + + + + + Square.1973 + + + + + + + Square.1974 + + + + + + + Square.1975 + + + + + + + Square.1976 + + + + + + + Square.1977 + + + + + + + Square.1978 + + + + + + + Square.1979 + + + + + + + Square.1980 + + + + + + + Square.1981 + + + + + + + Square.1982 + + + + + + + Square.1983 + + + + + + + Square.1984 + + + + + + + Square.1985 + + + + + + + Square.1986 + + + + + + + Square.1987 + + + + + + + Square.1988 + + + + + + + Square.1989 + + + + + + + Square.1990 + + + + + + + Square.1991 + + + + + + + Square.1992 + + + + + + + Square.1993 + + + + + + + Square.1994 + + + + + + + Square.1995 + + + + + + + Square.1996 + + + + + + + Square.1997 + + + + + + + Square.1998 + + + + + + + Square.1999 + + + + + + + Square.2000 + + + + + + + Square.2001 + + + + + + + Square.2002 + + + + + + + Square.2003 + + + + + + + Square.2004 + + + + + + + Square.2005 + + + + + + + Square.2006 + + + + + + + Square.2007 + + + + + + + Square.2008 + + + + + + + Square.2009 + + + + + + + Square.2010 + + + + + + + Square.2011 + + + + + + + Square.2012 + + + + + + + Square.2013 + + + + + + + Square.2014 + + + + + + + Square.2015 + + + + + + + Square.2016 + + + + + + + Square.2017 + + + + + + + Square.2018 + + + + + + + Square.2019 + + + + + + + Square.2020 + + + + + + + Square.2021 + + + + + + + Square.2022 + + + + + + + Square.2023 + + + + + + + Square.2024 + + + + + + + Square.2025 + + + + + + + Square.2026 + + + + + + + Square.2027 + + + + + + + Square.2028 + + + + + + + Square.2029 + + + + + + + Square.2030 + + + + + + + Square.2031 + + + + + + + Square.2032 + + + + + + + Square.2033 + + + + + + + Square.2034 + + + + + + + Square.2035 + + + + + + + Square.2036 + + + + + + + Square.2037 + + + + + + + Square.2038 + + + + + + + Square.2039 + + + + + + + Square.2040 + + + + + + + Square.2044 + + + + + + + Square.2045 + + + + + + + Square.2046 + + + + + + + Square.2047 + + + + + + + Square.2048 + + + + + + + Square.2049 + + + + + + + Square.2050 + + + + + + + Square.2051 + + + + + + + Square.2052 + + + + + + + Square.2053 + + + + + + + Square.2054 + + + + + + + Square.2055 + + + + + + + Square.2056 + + + + + + + Square.2057 + + + + + + + Square.2058 + + + + + + + Square.2059 + + + + + + + Square.2060 + + + + + + + Square.2061 + + + + + + + Square.2062 + + + + + + + Square.2063 + + + + + + + Square.2064 + + + + + + + Square.2065 + + + + + + + Square.2066 + + + + + + + Square.2067 + + + + + + + Square.2068 + + + + + + + Square.2069 + + + + + + + Square.2070 + + + + + + + Square.2071 + + + + + + + Square.2072 + + + + + + + Square.2073 + + + + + + + Square.2074 + + + + + + + Square.2075 + + + + + + + Square.2076 + + + + + + + Square.2077 + + + + + + + Square.2078 + + + + + + + Square.2079 + + + + + + + Square.2080 + + + + + + + Square.2081 + + + + + + + Square.2082 + + + + + + + Square.2083 + + + + + + + Square.2084 + + + + + + + Square.2085 + + + + + + + Square.2086 + + + + + + + Square.2087 + + + + + + + Square.2088 + + + + + + + Square.2089 + + + + + + + Square.2090 + + + + + + + Square.2091 + + + + + + + Square.2092 + + + + + + + Square.2093 + + + + + + + Square.2094 + + + + + + + Square.2095 + + + + + + + Square.2096 + + + + + + + Square.2097 + + + + + + + Square.2098 + + + + + + + Square.2099 + + + + + + + Square.2100 + + + + + + + Square.2101 + + + + + + + Square.2102 + + + + + + + Square.2103 + + + + + + + Square.2104 + + + + + + + Square.2105 + + + + + + + Square.2106 + + + + + + + Square.2107 + + + + + + + Square.2108 + + + + + + + Square.2109 + + + + + + + Square.2110 + + + + + + + Square.2111 + + + + + + + Square.2112 + + + + + + + Square.2113 + + + + + + + Square.2114 + + + + + + + Square.2115 + + + + + + + Square.2116 + + + + + + + Square.2117 + + + + + + + Square.2118 + + + + + + + Square.2119 + + + + + + + Square.2120 + + + + + + + Square.2121 + + + + + + + Square.2122 + + + + + + + Square.2123 + + + + + + + Square.2124 + + + + + + + Square.2125 + + + + + + + Square.2126 + + + + + + + Square.2127 + + + + + + + Square.2128 + + + + + + + Square.2129 + + + + + + + Square.2130 + + + + + + + Square.2131 + + + + + + + Square.2132 + + + + + + + Square.2133 + + + + + + + Square.2134 + + + + + + + Square.2135 + + + + + + + Square.2136 + + + + + + + Square.2137 + + + + + + + Square.2138 + + + + + + + Square.2139 + + + + + + + Square.2140 + + + + + + + Square.2141 + + + + + + + Square.2142 + + + + + + + Square.2143 + + + + + + + Square.2144 + + + + + + + Square.2145 + + + + + + + Square.2146 + + + + + + + Square.2147 + + + + + + + Square.2148 + + + + + + + Square.2149 + + + + + + + Square.2150 + + + + + + + Square.2151 + + + + + + + Square.2152 + + + + + + + Square.2153 + + + + + + + Square.2154 + + + + + + + Square.2155 + + + + + + + Square.2156 + + + + + + + Square.2157 + + + + + + + Square.2158 + + + + + + + Square.2159 + + + + + + + Square.2160 + + + + + + + Square.2161 + + + + + + + Square.2162 + + + + + + + Square.2163 + + + + + + + Square.2164 + + + + + + + Square.2165 + + + + + + + Square.2166 + + + + + + + Square.2167 + + + + + + + Square.2168 + + + + + + + Square.2169 + + + + + + + Square.2170 + + + + + + + Square.2171 + + + + + + + Square.2181 + + + + + + + Square.2182 + + + + + + + Square.2183 + + + + + + + Square.2184 + + + + + + + Square.2185 + + + + + + + Square.2186 + + + + + + + Square.2187 + + + + + + + Square.2188 + + + + + + + Square.2189 + + + + + + + Square.2190 + + + + + + + Square.2191 + + + + + + + Square.2192 + + + + + + + Square.2193 + + + + + + + Square.2194 + + + + + + + Square.2195 + + + + + + + Square.2196 + + + + + + + Square.2197 + + + + + + + Square.2198 + + + + + + + Square.2199 + + + + + + + Square.2200 + + + + + + + Square.2201 + + + + + + + Square.2202 + + + + + + + Square.2203 + + + + + + + Square.2204 + + + + + + + Square.2205 + + + + + + + Square.2206 + + + + + + + Square.2207 + + + + + + + Square.2208 + + + + + + + Square.2209 + + + + + + + Square.2210 + + + + + + + Square.2211 + + + + + + + Square.2212 + + + + + + + Square.2213 + + + + + + + Square.2214 + + + + + + + Square.2215 + + + + + + + Square.2216 + + + + + + + Square.2217 + + + + + + + Square.2218 + + + + + + + Square.2219 + + + + + + + Square.2220 + + + + + + + Square.2221 + + + + + + + Square.2222 + + + + + + + Square.2223 + + + + + + + Square.2224 + + + + + + + Square.2225 + + + + + + + Square.2226 + + + + + + + Square.2227 + + + + + + + Square.2228 + + + + + + + Square.2229 + + + + + + + Square.2230 + + + + + + + Square.2231 + + + + + + + Square.2232 + + + + + + + Square.2233 + + + + + + + Square.2234 + + + + + + + Square.2235 + + + + + + + Square.2236 + + + + + + + Square.2237 + + + + + + + Square.2238 + + + + + + + Square.2239 + + + + + + + Square.2240 + + + + + + + Square.2241 + + + + + + + Square.2242 + + + + + + + Square.2243 + + + + + + + Square.2244 + + + + + + + Square.2245 + + + + + + + Square.2246 + + + + + + + Square.2247 + + + + + + + Square.2248 + + + + + + + Square.2249 + + + + + + + Square.2250 + + + + + + + Square.2251 + + + + + + + Square.2252 + + + + + + + Square.2253 + + + + + + + Square.2254 + + + + + + + Square.2255 + + + + + + + Square.2256 + + + + + + + Square.2257 + + + + + + + Square.2258 + + + + + + + Square.2259 + + + + + + + Square.2260 + + + + + + + Square.2261 + + + + + + + Square.2262 + + + + + + + Square.2263 + + + + + + + Square.2264 + + + + + + + Square.2265 + + + + + + + Square.2266 + + + + + + + Square.2267 + + + + + + + Square.2268 + + + + + + + Square.2269 + + + + + + + Square.2270 + + + + + + + Square.2271 + + + + + + + Square.2272 + + + + + + + Square.2273 + + + + + + + Square.2274 + + + + + + + Square.2275 + + + + + + + Square.2276 + + + + + + + Square.2277 + + + + + + + Square.2278 + + + + + + + Square.2279 + + + + + + + Square.2280 + + + + + + + Square.2281 + + + + + + + Square.2282 + + + + + + + Square.2283 + + + + + + + Square.2284 + + + + + + + Square.2285 + + + + + + + Square.2286 + + + + + + + Square.2287 + + + + + + + Square.2288 + + + + + + + Square.2289 + + + + + + + Square.2290 + + + + + + + Square.2291 + + + + + + + Square.2292 + + + + + + + Square.2293 + + + + + + + Square.2294 + + + + + + + Square.2295 + + + + + + + Square.2296 + + + + + + + Square.2297 + + + + + + + Square.2298 + + + + + + + Square.2299 + + + + + + + Square.2300 + + + + + + + Square.2301 + + + + + + + Square.2302 + + + + + + + Square.2303 + + + + + + + Square.2304 + + + + + + + Square.2305 + + + + + + + Square.2315 + + + + + + + Square.2316 + + + + + + + Square.2317 + + + + + + + Square.2318 + + + + + + + Square.2319 + + + + + + + Square.2320 + + + + + + + Square.2321 + + + + + + + Square.2322 + + + + + + + Square.2323 + + + + + + + Square.2324 + + + + + + + Square.2325 + + + + + + + Square.2326 + + + + + + + Square.2327 + + + + + + + Square.2328 + + + + + + + Square.2329 + + + + + + + Square.2330 + + + + + + + Square.2331 + + + + + + + Square.2332 + + + + + + + Square.2333 + + + + + + + Square.2334 + + + + + + + Square.2335 + + + + + + + Square.2336 + + + + + + + Square.2337 + + + + + + + Square.2338 + + + + + + + Square.2339 + + + + + + + Square.2340 + + + + + + + Square.2341 + + + + + + + Square.2342 + + + + + + + Square.2343 + + + + + + + Square.2344 + + + + + + + Square.2345 + + + + + + + Square.2346 + + + + + + + Square.2347 + + + + + + + Square.2348 + + + + + + + Square.2349 + + + + + + + Square.2350 + + + + + + + Square.2351 + + + + + + + Square.2352 + + + + + + + Square.2353 + + + + + + + Square.2354 + + + + + + + Square.2355 + + + + + + + Square.2356 + + + + + + + Square.2357 + + + + + + + Square.2358 + + + + + + + Square.2359 + + + + + + + Square.2360 + + + + + + + Square.2361 + + + + + + + Square.2362 + + + + + + + Square.2363 + + + + + + + Square.2364 + + + + + + + Square.2365 + + + + + + + Square.2366 + + + + + + + Square.2367 + + + + + + + Square.2368 + + + + + + + Square.2369 + + + + + + + Square.2370 + + + + + + + Square.2371 + + + + + + + Square.2372 + + + + + + + Square.2373 + + + + + + + Square.2374 + + + + + + + Square.2375 + + + + + + + Square.2376 + + + + + + + Square.2377 + + + + + + + Square.2378 + + + + + + + Square.2379 + + + + + + + Square.2380 + + + + + + + Square.2381 + + + + + + + Square.2382 + + + + + + + Square.2383 + + + + + + + Square.2384 + + + + + + + Square.2385 + + + + + + + Square.2386 + + + + + + + Square.2387 + + + + + + + Square.2388 + + + + + + + Square.2389 + + + + + + + Square.2390 + + + + + + + Square.2391 + + + + + + + Square.2392 + + + + + + + Square.2393 + + + + + + + Square.2394 + + + + + + + Square.2395 + + + + + + + Square.2396 + + + + + + + Square.2397 + + + + + + + Square.2398 + + + + + + + Square.2399 + + + + + + + Square.2400 + + + + + + + Square.2401 + + + + + + + Square.2402 + + + + + + + Square.2403 + + + + + + + Square.2404 + + + + + + + Square.2405 + + + + + + + Square.2406 + + + + + + + Square.2407 + + + + + + + Square.2408 + + + + + + + Square.2409 + + + + + + + Square.2410 + + + + + + + Square.2411 + + + + + + + Square.2412 + + + + + + + Square.2413 + + + + + + + Square.2414 + + + + + + + Square.2415 + + + + + + + Square.2416 + + + + + + + Square.2417 + + + + + + + Square.2418 + + + + + + + Square.2419 + + + + + + + Square.2420 + + + + + + + Square.2421 + + + + + + + Square.2422 + + + + + + + Square.2423 + + + + + + + Square.2424 + + + + + + + Square.2425 + + + + + + + Square.2426 + + + + + + + Square.2427 + + + + + + + Square.2428 + + + + + + + Square.2429 + + + + + + + Square.2430 + + + + + + + Square.2431 + + + + + + + Square.2432 + + + + + + + Square.2433 + + + + + + + Square.2434 + + + + + + + Square.2435 + + + + + + + Square.2436 + + + + + + + Square.2437 + + + + + + + Square.2438 + + + + + + + Square.2439 + + + + + + + Square.2449 + + + + + + + Square.2450 + + + + + + + Square.2451 + + + + + + + Square.2452 + + + + + + + Square.2453 + + + + + + + Square.2454 + + + + + + + Square.2455 + + + + + + + Square.2456 + + + + + + + Square.2457 + + + + + + + Square.2458 + + + + + + + Square.2459 + + + + + + + Square.2460 + + + + + + + Square.2461 + + + + + + + Square.2462 + + + + + + + Square.3063 + + + + + + + Square.3064 + + + + + + + Square.3065 + + + + + + + Square.3069 + + + + + + + Square.3070 + + + + + + + Square.3071 + + + + + + + Square.3072 + + + + + + + Square.3073 + + + + + + + Square.3074 + + + + + + + Square.3075 + + + + + + + Square.3076 + + + + + + + Square.3077 + + + + + + + Square.3078 + + + + + + + Square.3079 + + + + + + + Square.3080 + + + + + + + Square.3084 + + + + + + + Square.3085 + + + + + + + Square.3086 + + + + + + + Square.3087 + + + + + + + Square.3088 + + + + + + + Square.3089 + + + + + + + Square.3090 + + + + + + + Square.3091 + + + + + + + Square.3092 + + + + + + + Square.3093 + + + + + + + Square.3094 + + + + + + + Square.3095 + + + + + + + Square.3099 + + + + + + + Square.3100 + + + + + + + Square.3101 + + + + + + + Square.3102 + + + + + + + Square.3103 + + + + + + + Square.3104 + + + + + + + Square.3105 + + + + + + + Square.3106 + + + + + + + Square.3107 + + + + + + + Sheet.3123 + Array Layer 0 + + + + Array Layer 0 + + Sheet.3124 + Array Layer 1 + + + + Array Layer 1 + + Sheet.3125 + Array Layer 2 + + + + Array Layer 2 + + Sheet.3126 + Array Layer 3 + + + + Array Layer 3 + + Sheet.3143 + Mip Level 0 + + + + Mip Level 0 + + Sheet.3144 + Mip Level 1 + + + + Mip Level 1 + + Sheet.3145 + Mip Tail + + + + Mip Tail + + Sheet.3170 + VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT + + + + VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT + + Sheet.3171 + Arrayed Sparse Image + + + + Arrayed Sparse Image + + Sheet.3172 + VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT + + + + VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT + + Sheet.3173 + + Sheet.3174 + + Square.3160 + + + + + + + Sheet.3176 + Mip Tail Data + + + + Mip Tail Data + + + Sheet.3177 + + Square.3154 + + + + + + + Sheet.3179 + Image Pixel Data + + + + Image Pixel Data + + + Sheet.3180 + + Square.3155 + + + + + + + Sheet.3182 + Sparse Memory Block + + + + Sparse Memory Block + + + + Square.2041 + + + + + + + Square.2042 + + + + + + + Square.2043 + + + + + + + Square.3066 + + + + + + + Square.3067 + + + + + + + Square.3068 + + + + + + + Square.3081 + + + + + + + Square.3082 + + + + + + + Square.3083 + + + + + + + Square.3096 + + + + + + + Square.3097 + + + + + + + Square.3098 + + + + + + + Rectangle + + + + + + + diff --git a/doc/specs/vulkan/images/sparseimage_alignedmipsize_singlemiptail.vsdx b/doc/specs/vulkan/images/sparseimage_alignedmipsize_singlemiptail.vsdx new file mode 100644 index 00000000..ac88d438 Binary files /dev/null and b/doc/specs/vulkan/images/sparseimage_alignedmipsize_singlemiptail.vsdx differ diff --git a/doc/specs/vulkan/images/sparseimage_multiaspect.pdf b/doc/specs/vulkan/images/sparseimage_multiaspect.pdf new file mode 100644 index 00000000..f00764c1 Binary files /dev/null and b/doc/specs/vulkan/images/sparseimage_multiaspect.pdf differ diff --git a/doc/specs/vulkan/images/sparseimage_multiaspect.svg b/doc/specs/vulkan/images/sparseimage_multiaspect.svg new file mode 100644 index 00000000..00f6428c --- /dev/null +++ b/doc/specs/vulkan/images/sparseimage_multiaspect.svg @@ -0,0 +1,1850 @@ + + + + + Vulkan Sparse Image + + + + + + + + + + + + + + Page-1 + + + Square.3258 + + + + + + + Square.3259 + + + + + + + Square.3260 + + + + + + + Square.3261 + + + + + + + Square.738 + + + + + + + Square.3188 + + + + + + + Square.3189 + + + + + + + Square.3190 + + + + + + + Square.3191 + + + + + + + Square.3192 + + + + + + + Square.3193 + + + + + + + Square.3194 + + + + + + + Square.3195 + + + + + + + Square.3196 + + + + + + + Square.3167 + + + + + + + Square.3161 + + + + + + + Square.3162 + + + + + + + Square.3165 + + + + + + + Square.3166 + + + + + + + Square.3172 + + + + + + + Square.3168 + + + + + + + Square.3169 + + + + + + + Square.3170 + + + + + + + Square.3171 + + + + + + + Square.3177 + + + + + + + Square.3173 + + + + + + + Square.3174 + + + + + + + Square.3175 + + + + + + + Square.3176 + + + + + + + Square.3182 + + + + + + + Square.3178 + + + + + + + Square.3179 + + + + + + + Square.3180 + + + + + + + Square.3181 + + + + + + + Square.3187 + + + + + + + Square.3183 + + + + + + + Square.3184 + + + + + + + Square.3185 + + + + + + + Square.3186 + + + + + + + Square.728 + + + + + + + Sheet.3158 + Multiple Aspect Sparse Image + + + + Multiple Aspect Sparse Image + + Sheet.3127 + Mip Level 0 + + + + Mip Level 0 + + Sheet.3128 + Mip Level 1 + + + + Mip Level 1 + + Square + + + + + + + Square.2 + + + + + + + Square.3 + + + + + + + Square.4 + + + + + + + Square.5 + + + + + + + Square.6 + + + + + + + Square.7 + + + + + + + Square.8 + + + + + + + Square.9 + + + + + + + Square.10 + + + + + + + Square.11 + + + + + + + Square.12 + + + + + + + Square.13 + + + + + + + Square.14 + + + + + + + Square.15 + + + + + + + Square.16 + + + + + + + Square.17 + + + + + + + Square.18 + + + + + + + Square.19 + + + + + + + Square.20 + + + + + + + Square.21 + + + + + + + Square.22 + + + + + + + Square.23 + + + + + + + Square.24 + + + + + + + Square.25 + + + + + + + Square.26 + + + + + + + Square.27 + + + + + + + Square.28 + + + + + + + Square.29 + + + + + + + Square.30 + + + + + + + Square.31 + + + + + + + Square.32 + + + + + + + Square.33 + + + + + + + Square.34 + + + + + + + Square.35 + + + + + + + Square.36 + + + + + + + Square.37 + + + + + + + Square.38 + + + + + + + Square.39 + + + + + + + Square.40 + + + + + + + Square.41 + + + + + + + Square.42 + + + + + + + Square.43 + + + + + + + Square.44 + + + + + + + Square.45 + + + + + + + Square.46 + + + + + + + Square.47 + + + + + + + Square.48 + + + + + + + Square.49 + + + + + + + Square.50 + + + + + + + Square.51 + + + + + + + Square.52 + + + + + + + Square.53 + + + + + + + Square.54 + + + + + + + Square.55 + + + + + + + Square.56 + + + + + + + Square.57 + + + + + + + Square.58 + + + + + + + Square.59 + + + + + + + Square.60 + + + + + + + Square.61 + + + + + + + Square.62 + + + + + + + Square.63 + + + + + + + Square.64 + + + + + + + Square.65 + + + + + + + Square.66 + + + + + + + Square.67 + + + + + + + Square.68 + + + + + + + Square.69 + + + + + + + Square.70 + + + + + + + Square.71 + + + + + + + Square.72 + + + + + + + Square.73 + + + + + + + Square.74 + + + + + + + Square.75 + + + + + + + Square.76 + + + + + + + Square.77 + + + + + + + Square.78 + + + + + + + Square.79 + + + + + + + Square.80 + + + + + + + Square.81 + + + + + + + Square.82 + + + + + + + Square.83 + + + + + + + Square.84 + + + + + + + Square.85 + + + + + + + Square.86 + + + + + + + Square.87 + + + + + + + Square.88 + + + + + + + Square.89 + + + + + + + Square.90 + + + + + + + Square.91 + + + + + + + Square.92 + + + + + + + Square.93 + + + + + + + Square.94 + + + + + + + Square.95 + + + + + + + Square.96 + + + + + + + Square.97 + + + + + + + Square.98 + + + + + + + Square.99 + + + + + + + Square.100 + + + + + + + Square.126 + + + + + + + Square.127 + + + + + + + Square.128 + + + + + + + Square.129 + + + + + + + Square.130 + + + + + + + Square.131 + + + + + + + Square.132 + + + + + + + Square.133 + + + + + + + Square.134 + + + + + + + Square.135 + + + + + + + Square.136 + + + + + + + Square.137 + + + + + + + Square.138 + + + + + + + Square.139 + + + + + + + Square.140 + + + + + + + Square.141 + + + + + + + Square.142 + + + + + + + Square.143 + + + + + + + Square.144 + + + + + + + Square.145 + + + + + + + Square.146 + + + + + + + Square.147 + + + + + + + Square.148 + + + + + + + Square.149 + + + + + + + Square.150 + + + + + + + Square.727 + + + + + + + Square.733 + + + + + + + Sheet.3110 + Depth Aspect + + + + Depth Aspect + + Sheet.3112 + Stencil Aspect + + + + Stencil Aspect + + Sheet.3113 + Metadata Aspect + + + + Metadata Aspect + + Square.3201 + + + + + + + Square.3202 + + + + + + + Square.734 + + + + + + + Sheet.3129 + Mip Level 2 + + + + Mip Level 2 + + Sheet.3132 + Mip Tail + + + + Mip Tail + + Square.151 + + + + + + + Square.152 + + + + + + + Square.153 + + + + + + + Square.154 + + + + + + + Square.155 + + + + + + + Square.156 + + + + + + + Square.157 + + + + + + + Square.158 + + + + + + + Square.159 + + + + + + + Square.737 + + + + + + + Sheet.3204 + Mip Tail + + + + Mip Tail + + Sheet.3130 + Mip Level 3 + + + + Mip Level 3 + + Square.164 + + + + + + + Square.165 + + + + + + + Square.160 + + + + + + + Square.161 + + + + + + + Square.162 + + + + + + + Square.163 + + + + + + + Square.741 + + + + + + + Rectangle + + + + + + + Rectangle.3240 + + + + + + + Sheet.3231 + + Square.546 + + + + + + + Square.547 + + + + + + + Square.548 + + + + + + + Square.549 + + + + + + + Square.550 + + + + + + + Square.551 + + + + + + + Square.552 + + + + + + + Square.553 + + + + + + + Square.554 + + + + + + + Square.555 + + + + + + + Square.556 + + + + + + + Square.557 + + + + + + + Square.558 + + + + + + + Square.559 + + + + + + + Square.560 + + + + + + + Square.561 + + + + + + + Square.562 + + + + + + + Square.563 + + + + + + + Square.564 + + + + + + + Square.565 + + + + + + + Square.566 + + + + + + + Square.567 + + + + + + + Square.568 + + + + + + + Square.569 + + + + + + + Square.570 + + + + + + + Square.3206 + + + + + + + Square.3207 + + + + + + + Square.3208 + + + + + + + Square.3209 + + + + + + + Square.3210 + + + + + + + Square.3211 + + + + + + + Square.3212 + + + + + + + Square.3213 + + + + + + + Square.3214 + + + + + + + Square.3215 + + + + + + + Square.3216 + + + + + + + Square.3217 + + + + + + + Square.3218 + + + + + + + Square.3219 + + + + + + + Square.3220 + + + + + + + Square.3221 + + + + + + + Square.3222 + + + + + + + Square.3223 + + + + + + + Square.3224 + + + + + + + Square.3225 + + + + + + + Square.3226 + + + + + + + Square.3227 + + + + + + + Square.3228 + + + + + + + Square.3229 + + + + + + + Square.3230 + + + + + + + + Sheet.3232 + Mip Tail + + + + Mip Tail + + Rectangle.3241 + + + + + + + Sheet.3243 + + Sheet.3244 + + Square.3160 + + + + + + + Sheet.3246 + Mip Tail Data + + + + Mip Tail Data + + + Sheet.3247 + + Square.3154 + + + + + + + Sheet.3249 + Image Pixel Data + + + + Image Pixel Data + + + Sheet.3250 + + Square.3155 + + + + + + + Sheet.3252 + Sparse Memory Block + + + + Sparse Memory Block + + + + diff --git a/doc/specs/vulkan/images/sparseimage_multiaspect.vsdx b/doc/specs/vulkan/images/sparseimage_multiaspect.vsdx new file mode 100644 index 00000000..79e3939f Binary files /dev/null and b/doc/specs/vulkan/images/sparseimage_multiaspect.vsdx differ diff --git a/doc/specs/vulkan/images/sparseimage_singlemiptail.pdf b/doc/specs/vulkan/images/sparseimage_singlemiptail.pdf new file mode 100644 index 00000000..c6c07790 Binary files /dev/null and b/doc/specs/vulkan/images/sparseimage_singlemiptail.pdf differ diff --git a/doc/specs/vulkan/images/sparseimage_singlemiptail.svg b/doc/specs/vulkan/images/sparseimage_singlemiptail.svg new file mode 100644 index 00000000..016e494b --- /dev/null +++ b/doc/specs/vulkan/images/sparseimage_singlemiptail.svg @@ -0,0 +1,4206 @@ + + + + + Vulkan Sparse Image + + + + + + + + + + + + + + Page-1 + + + Sheet.3115 + Array Layer 0 + + + + Array Layer 0 + + Sheet.3116 + Array Layer 1 + + + + Array Layer 1 + + Sheet.3117 + Array Layer 2 + + + + Array Layer 2 + + Sheet.3118 + Array Layer 3 + + + + Array Layer 3 + + Square.2910 + + + + + + + Square.2920 + + + + + + + Square.2930 + + + + + + + Square.2940 + + + + + + + Square.2950 + + + + + + + Square.2960 + + + + + + + Square.2970 + + + + + + + Square.2980 + + + + + + + Square.2990 + + + + + + + Square.3000 + + + + + + + Square.2481 + + + + + + + Square.2482 + + + + + + + Square.2483 + + + + + + + Square.2484 + + + + + + + Square.2485 + + + + + + + Square.2486 + + + + + + + Square.2487 + + + + + + + Square.2488 + + + + + + + Square.2489 + + + + + + + Square.2490 + + + + + + + Square.2491 + + + + + + + Square.2492 + + + + + + + Square.2493 + + + + + + + Square.2494 + + + + + + + Square.2495 + + + + + + + Square.2496 + + + + + + + Square.2497 + + + + + + + Square.2498 + + + + + + + Square.2499 + + + + + + + Square.2500 + + + + + + + Square.2501 + + + + + + + Square.2502 + + + + + + + Square.2503 + + + + + + + Square.2504 + + + + + + + Square.2505 + + + + + + + Square.2506 + + + + + + + Square.2507 + + + + + + + Square.2508 + + + + + + + Square.2509 + + + + + + + Square.2510 + + + + + + + Square.2511 + + + + + + + Square.2512 + + + + + + + Square.2513 + + + + + + + Square.2514 + + + + + + + Square.2515 + + + + + + + Square.2516 + + + + + + + Square.2517 + + + + + + + Square.2518 + + + + + + + Square.2519 + + + + + + + Square.2520 + + + + + + + Square.2521 + + + + + + + Square.2522 + + + + + + + Square.2523 + + + + + + + Square.2524 + + + + + + + Square.2525 + + + + + + + Square.2526 + + + + + + + Square.2527 + + + + + + + Square.2528 + + + + + + + Square.2529 + + + + + + + Square.2530 + + + + + + + Square.2531 + + + + + + + Square.2532 + + + + + + + Square.2533 + + + + + + + Square.2534 + + + + + + + Square.2535 + + + + + + + Square.2536 + + + + + + + Square.2537 + + + + + + + Square.2538 + + + + + + + Square.2539 + + + + + + + Square.2540 + + + + + + + Square.2541 + + + + + + + Square.2542 + + + + + + + Square.2543 + + + + + + + Square.2544 + + + + + + + Square.2545 + + + + + + + Square.2546 + + + + + + + Square.2547 + + + + + + + Square.2548 + + + + + + + Square.2549 + + + + + + + Square.2550 + + + + + + + Square.2551 + + + + + + + Square.2552 + + + + + + + Square.2553 + + + + + + + Square.2554 + + + + + + + Square.2555 + + + + + + + Square.2556 + + + + + + + Square.2557 + + + + + + + Square.2558 + + + + + + + Square.2559 + + + + + + + Square.2560 + + + + + + + Square.2561 + + + + + + + Square.2562 + + + + + + + Square.2563 + + + + + + + Square.2564 + + + + + + + Square.2565 + + + + + + + Square.2566 + + + + + + + Square.2567 + + + + + + + Square.2568 + + + + + + + Square.2569 + + + + + + + Square.2570 + + + + + + + Square.2571 + + + + + + + Square.2572 + + + + + + + Square.2573 + + + + + + + Square.2574 + + + + + + + Square.2575 + + + + + + + Square.2576 + + + + + + + Square.2577 + + + + + + + Square.2578 + + + + + + + Square.2579 + + + + + + + Square.2580 + + + + + + + Square.2581 + + + + + + + Square.2582 + + + + + + + Square.2583 + + + + + + + Square.2584 + + + + + + + Square.2585 + + + + + + + Square.2586 + + + + + + + Square.2587 + + + + + + + Square.2588 + + + + + + + Square.2589 + + + + + + + Square.2590 + + + + + + + Square.2591 + + + + + + + Square.2592 + + + + + + + Square.2593 + + + + + + + Square.2594 + + + + + + + Square.2595 + + + + + + + Square.2596 + + + + + + + Square.2597 + + + + + + + Square.2598 + + + + + + + Square.2599 + + + + + + + Square.2600 + + + + + + + Square.2601 + + + + + + + Square.2602 + + + + + + + Square.2603 + + + + + + + Square.2604 + + + + + + + Square.2605 + + + + + + + Square.2606 + + + + + + + Square.2607 + + + + + + + Square.2608 + + + + + + + Square.2609 + + + + + + + Square.2610 + + + + + + + Square.2611 + + + + + + + Square.2612 + + + + + + + Square.2613 + + + + + + + Square.2614 + + + + + + + Square.2615 + + + + + + + Square.2616 + + + + + + + Square.2617 + + + + + + + Square.2618 + + + + + + + Square.2619 + + + + + + + Square.2620 + + + + + + + Square.2621 + + + + + + + Square.2622 + + + + + + + Square.2623 + + + + + + + Square.2624 + + + + + + + Square.2625 + + + + + + + Square.2626 + + + + + + + Square.2627 + + + + + + + Square.2628 + + + + + + + Square.2629 + + + + + + + Square.2630 + + + + + + + Square.2631 + + + + + + + Square.2632 + + + + + + + Square.2633 + + + + + + + Square.2634 + + + + + + + Square.2635 + + + + + + + Square.2636 + + + + + + + Square.2637 + + + + + + + Square.2638 + + + + + + + Square.2639 + + + + + + + Square.2640 + + + + + + + Square.2641 + + + + + + + Square.2642 + + + + + + + Square.2643 + + + + + + + Square.2644 + + + + + + + Square.2645 + + + + + + + Square.2646 + + + + + + + Square.2647 + + + + + + + Square.2648 + + + + + + + Square.2649 + + + + + + + Square.2650 + + + + + + + Square.2651 + + + + + + + Square.2652 + + + + + + + Square.2653 + + + + + + + Square.2654 + + + + + + + Square.2655 + + + + + + + Square.2656 + + + + + + + Square.2657 + + + + + + + Square.2658 + + + + + + + Square.2659 + + + + + + + Square.2660 + + + + + + + Square.2661 + + + + + + + Square.2662 + + + + + + + Square.2663 + + + + + + + Square.2664 + + + + + + + Square.2665 + + + + + + + Square.2666 + + + + + + + Square.2667 + + + + + + + Square.2668 + + + + + + + Square.2669 + + + + + + + Square.2670 + + + + + + + Square.2671 + + + + + + + Square.2672 + + + + + + + Square.2673 + + + + + + + Square.2674 + + + + + + + Square.2675 + + + + + + + Square.2676 + + + + + + + Square.2677 + + + + + + + Square.2678 + + + + + + + Square.2679 + + + + + + + Square.2680 + + + + + + + Square.2681 + + + + + + + Square.2682 + + + + + + + Square.2683 + + + + + + + Square.2684 + + + + + + + Square.2685 + + + + + + + Square.2686 + + + + + + + Square.2687 + + + + + + + Square.2688 + + + + + + + Square.2689 + + + + + + + Square.2690 + + + + + + + Square.2691 + + + + + + + Square.2692 + + + + + + + Square.2693 + + + + + + + Square.2694 + + + + + + + Square.2695 + + + + + + + Square.2696 + + + + + + + Square.2697 + + + + + + + Square.2698 + + + + + + + Square.2699 + + + + + + + Square.2700 + + + + + + + Square.2701 + + + + + + + Square.2702 + + + + + + + Square.2703 + + + + + + + Square.2704 + + + + + + + Square.2705 + + + + + + + Square.2706 + + + + + + + Square.2707 + + + + + + + Square.2708 + + + + + + + Square.2709 + + + + + + + Square.2710 + + + + + + + Square.2711 + + + + + + + Square.2712 + + + + + + + Square.2713 + + + + + + + Square.2714 + + + + + + + Square.2715 + + + + + + + Square.2716 + + + + + + + Square.2717 + + + + + + + Square.2718 + + + + + + + Square.2719 + + + + + + + Square.2720 + + + + + + + Square.2721 + + + + + + + Square.2722 + + + + + + + Square.2723 + + + + + + + Square.2724 + + + + + + + Square.2725 + + + + + + + Square.2726 + + + + + + + Square.2727 + + + + + + + Square.2728 + + + + + + + Square.2729 + + + + + + + Square.2730 + + + + + + + Square.2731 + + + + + + + Square.2732 + + + + + + + Square.2733 + + + + + + + Square.2734 + + + + + + + Square.2735 + + + + + + + Square.2736 + + + + + + + Square.2737 + + + + + + + Square.2738 + + + + + + + Square.2739 + + + + + + + Square.2740 + + + + + + + Square.2741 + + + + + + + Square.2742 + + + + + + + Square.2743 + + + + + + + Square.2744 + + + + + + + Square.2745 + + + + + + + Square.2746 + + + + + + + Square.2747 + + + + + + + Square.2748 + + + + + + + Square.2749 + + + + + + + Square.2750 + + + + + + + Square.2751 + + + + + + + Square.2752 + + + + + + + Square.2753 + + + + + + + Square.2754 + + + + + + + Square.2755 + + + + + + + Square.2756 + + + + + + + Square.2757 + + + + + + + Square.2758 + + + + + + + Square.2761 + + + + + + + Square.2762 + + + + + + + Square.2763 + + + + + + + Square.2764 + + + + + + + Square.2765 + + + + + + + Square.2766 + + + + + + + Square.2767 + + + + + + + Square.2768 + + + + + + + Square.2769 + + + + + + + Square.2770 + + + + + + + Square.2771 + + + + + + + Square.2772 + + + + + + + Square.2773 + + + + + + + Square.2774 + + + + + + + Square.2775 + + + + + + + Square.2776 + + + + + + + Square.2777 + + + + + + + Square.2778 + + + + + + + Square.2779 + + + + + + + Square.2780 + + + + + + + Square.2781 + + + + + + + Square.2782 + + + + + + + Square.2783 + + + + + + + Square.2784 + + + + + + + Square.2785 + + + + + + + Square.2786 + + + + + + + Square.2787 + + + + + + + Square.2788 + + + + + + + Square.2789 + + + + + + + Square.2790 + + + + + + + Square.2791 + + + + + + + Square.2792 + + + + + + + Square.2793 + + + + + + + Square.2794 + + + + + + + Square.2795 + + + + + + + Square.2796 + + + + + + + Square.2797 + + + + + + + Square.2798 + + + + + + + Square.2799 + + + + + + + Square.2800 + + + + + + + Square.2801 + + + + + + + Square.2802 + + + + + + + Square.2803 + + + + + + + Square.2804 + + + + + + + Square.2805 + + + + + + + Square.2806 + + + + + + + Square.2807 + + + + + + + Square.2808 + + + + + + + Square.2809 + + + + + + + Square.2810 + + + + + + + Square.2811 + + + + + + + Square.2812 + + + + + + + Square.2813 + + + + + + + Square.2814 + + + + + + + Square.2815 + + + + + + + Square.2816 + + + + + + + Square.2817 + + + + + + + Square.2818 + + + + + + + Square.2819 + + + + + + + Square.2820 + + + + + + + Square.2821 + + + + + + + Square.2822 + + + + + + + Square.2823 + + + + + + + Square.2824 + + + + + + + Square.2825 + + + + + + + Square.2826 + + + + + + + Square.2827 + + + + + + + Square.2828 + + + + + + + Square.2829 + + + + + + + Square.2830 + + + + + + + Square.2831 + + + + + + + Square.2832 + + + + + + + Square.2833 + + + + + + + Square.2834 + + + + + + + Square.2835 + + + + + + + Square.2836 + + + + + + + Square.2837 + + + + + + + Square.2838 + + + + + + + Square.2839 + + + + + + + Square.2840 + + + + + + + Square.2841 + + + + + + + Square.2842 + + + + + + + Square.2843 + + + + + + + Square.2844 + + + + + + + Square.2845 + + + + + + + Square.2846 + + + + + + + Square.2847 + + + + + + + Square.2848 + + + + + + + Square.2849 + + + + + + + Square.2850 + + + + + + + Square.2851 + + + + + + + Square.2852 + + + + + + + Square.2853 + + + + + + + Square.2854 + + + + + + + Square.2855 + + + + + + + Square.2856 + + + + + + + Square.2857 + + + + + + + Square.2858 + + + + + + + Square.2859 + + + + + + + Square.2860 + + + + + + + Square.2861 + + + + + + + Square.2862 + + + + + + + Square.2863 + + + + + + + Square.2864 + + + + + + + Square.2865 + + + + + + + Square.2866 + + + + + + + Square.2867 + + + + + + + Square.2868 + + + + + + + Square.2869 + + + + + + + Square.2870 + + + + + + + Square.2871 + + + + + + + Square.2872 + + + + + + + Square.2873 + + + + + + + Square.2874 + + + + + + + Square.2875 + + + + + + + Square.2876 + + + + + + + Square.2877 + + + + + + + Square.2878 + + + + + + + Square.2879 + + + + + + + Square.2880 + + + + + + + Square.2881 + + + + + + + Square.2882 + + + + + + + Square.2883 + + + + + + + Square.2884 + + + + + + + Square.2885 + + + + + + + Square.2886 + + + + + + + Square.2887 + + + + + + + Square.2888 + + + + + + + Square.2889 + + + + + + + Square.2890 + + + + + + + Square.2891 + + + + + + + Square.2892 + + + + + + + Square.2893 + + + + + + + Square.2894 + + + + + + + Square.2895 + + + + + + + Square.2896 + + + + + + + Square.2897 + + + + + + + Square.2898 + + + + + + + Square.2901 + + + + + + + Square.2902 + + + + + + + Square.2903 + + + + + + + Square.2904 + + + + + + + Square.2905 + + + + + + + Square.2906 + + + + + + + Square.2907 + + + + + + + Square.2908 + + + + + + + Square.2909 + + + + + + + Square.2911 + + + + + + + Square.2912 + + + + + + + Square.2913 + + + + + + + Square.2914 + + + + + + + Square.2915 + + + + + + + Square.2916 + + + + + + + Square.2917 + + + + + + + Square.2918 + + + + + + + Square.2919 + + + + + + + Square.2921 + + + + + + + Square.2922 + + + + + + + Square.2923 + + + + + + + Square.2924 + + + + + + + Square.2925 + + + + + + + Square.2926 + + + + + + + Square.2927 + + + + + + + Square.2928 + + + + + + + Square.2929 + + + + + + + Square.2931 + + + + + + + Square.2932 + + + + + + + Square.2933 + + + + + + + Square.2934 + + + + + + + Square.2935 + + + + + + + Square.2936 + + + + + + + Square.2937 + + + + + + + Square.2938 + + + + + + + Square.2939 + + + + + + + Square.2941 + + + + + + + Square.2942 + + + + + + + Square.2943 + + + + + + + Square.2944 + + + + + + + Square.2945 + + + + + + + Square.2946 + + + + + + + Square.2947 + + + + + + + Square.2948 + + + + + + + Square.2949 + + + + + + + Square.2951 + + + + + + + Square.2952 + + + + + + + Square.2953 + + + + + + + Square.2954 + + + + + + + Square.2955 + + + + + + + Square.2956 + + + + + + + Square.2957 + + + + + + + Square.2958 + + + + + + + Square.2959 + + + + + + + Square.2961 + + + + + + + Square.2962 + + + + + + + Square.2963 + + + + + + + Square.2964 + + + + + + + Square.2965 + + + + + + + Square.2966 + + + + + + + Square.2967 + + + + + + + Square.2968 + + + + + + + Square.2969 + + + + + + + Square.2971 + + + + + + + Square.2972 + + + + + + + Square.2973 + + + + + + + Square.2974 + + + + + + + Square.2975 + + + + + + + Square.2976 + + + + + + + Square.2977 + + + + + + + Square.2978 + + + + + + + Square.2979 + + + + + + + Square.2981 + + + + + + + Square.2982 + + + + + + + Square.2983 + + + + + + + Square.2984 + + + + + + + Square.2985 + + + + + + + Square.2986 + + + + + + + Square.2987 + + + + + + + Square.2988 + + + + + + + Square.2989 + + + + + + + Square.2991 + + + + + + + Square.2992 + + + + + + + Square.2993 + + + + + + + Square.2994 + + + + + + + Square.2995 + + + + + + + Square.2996 + + + + + + + Square.2997 + + + + + + + Square.2998 + + + + + + + Square.2999 + + + + + + + Square.3001 + + + + + + + Square.3002 + + + + + + + Square.3003 + + + + + + + Square.3004 + + + + + + + Square.3005 + + + + + + + Square.3006 + + + + + + + Square.3007 + + + + + + + Square.3008 + + + + + + + Square.3009 + + + + + + + Square.3010 + + + + + + + Square.3011 + + + + + + + Square.3012 + + + + + + + Square.3013 + + + + + + + Square.3014 + + + + + + + Square.3015 + + + + + + + Square.3016 + + + + + + + Square.3017 + + + + + + + Square.3018 + + + + + + + Square.3019 + + + + + + + Square.3020 + + + + + + + Square.3021 + + + + + + + Square.3022 + + + + + + + Square.3023 + + + + + + + Square.3024 + + + + + + + Square.3025 + + + + + + + Square.3026 + + + + + + + Square.3027 + + + + + + + Square.3028 + + + + + + + Square.3029 + + + + + + + Square.3030 + + + + + + + Square.3031 + + + + + + + Square.3032 + + + + + + + Square.3033 + + + + + + + Square.3034 + + + + + + + Square.3035 + + + + + + + Square.3036 + + + + + + + Square.3037 + + + + + + + Square.3038 + + + + + + + Square.3041 + + + + + + + Square.3042 + + + + + + + Square.3043 + + + + + + + Square.3045 + + + + + + + Square.3046 + + + + + + + Square.3047 + + + + + + + Square.3048 + + + + + + + Square.3049 + + + + + + + Square.3050 + + + + + + + Square.3051 + + + + + + + Square.3052 + + + + + + + Square.3053 + + + + + + + Square.3054 + + + + + + + Square.3055 + + + + + + + Square.3056 + + + + + + + Square.3057 + + + + + + + Square.3058 + + + + + + + Square.3059 + + + + + + + Square.3060 + + + + + + + Square.3061 + + + + + + + Square.3062 + + + + + + + Square.3044 + + + + + + + Sheet.3133 + Mip Level 0 + + + + Mip Level 0 + + Sheet.3134 + Mip Level 1 + + + + Mip Level 1 + + Sheet.3135 + Mip Level 2 + + + + Mip Level 2 + + Sheet.3136 + Mip Level 3 + + + + Mip Level 3 + + Sheet.3137 + Mip Tail + + + + Mip Tail + + Sheet.3160 + VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT + + + + VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT + + Sheet.3165 + Arrayed Sparse Image + + + + Arrayed Sparse Image + + Sheet.3166 + + Sheet.3167 + + Square.3160 + + + + + + + Sheet.3169 + Mip Tail Data + + + + Mip Tail Data + + + Sheet.3170 + + Square.3154 + + + + + + + Sheet.3172 + Image Pixel Data + + + + Image Pixel Data + + + Sheet.3173 + + Square.3155 + + + + + + + Sheet.3175 + Sparse Memory Block + + + + Sparse Memory Block + + + + Rectangle + + + + + + + diff --git a/doc/specs/vulkan/images/sparseimage_singlemiptail.vsdx b/doc/specs/vulkan/images/sparseimage_singlemiptail.vsdx new file mode 100644 index 00000000..4b9373bf Binary files /dev/null and b/doc/specs/vulkan/images/sparseimage_singlemiptail.vsdx differ diff --git a/doc/specs/vulkan/images/tessparam.pdf b/doc/specs/vulkan/images/tessparam.pdf new file mode 100644 index 00000000..3eb3ff5a Binary files /dev/null and b/doc/specs/vulkan/images/tessparam.pdf differ diff --git a/doc/specs/vulkan/images/tessparam.svg b/doc/specs/vulkan/images/tessparam.svg new file mode 100644 index 00000000..ac8d4fee --- /dev/null +++ b/doc/specs/vulkan/images/tessparam.svg @@ -0,0 +1,444 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + IL1 + + + + + + IL0 + + + OL0 + + + OL2 + + + OL3 + + + OL1 + + + Quads + + + + + IL0 + + + OL0 + + + OL1 + + + OL2 + + + + + + + + Triangles + + + Isolines + + + OL1 + + + (no edge) + + + + + + + + OL0 + + + (0,0) + + + (1,0) + + + (0,1) + + + (1,1) + + + (0,0) + + + (1,0) + + + (0,1) + + + (1,1) + + + (0,0,1) + + + (0,1,0) + + + (1,0,0) + + diff --git a/doc/specs/vulkan/images/triadj.pdf b/doc/specs/vulkan/images/triadj.pdf new file mode 100644 index 00000000..1631bb66 Binary files /dev/null and b/doc/specs/vulkan/images/triadj.pdf differ diff --git a/doc/specs/vulkan/images/triadj.svg b/doc/specs/vulkan/images/triadj.svg new file mode 100644 index 00000000..c824a2fa --- /dev/null +++ b/doc/specs/vulkan/images/triadj.svg @@ -0,0 +1,405 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + 0 + + 2 + + 1 + + 5 + + 4 + + 3 + + + + + + + + + + + 6 + + 8 + + 7 + + 11 + + 10 + + 9 + + + + + + + + + + diff --git a/doc/specs/vulkan/images/triangles.pdf b/doc/specs/vulkan/images/triangles.pdf new file mode 100644 index 00000000..713f45df Binary files /dev/null and b/doc/specs/vulkan/images/triangles.pdf differ diff --git a/doc/specs/vulkan/images/triangles.svg b/doc/specs/vulkan/images/triangles.svg new file mode 100644 index 00000000..7b2d0ef5 --- /dev/null +++ b/doc/specs/vulkan/images/triangles.svg @@ -0,0 +1,652 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 1 + 2 + + 3 + 4 + 0 + 1 + 2 + 3 + 4 + 0 + 1 + 2 + 3 + 4 + 5 + + diff --git a/doc/specs/vulkan/images/tstripadj.pdf b/doc/specs/vulkan/images/tstripadj.pdf new file mode 100644 index 00000000..3ebb7076 Binary files /dev/null and b/doc/specs/vulkan/images/tstripadj.pdf differ diff --git a/doc/specs/vulkan/images/tstripadj.svg b/doc/specs/vulkan/images/tstripadj.svg new file mode 100644 index 00000000..31330b8c --- /dev/null +++ b/doc/specs/vulkan/images/tstripadj.svg @@ -0,0 +1,1078 @@ + + + + + + + + image/svg+xml + + + + + + + + + 0 + + 2 + + 1 + + 5 + + 3 + + 7 + + 4 + + 6 + + 9 + + 8 + + 10 + + 11 + + + + + + + + + + + + + + + + + + + + + + + 0 + + 2 + + 1 + + 5 + + 3 + + 7 + + 4 + + 6 + + 8 + + 9 + + + + + + + + + + + + + + + + + + + 0 + + 2 + + 1 + + 5 + + 3 + + 4 + + 6 + + 7 + + + + + + + + + + + + + + + 0 + + 2 + + 1 + + 3 + + 4 + + 5 + + + + + + + + + + diff --git a/doc/specs/vulkan/images/vulkantexture.pptx b/doc/specs/vulkan/images/vulkantexture.pptx new file mode 100644 index 00000000..973b7562 Binary files /dev/null and b/doc/specs/vulkan/images/vulkantexture.pptx differ diff --git a/doc/specs/vulkan/images/vulkantexture0.pdf b/doc/specs/vulkan/images/vulkantexture0.pdf new file mode 100644 index 00000000..9f0a99a7 Binary files /dev/null and b/doc/specs/vulkan/images/vulkantexture0.pdf differ diff --git a/doc/specs/vulkan/images/vulkantexture0.png b/doc/specs/vulkan/images/vulkantexture0.png new file mode 100644 index 00000000..3e1e7226 Binary files /dev/null and b/doc/specs/vulkan/images/vulkantexture0.png differ diff --git a/doc/specs/vulkan/images/vulkantexture0.svg b/doc/specs/vulkan/images/vulkantexture0.svg new file mode 100644 index 00000000..a2b34d19 --- /dev/null +++ b/doc/specs/vulkan/images/vulkantexture0.svg @@ -0,0 +1,1559 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + s + 0.0 + 1 + .0 + + + u + - + 1.0 + 9.0 + + + i + - + 1 + 8 + + + + + + + + + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + + + t + 1 + .0 + 0.0 + + + v + 5.0 + - + 1.0 + + + j + + + + + + + 4 + 3 + 2 + 1 + 0 + - + 1 + + + + + + + + + + + + + + + + + + + + + + ( + u, + v + ) + (u + - + 0. + 5, + v + - + 0.5) + + α + + + β + i1j0 + i1j1 + i0j1 + i0j0 + i1j0' + i1j1' + i0j1' + + i0j0 + ' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/specs/vulkan/images/vulkantexture1.png b/doc/specs/vulkan/images/vulkantexture1.png new file mode 100644 index 00000000..53d9c6f7 Binary files /dev/null and b/doc/specs/vulkan/images/vulkantexture1.png differ diff --git a/doc/specs/vulkan/images/vulkantexture2.png b/doc/specs/vulkan/images/vulkantexture2.png new file mode 100644 index 00000000..bdeb05c8 Binary files /dev/null and b/doc/specs/vulkan/images/vulkantexture2.png differ diff --git a/doc/specs/vulkan/installRelease b/doc/specs/vulkan/installRelease new file mode 100755 index 00000000..087dbcb7 --- /dev/null +++ b/doc/specs/vulkan/installRelease @@ -0,0 +1,39 @@ +#!/bin/sh +# Install release build with buildRelease into /promoters +# +# Essentially replaced by genRelease + +# Root of the Vulkan git repo +root=/home/tree/git/vulkan + +# Directory with generated specs (core and core+WSI) +genspec=$root/out + +# Promoter Vulkan directory in SVN +svnroot=/home/tree/khronos +promo=$svnroot/promoters/specs/candidates/vulkan + +# Directory name for this release +date=`date +%Y%m%d` + +install=$promo/$date +if test -d $install ; then + echo "Target directory $install already exists, may overwrite! Continuing..." +else + echo "Creating target directory $install" + mkdir $install +fi + +# Copy various files +cp $genspec/promoter.html $install/index.html +mkdir $install/core $install/wsi +cp -rp $genspec/core $genspec/wsi $genspec/df $install + +echo "**** Specs are copied to $install" +echo "**** Please ensure that:" +echo "**** * The right files are all there" +echo "**** * The Data Format spec is also there" +echo "**** * Everything is added to SVN and committed to the server" +echo "You can get there by:" +echo "cd $promo" +echo "svn add $date" diff --git a/doc/specs/vulkan/man/VkAllocationCallbacks.txt b/doc/specs/vulkan/man/VkAllocationCallbacks.txt new file mode 100644 index 00000000..f2de27a8 --- /dev/null +++ b/doc/specs/vulkan/man/VkAllocationCallbacks.txt @@ -0,0 +1,45 @@ +VkAllocationCallbacks(3) +======================== + +Name +---- +VkAllocationCallbacks - Structure containing callback function pointers for memory allocation. + +C Specification +--------------- + +include::../structs/VkAllocationCallbacks.txt[] + +Fields +------ + +pname:pUserData:: + A pointer-sized variable that the sole use of the application. + +pname:pfnAllocation:: + A pointer to a function that is called to allocate host memory. + +pname:pfnReallocation:: + A pointer to a function that is called to resize an existing host memory allocation. + +pname:pfnFree:: + A pointer to a function that is called to free an existing host memory allocation. + +pname:pfnInternalAllocation:: + A pointer to a function that is called to make short-lived internal allocations. + +pname:pfnInternalFree:: + A pointer to a function that is called to free internal allocations. + +Description +----------- + +This structure is contains pointers to callback functions that are used to create, reallocate +and free host memory allocations on behalf of a Vulkan implementation. The pname:pUserData +member of the structure is passed to each of the callback functions when they are called. +It is otherwise not accessed by the Vulkan implementation and its intended use is that the +host application use it to store state information related to memory allocation. + +include::../validity/structs/VkAllocationCallbacks.txt[] + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkBufferCreateFlags.txt b/doc/specs/vulkan/man/VkBufferCreateFlags.txt new file mode 100644 index 00000000..d3c7d8de --- /dev/null +++ b/doc/specs/vulkan/man/VkBufferCreateFlags.txt @@ -0,0 +1,41 @@ +VkBufferCreateFlags(3) +====================== + +Name +---- +VkBufferCreateFlags - Buffer object creation flags. + +C Specification +--------------- + +include::../enums/VkBufferCreateFlagBits.txt[] +include::../flags/VkBufferCreateFlags.txt[] + +Constants +--------- + +VK_BUFFER_CREATE_SPARSE_BINDING_BIT:: + Buffer objects created with this flag allow their contents to backed by sparse + memory allocations using flink:vkQueueBindSparse. + +VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT:: + Buffer objects created with this flag allow their contents to be backed by a + partially resident sparse memory allocation. + +VK_BUFFER_CREATE_SPARSE_ALIASED_BIT:: + Buffer objects created with this flag allow their contents to be backed by a + sparse memory allocation that might also simultaneously be backing another + buffer (or another portion of the buffer). + +Description +----------- + +These flags are used in the slink:VkBufferCreateInfo structure passed as parameter to flink:vkCreateBuffer +to define the properties of the created buffer object. + +See Also +-------- + +slink:VkBufferCreateInfo, flink:vkCreateBuffer + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkBufferCreateInfo.txt b/doc/specs/vulkan/man/VkBufferCreateInfo.txt new file mode 100644 index 00000000..2229e35f --- /dev/null +++ b/doc/specs/vulkan/man/VkBufferCreateInfo.txt @@ -0,0 +1,56 @@ +VkBufferCreateInfo(3) +===================== + +Name +---- +VkBufferCreateInfo - Structure specifying the parameters of a newly created buffer object. + +C Specification +--------------- + +include::../structs/VkBufferCreateInfo.txt[] + +Fields +------ + +pname:sType:: + Structure type. Must be ename:VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO. + +pname:pNext:: + Pointer to next structure in the structure chain when applicable. + +pname:size:: + Size of the buffer in bytes. + +pname:usage:: + Allowed usages of the buffer (see elink:VkBufferUsageFlags for more detail). + +pname:flags:: + Other properties of the buffer (see elink:VkBufferCreateFlags for more detail). + +pname:sharingMode:: + Sharing mode used for the buffer (see elink:VkSharingMode for more detail). + +pname:queueFamilyIndexCount:: + Number of queue families that can access the buffer in case + pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT. + +pname:pQueueFamilyIndices:: + Array of pname:queueFamilyIndexCount queue family indices specifying the + set of queue families that can access the buffer in case + pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT. + +Description +----------- + +This structure is used to specify the parameters of buffer objects created using +flink:vkCreateBuffer. + +include::../validity/structs/VkBufferCreateInfo.txt[] + +See Also +-------- + +flink:vkCreateBuffer + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkBufferMemoryBarrier.txt b/doc/specs/vulkan/man/VkBufferMemoryBarrier.txt new file mode 100644 index 00000000..c745d963 --- /dev/null +++ b/doc/specs/vulkan/man/VkBufferMemoryBarrier.txt @@ -0,0 +1,58 @@ +VkBufferMemoryBarrier(3) +======================== + +Name +---- +VkBufferMemoryBarrier - Structure specifying the parameters of a buffer memory barrier. + +C Specification +--------------- + +include::../structs/VkBufferMemoryBarrier.txt[] + +Fields +------ + +sType:: + Structure type. Must be ename:VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER. + +pNext:: + Pointer to next structure in the structure chain when applicable. + +outputMask:: + Types of writes to the buffer to flush (see elink:VkMemoryOutputFlags for more detail). + +inputMask:: + Types of reads from the buffer to invalidate (see elink:VkMemoryInputFlags for more detail). + +srcQueueFamilyIndex:: + Identifies the source queue family to transfer ownership of the buffer from. + A value of ename:VK_QUEUE_FAMILY_IGNORED indicates that this member should be ignored. + +destQueueFamilyIndex:: + Identifies the destination queue family to transfer ownership of the buffer to. + A value of ename:VK_QUEUE_FAMILY_IGNORED indicates that this member should be ignored. + +buffer:: + Buffer object the memory barrier applies to. + +offset:: + Byte offset of the sub-range of the buffer the memory barrier applies to. + +size:: + Size in bytes of the sub-range of the buffer the memory barrier applies to. + +include::../validity/structs/VkBufferMemoryBarrier.txt[] + +Description +----------- + +This structure specifies the parameters of a buffer memory barrier that can be passed in the ptext:ppMemoryBarriers +parameter of flink:vkCmdPipelineBarrier and flink:vkCmdWaitEvents. + +See Also +-------- + +flink:vkCmdPipelineBarrier, flink:vkCmdWaitEvents, slink:VkMemoryBarrier, slink:VkImageMemoryBarrier + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkBufferUsageFlags.txt b/doc/specs/vulkan/man/VkBufferUsageFlags.txt new file mode 100644 index 00000000..6ab97760 --- /dev/null +++ b/doc/specs/vulkan/man/VkBufferUsageFlags.txt @@ -0,0 +1,60 @@ +VkBufferUsageFlags(3) +===================== + +Name +---- +VkBufferUsageFlags - Buffer object usage flags. + +C Specification +--------------- + +include::../flags/VkBufferUsageFlags.txt[] + +Constants +--------- + +ename:VK_BUFFER_USAGE_TRANSFER_SRC_BIT:: + The buffer can be used as the source operand of transfer operations (flink:vkCmdCopyBuffer, + flink:vkCmdCopyBufferToImage). + +ename:VK_BUFFER_USAGE_TRANSFER_DST_BIT:: + The buffer can be used as the destination operand of transfer operations (flink:vkCmdCopyBuffer, + flink:vkCmdCopyImageToBuffer, flink:vkCmdUpdateBuffer, flink:vkCmdFillBuffer, flink:vkCmdWriteTimestamp, + flink:vkCmdCopyQueryPoolResults). + +ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT:: + The buffer supports reads via uniform texel buffer descriptors. + +ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT:: + The buffer supports loads, stores, and atomic operations via storage texel buffer descriptors. + +ename:VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT:: + The buffer supports reads via uniform buffer descriptors. + +ename:VK_BUFFER_USAGE_STORAGE_BUFFER_BIT:: + The buffer supports loads, stores, and atomic operations via storage buffer descriptors. + +ename:VK_BUFFER_USAGE_INDEX_BUFFER_BIT:: + The buffer can be bound as an index buffer using the flink:vkCmdBindIndexBuffer command. + +ename:VK_BUFFER_USAGE_VERTEX_BUFFER_BIT:: + The buffer can be bound as a vertex buffer using the flink:vkCmdBindVertexBuffers command. + +ename:VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT:: + The buffer can be used as the source of indirect commands (flink:vkCmdDrawIndirect, + flink:vkCmdDrawIndexedIndirect, flink:vkCmdDispatchIndirect). + +Description +----------- + +These flags are used in the slink:VkBufferCreateInfo structure passed as +parameter to flink:vkCreateBuffer to define the intended use of the created +buffer. Trying to use the buffer for any other purpose than those requested +at creation time may result in undefined behavior. + +See Also +-------- + +slink:VkBufferCreateInfo, flink:vkCreateBuffer + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkCommandBufferAllocateInfo.txt b/doc/specs/vulkan/man/VkCommandBufferAllocateInfo.txt new file mode 100644 index 00000000..9edd5e3d --- /dev/null +++ b/doc/specs/vulkan/man/VkCommandBufferAllocateInfo.txt @@ -0,0 +1,44 @@ +VkCommandBufferAllocateInfo(3) +============================== + +Name +---- +VkCommandBufferAllocateInfo - Structure specifying the allocation parameters for command buffer object. + +C Specification +--------------- + +include::../structs/VkCommandBufferAllocateInfo.txt[] + +Fields +------ + +pname:sType:: + Structure type. Must be ename:VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO. + +pname:pNext:: + Pointer to next structure in the structure chain when applicable. + +pname:commandPool:: + The pool from which to allocate the command buffers. + +pname:level:: + The level of the command buffers to allocate. + +pname:commandBufferCount:: + The numbef of command buffers to allocate. + +Description +----------- + +This structure is used to specify the parameters of command buffer objects allocated using +flink:vkAllocateCommandBuffers. + +include::../validity/structs/VkCommandBufferAllocateInfo.txt[] + +See Also +-------- + +flink:vkAllocateCommandBuffers + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkDescriptorSetAllocateInfo.txt b/doc/specs/vulkan/man/VkDescriptorSetAllocateInfo.txt new file mode 100644 index 00000000..4bc5d3ff --- /dev/null +++ b/doc/specs/vulkan/man/VkDescriptorSetAllocateInfo.txt @@ -0,0 +1,44 @@ +VkDescriptorSetAllocateInfo(3) +============================== + +Name +---- +VkDescriptorSetAllocateInfo - Structure specifying the allocation parameters for descriptor sets. + +C Specification +--------------- + +include::../structs/VkDescriptorSetAllocateInfo.txt[] + +Fields +------ + +pname:sType:: + Structure type. Must be ename:VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO. + +pname:pNext:: + Pointer to next structure in the structure chain when applicable. + +pname:descriptorPool:: + The pool from which to allocate the descriptor sets. + +pname:descriptorSetCount:: + The number of descriptor sets to allocate. + +pname:pSetLayouts:: + An array of pname:descriptorSetCount handles to descriptor set layouts objects describing the descriptor sets. + +Description +----------- + +This structure is used to specify the parameters of descriptor set objects allocated using +flink:vkAllocateDescriptorSets. + +include::../validity/structs/VkDescriptorSetAllocateInfo.txt[] + +See Also +-------- + +flink:vkAllocateDescriptorSets + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkDescriptorType.txt b/doc/specs/vulkan/man/VkDescriptorType.txt new file mode 100644 index 00000000..766c69b3 --- /dev/null +++ b/doc/specs/vulkan/man/VkDescriptorType.txt @@ -0,0 +1,111 @@ +VkDescriptorType(3) +=================== + +Name +---- +VkDescriptorType - Specifies the type of a descriptor in a descriptor set. + +C Specification +--------------- + +include::../enums/VkDescriptorType.txt[] + +Constants +--------- + +ename:VK_DESCRIPTOR_TYPE_SAMPLER:: + Identifies a sampler descriptor which refers the state of a sampler object. + + A descriptor of this type enables shaders to perform filtered sampling of any compatible image + resource using the referenced sampler in conjunction with a corresponding sampled image descriptor. + +ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER:: + Identifies a combined image sampler descriptor which refers the state of a sampler object + and an image view object being in a compatible image layout. + + A descriptor of this type enables shaders to perform filtered or unfiltered sampling of the + referenced image view using the referenced sampler. + + This descriptor type is compatible with image views having one of the following image layouts: + ename:VK_IMAGE_LAYOUT_GENERAL, ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, + or ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL. + + This descriptor type is compatible with image views of image objects created with the + ename:VK_IMAGE_USAGE_SAMPLED_BIT usage flag. + +ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE:: + Identifies a sampled image descriptor which refers the state of an image view object being in a + compatible image layout. + + A descriptor of this type enables shaders to perform unfiltered sampling of the referenced image + view, or can be used in conjunction with a sampler descriptor to perform filtered sampling of the + referenced image view. + + This descriptor type is compatible with image views in any of the following layouts: + ename:VK_IMAGE_LAYOUT_GENERAL, ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, + or ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL. + + This descriptor type is compatible with image views of image objects created with the + ename:VK_IMAGE_USAGE_SAMPLED_BIT usage flag. + +ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE:: + Identifies a storage image descriptor which refers the state of an image view object being in a + compatible image layout. + + A descriptor of this type enables shaders to perform loads, stores, and atomic operations on the + referenced image view. + + This descriptor type is compatible with image views in any of the following layouts: + ename:VK_IMAGE_LAYOUT_GENERAL or ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL. + However, stores and atomic operations can only be performed on image views in the + ename:VK_IMAGE_LAYOUT_GENERAL layout. + + This descriptor type is compatible with image views of image objects created with the + ename:VK_IMAGE_USAGE_STORAGE_BIT usage flag. + +ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER:: + Identifies a uniform texel buffer descriptor which refers the state of a buffer view object. + + A descriptor of this type enables shaders to perform reads of uniform texel data from the referenced + buffer view. + + +ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER:: + Identifies a storage texel buffer descriptor which refers the state of a buffer view object. + + A descriptor of this type enables shaders to perform loads, stores, and atomic operations on the + texel data of the referenced buffer view. + + +ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER:: + Identifies a uniform buffer descriptor which refers the state of a buffer view object. + + A descriptor of this type enables shaders to perform reads of uniform block data in the + referenced buffer and offset. + + +ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER:: + Identifies a storage buffer descriptor which refers the state of a buffer view object. + + A descriptor of this type enables shaders to perform loads, stores, and atomic operations of + storage block data in the referenced buffer and offset. + + +ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC:: + Identifies a uniform buffer descriptor with dynamic offset support. + + The only difference compared to ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER is that descriptors of this + type do not take their offset parameter from the buffer view's corresponding state, but instead + allow the application to specify the offset value dynamically at the time the descriptor set + containing the descriptor is bound using flink:vkCmdBindDescriptorSets. + +ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC:: + Identifies a storage buffer descriptor with dynamic offset support. + + The only difference compared to ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER is that descriptors of this + type do not take their offset parameter from the buffer view's corresponding state, but instead + allow the application to specify the offset value dynamically at the time the descriptor set + containing the descriptor is bound using flink:vkCmdBindDescriptorSets. + +ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT:: + Identifies an input attachment descriptor which refers to the state of an attachment view + object. + + A descriptor of this type enables shaders to perform loads from images on the referenced + attachment view. + + This descriptor type is compatible with image views in any of the following layouts: + ename:VK_IMAGE_LAYOUT_GENERAL or ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL. This + descriptor type is compatible with image views of image objects created with the + ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT usage flag. + +Description +----------- + +The constants of this enumeration are used to identify the type of the descriptors in various descriptor +set and descriptor pool handling commands. + +See Also +-------- + +slink:VkDescriptorSetLayoutBinding + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkFormatFeatureFlags.txt b/doc/specs/vulkan/man/VkFormatFeatureFlags.txt new file mode 100644 index 00000000..98836abf --- /dev/null +++ b/doc/specs/vulkan/man/VkFormatFeatureFlags.txt @@ -0,0 +1,66 @@ +VkFormatFeatureFlags(3) +======================= + +Name +---- +VkFormatFeatureFlags - Capability flags of a particular format. + +C Specification +--------------- + +include::../flags/VkFormatFeatureFlags.txt[] + +Constants +--------- + +ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT:: + Image views having this format support filtered and/or unfiltered sampling via sampled image + and combined image sampler descriptors. + +ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT:: + Image views having this format support loads and stores via storage image descriptors. + +ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT:: + Image views having this format support atomic operations via storage image descriptors. + +ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT:: + Buffer views having this format support uniform reads via uniform texel buffer descriptors. + +ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT:: + Buffer views having this format support loads and stores via storage texel buffer descriptors. + +ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT:: + Buffer views having this format support atomic operations via storage texel buffer descriptors. + +ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT:: + Indicates that the format is supported for vertex attributes. + +ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT:: + Indicates that the format is supported for color attachment views and thus can be used as + framebuffer color attachment format. + +ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT:: + Framebuffer color attachments having this format also support blending. + + If this flag is present then ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT is also present. + +ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT:: + Indicates that the format is supported for depth/stencil views and thus can be used as + framebuffer depth/stencil attachment format. + +ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT:: + Format can be used as the source image of blits with flink:vkCmdBlitImage + +ename:VK_FORMAT_FEATURE_BLIT_DST_BIT:: + Format can be used as the destination image of blits with flink:vkCmdBlitImage + +Description +----------- + +These flags are used in the slink:VkFormatProperties structure that is returned by flink:vkGetPhysicalDeviceFormatProperties. + +See Also +-------- + +slink:VkFormatProperties, flink:vkGetPhysicalDeviceFormatProperties + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkImageCreateFlags.txt b/doc/specs/vulkan/man/VkImageCreateFlags.txt new file mode 100644 index 00000000..0af0f07f --- /dev/null +++ b/doc/specs/vulkan/man/VkImageCreateFlags.txt @@ -0,0 +1,51 @@ +VkImageCreateFlags(3) +===================== + +Name +---- +VkImageCreateFlags - Image object creation flags. + +C Specification +--------------- + +include::../enums/VkImageCreateFlagBits.txt[] +include::../flags/VkImageCreateFlags.txt[] + +Constants +--------- + +VK_IMAGE_CREATE_SPARSE_BINDING_BIT:: + Image objects created with this flag allow their contents to backed by sparse + memory allocations using flink:vkQueueBindSparse. + +VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT:: + Image objects created with this flag allow their contents to be backed by a + partially resident sparse memory allocation. + +VK_IMAGE_CREATE_SPARSE_ALIASED_BIT:: + Image objects created with this flag allow their contents to be backed by a + sparse memory allocation that might also simultaneously be backing another + image (or another portion of the image). + +VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT:: + Image objects created with this flag allow image view objects created from them to override the + format of the image to any compatible format. Otherwise image view objects created from the + image must match the format of the image object. + +VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT:: + Image objects created with this flag allow image view objects of type ename:VK_IMAGE_VIEW_TYPE_CUBE + to be created from. This flag is only allowed to be used if the image object's type is + ename:VK_IMAGE_TYPE_2D. + +Description +----------- + +These flags are used in the slink:VkImageCreateInfo structure passed as parameter to flink:vkCreateImage +to define the properties of the created image object. + +See Also +-------- + +slink:VkImageCreateInfo, flink:vkCreateImage + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkImageCreateInfo.txt b/doc/specs/vulkan/man/VkImageCreateInfo.txt new file mode 100644 index 00000000..ba1e6410 --- /dev/null +++ b/doc/specs/vulkan/man/VkImageCreateInfo.txt @@ -0,0 +1,74 @@ +VkImageCreateInfo(3) +==================== + +Name +---- +VkImageCreateInfo - Structure specifying the parameters of a newly created image object. + +C Specification +--------------- + +include::../structs/VkImageCreateInfo.txt[] + +Fields +------ + +pname:sType:: + Structure type. Must be ename:VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO. + +pname:pNext:: + Pointer to next structure in the structure chain when applicable. + +pname:imageType:: + Type of the image (see elink:VkImageType for more detail). + +pname:format:: + Format of the texels of the image (see elink:VkFormat for more detail). + +pname:extent:: + Width, height, and depth of the image in texels. + +pname:mipLevels:: + Number of mip levels of the image. + +pname:arrayLayers:: + Number of layers of the image. + +pname:samples:: + Number of samples of the image. + +pname:tiling:: + Image tiling mode of the image (see elink:VkImageTiling for more detail). + +pname:usage:: + Allowed usages of the image (see elink:VkImageUsageFlags for more detail). + +pname:flags:: + Other properties of the image (see elink:VkImageCreateFlags for more detail). + +pname:sharingMode:: + Sharing mode used for the image (see elink:VkSharingMode for more detail). + +pname:queueFamilyIndexCount:: + Number of queue families that can access the image in case + pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT. + +pname:pQueueFamilyIndices:: + Array of pname:queueFamilyIndexCount queue family indices specifying the + set of queue families that can access the image in case + pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT. + +Description +----------- + +This structure is used to specify the parameters of image objects created using +flink:vkCreateImage. + +include::../validity/structs/VkImageCreateInfo.txt[] + +See Also +-------- + +flink:vkCreateImage + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkImageLayout.txt b/doc/specs/vulkan/man/VkImageLayout.txt new file mode 100644 index 00000000..5de1b928 --- /dev/null +++ b/doc/specs/vulkan/man/VkImageLayout.txt @@ -0,0 +1,86 @@ +VkImageLayout(3) +================ + +Name +---- +VkImageLayout - Specifies what layout an image object (or a sub-range of it) is in. + +C Specification +--------------- + +include::../enums/VkImageLayout.txt[] + +Constants +--------- + +VK_IMAGE_LAYOUT_UNDEFINED:: + The contents of images (or a sub-range of it) in this layout are undefined. + + This is the layout all images are assumed to be in right after creation, or when their memory + binding is changed. + + Any operation performed on an image sub-range in this layout leaves the contents of it undefined. + Applications need to transition an image sub-range to another layout before being able to perform + any operations on it that should result in defined contents. + +VK_IMAGE_LAYOUT_GENERAL:: + An image (or a sub-range of it) in this layout allows all operations to be performed on the image + sub-range that is otherwise permitted by the usage flags the image object was created with (see + elink:VkImageUsageFlags for more detail). + +VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL:: + An image (or a sub-range of it) in this layout can only be used as a framebuffer color attachment + and as such can only be accessed through framebuffer color reads and writes resulting from the + issuing of draw commands, fname:vkCmdClearAttachments, and through clearing writes resulting from the use of + the ename:VK_ATTACHMENT_LOAD_OP_CLEAR framebuffer attachment load operation. + +VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL:: + An image (or a sub-range of it) in this layout can only be used as a framebuffer depth/stencil + attachment and as such can only be accessed through framebuffer depth/stencil reads and writes + resulting from the issuing of draw commands, fname:vkCmdClearAttachments, and through clearing writes resulting from the use of + the ename:VK_ATTACHMENT_LOAD_OP_CLEAR framebuffer attachment load operation. + +VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL:: + An image (or a sub-range of it) in this layout can only be used as a read-only framebuffer + depth/stencil attachment and as such can only be accessed through framebuffer depth/stencil reads + resulting from the issuing of draw commands, and through shader reads done via a sampled image + descriptor, combined image sampler descriptor, or read-only storage image descriptor (see + elink:VkDescriptorType for more detail). + +VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL:: + An image (or a sub-range of it) in this layout can only be used as a read-only shader resource and + as such can only be accessed by shader reads done via a sampled image descriptor, combined image + sampler descriptor, or read-only storage image descriptor (see elink:VkDescriptorType for more detail). + +VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL:: + An image (or a sub-range of it) in this layout can only be used as the source operand of the + commands flink:vkCmdCopyImage, flink:vkCmdBlitImage, flink:vkCmdCopyImageToBuffer, + and flink:vkCmdResolveImage. + +VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL:: + An image (or a sub-range of it) in this layout can only be used as the destination operand of the + commands flink:vkCmdCopyImage, flink:vkCmdBlitImage, flink:vkCmdCopyBufferToImage, flink:vkCmdResolveImage, + flink:vkCmdClearColorImage, and flink:vkCmdClearDepthStencilImage. + +Description +----------- + +The constants of this enumeration are used to identify the layout an image object (or a sub-range of it) +is expected to be in at any given time, or used to specify the destination layout an image sub-range +should be transitioned to as the result of an image memory barrier (see slink:VkImageMemoryBarrier for more +details). + +Performing any operation on an image sub-range that isn't permitted by the layout the image sub-range is +currently in is undefined. + +If any operation tries to read from an image sub-range that isn't in the expected image layout results +in undefined data to be returned as the result of the read. + +If any operation tries to write to or perform an atomic operation on an image sub-range that isn't in the +expected image layout results in the contents of the whole image to become undefined, i.e. the whole image +is logically transitioned to the ename:VK_IMAGE_LAYOUT_UNDEFINED layout. + +See Also +-------- + +slink:VkImageMemoryBarrier + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkImageMemoryBarrier.txt b/doc/specs/vulkan/man/VkImageMemoryBarrier.txt new file mode 100644 index 00000000..bac1f647 --- /dev/null +++ b/doc/specs/vulkan/man/VkImageMemoryBarrier.txt @@ -0,0 +1,62 @@ +VkImageMemoryBarrier(3) +======================= + +Name +---- +VkImageMemoryBarrier - Structure specifying the parameters of an image memory barrier. + +C Specification +--------------- + +include::../structs/VkImageMemoryBarrier.txt[] + +Fields +------ + +pname:sType:: + Structure type. Must be ename:VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER. + +pname:pNext:: + Pointer to next structure in the structure chain when applicable. + +pname:outputMask:: + Types of writes to the image to flush (see elink:VkMemoryOutputFlags for more detail). + +pname:inputMask:: + Types of reads from the image to invalidate (see elink:VkMemoryInputFlags for more detail). + +pname:oldLayout:: + Current layout the image is expected to be in (see elink:VkImageLayout for more detail). + +pname:newLayout:: + New layout the image should be transferred to (see elink:VkImageLayout for more detail). + +pname:srcQueueFamilyIndex:: + Identifies the source queue family to transfer ownership of the image from. + A value of ename:VK_QUEUE_FAMILY_IGNORED indicates that this member should be ignored. + +pname:dstQueueFamilyIndex:: + Identifies the destination queue family to transfer ownership of the image to. + A value of ename:VK_QUEUE_FAMILY_IGNORED indicates that this member should be ignored. + +pname:image:: + Image object the memory barrier applies to. + +pname:subresourceRange:: + Sub-range of the image the memory barrier applies to. + +Description +----------- + +This structure specifies the parameters of an image memory barrier that can +be passed in the ptext:ppMemBarriers parameter of flink:vkCmdPipelineBarrier +and flink:vkCmdWaitEvents. + +include::../validity/structs/VkImageMemoryBarrier.txt[] + +See Also +-------- + +flink:vkCmdPipelineBarrier, flink:vkCmdWaitEvents, slink:VkMemoryBarrier, slink:VkBufferMemoryBarrier + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkImageType.txt b/doc/specs/vulkan/man/VkImageType.txt new file mode 100644 index 00000000..de458ef3 --- /dev/null +++ b/doc/specs/vulkan/man/VkImageType.txt @@ -0,0 +1,36 @@ +VkImageType(3) +============== + +Name +---- +VkImageType - Specifies the type of an image object. + +C Specification +--------------- + +include::../enums/VkImageType.txt[] + +Constants +--------- + +ename:VK_IMAGE_TYPE_1D:: + One-dimensional image type. + +ename:VK_IMAGE_TYPE_2D:: + Two-dimensional image type. + +ename:VK_IMAGE_TYPE_3D:: + Three-dimensional image type. + +Description +----------- + +The constants of this enumeration are used to specify the type of an image object created using +the flink:vkCreateImage command. + +See Also +-------- + +slink:VkImageCreateInfo, flink:vkCreateImage + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkImageUsageFlags.txt b/doc/specs/vulkan/man/VkImageUsageFlags.txt new file mode 100644 index 00000000..37aabaab --- /dev/null +++ b/doc/specs/vulkan/man/VkImageUsageFlags.txt @@ -0,0 +1,68 @@ +VkImageUsageFlags(3) +==================== + +Name +---- +VkImageUsageFlags - Image object usage flags. + +C Specification +--------------- + +include::../enums/VkImageUsageFlagBits.txt[] +include::../flags/VkImageUsageFlags.txt[] + +Constants +--------- + +ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT:: + The image can be used as the source operand of transfer operations (flink:vkCmdCopyImage, + flink:vkCmdBlitImage, flink:vkCmdCopyImageToBuffer, flink:vkCmdResolveImage). + +ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT:: + The image can be used as the destination operand of transfer operations (flink:vkCmdCopyImage, + flink:vkCmdBlitImage, flink:vkCmdCopyBufferToImage, flink:vkCmdClearColorImage, + flink:vkCmdClearDepthStencilImage, flink:vkCmdResolveImage). + +ename:VK_IMAGE_USAGE_SAMPLED_BIT:: + The image supports filtered and/or unfiltered sampling via sampled image and combined image sampler + descriptors. + +ename:VK_IMAGE_USAGE_STORAGE_BIT:: + The image supports loads, stores, and atomic operations via storage image descriptors. + +ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT:: + The image can be used as a framebuffer color attachment. + + A framebuffer can only use an attachment view as a color attachment if the + view's image was created with this usage flag. + +ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT:: + The image can be used as a framebuffer depth/stencil attachment. + + A framebuffer can only use an attachment view as a depth/stencil attachment if the + view's image was created with this usage flag. + +ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT:: + The contents of images created with this usage flag are only maintained within a render pass. + +ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT:: + The image can be used as a framebuffer input attachment. + +Description +----------- + +These flags are used in the slink:VkImageCreateInfo structure passed as parameter to flink:vkCreateImage +to define the intended use of the created image. Trying to use the image for any other purpose than +those requested at creation time may result in undefined behavior. + +ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT and ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT are +exclusive. No image can be created with both of these flags being set. + +ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT can only be used together with either the +ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, the ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, or +the ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT flags. + +See Also +-------- + +slink:VkImageCreateInfo, flink:vkCreateImage + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkImageViewType.txt b/doc/specs/vulkan/man/VkImageViewType.txt new file mode 100644 index 00000000..9e9645f6 --- /dev/null +++ b/doc/specs/vulkan/man/VkImageViewType.txt @@ -0,0 +1,57 @@ +VkImageViewType(3) +================== + +Name +---- +VkImageViewType - Specifies the type of an image view object. + +C Specification +--------------- + +include::../enums/VkImageViewType.txt[] + +Constants +--------- + +VK_IMAGE_VIEW_TYPE_1D:: + One-dimensional image view type. + + Image views of this type can only be created from image objects of type ename:VK_IMAGE_TYPE_1D. + +VK_IMAGE_VIEW_TYPE_2D:: + Two-dimensional image view type. + + Image views of this type can only be created from image objects of type ename:VK_IMAGE_TYPE_2D. + +VK_IMAGE_VIEW_TYPE_3D:: + Three-dimensional image view type. + + Image views of this type can only be created from image objects of type ename:VK_IMAGE_TYPE_3D. + +VK_IMAGE_VIEW_TYPE_CUBE:: + Cube image view type. + + Image views of this type can only be created from image objects of type ename:VK_IMAGE_TYPE_2D that were + created using the ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT creation flag. + +VK_IMAGE_VIEW_TYPE_1D_ARRAY:: + One-dimensional array image view type. + + Image views of this type can only be created from image objects of type ename:VK_IMAGE_TYPE_1D. + +VK_IMAGE_VIEW_TYPE_2D_ARRAY:: + Two-dimensional array image view type. + + Image views of this type can only be created from image objects of type ename:VK_IMAGE_TYPE_2D. + +VK_IMAGE_VIEW_TYPE_CUBE_ARRAY:: + Cube image array view type. + + Image views of this type can only be created from image objects of type ename:VK_IMAGE_TYPE_2D that were + created using the ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT creation flag. + +Description +----------- + +The constants of this enumeration are used to specify the type of an image view object created using +the flink:vkCreateImageView command. + +See Also +-------- + +slink:VkImageViewCreateInfo, flink:vkCreateImageView + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkMemoryAllocateInfo.txt b/doc/specs/vulkan/man/VkMemoryAllocateInfo.txt new file mode 100644 index 00000000..862dcbb4 --- /dev/null +++ b/doc/specs/vulkan/man/VkMemoryAllocateInfo.txt @@ -0,0 +1,29 @@ +VkMemoryAllocateInfo(3) +======================= + +Name +---- +VkMemoryAllocateInfo - Structure containing parameters of a memory allocation. + +C Specification +--------------- + +include::../structs/VkMemoryAllocateInfo.txt[] + +Fields +------ + +pname:sType:: + +pname:pNext:: + +pname:allocationSize:: + +pname:memoryTypeIndex:: + +Description +----------- + +include::../validity/structs/VkMemoryAllocateInfo.txt[] + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkMemoryPropertyFlags.txt b/doc/specs/vulkan/man/VkMemoryPropertyFlags.txt new file mode 100644 index 00000000..2ebb0bf6 --- /dev/null +++ b/doc/specs/vulkan/man/VkMemoryPropertyFlags.txt @@ -0,0 +1,55 @@ +VkMemoryPropertyFlags(3) +======================== + +Name +---- +VkMemoryPropertyFlags - Memory pool properties. + +C Specification +--------------- + +include::../enums/VkMemoryPropertyFlagBits.txt[] +include::../flags/VkMemoryPropertyFlags.txt[] + +Constants +--------- + +ename:VK_MEMORY_PROPERTY_DEVICE_ONLY:: + Unless any other flag is used to enable other uses this constant + identifies memory that's only accessible by the device. + +ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT:: + Identifies a memory pool that can be mapped into host memory address + space and thus is accessible by the host. + +ename:VK_MEMORY_PROPERTY_HOST_NON_COHERENT_BIT:: + Identifies a memory pool where accesses beteen the host and the + coherency domain are not conherent. Memory with this property needs + explicit use of flink:vkFlushMappedMemoryRanges after host writes to + this type of memory, and use of flink:vkInvalidateMappedMemoryRanges + before host reads from that memory. + +ename:VK_MEMORY_PROPERTY_HOST_UNCACHED_BIT:: + Identifies memory that is not cached by the host. + +ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT:: + Identifies memory where an object's backing may be provided lazily + (when needed) by the implementation. + +Description +----------- + +These flags are used in the slink:VkMemoryAllocateInfo structure passed as parameter to flink:vkAllocateMemory +to define the properties of the memory pool the memory object should be allocated from. + +Additionally, when querying the memory requirements of objects using +flink:vkGetBufferMemoryRequirements or flink:vkGetImageMemoryRequirements, +the ptext:memoryTypeBits member returned in the slink:VkMemoryRequirements +structure takes its values from these set of flags. + +See Also +-------- + +slink:VkMemoryAllocateInfo, flink:vkAllocateMemory, slink:VkMemoryRequirements + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkPhysicalDeviceFeatures.txt b/doc/specs/vulkan/man/VkPhysicalDeviceFeatures.txt new file mode 100644 index 00000000..ac3bf9b0 --- /dev/null +++ b/doc/specs/vulkan/man/VkPhysicalDeviceFeatures.txt @@ -0,0 +1,199 @@ +VkPhysicalDeviceFeatures(3) +=========================== + +Name +---- +VkPhysicalDeviceFeatures - Structure describing the fine-grained features that can be supported by an implementation. + +C Specification +--------------- + +include::../structs/VkPhysicalDeviceFeatures.txt[] + +Fields +------ + +pname:robustBufferAccess:: + out of bounds buffer accesses are well defined + +pname:fullDrawIndexUint32:: + full 32-bit range of indices are supported for indexed draw calls using VK_INDEX_TYPE_UINT32. + +pname:imageCubeArray:: + image views which are arrays of cube maps are supported (VK_IMAGE_VIEW_TYPE_CUBE_ARRAY) + +pname:independentBlend:: + blending operations are controlled independently per-attachment + +pname:geometryShader:: + geometry shader stage is supported + +pname:tessellationShader:: + tessellation control and evaluation shader stages are supported + +pname:sampleRateShading:: + per-sample shading and multisample interpolation are supported + +pname:dualSrcBlend:: + blend operations which take two sources are supported + +pname:logicOp:: + logic operations are supported + +pname:multiDrawIndirect:: + multi draw indirect is supported + +pname:depthClamp:: + depth clamping is supported + +pname:depthBiasClamp:: + depth bias clamping is supported + +pname:fillModeNonSolid:: + point and wireframe fill modes are supported + +pname:depthBounds:: + depth bounds test is supported + +pname:wideLines:: + lines with width greater than 1 are supported + +pname:largePoints:: + points with size greater than 1 are supported + +pname:alphaToOne:: + the implementation can replace the alpha value of the color fragment output to the maximum + representable alpha value for fixed-point colors or 1.0 for floating-point colors. + +pname:multiViewport:: + mulitple viewports are supported + +pname:samplerAnisotropy:: + Anisotropic filtering is supported + +pname:textureCompressionETC2:: + ETC and EAC texture compression formats are supported + +pname:textureCompressionASTC_LDR:: + ASTC LDR texture compression formats are supported + +pname:textureCompressionBC:: + BC1-7 texture compressed formats are supported + +pname:pipelineStatisticsQuery:: + pipeline statistics queries are supported + + +pname:vertexPipelineStoresAndAtomics:: + storage buffers and images support stores and atomic operationscan in + the vertex, tessellation, and geometry shader stages. + + +pname:fragmentStoresAndAtomics:: + storage buffers and images support stores and atomic operationscan in + the fragment shader stage. + + +pname:shaderTessellationAndGeometryPointSize:: + the _PointSize_ shader builtin is available in the tessellation control, + tessellation evaluation, and geometry shader stages. + +pname:shaderImageGatherExtended:: + image gather with _non-constant offset_ and image gather with _offsets_ are supported + +pname:shaderStorageImageExtendedFormats:: + the extended set of image formats can be used for storage images + +pname:shaderStorageImageMultisample:: + multisample images can be used for storage images + +pname:shaderUniformBufferArrayDynamicIndexing:: + arrays of uniform buffers can be accessed with dynamically uniform indices + +pname:shaderSampledImageArrayDynamicIndexing:: + arrays of samplers and sampled images can be accessed with dynamically uniform indices + +pname:shaderStorageBufferArrayDynamicIndexing:: + arrays of storage buffers can be accessed with dynamically uniform indices + +pname:shaderStorageImageArrayDynamicIndexing:: + arrays of storage images can be accessed with dynamically uniform indices + +pname:shaderClipDistance:: + clip distance is supported in shader code + +pname:shaderCullDistance:: + cull distance is supported in shader code + +pname:shaderFloat64:: + 64-bit floats (doubles) are supported in shader code + +pname:shaderInt64:: + 64-bit integers are supported in shader code + +pname:shaderInt16:: + 16-bit integers are supported in shader code + +pname:shaderResourceResidency:: + image operations that return resource residency information are supported in shader code + +pname:shaderResourceMinLod:: + image operations that specify minimum resource Lod are supported in shader code + +pname:sparseBinding:: + indicates whether resource memory can be managed at opaque page level + +pname:shaderResourceResidency:: + Sparse resources support: Resource memory can be managed at opaque page level rather than object level + +pname:sparseResidencyBuffer:: + Sparse resources support: physical device can access partially resident buffers + +pname:sparseResidencyImage2D:: + Sparse resources support: physical device can access partially resident 2D (non-MSAA non-DepthStencil) images + +pname:sparseResidencyImage3D:: + Sparse resources support: physical device can access partially resident 3D images + +pname:sparseResidency2Samples:: + Sparse resources support: physical device can access partially resident MSAA 2D images with 2 samples + +pname:sparseResidency4Samples:: + Sparse resources support: physical device can access partially resident MSAA 2D images with 4 samples + +pname:sparseResidency8Samples:: + Sparse resources support: physical device can access partially resident MSAA 2D images with 8 samples + +pname:sparseResidency16Samples:: + Sparse resources support: physical device can access partially resident MSAA 2D images with 16 samples + +pname:sparseResidencyAliased:: + Sparse resources support: physical device can correctly access data aliased into multiple locations (opt-in) + +Description +----------- + +The VkPhysicalDeviceFeatures structure contains a feature flag for each of +the fine-grained features that may be supported by an implementation. + +When passed to flink:vkGetPhysicalDeviceFeatures as the ptext:pFeatures +parameter, the implementation will fill in each member of the structure +with ename:VK_TRUE if the indicated ptext:physicalDevice supports the feature, +or with ename:VK_FALSE if the physical device does not support the feature. + +Fine-grained features must be enabled at slink:VkDevice creation time. This +is done by passing a pointer to a slink:VkPhysicalDeviceFeatures structure +in the ptext:pEnabledFeatures member of the slink:VkDeviceCreateInfo +structure that is passed to flink:vkCreateDevice. In this case, setting a +member of the structure to ename:VK_TRUE will enable support for the +feature on the indictated physical device, and setting a member to +ename:VK_FALSE will disable support for the feature. + +include::../validity/structs/VkPhysicalDeviceFeatures .txt[] + +See Also +-------- + +flink:vkGetPhysicalDeviceFeatures, flink:vkGetPhysicalDeviceProperties, flink:vkCreateDevice + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkPhysicalDeviceLimits.txt b/doc/specs/vulkan/man/VkPhysicalDeviceLimits.txt new file mode 100644 index 00000000..bdd6e43b --- /dev/null +++ b/doc/specs/vulkan/man/VkPhysicalDeviceLimits.txt @@ -0,0 +1,232 @@ +VkPhysicalDeviceLimits(3) +========================= + +Name +---- +VkPhysicalDeviceLimits - Structure + +C Specification +--------------- + +include::../structs/VkPhysicalDeviceLimits.txt[] + +Fields +------ + +maxImageDimension1D:: + max 1D image dimension +maxImageDimension2D:: + max 2D image dimension +maxImageDimension3D:: + max 3D image dimension +maxImageDimensionCube:: + max cubemap image dimension +maxImageArrayLayers:: + max layers for image arrays +maxTexelBufferSize:: + max texel buffer size (bytes) +maxUniformBufferRange:: + max uniform buffer range (bytes) +maxStorageBufferRange:: + max storage buffer range (bytes) +maxPushConstantsSize:: + max size of the push constants pool (bytes) + +maxMemoryAllocationCount:: + max number of device memory allocations supported +maxSamplerAllocationCount:: + max number of samplers that can be allocated on a device +bufferImageGranularity:: + Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage + +maxBoundDescriptorSets:: + max number of descriptors sets that can be bound to a pipeline +maxPerStageDescriptorSamplers:: + max num of samplers allowed per-stage in a descriptor set +maxPerStageDescriptorUniformBuffers:: + max num of uniform buffers allowed per-stage in a descriptor set +maxPerStageDescriptorStorageBuffers:: + max num of storage buffers allowed per-stage in a descriptor set +maxPerStageDescriptorSampledImages:: + max num of sampled images allowed per-stage in a descriptor set +maxPerStageDescriptorStorageImages:: + max num of storage images allowed per-stage in a descriptor set +maxPerStageDescriptorInputAttachments:: + max num of input attachments allowed per-stage in a descriptor set +maxDescriptorSetUniformBuffers:: + max num of uniform buffers allowed in all stages in a descriptor set +maxDescriptorSetStorageBuffers:: + max num of storage buffers allowed in all stages in a descriptor set +maxDescriptorSetSampledImages:: + max num of sampled images allowed in all stages in a descriptor set +maxDescriptorSetStorageImages:: + max num of storage images allowed in all stages in a descriptor set +maxDescriptorSetInputAttachments:: + max num of input attachments allowed in all stages in a descriptor set + +maxVertexInputAttributes:: + max num of vertex input attribute slots +maxVertexInputBindings: + max num of vertex input binding slots +maxVertexInputAttributeOffset:: + max vertex input attribute offset added to vertex buffer offset +maxVertexInputBindingStride:: + max vertex input binding stride +maxVertexOutputComponents:: + max num of output components written by vertex shader + +maxTessellationGenLevel:: + max level supported by tessellation primitive generator +maxTessellationPatchSize:: + max patch size (vertices) +maxTessellationControlPerVertexInputComponents:: + max num of input components per-vertex in TCS +maxTessellationControlPerVertexOutputComponents:: + max num of output components per-vertex in TCS +maxTessellationControlPerPatchOutputComponents:: + max num of output components per-patch in TCS +maxTessellationControlTotalOutputComponents:: + max total num of per-vertex and per-patch output components in TCS + +maxTessellationEvaluationInputComponents:: + max num of input components per vertex in TES +maxTessellationEvaluationOutputComponents:: + max num of output components per vertex in TES + +maxGeometryShaderInvocations:: + max invocation count supported in geometry shader +maxGeometryInputComponents:: + max num of input components read in geometry stage +maxGeometryOutputComponents:: + max num of output components written in geometry stage +maxGeometryOutputVertices:: + max num of vertices that can be emitted in geometry stage +maxGeometryTotalOutputComponents:: + max total num of components (all vertices) written in geometry stage +maxFragmentInputComponents:: + max num of input compontents read in fragment stage +maxFragmentOutputAttachments:: + max num of output attachments written in fragment stage +maxFragmentDualSourceAttachments:: + max num of output attachments written when using dual source blending +maxFragmentCombinedOutputResources:: + total num of storage buffers, storage images and output buffers +maxComputeSharedMemorySize:: + max total storage size of work group local storage (bytes) +maxComputeWorkGroupCount[3]:: + max num of compute work groups that may be dispatched by a single command (x,y,z) +maxComputeWorkGroupInvocations:: + max total compute invocations in a single local work group +maxComputeWorkGroupSize[3]:: + max local size of a compute work group (x,y,z) + +subPixelPrecisionBits:: + num bits of subpixel precision in screen x and y +subTexelPrecisionBits:: + num bits of subtexel precision +mipmapPrecisionBits:: + num bits of mipmap precision + +maxDrawIndexedIndexValue:: + max index value for indexed draw calls (for 32-bit indices) +maxDrawIndirectCount:: + max draw count for indirect draw calls + +maxSamplerLodBias:: + max absolute sampler level of detail bias +maxSamplerAnisotropy:: + max degree of sampler anisotropy + +maxViewports:: + max number of active viewports +maxViewportDimensions[2]:: + max viewport dimensions (x,y) +viewportBoundsRange[2]:: + viewport bounds range (min,max) +viewportSubPixelBits:: + num bits of subpixel precision for viewport + +minMemoryMapAlignment:: + min required alignment of host-visible memory allocations within the host + address space (bytes) +minTexelBufferOffsetAlignment:: + min required alignment for texel buffer offsets (bytes) +minUniformBufferOffsetAlignment:: + min required alignment for uniform buffer sizes and offsets (bytes) +minStorageBufferOffsetAlignment:: + min required alignment for storage buffer offsets (bytes) +minTexelOffset:: + min texel offset for OpTextureSampleOffset +maxTexelOffset:: + max texel offset for OpTextureSampleOffset +minTexelGatherOffset:: + min texel offset for OpTextureGatherOffset +maxTexelGatherOffset:: + max texel offset for OpTextureGatherOffset +minInterpolationOffset:: + furthest negative offset for interpolateAtOffset +maxInterpolationOffset:: + furthest positive offset for interpolateAtOffset +subPixelInterpolationOffsetBits:: + num of subpixel bits for interpolateAtOffset + +maxFramebufferWidth:: + max width for a framebuffer +maxFramebufferHeight:: + max height for a framebuffer +maxFramebufferLayers:: + max layer count for a layered framebuffer +framebufferColorSampleCounts:: + supported color sample counts for a framebuffer +framebufferDepthSampleCounts:: + supported depth sample counts for a framebuffer +framebufferStencilSampleCounts:: + supported stencil sample counts for a framebuffer +framebufferNoAttachmentsSampleCounts:: + supported sample counts for a framebuffer with no attachments + +maxColorAttachments:: + max num of color attachments per subpass + +sampledImageColorSampleCounts:: + supported sample counts for an image with a non-integer color format +sampledImageIntegerSampleCounts:: + supported sample counts for an image with an integer color format +sampledImageDepthSampleCounts:: + supported sample counts for an image with a depth format +sampledImageStencilSampleCounts:: + supported sample counts for an image with a stencil format +storageImageSampleCounts:: + supported sample counts for an image used for storage operations + +timestampFrequency:: + 1/clock_tick_granularity for timestamp queries + +maxClipDistances:: + max number of clip distances +maxCullDistances:: + max number of cull distances +maxCombinedClipAndCullDistances:: + max combined number of user clipping + +pointSizeRange[2]:: + range (min,max) of supported point sizes +lineWidthRange[2]:: + range (min,max) of supported line widths +pointSizeGranularity:: + granularity of supported point sizes +lineWidthGranularity:: + granularity of supported line widths + + +Description +----------- + +include::../validity/structs/VkPhysicalDeviceLimits.txt[] + +See Also +-------- + +flink:vkGetPhysicalDeviceFeatures + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkPipelineLayoutCreateInfo.txt b/doc/specs/vulkan/man/VkPipelineLayoutCreateInfo.txt new file mode 100644 index 00000000..b2b82fe8 --- /dev/null +++ b/doc/specs/vulkan/man/VkPipelineLayoutCreateInfo.txt @@ -0,0 +1,43 @@ +VkPipelineLayoutCreateInfo(3) +============================= + +Name +---- +VkPipelineLayoutCreateInfo - Structure specifying the parameters of a newly created pipeline layout object. + +C Specification +--------------- + +include::../structs/VkPipelineLayoutCreateInfo.txt[] + +Fields +------ + +sType:: + Structure type. Must be ename:VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO. + +pNext:: + Pointer to next structure in the structure chain when applicable. + +setLayoutCount:: + Number of descriptor sets interfaced by the pipeline. + +pSetLayouts:: + Pointer to an array of pname:setLayoutCount number of descriptor set + layout objects defining the layout of the descriptor set at the + corresponding index. + +Description +----------- + +This structure is used to specify the parameters of pipeline layout objects created using +flink:vkCreatePipelineLayout. + +include::../validity/structs/VkPipelineLayoutCreateInfo.txt[] + +See Also +-------- + +flink:vkCreatePipelineLayout + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkPipelineStageFlags.txt b/doc/specs/vulkan/man/VkPipelineStageFlags.txt new file mode 100644 index 00000000..ee1b5790 --- /dev/null +++ b/doc/specs/vulkan/man/VkPipelineStageFlags.txt @@ -0,0 +1,100 @@ +VkPipelineStageFlags(3) +======================= + +Name +---- +VkPipelineStageFlags - Pipeline stage identifiers. + +C Specification +--------------- + +include::../enums/VkPipelineStageFlagBits.txt[] + +Constants +--------- + +ename:VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT:: + Stage of the pipeline where commands are initially received by the queue. + +ename:VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT:: + Stage of the pipeline where Draw/DispatchIndirect data structures are + consumed. + +ename:VK_PIPELINE_STAGE_VERTEX_INPUT_BIT:: + Stage of the pipeline where vertex and index buffers are consumed. + +ename:VK_PIPELINE_STAGE_VERTEX_SHADER_BIT:: + Vertex shader stage. + +ename:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT:: + Tessellation control shader stage. + +ename:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT:: + Tessellation evaluation shader stage. + +ename:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT:: + Geometry shader stage. + +ename:VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT:: + Fragment shader stage. + +ename:VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT:: + Stage of the pipeline where early fragment tests (depth/stencil test before + fragment shading) are performed. + +ename:VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT:: + Stage of the pipeline where late fragment tests (depth/stencil test after + fragment shading) are performed. + +ename:VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT:: + Stage of the pipeline after blending where the final color values are output + from the pipeline. Note that this does not necessarily indicate that the + values have been committed to memory. + +ename:VK_PIPELINE_STAGE_TRANSFER_BIT:: + Execution of copy commands. This includes the operations resulting from all + transfer commands, e.g. fname:vkCmdCopyImage, fname:vkCmdCopyBuffer, + fname:vkCmdBlitImage, fname:vkCmdResolveImage, fname:vkCmdClearColorImage, + etc. + +ename:VK_PIPELINE_STAGE_HOST_BIT:: + Indicates execution on the Host of reads/writes of device memory. + +Description +----------- + +The pipeline stages are used to describe which operations must be synchronized +for the purposes of execution dependencies in pipeline barriers, event +signal/wait, and subpass dependencies. Many of the bits describe stages of the +graphics pipeline, but there are also pseudo-stages for compute work, +copy commands, and CPU production/consumption of data. + +For the commands flink:vkCmdSetEvent and flink:vkCmdResetEvent the event object is +set and reset, respectively, after the specified pipeline stages have completed +executing prior commands. Some implementations may not be able to signal at as +fine a grain as the bits in the bitfield, in which case the signaling may occur +after additional stages have completed executing prior commands. + +For the command flink:vkCmdWaitEvents, the ptext:srcStageMask should be a +bitwise OR of all ptext:stageMasks used to signal the events, as described +above. If some events were signaled with flink:vkSetEvent, then this should +include ename:VK_PIPELINE_STAGE_HOST_BIT. ptext:dstStageMask indicates the set of +pipeline stages that should not begin executing subsequent commands until the +events are signaled. Some implementations may not be able to wait at as fine +a grain as the bits in the bitfield, in which case the waiting may occur at an +earlier stage in the pipeline. + +For the command flink:vkCmdPipelineBarrier, writes as described by +ptext:outputMask that were written by pipeline stages in ptext:srcStageMask +prior to the barrier are made visible to reads as described by ptext:inputMask +in pipeline stages in ptext:dstStageMask subsequent to the barrier. + +ename:VK_PIPELINE_STAGE_HOST_BIT cannot be used for fname:vkCmdSetEvent, +fname:vkCmdResetEvent, or fname:vkCmdPipelineBarrier. + +See Also +-------- + +flink:vkCmdSetEvent, flink:vkCmdResetEvent, flink:vkCmdWaitEvents, flink:vkCmdPipelineBarrier + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkQueryControlFlags.txt b/doc/specs/vulkan/man/VkQueryControlFlags.txt new file mode 100644 index 00000000..48450e65 --- /dev/null +++ b/doc/specs/vulkan/man/VkQueryControlFlags.txt @@ -0,0 +1,31 @@ +VkQueryControlFlags(3) +====================== + +Name +---- +VkQueryControlFlags - Query control flags. + +C Specification +--------------- + +include::../flags/VkQueryControlFlags.txt[] + +Constants +--------- + +VK_QUERY_CONTROL_PRECISE_BIT:: + When this flag is used the query must collect precise results. Without this flag + the actual result of occlusion queries may be less than the result of the same query + when using this flag. + +Description +----------- + +These flags are used to control the behavior of queries started with the flink:vkCmdBeginQuery command. + +See Also +-------- + +flink:vkCmdBeginQuery + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkQueryResultFlags.txt b/doc/specs/vulkan/man/VkQueryResultFlags.txt new file mode 100644 index 00000000..1ffc8475 --- /dev/null +++ b/doc/specs/vulkan/man/VkQueryResultFlags.txt @@ -0,0 +1,52 @@ +VkQueryResultFlags(3) +===================== + +Name +---- +VkQueryResultFlags - Query result flags. + +C Specification +--------------- + +include::../flags/VkQueryResultFlags.txt[] + +Constants +--------- + +VK_QUERY_RESULT_32_BIT:: + When this flag is used the results of the queries are written to the destination buffer as one or more + 32-bit values. + +VK_QUERY_RESULT_64_BIT:: + When this flag is used the results of the queries are written to the destination buffer as one or more + 64-bit values. + +VK_QUERY_RESULT_NO_WAIT_BIT:: + When this flag is used the results of the queries aren't waited on before proceeding with the result copy. + +VK_QUERY_RESULT_WAIT_BIT:: + When this flag is used the results of the queries are waited on before proceeding with the result copy. + +VK_QUERY_RESULT_WITH_AVAILABILITY_BIT:: + When this flag is used the availability of the results is also written to the destination buffer as a + separate value after the actual results. If the results of the query were available at the time of the + result copy the integer value 1 is written, otherwise the integer value 0 is written to the destination buffer. + +VK_QUERY_RESULT_PARTIAL_BIT:: + When this flag is used the partial results of the queries are written to the destination buffer even if the + final results aren't available. If this flag isn't used then the locations in the destination buffer + corresponding to result values of queries whose result isn't available at the time of the result copy will + be left untouched. + +Description +----------- + +These flags are used to control the behavior of the query result copy commands flink:vkGetQueryPoolResults and +flink:vkCmdCopyQueryPoolResults. + +See Also +-------- + +flink:vkGetQueryPoolResults, flink:vkCmdCopyQueryPoolResults + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkQueueFamilyProperties.txt b/doc/specs/vulkan/man/VkQueueFamilyProperties.txt new file mode 100644 index 00000000..620fd625 --- /dev/null +++ b/doc/specs/vulkan/man/VkQueueFamilyProperties.txt @@ -0,0 +1,38 @@ +VkQueueFamilyProperties(3) +========================== + +Name +---- +VkQueueFamilyProperties - Structure providing information about a queue family. + +C Specification +--------------- + +include::../structs/VkQueueFamilyProperties.txt[] + +Fields +------ + +queueFlags:: + Capabilities of the queues in this queue family (see elink:VkQueueFlags for more detail). + +queueCount:: + Number of queues in this queue family. + +supportsTimestamps:: + Tells whether queues in this queue family support timestamps. + +Description +----------- + +The properties of queue families available in this structure can be retrieved using +flink:vkGetPhysicalDeviceQueueFamilyProperties. + +include::../validity/structs/VkQueueFamilyProperties.txt[] + +See Also +-------- + +flink:vkGetPhysicalDeviceQueueFamilyProperties, elink:VkQueueFlags + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkQueueFlags.txt b/doc/specs/vulkan/man/VkQueueFlags.txt new file mode 100644 index 00000000..96ed140f --- /dev/null +++ b/doc/specs/vulkan/man/VkQueueFlags.txt @@ -0,0 +1,44 @@ +VkQueueFlags(3) +=============== + +Name +---- +VkQueueFlags - Queue capability flags. + +C Specification +--------------- + +include::../flags/VkQueueFlags.txt[] + +Constants +--------- + +ename:VK_QUEUE_GRAPHICS_BIT:: + Queues which have this capability flag support graphics operations. + These operations include support using a graphics pipeline and issuing draw commands. + +ename:VK_QUEUE_COMPUTE_BIT:: + Queues which have this capability flag support compute operations. + These operations include support using a compute pipeline and issuing dispatch commands. + +ename:VK_QUEUE_TRANSFER_BIT:: + Queues which have this capability flag support transfer operations. + These operations include all of the copy commands. + +ename:VK_QUEUE_SPARSE_BINDING_BIT:: + Queues which have this capability flag support memory management operations. + These operations are affected by calling flink:vkQueueBindSparse. + +Description +----------- + +These flags are returned in the slink:VkQueueFamilyProperties structure together with other +capabilities of a queue from a particular queue family as result of calling +flink:vkGetPhysicalDeviceQueueFamilyProperties. + +See Also +-------- + +slink:VkQueueFamilyProperties, flink:vkGetPhysicalDeviceQueueFamilyProperties + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkSharingMode.txt b/doc/specs/vulkan/man/VkSharingMode.txt new file mode 100644 index 00000000..a1bbd04c --- /dev/null +++ b/doc/specs/vulkan/man/VkSharingMode.txt @@ -0,0 +1,63 @@ +VkSharingMode(3) +================ + +Name +---- +VkSharingMode - Specifies the mode of resource sharing. + +C Specification +--------------- + +include::../enums/VkSharingMode.txt[] + +Constants +--------- + +ename:VK_SHARING_MODE_EXCLUSIVE:: + Objects created using this sharing mode can only be accessed by queues + of the same queue family at any given time. + +ename:VK_SHARING_MODE_CONCURRENT:: + Objects created using this sharing mode can be accessed by queues from + different queue families simultaneously. + +Description +----------- + +The constants of this enumeration are used to specify the intended resource +sharing mode used by a buffer or image object. + +Buffers and images created using ename:VK_SHARING_MODE_EXCLUSIVE can only +be accessed by queues of the same queue family at any given time. Before +being able to access the object using a queue from a different queue family +the application has to transfer exclusive ownership of the object between +the source and destination queue families. In order to do that the +application has to perform the following operations: + +1. Release exclusive ownership from the source queue family to the destination queue family. + +2. Use semaphores to ensure proper execution control for the ownership transfer. + +3. Acquire exclusive ownership for the destination queue family from the source queue family. + +To release exclusive ownership the application should execute an image +memory barrier (see slink:VkImageMemoryBarrier) on a queue from the source +queue family where it must set the ptext:srcQueueFamilyIndex parameter of +the barrier to the source queue family's index, and the +ptext:dstQueueFamilyIndex parameter of the barrier to the destination queue +family's index. + +To acquire exclusive ownership the application should execute the same image +memory barrier on a queue from the destination queue family. + +Buffers and images created using ename:VK_SHARING_MODE_CONCURRENT can be +simultaneously accessed by queues from different queue families. Accesses of +buffers and images created using this sharing mode may have lower performance +characteristics. + +See Also +-------- + +slink:VkImageCreateInfo, slink:VkBufferCreateInfo + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/VkWriteDescriptorSet.txt b/doc/specs/vulkan/man/VkWriteDescriptorSet.txt new file mode 100644 index 00000000..6f878399 --- /dev/null +++ b/doc/specs/vulkan/man/VkWriteDescriptorSet.txt @@ -0,0 +1,85 @@ +VkWriteDescriptorSet(3) +======================= + +Name +---- +VkWriteDescriptorSet - Structure specifying the parameters of a descriptor set write operation. + +C Specification +--------------- + +include::../structs/VkWriteDescriptorSet.txt[] + +Fields +------ + +pname:sType:: + Structure type. Must be ename:VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET. + +pname:pNext:: + Pointer to next structure in the structure chain when applicable. + +pname:dstSet:: + Destination descriptor set to write the descriptor data to. + +pname:dstBinding:: + Binding within the descriptor set to start the update from. + +pname:dstArrayElement:: + Array element of the binding to start the update from. + +pname:descriptorCount:: + Number of descriptors to write to the descriptor set. + +pname:descriptorType:: + Type of descriptors to write to the descriptor set. + +pname:pImageInfo:: + A pointer to an array of pname:descriptorCount slink:VkDescriptorImageInfo + structures specifying the source of the descriptor data to write to the + descriptor set for images. + +pname:pBufferInfo:: + A pointer to an array of pname:descriptorCount slink:VkDescriptorBufferInfo + structures specifying the source of the descriptor data to write to the + descriptor set for buffers. + +pname:pTexelBufferView:: + A pointer to an array of basetype:VkBufferView handles used when binding + texel buffers into a the descriptor set. + +Description +----------- + +This structure specifies information about the descriptors to be written to +a descriptor set using the fname:vkUpdateDescriptorSets command. + +When writing data to descriptor sets, the pname:pImageInfo, pname:pBufferInfo +or pname:pTexelBufferView parameters of fname:vkUpdateDescriptorSets point +to pname:descriptorCount instances of data structures, each instance +specifying the source of the descriptor data to be written. Which of these +parameters is used depends on the value of pname:descriptorType. + +Each instance of the selected array allows writing pname:descriptorCount +descriptors of type pname:descriptorType to the destination descriptor +set specified by pname:dstSet starting from the array element index +pname:dstArrayElement of the pname:dstBinding binding. + +If pname:descriptorCount is greater than the number of descriptors in the +specified binding starting from the specified array element index then +subsequent descriptors are written to the next binding starting from its +first array element. This allows updating multiple subsequent bindings with +a single instance of this structure as long as the descriptor type of those +bindings match. + +Attempting to write descriptors of incompatible type to any binding of a +descriptor set may result in undefined behavior. + +include::../validity/structs/VkWriteDescriptorSet.txt[] + +See Also +-------- + +flink:vkUpdateDescriptorSets, slink:VkDescriptorImageInfo, slink:VkDescriptorBufferInfo, elink:VkDescriptorType + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/apispec.txt b/doc/specs/vulkan/man/apispec.txt new file mode 100644 index 00000000..b7c5a929 --- /dev/null +++ b/doc/specs/vulkan/man/apispec.txt @@ -0,0 +1,208 @@ +Vulkan API Reference Pages +========================== +include::../specversion.txt[] + +:doctype: book +:numbered!: +:toc2: +:max-width: 200 +:numbered: +:doctype: book +:data-uri: +:asciimath: +:toclevels: 2 + +Drawing Commands +---------------- + +:leveloffset: 2 + +include::vkBeginCommandBuffer.txt[] +include::vkBindBufferMemory.txt[] +include::vkBindImageMemory.txt[] +include::vkCmdBeginQuery.txt[] +include::vkCmdBeginRenderPass.txt[] +include::vkCmdBindDescriptorSets.txt[] +include::vkCmdBindIndexBuffer.txt[] +include::vkCmdBindPipeline.txt[] +include::vkCmdBindVertexBuffers.txt[] +include::vkCmdBlitImage.txt[] +include::vkCmdClearAttachments.txt[] +include::vkCmdClearColorImage.txt[] +include::vkCmdClearDepthStencilImage.txt[] +include::vkCmdCopyBuffer.txt[] +include::vkCmdCopyBufferToImage.txt[] +include::vkCmdCopyImage.txt[] +include::vkCmdCopyImageToBuffer.txt[] +include::vkCmdCopyQueryPoolResults.txt[] +include::vkCmdDispatch.txt[] +include::vkCmdDispatchIndirect.txt[] +include::vkCmdDraw.txt[] +include::vkCmdDrawIndexed.txt[] +include::vkCmdDrawIndexedIndirect.txt[] +include::vkCmdDrawIndirect.txt[] +include::vkCmdEndQuery.txt[] +include::vkCmdEndRenderPass.txt[] +include::vkCmdExecuteCommands.txt[] +include::vkCmdFillBuffer.txt[] +include::vkCmdNextSubpass.txt[] +include::vkCmdPipelineBarrier.txt[] +include::vkCmdPushConstants.txt[] +include::vkCmdResetEvent.txt[] +include::vkCmdResetQueryPool.txt[] +include::vkCmdResolveImage.txt[] +include::vkCmdSetBlendConstants.txt[] +include::vkCmdSetDepthBias.txt[] +include::vkCmdSetDepthBounds.txt[] +include::vkCmdSetEvent.txt[] +include::vkCmdSetLineWidth.txt[] +include::vkCmdSetScissor.txt[] +include::vkCmdSetStencilCompareMask.txt[] +include::vkCmdSetStencilReference.txt[] +include::vkCmdSetStencilWriteMask.txt[] +include::vkCmdSetViewport.txt[] +include::vkCmdUpdateBuffer.txt[] +include::vkCmdWaitEvents.txt[] +include::vkCmdWriteTimestamp.txt[] +include::vkCreateBuffer.txt[] +include::vkCreateBufferView.txt[] +include::vkCreateCommandPool.txt[] +include::vkCreateComputePipelines.txt[] +include::vkCreateDescriptorPool.txt[] +include::vkCreateDescriptorSetLayout.txt[] +include::vkCreateDevice.txt[] +include::vkCreateEvent.txt[] +include::vkCreateFence.txt[] +include::vkCreateFramebuffer.txt[] +include::vkCreateGraphicsPipelines.txt[] +include::vkCreateImage.txt[] +include::vkCreateImageView.txt[] +include::vkCreateInstance.txt[] +include::vkCreatePipelineCache.txt[] +include::vkCreatePipelineLayout.txt[] +include::vkCreateQueryPool.txt[] +include::vkCreateRenderPass.txt[] +include::vkCreateSampler.txt[] +include::vkCreateSemaphore.txt[] +include::vkCreateShaderModule.txt[] +include::vkDestroyBuffer.txt[] +include::vkDestroyBufferView.txt[] +include::vkDestroyCommandPool.txt[] +include::vkDestroyDescriptorPool.txt[] +include::vkDestroyDescriptorSetLayout.txt[] +include::vkDestroyDevice.txt[] +include::vkDestroyEvent.txt[] +include::vkDestroyFence.txt[] +include::vkDestroyFramebuffer.txt[] +include::vkDestroyImage.txt[] +include::vkDestroyImageView.txt[] +include::vkDestroyInstance.txt[] +include::vkDestroyPipeline.txt[] +include::vkDestroyPipelineCache.txt[] +include::vkDestroyPipelineLayout.txt[] +include::vkDestroyQueryPool.txt[] +include::vkDestroyRenderPass.txt[] +include::vkDestroySampler.txt[] +include::vkDestroySemaphore.txt[] +include::vkDestroyShaderModule.txt[] +include::vkDeviceWaitIdle.txt[] +include::vkEndCommandBuffer.txt[] +include::vkEnumerateDeviceExtensionProperties.txt[] +include::vkEnumerateDeviceLayerProperties.txt[] +include::vkEnumerateInstanceExtensionProperties.txt[] +include::vkEnumerateInstanceLayerProperties.txt[] +include::vkEnumeratePhysicalDevices.txt[] +include::vkFlushMappedMemoryRanges.txt[] +include::vkFreeCommandBuffers.txt[] +include::vkFreeDescriptorSets.txt[] +include::vkFreeMemory.txt[] +include::vkGetBufferMemoryRequirements.txt[] +include::vkGetDeviceMemoryCommitment.txt[] +include::vkGetDeviceProcAddr.txt[] +include::vkGetDeviceQueue.txt[] +include::vkGetEventStatus.txt[] +include::vkGetFenceStatus.txt[] +include::vkGetImageMemoryRequirements.txt[] +include::vkGetImageSparseMemoryRequirements.txt[] +include::vkGetImageSubresourceLayout.txt[] +include::vkGetInstanceProcAddr.txt[] +include::vkGetPhysicalDeviceFeatures.txt[] +include::vkGetPhysicalDeviceFormatProperties.txt[] +include::vkGetPhysicalDeviceImageFormatProperties.txt[] +include::vkGetPhysicalDeviceMemoryProperties.txt[] +include::vkGetPhysicalDeviceProperties.txt[] +include::vkGetPhysicalDeviceQueueFamilyProperties.txt[] +include::vkGetPhysicalDeviceSparseImageFormatProperties.txt[] +include::vkGetPipelineCacheData.txt[] +include::vkGetQueryPoolResults.txt[] +include::vkGetRenderAreaGranularity.txt[] +include::vkInvalidateMappedMemoryRanges.txt[] +include::vkMapMemory.txt[] +include::vkMergePipelineCaches.txt[] +include::vkQueueBindSparse.txt[] +include::vkQueueSubmit.txt[] +include::vkQueueWaitIdle.txt[] +include::vkResetCommandBuffer.txt[] +include::vkResetCommandPool.txt[] +include::vkResetDescriptorPool.txt[] +include::vkResetEvent.txt[] +include::vkResetFences.txt[] +include::vkSetEvent.txt[] +include::vkUnmapMemory.txt[] +include::vkUpdateDescriptorSets.txt[] +include::vkWaitForFences.txt[] + +:leveloffset: 0 + +Enumerations +------------ + +:leveloffset: 2 + +include::VkDescriptorType.txt[] +include::VkImageLayout.txt[] +include::VkImageType.txt[] +include::VkImageViewType.txt[] +include::VkSharingMode.txt[] + +:leveloffset: 0 + +Flags +----- + +:leveloffset: 2 + +include::VkBufferCreateFlags.txt[] +include::VkBufferUsageFlags.txt[] +include::VkFormatFeatureFlags.txt[] +include::VkImageCreateFlags.txt[] +include::VkImageUsageFlags.txt[] +include::VkMemoryPropertyFlags.txt[] +include::VkPipelineStageFlags.txt[] +include::VkQueryControlFlags.txt[] +include::VkQueryResultFlags.txt[] +include::VkQueueFlags.txt[] + +:leveloffset: 0 + +Structures +---------- + +:leveloffset: 2 + +include::VkBufferCreateInfo.txt[] +include::VkBufferMemoryBarrier.txt[] +include::VkDescriptorSetAllocateInfo.txt[] +include::VkImageCreateInfo.txt[] +include::VkImageMemoryBarrier.txt[] +include::VkPhysicalDeviceFeatures.txt[] +include::VkPhysicalDeviceLimits.txt[] +include::VkPipelineLayoutCreateInfo.txt[] +include::VkQueueFamilyProperties.txt[] +include::VkWriteDescriptorSet.txt[] + +:leveloffset: 0 + +[index] +Index +----- diff --git a/doc/specs/vulkan/man/footer.txt b/doc/specs/vulkan/man/footer.txt new file mode 100644 index 00000000..d66b34cd --- /dev/null +++ b/doc/specs/vulkan/man/footer.txt @@ -0,0 +1,7 @@ +ifdef::doctype-manpage[] +include::khronoscopyright.txt[] +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +endif::doctype-manpage[] diff --git a/doc/specs/vulkan/man/khronoscopyright.txt b/doc/specs/vulkan/man/khronoscopyright.txt new file mode 100644 index 00000000..3c48008d --- /dev/null +++ b/doc/specs/vulkan/man/khronoscopyright.txt @@ -0,0 +1,6 @@ +Copyright +--------- + +Copyright (C) 2014-2016 Khronos Group. This material may be distributed subject to +the terms and conditions set forth in the Open Publication License, v 1.0, 8 +June 1999. http://opencontent.org/openpub/. diff --git a/doc/specs/vulkan/man/manpages.mak b/doc/specs/vulkan/man/manpages.mak new file mode 100644 index 00000000..dbf63cb3 --- /dev/null +++ b/doc/specs/vulkan/man/manpages.mak @@ -0,0 +1,251 @@ +MANDIR?=. +MANSECTION:=3 + +WSISOURCES=\ + $(MANDIR)/vkAcquireNextImageKHR.txt \ + $(MANDIR)/vkCreateAndroidSurfaceKHR.txt \ + $(MANDIR)/vkCreateDisplayModeKHR.txt \ + $(MANDIR)/vkCreateDisplayPlaneSurfaceKHR.txt \ + $(MANDIR)/vkCreateMirSurfaceKHR.txt \ + $(MANDIR)/vkCreateSharedSwapchainsKHR.txt \ + $(MANDIR)/vkCreateSwapchainKHR.txt \ + $(MANDIR)/vkCreateWaylandSurfaceKHR.txt \ + $(MANDIR)/vkCreateWin32SurfaceKHR.txt \ + $(MANDIR)/vkCreateXcbSurfaceKHR.txt \ + $(MANDIR)/vkCreateXlibSurfaceKHR.txt \ + $(MANDIR)/vkDestroySurfaceKHR.txt \ + $(MANDIR)/vkDestroySwapchainKHR.txt \ + $(MANDIR)/vkGetDisplayModePropertiesKHR.txt \ + $(MANDIR)/vkGetDisplayPlaneCapabilitiesKHR.txt \ + $(MANDIR)/vkGetDisplayPlaneSupportedDisplaysKHR.txt \ + $(MANDIR)/vkGetPhysicalDeviceDisplayPlanePropertiesKHR.txt \ + $(MANDIR)/vkGetPhysicalDeviceDisplayPropertiesKHR.txt \ + $(MANDIR)/vkGetPhysicalDeviceMirPresentationSupportKHR.txt \ + $(MANDIR)/vkGetPhysicalDeviceSurfaceCapabilitiesKHR.txt \ + $(MANDIR)/vkGetPhysicalDeviceSurfaceFormatsKHR.txt \ + $(MANDIR)/vkGetPhysicalDeviceSurfacePresentModesKHR.txt \ + $(MANDIR)/vkGetPhysicalDeviceSurfaceSupportKHR.txt \ + $(MANDIR)/vkGetPhysicalDeviceWaylandPresentationSupportKHR.txt \ + $(MANDIR)/vkGetPhysicalDeviceWin32PresentationSupportKHR.txt \ + $(MANDIR)/vkGetPhysicalDeviceXcbPresentationSupportKHR.txt \ + $(MANDIR)/vkGetPhysicalDeviceXlibPresentationSupportKHR.txt \ + $(MANDIR)/vkGetSwapchainImagesKHR.txt \ + $(MANDIR)/vkQueuePresentKHR.txt \ + +FUNCSOURCES=\ + $(MANDIR)/vkAllocateCommandBuffers.txt \ + $(MANDIR)/vkAllocateDescriptorSets.txt \ + $(MANDIR)/vkAllocateMemory.txt \ + $(MANDIR)/vkBeginCommandBuffer.txt \ + $(MANDIR)/vkBindBufferMemory.txt \ + $(MANDIR)/vkBindImageMemory.txt \ + $(MANDIR)/vkCmdBeginQuery.txt \ + $(MANDIR)/vkCmdBeginRenderPass.txt \ + $(MANDIR)/vkCmdBindDescriptorSets.txt \ + $(MANDIR)/vkCmdBindIndexBuffer.txt \ + $(MANDIR)/vkCmdBindPipeline.txt \ + $(MANDIR)/vkCmdBindVertexBuffers.txt \ + $(MANDIR)/vkCmdBlitImage.txt \ + $(MANDIR)/vkCmdClearAttachments.txt \ + $(MANDIR)/vkCmdClearColorImage.txt \ + $(MANDIR)/vkCmdClearDepthStencilImage.txt \ + $(MANDIR)/vkCmdCopyBuffer.txt \ + $(MANDIR)/vkCmdCopyBufferToImage.txt \ + $(MANDIR)/vkCmdCopyImage.txt \ + $(MANDIR)/vkCmdCopyImageToBuffer.txt \ + $(MANDIR)/vkCmdCopyQueryPoolResults.txt \ + $(MANDIR)/vkCmdDispatch.txt \ + $(MANDIR)/vkCmdDispatchIndirect.txt \ + $(MANDIR)/vkCmdDraw.txt \ + $(MANDIR)/vkCmdDrawIndexed.txt \ + $(MANDIR)/vkCmdDrawIndexedIndirect.txt \ + $(MANDIR)/vkCmdDrawIndirect.txt \ + $(MANDIR)/vkCmdEndQuery.txt \ + $(MANDIR)/vkCmdEndRenderPass.txt \ + $(MANDIR)/vkCmdExecuteCommands.txt \ + $(MANDIR)/vkCmdFillBuffer.txt \ + $(MANDIR)/vkCmdNextSubpass.txt \ + $(MANDIR)/vkCmdPipelineBarrier.txt \ + $(MANDIR)/vkCmdPushConstants.txt \ + $(MANDIR)/vkCmdResetEvent.txt \ + $(MANDIR)/vkCmdResetQueryPool.txt \ + $(MANDIR)/vkCmdResolveImage.txt \ + $(MANDIR)/vkCmdSetBlendConstants.txt \ + $(MANDIR)/vkCmdSetDepthBias.txt \ + $(MANDIR)/vkCmdSetDepthBounds.txt \ + $(MANDIR)/vkCmdSetEvent.txt \ + $(MANDIR)/vkCmdSetLineWidth.txt \ + $(MANDIR)/vkCmdSetScissor.txt \ + $(MANDIR)/vkCmdSetStencilCompareMask.txt \ + $(MANDIR)/vkCmdSetStencilReference.txt \ + $(MANDIR)/vkCmdSetStencilWriteMask.txt \ + $(MANDIR)/vkCmdSetViewport.txt \ + $(MANDIR)/vkCmdUpdateBuffer.txt \ + $(MANDIR)/vkCmdWaitEvents.txt \ + $(MANDIR)/vkCmdWriteTimestamp.txt \ + $(MANDIR)/vkCreateBuffer.txt \ + $(MANDIR)/vkCreateBufferView.txt \ + $(MANDIR)/vkCreateCommandPool.txt \ + $(MANDIR)/vkCreateComputePipelines.txt \ + $(MANDIR)/vkCreateDescriptorPool.txt \ + $(MANDIR)/vkCreateDescriptorSetLayout.txt \ + $(MANDIR)/vkCreateDevice.txt \ + $(MANDIR)/vkCreateEvent.txt \ + $(MANDIR)/vkCreateFence.txt \ + $(MANDIR)/vkCreateFramebuffer.txt \ + $(MANDIR)/vkCreateGraphicsPipelines.txt \ + $(MANDIR)/vkCreateImage.txt \ + $(MANDIR)/vkCreateImageView.txt \ + $(MANDIR)/vkCreateInstance.txt \ + $(MANDIR)/vkCreatePipelineCache.txt \ + $(MANDIR)/vkCreatePipelineLayout.txt \ + $(MANDIR)/vkCreateQueryPool.txt \ + $(MANDIR)/vkCreateRenderPass.txt \ + $(MANDIR)/vkCreateSampler.txt \ + $(MANDIR)/vkCreateSemaphore.txt \ + $(MANDIR)/vkCreateShaderModule.txt \ + $(MANDIR)/vkDestroyBuffer.txt \ + $(MANDIR)/vkDestroyBufferView.txt \ + $(MANDIR)/vkDestroyCommandPool.txt \ + $(MANDIR)/vkDestroyDescriptorPool.txt \ + $(MANDIR)/vkDestroyDescriptorSetLayout.txt \ + $(MANDIR)/vkDestroyDevice.txt \ + $(MANDIR)/vkDestroyEvent.txt \ + $(MANDIR)/vkDestroyFence.txt \ + $(MANDIR)/vkDestroyFramebuffer.txt \ + $(MANDIR)/vkDestroyImage.txt \ + $(MANDIR)/vkDestroyImageView.txt \ + $(MANDIR)/vkDestroyInstance.txt \ + $(MANDIR)/vkDestroyPipeline.txt \ + $(MANDIR)/vkDestroyPipelineCache.txt \ + $(MANDIR)/vkDestroyPipelineLayout.txt \ + $(MANDIR)/vkDestroyQueryPool.txt \ + $(MANDIR)/vkDestroyRenderPass.txt \ + $(MANDIR)/vkDestroySampler.txt \ + $(MANDIR)/vkDestroySemaphore.txt \ + $(MANDIR)/vkDestroyShaderModule.txt \ + $(MANDIR)/vkDeviceWaitIdle.txt \ + $(MANDIR)/vkEndCommandBuffer.txt \ + $(MANDIR)/vkEnumerateDeviceExtensionProperties.txt \ + $(MANDIR)/vkEnumerateDeviceLayerProperties.txt \ + $(MANDIR)/vkEnumerateInstanceExtensionProperties.txt \ + $(MANDIR)/vkEnumerateInstanceLayerProperties.txt \ + $(MANDIR)/vkEnumeratePhysicalDevices.txt \ + $(MANDIR)/vkFlushMappedMemoryRanges.txt \ + $(MANDIR)/vkFreeCommandBuffers.txt \ + $(MANDIR)/vkFreeDescriptorSets.txt \ + $(MANDIR)/vkFreeMemory.txt \ + $(MANDIR)/vkGetBufferMemoryRequirements.txt \ + $(MANDIR)/vkGetDeviceMemoryCommitment.txt \ + $(MANDIR)/vkGetDeviceProcAddr.txt \ + $(MANDIR)/vkGetDeviceQueue.txt \ + $(MANDIR)/vkGetEventStatus.txt \ + $(MANDIR)/vkGetFenceStatus.txt \ + $(MANDIR)/vkGetImageMemoryRequirements.txt \ + $(MANDIR)/vkGetImageSparseMemoryRequirements.txt \ + $(MANDIR)/vkGetImageSubresourceLayout.txt \ + $(MANDIR)/vkGetInstanceProcAddr.txt \ + $(MANDIR)/vkGetPhysicalDeviceFeatures.txt \ + $(MANDIR)/vkGetPhysicalDeviceFormatProperties.txt \ + $(MANDIR)/vkGetPhysicalDeviceImageFormatProperties.txt \ + $(MANDIR)/vkGetPhysicalDeviceMemoryProperties.txt \ + $(MANDIR)/vkGetPhysicalDeviceProperties.txt \ + $(MANDIR)/vkGetPhysicalDeviceQueueFamilyProperties.txt \ + $(MANDIR)/vkGetPhysicalDeviceSparseImageFormatProperties.txt \ + $(MANDIR)/vkGetPipelineCacheData.txt \ + $(MANDIR)/vkGetQueryPoolResults.txt \ + $(MANDIR)/vkGetRenderAreaGranularity.txt \ + $(MANDIR)/vkInvalidateMappedMemoryRanges.txt \ + $(MANDIR)/vkMapMemory.txt \ + $(MANDIR)/vkMergePipelineCaches.txt \ + $(MANDIR)/vkQueueBindSparse.txt \ + $(MANDIR)/vkQueueSubmit.txt \ + $(MANDIR)/vkQueueWaitIdle.txt \ + $(MANDIR)/vkResetCommandBuffer.txt \ + $(MANDIR)/vkResetCommandPool.txt \ + $(MANDIR)/vkResetDescriptorPool.txt \ + $(MANDIR)/vkResetEvent.txt \ + $(MANDIR)/vkResetFences.txt \ + $(MANDIR)/vkSetEvent.txt \ + $(MANDIR)/vkUnmapMemory.txt \ + $(MANDIR)/vkUpdateDescriptorSets.txt \ + $(MANDIR)/vkWaitForFences.txt \ + +STRUCTSOURCES=\ + $(MANDIR)/VkAllocationCallbacks.txt \ + $(MANDIR)/VkCommandBufferAllocateInfo.txt \ + $(MANDIR)/VkDescriptorSetAllocateInfo.txt \ + $(MANDIR)/VkBufferCreateInfo.txt \ + $(MANDIR)/VkBufferMemoryBarrier.txt \ + $(MANDIR)/VkImageCreateInfo.txt \ + $(MANDIR)/VkImageMemoryBarrier.txt \ + $(MANDIR)/VkPhysicalDeviceFeatures.txt \ + $(MANDIR)/VkPhysicalDeviceLimits.txt \ + $(MANDIR)/VkPipelineLayoutCreateInfo.txt \ + $(MANDIR)/VkQueueFamilyProperties.txt \ + $(MANDIR)/VkWriteDescriptorSet.txt + +# stub page to be filled in: $(MANDIR)/VkMemoryAllocateInfo.txt + +FLAGSSOURCES=\ + $(MANDIR)/VkBufferCreateFlags.txt \ + $(MANDIR)/VkBufferUsageFlags.txt \ + $(MANDIR)/VkFormatFeatureFlags.txt \ + $(MANDIR)/VkImageCreateFlags.txt \ + $(MANDIR)/VkImageUsageFlags.txt \ + $(MANDIR)/VkMemoryPropertyFlags.txt \ + $(MANDIR)/VkPipelineStageFlags.txt \ + $(MANDIR)/VkQueryControlFlags.txt \ + $(MANDIR)/VkQueryResultFlags.txt \ + $(MANDIR)/VkQueueFlags.txt + +ENUMSOURCES=\ + $(MANDIR)/VkDescriptorType.txt \ + $(MANDIR)/VkImageLayout.txt \ + $(MANDIR)/VkImageType.txt \ + $(MANDIR)/VkImageViewType.txt \ + $(MANDIR)/VkSharingMode.txt + +MANSOURCES=$(FUNCSOURCES) $(STRUCTSOURCES) $(FLAGSSOURCES) $(ENUMSOURCES) + +MANPAGEDIR=$(OUTDIR)/man/$(MANSECTION) +MANPAGES=$(MANSOURCES:$(MANDIR)/%.txt=$(MANPAGEDIR)/%.$(MANSECTION)) +MANHTMLDIR=$(OUTDIR)/man/html +MANHTML=$(MANSOURCES:$(MANDIR)/%.txt=$(MANHTMLDIR)/%.html) + +manpagesall: manpages manhtmlpages + +manpages: $(MANPAGEDIR) $(MANPAGES) + +manhtmlpages: $(MANHTMLDIR) $(MANHTML) + +manhtmlpages: VKCONF=config/manpages.conf + +# These dependencies don't take into account include directives + +$(MANPAGEDIR)/%.$(MANSECTION): $(MANDIR)/%.txt $(MANDIR)/footer.txt config/manpages.conf + $(QUIET)$(ECHO) Building $@ + $(QUIET)$(A2X) -d manpage -f manpage --asciidoc-opts "-f config/manpages.conf" $(A2XOPTS) $< + +$(MANHTMLDIR)/%.html: $(MANDIR)/%.txt $(MANDIR)/footer.txt config/manpages.conf + $(QUIET)$(ECHO) Building $@ + $(QUIET)$(A2X) -d manpage -f xhtml --asciidoc-opts "-f config/manpages.conf" --stylesheet=vkman.css $(A2XOPTS) --destination-dir=$(@D) $< + +$(MANHTMLDIR): + $(QUIET)$(MKDIR) $@ + +$(MANPAGEDIR): + $(QUIET)$(MKDIR) $@ + +clean: cleanmanhtmlpages cleanmanpages + +cleanmanhtmlpages: + $(RM) $(MANHTML) + $(RMRF) $(MANHTMLDIR) + +cleanmanpages: + $(RM) $(MANPAGES) + $(RMRF) $(MANPAGEDIR) + +.PHONY: $(MANHTMLDIR) $(MANPAGEDIR) + diff --git a/doc/specs/vulkan/man/vkAcquireNextImageKHR.txt b/doc/specs/vulkan/man/vkAcquireNextImageKHR.txt new file mode 100644 index 00000000..3822f439 --- /dev/null +++ b/doc/specs/vulkan/man/vkAcquireNextImageKHR.txt @@ -0,0 +1,46 @@ +vkAcquireNextImageKHR(3) +======================= + +Name +---- +vkAcquireNextImageKHR - retrieve the index of the next available presentable image. + +C Specification +--------------- + +include::../protos/vkAcquireNextImageKHR.txt[] + +Parameters +---------- + +pname:device:: + The VkDevice associated with the swapchain. + +pname:swapchain:: + The swapchain from which an image is being acquired. + +pname:timeout:: + Indicates how long the function waits, in nanoseconds. + +pname:semaphore:: + A VkSemaphore that will become signaled when the presentation engine has released ownership of the image. + +pname:fence:: + A VkFence that will become signaled when the presentation engine has released ownership of the image. + +pname:pImageIndex:: + A pointer to an integer that is set to the index of the next image to use. + +Description +----------- + +fname:vkAcquireNextImageKHR acquires the next image from the swapchain. + +include::../validity/protos/vkAcquireNextImageKHR.txt[] + +See Also +-------- + +flink:vkGetSwapchainImagesKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkAllocateCommandBuffers.txt b/doc/specs/vulkan/man/vkAllocateCommandBuffers.txt new file mode 100644 index 00000000..3af458c9 --- /dev/null +++ b/doc/specs/vulkan/man/vkAllocateCommandBuffers.txt @@ -0,0 +1,52 @@ +vkAllocateCommandBuffers(3) +=========================== + +Name +---- +vkAllocateCommandBuffers - Allocate command buffers from an existing command pool + +C Specification +--------------- + +include::../protos/vkAllocateCommandBuffers.txt[] + +Parameters +---------- + +pname:device:: + A handle to the device that owns the pool from which the command buffers are to be allocated. + +pname:pAllocateInfo:: + A pointer to a structure containing information about the command buffers to be allocated. + +pname:pCommandBuffers:: + A pointer to an array of sname:VkCommandBuffer handles that will be filled with the newly allocated command buffers. + +Description +----------- + +fname::vkAllocateCommandBuffers allocates command buffers from an existing command pool. pname:pAllocateInfo +is a pointer to an instance of the slink:VkCommandBufferAllocateInfo structure which +describes the command buffer allocation. The definition of slink:VkCommandBufferAllocateInfo is: + +include::../structs/VkCommandBufferAllocateInfo.txt[] + +In pname:pAllocateInfo, pname:sType must be ename:VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO +and, unless an extension is in use, pname:pNext must be code:NULL. pname:commandPool is a handle to the command +pool from which the command buffer should be allocated, and this must be a command pool that is owned +by the device whose handle is passed in pname:device. The pname:level field indicates the level of the +command buffer (primary or secondary) and must be a member of the elink:VkCommandBufferLevel enumeration. +The number of command buffers to allocate is given by pname:commandBufferCount. + +On success, pname:commandBufferCount new command buffers are returned in the array pointed to +by pname:pCommandBuffers. Command buffers allocated with fname:vkAllocateCommandBuffers must: be freed +using flink:vkFreeCommandBuffers. + +include::../validity/protos/vkAllocateCommandBuffers.txt[] + +See Also +-------- + +flink:vkCreateCommandPool, flink:vkDestroyCommandPool, flink:vkFreeCommandBuffers + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkAllocateDescriptorSets.txt b/doc/specs/vulkan/man/vkAllocateDescriptorSets.txt new file mode 100644 index 00000000..bd4b6581 --- /dev/null +++ b/doc/specs/vulkan/man/vkAllocateDescriptorSets.txt @@ -0,0 +1,55 @@ +vkAllocateDescriptorSets(3) +=========================== + +Name +---- +vkAllocateDescriptorSets - Allocate one or more descriptor sets. + +C Specification +--------------- + +include::../protos/vkAllocateDescriptorSets.txt[] + +Parameters +---------- + +pname:device:: + The device that will create the descriptor sets. + +pname:pAllocateInfo:: + A pointer to a structure containing information about the sets to allocate. + +pname:pDescriptorSets:: + An array of variables that will receive the handles to the newly created descriptor sets. + +Description +----------- + +fname:vkAllocateDescriptorSets allocates one or more descriptor sets using +information contained in the structure pointed to by pname:pAllocateInfo. +pname:pAllocateInfo is an instance of the slink:VkDescriptorSetAllocateInfo +structure, the definition of which is: + +include::../structs/VkDescriptorSetAllocateInfo.txt[] + +The pname:sType member of slink:VkDescriptorSetAllocateInfo must be set to +ename:VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO. The pname:pNext member +is reserved for use by extensions and should be set to code:NULL. + +The requested sets are allocated from the descriptor pool specified by +pname:descriptorPool. pname:descriptorPool and the resulting descriptor sets +must be owned by the device specified in pname:device. + +pname:setLayoutCount specifies the number of sets to allocate. pname:pSetLayouts is +an array of pname:setLayoutCount sname:VkDescriptorSetLayout object handles which +describe the layouts of each of the sets. On success, pname:setLayoutCount descriptor +set handles will be allocated and placed in the pname:pDescriptorSets array. + +include::../validity/protos/vkAllocateDescriptorSets.txt[] + +See Also +-------- + +flink:vkFreeDescriptorSets, flink:vkUpdateDescriptorSets, flink:vkCreateDescriptorPool, flink:vkCreateDescriptorSetLayout + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkAllocateMemory.txt b/doc/specs/vulkan/man/vkAllocateMemory.txt new file mode 100644 index 00000000..a58e8753 --- /dev/null +++ b/doc/specs/vulkan/man/vkAllocateMemory.txt @@ -0,0 +1,59 @@ +vkAllocateMemory(3) +=================== + +Name +---- +vkAllocateMemory - Allocate GPU memory. + +C Specification +--------------- + +include::../protos/vkAllocateMemory.txt[] + +Parameters +---------- + +pname:device:: + The device from which to allocate memory. + +pname:pAllocateInfo:: + Pointer to a slink:VkMemoryAllocateInfo structure containing a description of the desired memory allocation. + +pname:pAllocator:: + A pointer to a slink:VkAllocationCallbacks structure containing the allocation callbacks to be used when allocating the object. + +pname:pMemory:: + Pointer to a variable which will receive the newly allocated sname:VkDeviceMemory object. + +Description +----------- + +fname:vkAllocateMemory allocates memory using the device specified in pname:device. The properties of the +new allocation are specified in the structure pointed to by pname:pAllocateInfo, which is an instance +of slink:VkMemoryAllocateInfo. The definition of slink:VkMemoryAllocateInfo is: + +include::../structs/VkMemoryAllocateInfo.txt[] + +The pname:sType member of the slink:VkMemoryAllocateInfo structure must be set to +ename:VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO and the pname:pNext member of the structure is reserved +for use by extensions and should be set to code:NULL if none are in use. + +The pname:allocationSize member specifies the size in bytes of the requested allocation +and the pname:memoryTypeIndex member specifies the type of memory to allocate. The number of +available memory types and their properties is a feature of the physical device and may +be obtained by calling flink:vkGetPhysicalDeviceMemoryProperties. + +include::../validity/protos/vkAllocateMemory.txt[] + +If any host memory is required to create the memory object, the allocators passed in the +structure pointed to by the pname:pAllocator parameter are used and will be used to free the object +when flink:vkFreeMemory is called. + +On success, a handle to the new memory object is placed in the variable pointed to by pname:pMemory. + +See Also +-------- + +flink:vkFreeMemory + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkBeginCommandBuffer.txt b/doc/specs/vulkan/man/vkBeginCommandBuffer.txt new file mode 100644 index 00000000..bc29d499 --- /dev/null +++ b/doc/specs/vulkan/man/vkBeginCommandBuffer.txt @@ -0,0 +1,94 @@ +vkBeginCommandBuffer(3) +======================= + +Name +---- +vkBeginCommandBuffer - Start recording a command buffer + +C Specification +--------------- + +include::../protos/vkBeginCommandBuffer.txt[] + +Parameters +---------- + +pname:commandBuffer:: + A handle to the command buffer that is to be recorded. + +pname:pBeginInfo:: + A pointer to an instance of slink:VkCommandBufferBeginInfo containing information about the command buffer. + +Description +----------- + +fname:vkBeginCommandBuffer begins recording the command buffer whose handle is +specified in pname:commandBuffer. pname:pBeginInfo is a pointer to an instance of the slink:VkCommandBufferBeginInfo +structure whose definition is: + +include::../structs/VkCommandBufferBeginInfo.txt[] + +The ptext:sType member of slink:VkCommandBufferBeginInfo should be set to +ename:VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO and the ptext:pNext member of the structure +is reserved for extensions and should be set to code:NULL if none are in use. + +The pname:flags member of pname:pBeginInfo may be used to indicate the type of workload +expected to be placed in the command buffer, which may allow implementations +to optimize command buffer contents more appropriately. The available flags for use +in this member are: + +include::../enums/VkCommandBufferUsageFlagBits.txt[] + +If the pname:flags member contains ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, +then the command buffer may only be submitted to a queue for execution once, +after which time it must be reset or destroyed. If this flag is not included, +then it is legal to submit the command buffer many times. + +If the pname:flags member contains ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT +then the command buffer must be a secondary command buffer (see flink:vkAllocateCommandBuffers +for more information) and is considered to be entirely contained inside a renderpass +that is begun in the calling primary command buffer. In such a case, the pname:renderPass, +pname:subpass and pname:framebuffer members refer to the renderpass, subpass and framebuffer +that will be active when the command buffer is referenced with a call to flink:vkCmdExecuteCommands. + +If ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT is not set, then the pname:renderPass, +pname:subpass and pname:framebuffer members are ignored. If the command buffer is a primary +command buffer, then new renderpasses may be initiated by calls to flink:vkCmdBeginRenderPass. +If the command buffer is a secondary command buffer, then it may not contain commands that +are legal only inside a renderpass, and may not be called from a primary command buffer +while a renderpass is active. + +If the pname:flags member contains ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, +then multiple submissions of the command buffer may be in flight simultaneously. + +* A primary command buffer is considered to be in flight from the time it is submitted +to a queue by a call to flink:vkQueueSubmit until the time it is retired (signaling +the fence passed to the call to flink:vkQueueSubmit). + +* A secondary command buffer is considered to be in flight from a reference to it +it is made from a primary command buffer using a call to flink:vkCmdExecuteCommands +until that primary command buffer is retired. + +If ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT is not set, +then only one invocation of the command buffer may be in flight at any time. + +It should be noted that for primary command buffers, +ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT implies possible multiple submission +of the command buffer, suggesting that ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT +should be clear. Secondary command buffers may be referenced at most once from +a primary command buffer (even the same primary command buffer) unless +ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT is set. + +The pname:renderPass and pname:framebuffer members must be sname:VK_NULL_HANDLE +for primary command buffers. For secondary command buffers, they must refer to +the render pass and framebuffer that will be active when the secondary command +buffer is called. + +include::../validity/protos/vkBeginCommandBuffer.txt[] + +See Also +-------- + +flink:vkAllocateCommandBuffers, flink:vkFreeCommandBuffers, flink:vkEndCommandBuffer, flink:vkResetCommandBuffer + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkBindBufferMemory.txt b/doc/specs/vulkan/man/vkBindBufferMemory.txt new file mode 100644 index 00000000..0e65460a --- /dev/null +++ b/doc/specs/vulkan/man/vkBindBufferMemory.txt @@ -0,0 +1,51 @@ +vkBindBufferMemory(3) +===================== + +Name +---- +vkBindBufferMemory - Bind device memory to a buffer object + +C Specification +--------------- + +include::../protos/vkBindBufferMemory.txt[] + +Parameters +---------- + +pname:device:: + A handle to the device that owns the object to which memory will be bound. + +pname:buffer:: + A handle to the object to which to bind memory. + +pname:memory:: + A handle to the device memory object. + +pname:memoryOffset:: + The offset within the device memory object at which the binding should begin. + +Description +----------- + +fname:vkBindBufferMemory binds a region of the device memory object specified by pname:memory +to the resource buffer specified by pname:buffer. pname:buffer must be the handle of a buffer +resource. + +pname:memoryOffset specifies the offset within pname:memory, in bytes, from which the binding +will begin. The value of pname:memoryOffset must satisfy the alignment requirments of the +object specified in pname:buffer. This value is returned in the ptext:alignment member of the +sname:VkMemoryRequirements retrieved by calling flink:vkGetBufferMemoryRequirements with with pname:buffer +as specified. + +fname:vkBindBufferMemory should be used only for non-sparse resources. Memory is bound to sparse +buffers by calling flink:vkQueueBindSparse. + +include::../validity/protos/vkBindBufferMemory.txt[] + +See Also +-------- + +flink:vkQueueBindSparse + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkBindImageMemory.txt b/doc/specs/vulkan/man/vkBindImageMemory.txt new file mode 100644 index 00000000..23385f32 --- /dev/null +++ b/doc/specs/vulkan/man/vkBindImageMemory.txt @@ -0,0 +1,51 @@ +vkBindImageMemory(3) +==================== + +Name +---- +vkBindImageMemory - Bind device memory to an image object + +C Specification +--------------- + +include::../protos/vkBindImageMemory.txt[] + +Parameters +---------- + +pname:device:: + A handle to the device that owns the object to which memory will be bound. + +pname:image:: + A handle to the object to which to bind memory. + +pname:memory:: + A handle to the device memory object. + +pname:memoryOffset:: + The offset within the device memory object at which the binding should begin. + +Description +----------- + +fname:vkBindImageMemory binds a region of the device memory object specified by pname:memory +to the resource image specified by pname:image. pname:image must be the handle of an image +resource. + +pname:memoryOffset specifies the offset within pname:memory, in bytes, from which the binding +will begin. The value of pname:memoryOffset must satisfy the alignment requirments of the +image specified in pname:image. This value is returned in the ptext:alignment member of the +sname:VkMemoryRequirements retrieved by calling flink:vkGetImageMemoryRequirements with with pname:image +as specified. + +fname:vkBindImageMemory should be used only for non-sparse resources. Memory +is bound to sparse imagesby calling flink:vkQueueBindSparse. + +include::../validity/protos/vkBindImageMemory.txt[] + +See Also +-------- + +flink:vkQueueBindSparse + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdBeginQuery.txt b/doc/specs/vulkan/man/vkCmdBeginQuery.txt new file mode 100644 index 00000000..b9388c7c --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdBeginQuery.txt @@ -0,0 +1,49 @@ +vkCmdBeginQuery(3) +=================== + +Name +---- +vkCmdBeginQuery - Begin a query. + +C Specification +--------------- + +include::../protos/vkCmdBeginQuery.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer upon which to execute the query. + +pname:queryPool:: + The query pool which contains the requested query. + +pname:entry:: + The index of the entry within pname:queryPool at which the query resides. + +pname:flags:: + A set of flags controlling how the query should be executed (see elink:VkQueryControlFlags). + +Description +----------- + +fname:vkCmdBeginQuery begins the query located at the entry indicated by pname:entry in +the pool specified in pname:queryPool. The pname:flags parameter specifies how the query +should be executed and must be one of the flags defined in elink:VkQueryControlFlags. + +include::../validity/protos/vkCmdBeginQuery.txt[] + +Notes +----- + +Although fname:vkCmdBeginQuery does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkCmdEndQuery, flink:vkCreateQueryPool, flink:vkCmdResetQueryPool, flink:vkCmdCopyQueryPoolResults, flink:vkGetQueryPoolResults, flink:vkDestroyQueryPool + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdBeginRenderPass.txt b/doc/specs/vulkan/man/vkCmdBeginRenderPass.txt new file mode 100644 index 00000000..eb67b7a3 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdBeginRenderPass.txt @@ -0,0 +1,63 @@ +vkCmdBeginRenderPass(3) +======================== + +Name +---- +vkCmdBeginRenderPass - Begin a new render pass. + +C Specification +--------------- + +include::../protos/vkCmdBeginRenderPass.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer in which to begin the render pass. + +pname:pRenderPassBegin:: + A pointer to a structure describing how to begin the render pass. + +pname:contents:: + A description of how the commands for the first subpass of the render pass + will be issued. + +Description +----------- + +fname:vkCmdBeginRenderPass begins the first subpass of a new render pass in the command buffer specified by +pname:commandBuffer. Information about how to begin the render pass is given in an instance of +the slink:VkRenderPassBeginInfo structure, a pointer to which is specified in pname:pRenderPassBegin. +The definition of slink:VkRenderPassBeginInfo is: + +include::../structs/VkRenderPassBeginInfo.txt[] + +The pname:contents parameter describes how the commands in the first subpass will be +provided. If it is ename:VK_SUBPASS_CONTENTS_INLINE, the contents of the +subpass will be recorded inline in the primary command buffer, and calling a +secondary command buffer within the subpass is an error. If pname:contents +is ename:VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS, the contents are +recorded in secondary command buffers that will be called from the primary +command buffer, and fname:vkCmdExecuteCommands is the only valid command on +the command buffer until fname:vkCmdNextSubpass or fname:vkCmdEndRenderPass. + +fname:vkCmdBeginRenderPass is only allowed in primary command buffers. A render +pass must end in the same command buffer in which it was begun. + +include::../validity/protos/vkCmdBeginRenderPass.txt[] + +Notes +----- + +Although fname:vkCmdBeginRenderPass does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkCmdEndRenderPass, flink:vkCreateRenderPass, flink:vkDestroyRenderPass, +flink:vkCmdNextSubpass, flink:vkCmdEndRenderPass + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdBindDescriptorSets.txt b/doc/specs/vulkan/man/vkCmdBindDescriptorSets.txt new file mode 100644 index 00000000..a1257cbb --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdBindDescriptorSets.txt @@ -0,0 +1,70 @@ +vkCmdBindDescriptorSets(3) +========================== + +Name +---- +vkCmdBindDescriptorSets - Binds descriptor sets to a command buffer. + +C Specification +--------------- + +include::../protos/vkCmdBindDescriptorSets.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which the command is to be placed. + +pname:pipelineBindPoint:: + The pipeline bind point the descriptor sets should be bound to. + +pname:layout:: + A handle to the layout used to create the descriptor sets. + +pname:firstSet:: + The first descriptor set index of the pipeline bind point updated by the + command. + +pname:descriptorSetCount:: + The number of descriptor set index of the pipeline bind point updated by + the command. + +pname:pDescriptorSets:: + An array of pname:descriptorSetCount number of descriptor set objects to + bind. + +pname:dynamicOffsetCount:: + The number of dynamic offsets to be applied to the descriptor sets. + +pname:pDynamicOffsets:: + An array of pname:dynamicOffsetCount number of offsets, each corresponding to a dynamic buffer descriptor + in the specified descriptor sets. + +Description +----------- + +fname:vkCmdBindDescriptorSets updates pname:descriptorSetCount number of +descriptor set bindings of the pipeline bind point specified by +pname:pipelineBindPoint starting from descriptor set index specified by +pname:firstSet. The parameter pname:pDescriptorSets specifies an array of +pname:descriptorSetCount number of descriptor set objects to bind. + +pname:pDynamicOffsets provides pname:dynamicOffsetCount number of offsets +used for the dynamic buffer descriptors in the specified descriptor sets. +Each offset corresponds to one dynamic buffer descriptor entry in the set +index range. The order the offsets should be specified so that offsets +corresponding to lower indexed sets appear before offsets corresponding to +higher indexed sets, while offsets of the same set index should be specified +so that offsets corresponding to lower indexed bindings appear before +offsets corresponding to higher indexed bindings. + +include::../validity/protos/vkCmdBindDescriptorSets.txt[] + +See Also +-------- + +flink:vkAllocateDescriptorSets, flink:vkFreeDescriptorSets, +flink:vkCreateDescriptorPool, flink:vkCreateDescriptorSetLayout + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdBindIndexBuffer.txt b/doc/specs/vulkan/man/vkCmdBindIndexBuffer.txt new file mode 100644 index 00000000..736bb222 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdBindIndexBuffer.txt @@ -0,0 +1,53 @@ +vkCmdBindIndexBuffer(3) +======================== + +Name +---- +vkCmdBindIndexBuffer - Bind an index buffer to a command buffer. + +C Specification +--------------- + +include::../protos/vkCmdBindIndexBuffer.txt[] + +Parameters +---------- + +pname:commandBuffer:: + Specifies the command buffer to which to bind the index buffer. + +pname:buffer:: + The buffer object to bind. + +pname:offset:: + The offset from the start of the buffer object where index data begins. + +pname:indexType:: + The type of the index data stored in the buffer. + +Description +----------- + +fname:vkCmdBindIndexBuffer binds the buffer object specified by pname:buffer, starting +at the byte offset specified in pname:offset as an index buffer on the graphics pipeline bind point +on pname:commandBuffer. pname:indexType specifies the type of the index data and must be one of +ename:VK_INDEX_TYPE_UINT16 or ename:VK_INDEX_TYPE_UINT32, to indicate 16- or 32-bit unsigned data, respectively. + +If pname:indexType is ename:VK_INDEX_TYPE_UINT16, then pname:offset must be a multiple of two. If pname:indexType +is ename:VK_INDEX_TYPE_UINT32, then offset must be a multiple of four. + +include::../validity/protos/vkCmdBindIndexBuffer.txt[] + +Notes +----- + +Although fname:vkCmdBindIndexBuffer does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkCmdDrawIndexed + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdBindPipeline.txt b/doc/specs/vulkan/man/vkCmdBindPipeline.txt new file mode 100644 index 00000000..52a46a7b --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdBindPipeline.txt @@ -0,0 +1,50 @@ +vkCmdBindPipeline(3) +===================== + +Name +---- +vkCmdBindPipeline - Bind a pipeline object to a command buffer. + +C Specification +--------------- + +include::../protos/vkCmdBindPipeline.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer to which to bind the pipeline. + +pname:pipelineBindPoint:: + The pipeline bind point on the command buffer to which to bind the pipeline. + +pname:pipeline:: + The pipeline object to bind to pname:commandBuffer. + +Description +----------- + +fname:vkCmdBindPipeline binds the pipeline object specified in pname:pipeline to the command buffer +specified in pname:commandBuffer at the bind point specified by pname:pipelineBindPoint. The value of +pname:pipelineBindPoint must be supported by the command buffer, and be valid for the specified +pipeline object. pname:pipelineBindPoint may be one of ename:VK_PIPELINE_BIND_POINT_COMPUTE or +ename:VK_PIPELINE_BIND_POINT_GRAPHICS, assuming the command buffer supports the corresponding +bind point. All work subsequently issued in pname:commandBuffer will use the pipeline bound to the +corresponding pipeline bind point. + +include::../validity/protos/vkCmdBindPipeline.txt[] + +Notes +----- + +Although fname:vkCmdBindPipeline does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkCreateGraphicsPipelines, flink:vkCreateComputePipelines + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdBindVertexBuffers.txt b/doc/specs/vulkan/man/vkCmdBindVertexBuffers.txt new file mode 100644 index 00000000..a2d9214f --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdBindVertexBuffers.txt @@ -0,0 +1,55 @@ +vkCmdBindVertexBuffers(3) +========================= + +Name +---- +vkCmdBindVertexBuffers - Bind vertex buffers to a command buffer + +C Specification +--------------- + +include::../protos/vkCmdBindVertexBuffers.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The first parameter. + +pname:startBinding:: + The index of the first vertex buffer binding to which to bind a vertex buffer. + +pname:bindingCount:: + The number of consecutive vertex buffer bindings to update. + +pname:pBuffers:: + A pointer to an array of sname:VkBuffer handles representing the buffers to be bound. + +pname:pOffsets:: + A pointer to an array of basetype:VkDeviceSize values containing the offsets, in bytes, of each binding within its respective buffer. + +Description +----------- + +fname:vkCmdBindVertexBuffers binds one or more vertex buffers to the command +buffer specified by pname:commandBuffer. The first binding to update is specified +in pname:startBinding and the number of bindings to update is specified in +pname:bindingCount. + +pname:pBuffers points to an array of pname:bindingCount buffer object handles +representing the buffers to bind. The same buffer may be referenced multiple +times. pname:pOffsets points to an array of pname:bindingCount values containing +the offsets, in bytes of the start of each binding within the current buffer. + +Vertex data consumed by drawing commands such as flink:vkCmdDraw +or flink:vkCmdDrawIndexed subsequently issued in pname:commandBuffer is drawn +from the buffers bound to that command buffer. + +include::../validity/protos/vkCmdBindVertexBuffers.txt[] + +See Also +-------- + +flink:vkCmdBindIndexBuffer, flink:vkCmdDraw, flink:vkCmdDrawIndexed, flink:vkCmdDrawIndirect, flink:vkCmdDrawIndexedIndirect + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdBlitImage.txt b/doc/specs/vulkan/man/vkCmdBlitImage.txt new file mode 100644 index 00000000..1ac856f5 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdBlitImage.txt @@ -0,0 +1,115 @@ +vkCmdBlitImage(3) +================= + +Name +---- +vkCmdBlitImage - copies regions of an image, potentially performing format conversion, +arbitrary scaling, and filtering (but does not allow MSAA resolve). + +C Specification +--------------- + +include::../protos/vkCmdBlitImage.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which the command is to be placed. + +pname:srcImage:: + The image that is the source of the blit operation. + +pname:srcImageLayout:: + The layout of the source image at the time of the blit. + +pname:dstImage:: + The image into which image data is to be copied. + +pname:dstImageLayout:: + The layout of the destination image at the time of the blit. + +pname:regionCount:: + The number of regions to blit. + +pname:pRegions:: + An array of image regions to blit. + +pname:filter:: + Filtering operation to perform on the image while performing the blit. + +Description +----------- + +fname:vkCmdBlitImage copies regions of a source image into a destination image, potentially performing +format conversion, arbitrary scaling, and filtering (but does not allow MSAA resolve). +The source and destination images are specified in pname:srcImage and pname:dstImage, +respectively. The layout of the source and destination images must be provided +in pname:srcImageLayout and pname:dstImageLayout, respectively. +The pname:srcImageLayout must be either ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL +or ename:VK_IMAGE_LAYOUT_GENERAL. The pname:dstImageLayout must be either +ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or ename:VK_IMAGE_LAYOUT_GENERAL. + +The pname:srcImage must support the elink:VkFormatFeatureFlags bit +ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT and the pname:dstImage must support +the elink:VkFormatFeatureFlags bit ename:VK_FORMAT_FEATURE_BLIT_DST_BIT. +pname:srcImage and pname:dstImage may reference the same image but results are +undefined if source and destination regions overlap. pname:srcImage or +pname:dstImage may not refer to multi-sampled images. Use fname:vkCmdResolveImage +to resolve multi-sampled images. + +pname:pRegions is a pointer to an array of pname:regionCount slink:VkImageBlit +structures, the definition of each is: + +include::../structs/VkImageBlit.txt[] + +The pname:srcSubresource and pname:dstSubresource members of slink:VkImageBlit +specify the source and destination sub-resources, respectively. Each is +a instance of the slink:VkImageSubresourceLayers structure, the definition of +which is: + +include::../structs/VkImageSubresourceLayers.txt[] + +The ptext:srcOffset[0] and ptext:srcOffset[1] members of slink:VkImageBlit +define the region of the source image to copy from, and the ptext:dstOffset[0] +and ptext:dstOffset[1] members define the region of the destination image to +copy to. The offset members are instances of the slink:VkOffset3D structure. The +definition of slink:VkOffset3D is: + +include::../structs/VkOffset3D.txt[] + +The size of the two regions need not match. If they are different, then +the pname:filter parameter determines the filtering mode used to expand or +shrink the source region to fit the destination region. This is a member of +the elink:VkFilter enumeration, the definition of which is: + +include::../enums/VkFilter.txt[] + +If the format of pname:srcImage is an integer-based format then pname:filter +must be ename:VK_FILTER_NEAREST. + +Pixels are copied from the regions bound by srcOffset[0], srcOffset[1] to the +region bound by destOffset[0], destOffset[1], scaling the result if the regions +are different sizes. + +fname:vkCmdBlitImage does not perform any implicit barriers. Therefore, if any +region in the array of pname:pRegions a references updates from a prior +region, then results are undefined. + +This command may not be used within a renderpass. + +include::../validity/protos/vkCmdBlitImage.txt[] + +Notes +----- + +Although fname:vkCmdBlitImage does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkCmdResolveImage, flink:vkCmdCopyImage + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdClearAttachments.txt b/doc/specs/vulkan/man/vkCmdClearAttachments.txt new file mode 100644 index 00000000..64ade8b8 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdClearAttachments.txt @@ -0,0 +1,87 @@ +vkCmdClearAttachments(3) +======================== + +Name +---- +vkCmdClearAttachments - Clear regions within currently bound framebuffer attachments. + +C Specification +--------------- + +include::../protos/vkCmdClearAttachments.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which to insert the command. + +pname:attachmentCount:: + The number of attachments to clear. + +pname:pAttachments:: + A pointer to an array of structures describing the attachments to clear + and the values to clear them to. + +pname:rectCount:: + The number of regions within the attachments to clear. + +pname:pRects:: + A pointer to an array of rectangles defining the regions to clear. + +Description +----------- + +fname:vkCmdClearAttachments clears regions within the attachments associated +with the current renderpass. pname:commandBuffer is a handle to the command +buffer into which to insert the command. A renderpass must be active on +pname:commandBuffer. pname:attachmentCount specifies the number of attachments +to clear and pname:pAttachments is a pointer to an array of pname:attachmentCount +slink:VkClearAttachment structures, each containing the aspect(s), attachment +index and the clear value for each attachment. The definition of +slink:VkClearAttachment is: + +include::../structs/VkClearAttachment.txt[] + +pname:aspectMask is a bitfield specifying the aspect or aspects to clear +on the referenced attachment. It is constructed from a bitwise combination +of the members of the elink:VkImageAspectFlagBits enumeration, the +definition of which is: + +include::../enums/VkImageAspectFlagBits.txt[] + +The pname:colorAttachment member of slink:VkClearAttachment specifies the +index of the color attachment within the current framebuffer. The pname:clearValue +member contains the value to which to clear the attachment. It is an instance +of the slink:VkClearValue union, the definition of which is: + +include::../structs/VkClearValue.txt[] + +If the attachment and aspect referenced by ptext:aspectMask and +ptext:colorAttachment is a color attachment, the the values contained in the +pname:color field of slink:VkClearValue is used to clear the attachment +regions. If the attachment and aspect referenced by ptext:aspectMask and +ptext:colorAttachment is a depth, stencil or depth-stencil attachment, then +the pname:depthStencil field of slink:VkClearValue is used to clear the +attachment. + +The pname:rectCount parameter to fname:vkCmdClearAttachments specifies the +number of regions of the attachments to clear. pname:pRects is a pointer +to an array of pname:rectCount slink:VkClearRect structures defining +those regions. The definition of slink:VkClearRect is: + +include::../structs/VkClearRect.txt[] + +The pname:rect member of slink:VkClearRect specifies the rectangle, measured +in pixels, of the rectangle to clear. pname:baseArrayLayer and +pname:layerCount specify the first layer and number of layers to clear +and should be used to clear multiple layers in layered attachments. + +include::../validity/protos/vkCmdClearAttachments.txt[] + +See Also +-------- + +slink:VkClearAttachment, flink:vkCmdBeginRenderPass + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdClearColorImage.txt b/doc/specs/vulkan/man/vkCmdClearColorImage.txt new file mode 100644 index 00000000..848e8b68 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdClearColorImage.txt @@ -0,0 +1,72 @@ +vkCmdClearColorImage(3) +======================== + +Name +---- +vkCmdClearColorImage - Clear regions of a color image. + +C Specification +--------------- + +include::../protos/vkCmdClearColorImage.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which the clear command is to be placed. + +pname:image:: + The image that contains the regions to be cleared. + +pname:imageLayout:: + The layout of the image at the time of the clear operation. + +pname:pColor:: + A pointer to a structure containing the color with which to clear the image. + +pname:rangeCount:: + The number of ranges to clear. + +pname:pRanges:: + A pointer to an array of structures defining the regions to be cleared. + +Description +----------- + +fname:vkCmdClearColorImage clears pname:rangeCount regions of an image. The color +with which to clear the image is specified an instance of the +slink:VkClearColorValue union pointed to by pname:pColor. The definition +of slink:VkClearColorValue is: + +include::../structs/VkClearColorValue.txt[] + +The ptext:float32, ptext:int32 and ptext:uint32 members of pname:pColor are +arrays of four 32-bit floating point, signed integer or unsigned integer +values, respectively. Which is used is determined from the format of the +image specified in pname:image. + +The first element of the selected array is written to the first component of +the target image, the second element to the second component, the third to +the third and the fourth to the fourth, if those components exist. +pname:pRanges describes the regions to be cleared and points to an array +of pname:rangeCount slink:VkImageSubresourceRange structures, the definition +of which is: + +include::../structs/VkImageSubresourceRange.txt[] + +include::../validity/protos/vkCmdClearColorImage.txt[] + +Notes +----- + +Although fname:vkCmdClearColorImage does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkCmdClearDepthStencilImage + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdClearDepthStencilImage.txt b/doc/specs/vulkan/man/vkCmdClearDepthStencilImage.txt new file mode 100644 index 00000000..2dd29f15 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdClearDepthStencilImage.txt @@ -0,0 +1,67 @@ +vkCmdClearDepthStencilImage(3) +============================== + +Name +---- +vkCmdClearDepthStencilImage - Fill regions of a combined depth-stencil image. + +C Specification +--------------- + +include::../protos/vkCmdClearDepthStencilImage.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which the command is to be placed. + +pname:image:: + The image containing the regions to be cleared. + +pname:imageLayout:: + The layout of the image to be cleared. + +pname:pDepthStencil:: + A pointer to a structure containing the values to clear the image with. + +pname:rangeCount:: + The number of image regions to clear. + +pname:pRanges:: + A pointer to an array of pname:rangeCount regions to clear. + +Description +----------- + +fname:vkCmdClearDepthStencilImage clears pname:rangeCount regions of a combined +depth-stencil image to the values specified in the structure whose address is +given in pname:pDepthStencil. This is a pointer to an instance of the +slink:VkClearDepthStencilValue structure, the definition of which is: + +include::../structs/VkClearDepthStencilValue.txt[] + +The pname:depth and pname:stencil members contain the value to clear the the +depth and stencil aspects of the image to, respectively. pname:imageLayout +specifies the layout of the image being cleared. pname:pRanges points to an +array pname:rangeCount regions of the image are cleared, each of which is described +by an instance of the slink:VkImageSubresourceRange structure, the definition +of which is: + +include::../structs/VkImageSubresourceRange.txt[] + +include::../validity/protos/vkCmdClearDepthStencilImage.txt[] + +Notes +----- + +Although fname:vkCmdClearDepthStencilImage does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkCmdClearColorImage + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdCopyBuffer.txt b/doc/specs/vulkan/man/vkCmdCopyBuffer.txt new file mode 100644 index 00000000..626ada51 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdCopyBuffer.txt @@ -0,0 +1,59 @@ +vkCmdCopyBuffer(3) +=================== + +Name +---- +vkCmdCopyBuffer - Copy data between buffer regions. + +C Specification +--------------- + +include::../protos/vkCmdCopyBuffer.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which the copy command is to be placed. + +pname:srcBuffer:: + The buffer containing the data to be copied. + +pname:dstBuffer:: + The buffer into which data will be copied. + +pname:regionCount:: + The number of regions of data to copy. + +pname:pRegions:: + An array of pname:regionCount regions of data to be copied. + +Description +----------- + +fname:vkCmdCopyBuffer copies regions of data from a source buffer to a destination +buffer. pname:regionCount regions are copied from pname:srcBuffer to pname:dstBuffer. Each +region is represented by a member of the pname:pRegions array, which is an array of +the slink:VkBufferCopy structure, whose definition is: + +include::../structs/VkBufferCopy.txt[] + +If any two or more regions within pname:pRegions overlap, the resulting data will be +undefined. It is recomended, but not required, that the regions given in pname:pRegions +start on multiples of four bytes and have a length which is a multiple of four bytes. + +include::../validity/protos/vkCmdCopyBuffer.txt[] + +Notes +----- + +Although fname:vkCmdCopyBuffer does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkCmdCopyImage, flink:vkCmdCopyBufferToImage, flink:vkCmdCopyImageToBuffer + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdCopyBufferToImage.txt b/doc/specs/vulkan/man/vkCmdCopyBufferToImage.txt new file mode 100644 index 00000000..594c5e52 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdCopyBufferToImage.txt @@ -0,0 +1,57 @@ +vkCmdCopyBufferToImage(3) +========================== + +Name +---- +vkCmdCopyBufferToImage - Copy data from a buffer into an image. + +C Specification +--------------- + +include::../protos/vkCmdCopyBufferToImage.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which the copy command is to be placed. + +pname:srcBuffer:: + The buffer from which data is to be sourced. + +pname:dstImage:: + The image that is to be the destination for the copy. + +pname:dstImageLayout:: + The image layout of the destination image at the time of the copy operation. + +pname:regionCount:: + The number of image regions to update. + +pname:pRegions:: + An array of pname:regionCount regions to update. + +Description +----------- + +fname:vkCmdCopyBufferToImage copies pname:regionCount regions of data from pname:srcBuffer +into pname:dstImage. pname:pRegions points to an array of slink:VkBufferImageCopy structures +which describe the regions to be copied. The definition of slink:VkBufferImageCopy is: + +include::../structs/VkBufferImageCopy.txt[] + +include::../validity/protos/vkCmdCopyBufferToImage.txt[] + +Notes +----- + +Although fname:vkCmdCopyBufferToImage does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkCmdCopyBuffer, flink:vkCmdCopyImageToBuffer + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdCopyImage.txt b/doc/specs/vulkan/man/vkCmdCopyImage.txt new file mode 100644 index 00000000..8d7bc95c --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdCopyImage.txt @@ -0,0 +1,60 @@ +vkCmdCopyImage(3) +================== + +Name +---- +vkCmdCopyImage - Copy data between images. + +C Specification +--------------- + +include::../protos/vkCmdCopyImage.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which the copy command is to be placed. + +pname:srcImage:: + The image that is the source for the data. + +pname:srcImageLayout:: + The layout of the source image at the time of the copy operation. + +pname:dstImage:: + The image that is to be the destination for the copy. + +pname:dstImageLayout:: + The layout of the destination image at the time of the copy operation. + +pname:regionCount:: + The number of regions to copy. + +pname:pRegions:: + An array of pname:regionCount regions to copy. + +Description +----------- + +fname:vkCmdCopyImage copies pname:regionCount regions of image data between pname:srcImage and +pname:dstImage. Each region is described by an element of the array pointed to by +pname:pRegions, which is an array of slink:VkImageCopy, the definition of which is: + +include::../structs/VkImageCopy.txt[] + +include::../validity/protos/vkCmdCopyImage.txt[] + +Notes +----- + +Although fname:vkCmdCopyBufferToImage does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkCmdCopyBuffer, flink:vkCmdCopyImageToBuffer, flink:vkCmdCopyBufferToImage + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdCopyImageToBuffer.txt b/doc/specs/vulkan/man/vkCmdCopyImageToBuffer.txt new file mode 100644 index 00000000..7741f893 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdCopyImageToBuffer.txt @@ -0,0 +1,58 @@ +vkCmdCopyImageToBuffer(3) +========================== + +Name +---- +vkCmdCopyImageToBuffer - Copy image data into a buffer. + +C Specification +--------------- + +include::../protos/vkCmdCopyImageToBuffer.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which the copy command is to be placed. + +pname:srcImage:: + The image that is the source for the data. + +pname:srcImageLayout:: + The layout of the source image at the time of the copy operation. + +pname:dstBuffer:: + The buffer that is to receive the copied data. + +pname:regionCount:: + The number of regions to copy. + +pname:pRegions:: + An array of pname:regionCount regions to copy. + +Description +----------- + +fname:vkCmdCopyImageToBuffer copies image data into a buffer object. pname:srcImage specifies +the image that is to be the source of the data. pname:dstBuffer is the buffer into which +the data is to be copied. pname:pRegions points to an array of pname:regionCount +slink:VkBufferImageCopy structures, the definition of which is: + +include::../structs/VkBufferImageCopy.txt[] + +include::../validity/protos/vkCmdCopyImageToBuffer.txt[] + +Notes +----- + +Although fname:vkCmdCopyImageToBuffer does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkCmdCopyBufferToImage, flink:vkCmdCopyImage + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdCopyQueryPoolResults.txt b/doc/specs/vulkan/man/vkCmdCopyQueryPoolResults.txt new file mode 100644 index 00000000..0c0b221d --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdCopyQueryPoolResults.txt @@ -0,0 +1,66 @@ +vkCmdCopyQueryPoolResults(3) +============================ + +Name +---- +vkCmdCopyQueryPoolResults - Copy the results of queries in a query pool to a buffer object. + +C Specification +--------------- + +include::../protos/vkCmdCopyQueryPoolResults.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which the command is to be placed. + +pname:queryPool:: + The query pool whose results should be copied to the buffer object. + +pname:startQuery:: + The index of the first query in the query pool whose results should be copied to the buffer object. + +pname:queryCount:: + The number of queries in the query pool whose results should be copied to the buffer object. + +pname:dstBuffer:: + The buffer object the results should be written to. + +pname:dstOffset:: + The offset within the buffer object the results should be written to. + +pname:stride:: + The stride between subsequent query result writes. + +pname:flags:: + The flags controlling the behavior of the query result copy command (see elink:VkQueryResultFlags). + +Description +----------- + +fname:vkCmdCopyQueryPoolResults copies the results of pname:queryCount number of +queries in the query pool specified by pname:queryPool starting from index +pname:startQuery. The results are written to the buffer object specified by +pname:dstBuffer starting from pname:dstOffset with each subsequent query's +result being written pname:stride number of bytes after the previous one. The +semantics of when and what values written to the destination buffer are defined +by the type of the queries in the query pool, the query control flags passed +to flink:vkCmdBeginQuery, and the query result control flags specified by pname:flags. + +include::../validity/protos/vkCmdCopyQueryPoolResults.txt[] + +Notes +----- + +Although fname:vkCmdCopyQueryPoolResults does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkGetQueryPoolResults, flink:vkCmdBeginQuery, flink:vkCmdEndQuery, flink:vkCmdResetQueryPool, flink:vkDestroyQueryPool, flink:vkCreateQueryPool + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdDispatch.txt b/doc/specs/vulkan/man/vkCmdDispatch.txt new file mode 100644 index 00000000..8caf6dff --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdDispatch.txt @@ -0,0 +1,51 @@ +vkCmdDispatch(3) +================= + +Name +---- +vkCmdDispatch - Dispatch compute work items. + +C Specification +--------------- + +include::../protos/vkCmdDispatch.txt[] + +Parameters +---------- + +pname:commandBuffer:: + Command buffer upon which to execute the command. + +pname:x:: + Number of workgroups to dispatch in the X dimension. + +pname:y:: + Number of workgroups to dispatch in the Y dimension. + +pname:z:: + Number of workgroups to dispatch in the Z dimension. + +Description +----------- + +fname:vkCmdDispatch dispatches a pname:x by pname:y by pname:z group of compute workgroups. +Two- and one-dimensional work groups can be dispatched by setting the pname:z, or +pname:y and pname:z parameters to 1, respectively. The size of each workgroup is +determined by the pipeline bound to the ename:VK_PIPELINE_BIND_POINT_COMPUTE bind point +on the command buffer specified by pname:commandBuffer. + +include::../validity/protos/vkCmdDispatch.txt[] + +Notes +----- + +Although fname:vkCmdDispatch does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkCmdDispatchIndirect + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdDispatchIndirect.txt b/doc/specs/vulkan/man/vkCmdDispatchIndirect.txt new file mode 100644 index 00000000..ca822d92 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdDispatchIndirect.txt @@ -0,0 +1,53 @@ +vkCmdDispatchIndirect(3) +========================= + +Name +---- +vkCmdDispatchIndirect - Dispatch compute work items using indirect parameters. + +C Specification +--------------- + +include::../protos/vkCmdDispatchIndirect.txt[] + +Parameters +---------- + +pname:commandBuffer:: + Command buffer upon which to execute the command. + +pname:buffer:: + The buffer object containing the parameters to dispatch. + +pname:offset:: + The offset within pname:buffer at which the parameters are located. + +Description +----------- + +fname:vkCmdDispatchIndirect dispatches a group of ptext:x by ptext:y by ptext:z compute workgroups +where the values of ptext:x, ptext:y, and ptext:z are taken from pname:offset bytes into the +buffer object specified by pname:buffer. At this location in the buffer, there is assumed +to be an instance of the slink:VkDispatchIndirectCommand structure, whose definition is: + +include::../structs/VkDispatchIndirectCommand.txt[] + +pname:offset must be a multiple of four. If any of the pname:x, pname:y or pname:z members of +slink:VkDispatchIndirectCommand are zero, then no work is initiated. Two- and one-dimensional +work may be initiated by setting pname:z or pname:y and pname:z to 1, respectively. + +include::../validity/protos/vkCmdDispatchIndirect.txt[] + +Notes +----- + +Although fname:vkCmdDispatchIndirect does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkCmdDispatch, flink:vkCmdDrawIndirect, flink:vkCmdDrawIndexedIndirect + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdDraw.txt b/doc/specs/vulkan/man/vkCmdDraw.txt new file mode 100644 index 00000000..d91ad84a --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdDraw.txt @@ -0,0 +1,55 @@ +vkCmdDraw(3) +============= + +Name +---- +vkCmdDraw - Draw primitives. + +C Specification +--------------- + +include::../protos/vkCmdDraw.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which the drawing command is to be placed. + +pname:firstVertex:: + The first vertex to be passed to the graphics pipeline. + +pname:vertexCount:: + The number of vertices passed to the graphics pipeline. + +pname:firstInstance:: + The first instance of data to be passed to the graphice pipeline. + +pname:instanceCount:: + The number of instances to be passed to the graphics pipeline. + +Description +----------- + +fname:vkCmdDraw invokes a draw in the bound graphics pipeline. pname:instanceCount instances +of pname:vertexCount vertices are produced. The vertex index presented to the pipeline +is automatically generated, starting from pname:firstVertex and counting forwards. For +each instance, the instance index is generated automaticall, starting from pname:firstInstance +and counting forwards. If pname:vertexCount or pname:vertexCount is zero, then no vertices are +generated. + +include::../validity/protos/vkCmdDraw.txt[] + +Notes +----- + +Although fname:vkCmdDraw does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkCmdDrawIndexed + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdDrawIndexed.txt b/doc/specs/vulkan/man/vkCmdDrawIndexed.txt new file mode 100644 index 00000000..56596672 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdDrawIndexed.txt @@ -0,0 +1,58 @@ +vkCmdDrawIndexed(3) +==================== + +Name +---- +vkCmdDrawIndexed - Issue an indexed draw into a command buffer. + +C Specification +--------------- + +include::../protos/vkCmdDrawIndexed.txt[] + +Parameters +---------- + +pname:commandBuffer:: + Specifies the command buffer into which to insert the draw command. + +pname:firstIndex:: + Specifies the first element from the index buffer to be consumed by the command. + +pname:indexCount:: + Specifies the number of elements from the index buffer to be consumed by the command. + +pname:vertexOffset:: + Specifies a constant offset to be added to the value retrieved from the index buffer. + +pname:firstInstance:: + Specifies the starting value of the internally generated instance count. + +pname:instanceCount:: + Specifies the number of instances of the geometry to consume. + +Description +----------- + +fname:vkCmdDrawIndexed issues an indexed draw into a command bufer. The command +consumes pname:indexCount elements from the bound index buffer, starting from +pname:firstIndex, and inserts them into graphics pipeline. Before insertion to the +pipeline, pname:vertexOffset is added to each index value. pname:instanceCount instances +of the index buffer range are inserted into the pipeline. The first shader in +the pipeline is presented with the instance index, which begins at pname:firstInstance. + +include::../validity/protos/vkCmdDrawIndexed.txt[] + +Notes +----- + +Although fname:vkCmdDrawIndexed does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkCmdDraw, flink:vkCmdDrawIndirect, flink:vkCmdDrawIndexedIndirect + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdDrawIndexedIndirect.txt b/doc/specs/vulkan/man/vkCmdDrawIndexedIndirect.txt new file mode 100644 index 00000000..0d00f902 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdDrawIndexedIndirect.txt @@ -0,0 +1,63 @@ +vkCmdDrawIndexedIndirect(3) +============================ + +Name +---- +vkCmdDrawIndexedIndirect - Perform an indexed indirect draw. + +C Specification +--------------- + +include::../protos/vkCmdDrawIndexedIndirect.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer upon which to execute the command. + +pname:buffer:: + The buffer from which to source the indirect draw parameters. + +pname:offset:: + The offset within the buffer where the draw parameters are located. + +pname:drawCount:: + The number of draws to issue. + +pname:stride:: + The stride between each structure member. + +Description +----------- + +fname:vkCmdDrawIndexedIndirect issues an indirect indexed draw list +containing pname:drawCount draws into the command buffer specified in +pname:commandBuffer. pname:buffer is the buffer containing the drawing +parameters, which begin at pname:offset bytes into the buffer. Each command +is an instance of a slink:VkDrawIndexedIndirectCommand structure, separated by +pname:stride bytes in memory. If pname:stride is zero, then the array is +assumed to be tightly packed. The definition of +slink:VkDrawIndexedIndirectCommand is as follows. + +include::../structs/VkDrawIndexedIndirectCommand.txt[] + +The members of sname:VkDrawIndexedIndirectCommand are interpreted in the +same fashion as the similarly named parameters of flink:vkCmdDrawIndexed. +pname:offset and pname:stride should be multiples of four. + +include::../validity/protos/vkCmdDrawIndexedIndirect.txt[] + +Notes +----- + +Although fname:vkCmdDrawIndexedIndirect does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkCmdDrawIndirect, flink:vkCmdDrawIndexed, flink:vkCmdDraw, flink:vkCmdDispatchIndirect + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdDrawIndirect.txt b/doc/specs/vulkan/man/vkCmdDrawIndirect.txt new file mode 100644 index 00000000..cb38a73c --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdDrawIndirect.txt @@ -0,0 +1,62 @@ +vkCmdDrawIndirect(3) +==================== + +Name +---- +vkCmdDrawIndirect - Issue an indirect draw into a command buffer. + +C Specification +--------------- + +include::../protos/vkCmdDrawIndirect.txt[] + +Parameters +---------- + +pname:commandBuffer:: + Specifies the command buffer into which to insert the draw command. + +pname:buffer:: + Specifies a handle of a buffer object containing parameters forming individual draw commands. + +pname:offset:: + Specifies offset, in bytes, within the buffer object represented by pname:buffer at which the drawing command parameters begin. + +pname:drawCount:: + Specifies the number of indirect draws to consume from the specified + memory object. + +pname:stride:: + Specifies the distance, in bytes, between the start of each indirect draw in the memory object. This parameter + may be zero to indicate that the array of indirect draw commands is tightly packed. + +Description +----------- + +fname:vkCmdDrawIndirect issues an indirect draw into a command bufer. Each +indirect command consumes pname:drawCount structures, stored at pname:offset +bytes into the buffer object whose handle is specified in pname:buffer. +The beginning of each structure is pname:stride bytes from the previous. +The data structures have the a layout in memory which may be represented by +the the slink:VkDrawIndirectCommand structure, the definition of which is: + +include::../structs/VkDrawIndirectCommand.txt[] + +If pname:stride is zero, the array of slink:VkDrawIndirectCommand structures is +assumed to be tightly packed. + +include::../validity/protos/vkCmdDrawIndirect.txt[] + +Notes +----- + +Although fname:vkCmdDrawIndirect does not generate errors or return a value, enabled +validation layers may detect possible error conditions or potentially undefined +behavior and report this via some other means. + +See Also +-------- + +flink:vkCmdDraw, flink:vkCmdDrawIndexed, flink:vkCmdDrawIndexedIndirect + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdEndQuery.txt b/doc/specs/vulkan/man/vkCmdEndQuery.txt new file mode 100644 index 00000000..2a10c11a --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdEndQuery.txt @@ -0,0 +1,40 @@ +vkCmdEndQuery(3) +================ + +Name +---- +vkCmdEndQuery - Ends a query. + +C Specification +--------------- + +include::../protos/vkCmdEndQuery.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer upon which to execute the command. + +pname:queryPool:: + The pool in which the query to be stopped resides. + +pname:entry:: + The entry within pname:queryPool at which the query to be stopped resides. + +Description +----------- + +fname:vkCmdEndQuery ends the query at the entry specified by pname:entry in the query pool +specified by pname:queryPool. The command is executed in the command buffer specified +by pname:commandBuffer. The query referenced by pname:queryPool and pname:entry should be an active +query for which fname:vkCmdBeginQuery has been called in the past. + +include::../validity/protos/vkCmdEndQuery.txt[] + +See Also +-------- + +flink:vkCmdBeginQuery, flink:vkCmdResetQueryPool, flink:vkCreateQueryPool, flink:vkDestroyQueryPool, flink:vkGetQueryPoolResults, flink:vkCmdCopyQueryPoolResults + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdEndRenderPass.txt b/doc/specs/vulkan/man/vkCmdEndRenderPass.txt new file mode 100644 index 00000000..3ff7d10b --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdEndRenderPass.txt @@ -0,0 +1,37 @@ +vkCmdEndRenderPass(3) +====================== + +Name +---- +vkCmdEndRenderPass - End the current render pass. + +C Specification +--------------- + +include::../protos/vkCmdEndRenderPass.txt[] + +Parameters +---------- + +pname:commandBuffer:: + A handle to the command buffer in which the render pass is to be ended. + +Description +----------- + +fname:vkCmdEndRenderPass ends the current render pass in the command buffer specified by +pname:commandBuffer. A render pass must begin and end in the same command buffer. + +fname:vkCmdEndRenderPass is only allowed in primary command buffers. + +When fname:vkCmdEndRenderPass executes, the store op for all attachments in the render pass +is performed, and the attachment images are transitioned to their final layout. + +include::../validity/protos/vkCmdEndRenderPass.txt[] + +See Also +-------- + +flink:vkCmdBeginRenderPass, flink:vkCreateRenderPass + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdExecuteCommands.txt b/doc/specs/vulkan/man/vkCmdExecuteCommands.txt new file mode 100644 index 00000000..d94c01db --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdExecuteCommands.txt @@ -0,0 +1,64 @@ +vkCmdExecuteCommands(3) +======================= + +Name +---- +vkCmdExecuteCommands - Execute a secondary command buffer from a primary command buffer. + +C Specification +--------------- + +include::../protos/vkCmdExecuteCommands.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The primary command buffer from which to call the secondary command buffers. + +pname:commandBuffersCount:: + Length of the pCommandBuffers array. + +pname:pCommandBuffers:: + An array of secondary command buffer handles. + +Description +----------- + +fname:vkCmdExecuteCommands executes the contents of the secondary command buffers, +in the order they appear in the pname:pCommandBuffers array. + +If any of the secondary command buffers contains commands that may only be +executed inside a renderpass, then they may only be executed between calls +to flink:vkCmdBeginRenderPass and flink:vkCmdEndRenderPass and the active +renderpass must have a elink:VkSubpassContents property of +ename:VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS. The pname:commandBuffer +argument must be a primary command buffer. The renderpass and +framebuffer provided when beginning the secondary command buffer must +match the sname:VkRenderPass and sname:VkFramebuffer provided to +fname:vkCmdBeginRenderPass. + +If a secondary command buffer was not recorded with the +ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT usage, then only a single +call to the secondary command buffer may exist in any primary command buffer +at one time. If this usage bit is clear, then the secondary command buffer +may be called multiple times from the same or multiple primary command buffers. + +A secondary command buffer must be finished recording, via +fname:vkEndCommandBuffer, before it can be referenced in a call to +fname:vkCmdExecuteCommands. It must not be reset or destroyed before primary +command buffers referencing it have completed executing. + +A secondary command buffer can safely be passed to multiple +fname:vkCmdExecuteCommands (affecting different primary command buffers) +simultaneously, only if it was recorded with the +ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag. + +include::../validity/protos/vkCmdExecuteCommands.txt[] + +See Also +-------- + +flink:vkAllocateCommandBuffers, flink:vkFreeCommandBuffers, flink:vkCmdBeginRenderPass, flink:vkCmdEndRenderPass + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdFillBuffer.txt b/doc/specs/vulkan/man/vkCmdFillBuffer.txt new file mode 100644 index 00000000..fd1e5a2c --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdFillBuffer.txt @@ -0,0 +1,47 @@ +vkCmdFillBuffer(3) +=================== + +Name +---- +vkCmdFillBuffer - Fill a region of a buffer with a fixed value. + +C Specification +--------------- + +include::../protos/vkCmdFillBuffer.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer upon which to execute the command. + +pname:dstBuffer:: + The destination buffer. + +pname:dstOffset:: + The offset in the buffer at which to begin filling. + +pname:size:: + The size of the region to be filled, in bytes. + +pname:data:: + The data with which to fill the buffer region. + +Description +----------- + +fname:vkCmdFillBuffer fills a region of a buffer object with the fixed, 32-bit pattern +specified in pname:data. The command is executed in pname:commandBuffer. pname:dstBuffer specifies +the destination buffer object, pname:dstOffset specifies the offset within the buffer +at which to begin filling and pname:size specifies the size of the region to be filled, +in bytes. pname:dstOffset and pname:size must be multiples of four bytes. + +include::../validity/protos/vkCmdFillBuffer.txt[] + +See Also +-------- + +flink:vkCreateBuffer, flink:vkCreateBufferView + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdNextSubpass.txt b/doc/specs/vulkan/man/vkCmdNextSubpass.txt new file mode 100644 index 00000000..6defeef5 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdNextSubpass.txt @@ -0,0 +1,52 @@ +vkCmdNextSubpass(3) +=================== + +Name +---- +vkCmdNextSubpass - Transition to the next subpass of a render pass. + +C Specification +--------------- + +include::../protos/vkCmdNextSubpass.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer in which to switch to the next subpass. + +pname:contents:: + A description of how the commands for the next subpass will be issued. + +Description +----------- + +fname:vkCmdNextSubpass finalizes the previous subpass of the current render pass +and prepares for the next subpass. It may only be called in a primary command +buffer when a render pass is active. For a render pass with N subpasses, +fname:vkCmdNextSubpass must be used exactly N-1 times between +fname:vkCmdBeginRenderPass and fname:vkCmdEndRenderPass to transition through all +of the subpasses. + +The pname:contents parameter describes how the commands in the next subpass will be +provided. If it is ename:VK_SUBPASS_CONTENTS_INLINE, the contents of the +subpass will be recorded inline in the primary command buffer, and calling a +secondary command buffer within the subpass is an error. If pname:contents +is ename:VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS, the contents are +recorded in secondary command buffers that will be called from the primary +command buffer, and fname:vkCmdExecuteCommands is the only valid command on +the command buffer until fname:vkCmdNextSubpass or fname:vkCmdEndRenderPass. + +Transitioning between subpasses performs any multisample resolve operations in +the pass being ended, and transitions attachment images from their current +layout to the layout required by the next subpass. + +include::../validity/protos/vkCmdNextSubpass.txt[] + +See Also +-------- + +flink:vkCmdEndRenderPass, flink:vkCreateRenderPass + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdPipelineBarrier.txt b/doc/specs/vulkan/man/vkCmdPipelineBarrier.txt new file mode 100644 index 00000000..b26335b1 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdPipelineBarrier.txt @@ -0,0 +1,141 @@ +vkCmdPipelineBarrier(3) +======================== + +Name +---- +vkCmdPipelineBarrier - Insert a set of execution and memory barriers. + +C Specification +--------------- + +include::../protos/vkCmdPipelineBarrier.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer in which to wait. + +pname:srcStageMask:: + Specifies which pipeline stages must complete executing prior commands + (see elink:VkPipelineStageFlags for more detail). + +pname:dstStageMask:: + Specifies which pipeline stages do not begin executing subsequent + commands until the barrier completes (see elink:VkPipelineStageFlags for + more detail). + +pname:byRegion:: + Indicates whether the barrier has screen-space locality (described below). + +pname:memoryBarrierCount:: + Number of memory barriers to insert after waiting for the pipe events. + +pname:ppMemoryBarriers:: + Array of pointers to memory barrier structures specifying the parameters + of the memory barriers to insert as part of the pipeline barrier. Each + element of the array may point to a slink:VkMemoryBarrier, + slink:VkBufferMemoryBarrier, or slink:VkImageMemoryBarrier structure. + +Description +----------- + +fname:vkCmdPipelineBarrier inserts a set of execution and memory barriers +into the command buffer specified by pname:commandBuffer. The number of barriers +to insert is specified in pname:memoryBarrierCount and the description of those +barriers is specified in a number instances of the slink:VkMemoryBarrier, +slink:VkBufferMemoryBarrier or slink:VkImageMemoryBarrier structures. The +definitions of these structures are: + +include::../structs/VkMemoryBarrier.txt[] + +include::../structs/VkBufferMemoryBarrier.txt[] + +include::../structs/VkImageMemoryBarrier.txt[] + +The pname:ppMemoryBarriers parameter points to an array of pointers to +these structures. Each element of pname:ppMemoryBarriers may point to a +different type of structure. The type of each structure is identified by its +pname:sType member member. This should be set to ename:VK_STRUCTURE_TYPE_MEMORY_BARRIER, +ename:VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER or +ename:VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER for slink:VkMemoryBarrier, +slink:VkBufferMemoryBarrier and slink:VkImageMemoryBarrier, respectively. + +Writes as described by pname:outputMask that were written by pipeline stages +in pname:srcStageMask prior to the barrier are made visible to reads as +described by pname:inputMask in pipeline stages in pname:dstStageMask +subsequent to the barrier. If pname:byRegion is true, then the writes are +made visible only to work in the same (implementation-dependent) +screen-space region. This effectively reqiures that the subsequent work only +reads data written by the same fragment location in the previous work. +pname:byRegion should only be set to true when the pname:srcStageMask and +pname:dstStageMask only include screen-space work (fragment shader, early +and late fragment tests, and/or attachment outputs). + +In case of global memory barriers inserted by passing an +slink:VkMemoryBarrier structure to the command prior writes in the requested +pipeline stages to any memory location corresponding to the set of memory +output coherency flags specified in the pname:outputMask member of the +structure are made coherent with subsequent reads in the requested pipeline +stages of any memory location corresponding to the set of memory input +coherency flags specified in the pname:inputMask member of the structure. + +In case of buffer memory barriers inserted by passing an +slink:VkBufferMemoryBarrier structure to the command prior writes in the +requested pipeline stages to the specified sub-range of the buffer +corresponding to the set of memory output coherency flags specified in the +pname:outputMask member of the structure are made coherent with subsequent +reads in the requested pipeline stages of the specified sub-range of the +buffer corresponding to the set of memory input coherency flags specified in +the pname:inputMask member of the structure. + +In case of image memory barriers inserted by passing an +slink:VkImageMemoryBarrier structure to the command prior writes in the +requested pipeline stages to the specified sub-range of the image +corresponding to the set of memory output coherency flags specified in the +pname:outputMask member of the structure are made coherent with subsequent +reads in the requested pipeline stages of the specified sub-range of the +image corresponding to the set of memory input coherency flags specified in +the pname:inputMask member of the structure. Additionally, if the +pname:oldLayout and pname:newLayout members of the structure don't match a +layout transition is performed on the specified sub-range of the image as +part of the memory barrier. + +In case of buffer and image memory barriers the pname:srcQueueFamilyIndex +and pname:dstQueueFamilyIndex members of the corresponding memory barrier +structures can specify the parameters of a transfer of ownership between two +distinct families of queues of a shared buffer or image object created with +the ename:VK_SHARING_MODE_EXCLUSIVE sharing mode. In case of regular +resource transitions both pname:srcQueueFamilyIndex and +pname:dstQueueFamilyIndex should be set to ename:VK_QUEUE_FAMILY_IGNORED to +indicate no transfer of ownership between queue families. In case of +resource transitions involving ownership transfer of shared buffers or +images one of these two members have to match the queue family index the +command buffer specified by pname:commandBuffer was created for, while the other +should specify the queue family index the ownership transfer is released to +or acquired from. Ownership transferring resource transitions have to be +performed both on a queue from the source queue family and on a queue from +the destination queue family (see elink:VkSharingMode for more detail). + +If the pname:inputMask member is zero in any of the memory barrier structures +then prior writes will only be coherent with any type of subsequent read +after a future resource transition command specifies a non-empty set of +memory input coherency control flags. This allows flushing device output +caches unconditionally. + +If the pname:outputMask member is zero in any of the memory barrier +structures then subsequent reads will only be coherent with any type of +prior write if an earlier resource transition command specified a non-empty +set of memory output coherency control flags. This allows invalidating +device input caches unconditionally. + +include::../validity/protos/vkCmdPipelineBarrier.txt[] + +See Also +-------- + +flink:vkCmdWaitEvents, slink:VkMemoryBarrier, slink:VkBufferMemoryBarrier, +slink:VkImageMemoryBarrier, elink:VkPipelineStageFlags + +include::footer.txt[] + diff --git a/doc/specs/vulkan/man/vkCmdPushConstants.txt b/doc/specs/vulkan/man/vkCmdPushConstants.txt new file mode 100644 index 00000000..749d68a1 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdPushConstants.txt @@ -0,0 +1,62 @@ +vkCmdPushConstants(3) +===================== + +Name +---- +vkCmdPushConstants - Update the values of push constants. + +C Specification +--------------- + +include::../protos/vkCmdPushConstants.txt[] + +Parameters +---------- + +pname:commandBuffer:: + A handle to the command buffer into which to insert the command. + +pname:layout:: + A handle to the pipeline layout describing the layout of the push constants. + +pname:stageFlags:: + A bitmask specifying the pipeline stages for which to update push constants. + +pname:offset:: + The offset of the first push constant to update in the layout. + +pname:size:: + The size of the push constants to update. + +pname:pValues:: + A pointer to a region of memory containing the new values for the push constants. + +Description +----------- + +fname:vkCmdPushConstants updates the values of push constants for the command buffer +specified by pname:commandBuffer. Push constants become visible to the next drawing or +dispatch command appended to pname:commandBuffer. pname:layout specifies a handle to +a pipeline layout object containing the layout information for the push constants. +pname:stageFlags specifies the pipeline stages for which the push constant update +is to be applied. This parameter is a bitwise combination of members of the +elink:VkShaderStageFlagBits enumeration and must match the shader stages used +in the pipeline layout for the range specified by pname:offset and pname:size. +The definition of elink:VkShaderStageFlagBits is: + +include::../enums/VkShaderStageFlagBits.txt[] + +pname:offset and pname:size specify the offset of the start of the region to be updated +and its size, respectively. Both are in units of bytes. + +pname:pValues is a pointer to a region of pname:size bytes of memory containing the +new values for the specified push constants. + +include::../validity/protos/vkCmdPushConstants.txt[] + +See Also +-------- + +flink:vkCreatePipelineLayout, elink:VkPipelineStageFlags + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdResetEvent.txt b/doc/specs/vulkan/man/vkCmdResetEvent.txt new file mode 100644 index 00000000..952e8fe7 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdResetEvent.txt @@ -0,0 +1,42 @@ +vkCmdResetEvent(3) +================== + +Name +---- +vkCmdResetEvent - Reset an event object to non-signaled state. + +C Specification +--------------- + +include::../protos/vkCmdResetEvent.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which to insert the command. + +pname:event:: + The event object to reset to non-signaled state. + +pname:stageMask:: + Specifies when to reset the event (see elink:VkPipelineStageFlags for more + detail). + +Description +----------- + +fname:vkCmdResetEvent causes the event object specified in pname:event to be +returned to the non-signaled state when the pipeline stages specified by +pname:stageMask have completed executing prior commands. + +For definitions of the pipeline stages, see elink:VkPipelineStageFlags. + +include::../validity/protos/vkCmdResetEvent.txt[] + +See Also +-------- + +flink:vkCmdSetEvent, flink:vkSetEvent, flink:vkResetEvent, elink:VkPipelineStageFlags + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdResetQueryPool.txt b/doc/specs/vulkan/man/vkCmdResetQueryPool.txt new file mode 100644 index 00000000..334d6a2a --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdResetQueryPool.txt @@ -0,0 +1,43 @@ +vkCmdResetQueryPool(3) +======================= + +Name +---- +vkCmdResetQueryPool - Reset queries in a query pool. + +C Specification +--------------- + +include::../protos/vkCmdResetQueryPool.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which the command is to be placed. + +pname:queryPool:: + The query pool containing the queries to be reset. + +pname:startQuery:: + The index of the first query to be reset. + +pname:queryCount:: + The number of queries to reset. + +Description +----------- + +fname:vkCmdResetQueryPool resets pname:queryCount starting at the entry index given +by pname:startQuery in the query pool specified by pname:queryPool. The reset command +is executed by the command buffer specified in pname:commandBuffer. After execution, all +queries are reset to inactive state and have zero values. + +include::../validity/protos/vkCmdResetQueryPool.txt[] + +See Also +-------- + +flink:vkCmdBeginQuery, flink:vkCmdEndQuery, flink:vkCreateQueryPool, flink:vkDestroyQueryPool, flink:vkGetQueryPoolResults, flink:vkCmdCopyQueryPoolResults + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdResolveImage.txt b/doc/specs/vulkan/man/vkCmdResolveImage.txt new file mode 100644 index 00000000..8bff87d7 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdResolveImage.txt @@ -0,0 +1,55 @@ +vkCmdResolveImage(3) +===================== + +Name +---- +vkCmdResolveImage - Resolve regions of an image. + +C Specification +--------------- + +include::../protos/vkCmdResolveImage.txt[] + +Parameters +---------- + +pname:commandBuffer:: + Ths command buffer into which the command is to be placed. + +pname:srcImage:: + The image that is the source of the resolve operation. + +pname:srcImageLayout:: + The layout of the source image at the time of the resolve. + +pname:dstImage:: + The image into which image data is to be resolved. + +pname:dstImageLayout:: + The layout of the destination image at the time of the resolve. + +pname:regionCount:: + The number of regions to resolve. + +pname:pRegions:: + An array of image regions to resolve. + +Description +----------- + +fname:vkCmdResolveImage resolves regions of a source image into a destination image. +The source and destination images are specified in pname:srcImage and pname:dstImage, respectively. +The layout of the source and destination images must be provided in pname:srcImageLayout and +pname:dstImageLayout, respectively. pname:pRegions is a pointer to an array of pname:regionCount slink:VkImageResolve +structures, the definition of each is: + +include::../structs/VkImageResolve.txt[] + +include::../validity/protos/vkCmdResolveImage.txt[] + +See Also +-------- + +flink:vkCmdBlitImage, flink:vkCmdClearColorImage, flink:vkCmdClearDepthStencilImage + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdSetBlendConstants.txt b/doc/specs/vulkan/man/vkCmdSetBlendConstants.txt new file mode 100644 index 00000000..3fcb3e4b --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdSetBlendConstants.txt @@ -0,0 +1,43 @@ +vkCmdSetBlendConstants.txt(3) +============================= + +Name +---- +vkCmdSetBlendConstants - Set the values of blend constants. + +C Specification +--------------- + +include::../protos/vkCmdSetBlendConstants.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which to insert the command. + +pname:blendConstants:: + An array of values specifying the new blend constants. + +Description +----------- + +fname:vkCmdSetBlendConstants sets the blend constants for the command buffer specified +by pname:commandBuffer to the values specified in the four element array pname:blendConstants. +Blend constants may be modified only if the current pipeline state object was created +with the ename:VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled. When a pipeline +that does not have ename:VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic state enabled is +first bound, the values of the blend constants are taken from the pipeline and +attempts to change them using fname:vkCmdSetBlendConstants results in undefined +behavior. When a pipeline does have ename:VK_DYNAMIC_STATE_BLEND_CONSTANTS dynamic +state enabled is first bound, the current values of the blend constants become undefined +and must be set using a call to fname:vkCmdSetBlendConstants. + +include::../validity/protos/vkCmdSetBlendConstants.txt[] + +See Also +-------- + +flink:vkCreateGraphicsPipelines, slink:VkPipelineDynamicStateCreateInfo + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdSetDepthBias.txt b/doc/specs/vulkan/man/vkCmdSetDepthBias.txt new file mode 100644 index 00000000..23a199c7 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdSetDepthBias.txt @@ -0,0 +1,50 @@ +vkCmdSetDepthBias(3) +==================== + +Name +---- +vkCmdSetDepthBias - Set the depth bias dynamic state. + +C Specification +--------------- + +include::../protos/vkCmdSetDepthBias.txt[] + +Parameters +---------- + +pname:commandBuffer:: + A handle to the command buffer into which to insert the command. + +pname:depthBiasConstantFactor:: + The constant bias factor. + +pname:depthBiasClamp:: + The bias clamp factor. + +pname:depthBiasSlopeFactor:: + The bias slope factor. + +Description +----------- + +fname:vkCmdSetDepthBias sets the depth bias parameters for the command buffer specified +by pname:commandBuffer. The pname:depthBiasConstantFactor, pname:depthBiasClamp +and pname:depthBiasSlopeFactor parameters specify the new values for the depth +bias calculation. The graphics pipeline bound to pname:commandBuffer must have the +ename:VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled. When a pipeline +that does not have ename:VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state enabled is +first bound, the values of the depth bias parameters are taken from the pipeline and +attempts to change them using fname:vkCmdSetBlendConstants results in undefined +behavior. When a pipeline does have ename:VK_DYNAMIC_STATE_DEPTH_BIAS dynamic +state enabled is first bound, the current values of the depth bias parameters become undefined +and must be set using a call to fname:vkCmdSetDepthBias. + +include::../validity/protos/vkCmdSetDepthBias.txt[] + +See Also +-------- + +flink:vkCreateGraphicsPipelines, slink:VkPipelineDynamicStateCreateInfo + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdSetDepthBounds.txt b/doc/specs/vulkan/man/vkCmdSetDepthBounds.txt new file mode 100644 index 00000000..09092f03 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdSetDepthBounds.txt @@ -0,0 +1,59 @@ +vkCmdSetDepthBounds(3) +====================== + +Name +---- +vkCmdSetDepthBounds - Set the depth bounds test values for a command buffer. + +C Specification +--------------- + +include::../protos/vkCmdSetDepthBounds.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which to insert the command. + +pname:minDepthBounds:: + The minimum value for the depth bounds test range. + +pname:maxDepthBounds:: + The maximum value for the depth bounds test range. + +Description +----------- + +fname:vkCmdSetDepthBounds sets the minimum and maximum values for the depth bounds +test for the command buffer specified in pname:commandBuffer. pname:minDepthBounds and +pname:maxDepthBounds specify the minimum and maximum values for the depth bounds +test respectively. A the value stored in the current depth attachment at a fragment's +location lies between pname:minDepthBounds and pname:maxDepthBounds, then the depth +bounds test passes, otherwise the test fails and the fragment's coverage bit is +cleared. + +The graphics pipeline bound to pname:commandBuffer must have the +ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled. When a pipeline +that does not have ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled is +first bound, the values of the depth bias parameters are taken from the pipeline and +attempts to change them using fname:vkCmdSetBlendConstants results in undefined +behavior. When a pipeline does have ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic +state enabled is first bound, the current values of the depth bias parameters become undefined +and must be set using a call to fname:vkCmdSetDepthBias. + +If the depth bounds test for the current pipeline is not enabled, then it is as +if the depth bounds test always passes and the values of pname:minDepthBounds +and pname:maxDepthBounds are ignored. + +The value of pname:maxDepthBounds must be greater than or equal to the value of +pname:minDepthBounds. + +include::../validity/protos/vkCmdSetDepthBounds.txt[] + +See Also +-------- + +flink:vkCmdSetDepthBias, flink:vkCreateGraphicsPipelines, slink:VkPipelineDynamicStateCreateInfo + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdSetEvent.txt b/doc/specs/vulkan/man/vkCmdSetEvent.txt new file mode 100644 index 00000000..9a409a62 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdSetEvent.txt @@ -0,0 +1,42 @@ +vkCmdSetEvent(3) +================ + +Name +---- +vkCmdSetEvent - Set an event object to signaled state. + +C Specification +--------------- + +include::../protos/vkCmdSetEvent.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which to insert the command. + +pname:event:: + The event object to set to signaled state. + +pname:stageMask:: + Specifies when the event becomes signaled (see elink:VkPipelineStageFlags for + more detail). + +Description +----------- + +fname:vkCmdSetEvent causes the event object specified in pname:event to be +moved to the signaled state when the pipeline stages specified by +pname:stageMask have completed executing prior commands. + +For definitions of the pipeline stages, see elink:VkPipelineStageFlags. + +include::../validity/protos/vkCmdSetEvent.txt[] + +See Also +-------- + +flink:vkCmdResetEvent, flink:vkSetEvent, flink:vkResetEvent, elink:VkPipelineStageFlags + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdSetLineWidth.txt b/doc/specs/vulkan/man/vkCmdSetLineWidth.txt new file mode 100644 index 00000000..d919bfee --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdSetLineWidth.txt @@ -0,0 +1,46 @@ +vkCmdSetLineWidth(3) +==================== + +Name +---- +vkCmdSetLineWidth - Set the dynamic line width state. + +C Specification +--------------- + +include::../protos/vkCmdSetLineWidth.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which to insert the command. + +pname:lineWidth:: + The new line width. + +Description +----------- + +fname:vkCmdSetLineWidth sets the dymamic line width for the command buffer specified +in pname:commandBuffer to the value specified in pname:lineWidth. Line primitives drawn +subsequent to this command, either directly using line topologies or by generation of +line primitives mid-pipeline, will assume the specified width. + +Dynamic line width may be modified only if the current pipeline state object was created +with the ename:VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled. When a pipeline +that does not have ename:VK_DYNAMIC_STATE_LINE_WIDTH dynamic state enabled is +first bound, the line width is taken from the pipeline and +attempts to change it using fname:vkCmdSetLineWidth results in undefined +behavior. When a pipeline does have ename:VK_DYNAMIC_STATE_LINE_WIDTH dynamic +state enabled is first bound, the current value for line width becomes undefined +and must be set using a call to fname:vkCmdSetLineWidth. + +include::../validity/protos/vkCmdSetLineWidth.txt[] + +See Also +-------- + +flink:vkCmdSetDepthBias, flink:vkCreateGraphicsPipelines, slink:VkPipelineDynamicStateCreateInfo + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdSetScissor.txt b/doc/specs/vulkan/man/vkCmdSetScissor.txt new file mode 100644 index 00000000..fd9dfe1a --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdSetScissor.txt @@ -0,0 +1,56 @@ +vkCmdSetScissor(3) +================== + +Name +---- +vkCmdSetScissor - Set the dynamic scissor rectangles on a command buffer. + +C Specification +--------------- + +include::../protos/vkCmdSetScissor.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which to insert the command. + +pname:scissorCount:: + The number of scissor rectangles to update. + +pname:pScissors:: + A pointer to an array of structures defining the new scissor rectangles. + +Description +----------- + +fname:vkCmdSetScissor sets the dynamic scissor state on the command buffer specified +in pname:commandBuffer. pname:scissorCount specifies the number of scissor rectangles +to update and pname;pScissors is pointer to an array of slink:VkRect2D structures +defining the new scissor rectangles. The definition of slink:VkRect2D is: + +include::../structs/VkRect2D.txt[] + +The pname:offset and pname:extent members of slink:VkRect2D specify the origin and +size of the scissor rectangle, respectively. The rectangles numbered zero through +pname:scissorCount are updated and any remaining scissor rectangles become undefined. + +The graphics pipeline bound to pname:commandBuffer must have the +ename:VK_DYNAMIC_STATE_SCISSOR dynamic state enabled. When a pipeline +that does not have ename:VK_DYNAMIC_STATE_SCISSOR dynamic state enabled is +first bound, the origins and extents are taken from the pipeline and +attempts to change them using fname:vkCmdSetScissor results in undefined +behavior. When a pipeline does have ename:VK_DYNAMIC_STATE_SCISSOR dynamic +state enabled is first bound, the current values of the scissor rectangle +origins and extents become undefined and must be set using a call to +fname:vkCmdSetScissor. + +include::../validity/protos/vkCmdSetScissor.txt[] + +See Also +-------- + +flink:vkCreateGraphicsPipelines, slink:VkPipelineDynamicStateCreateInfo + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdSetStencilCompareMask.txt b/doc/specs/vulkan/man/vkCmdSetStencilCompareMask.txt new file mode 100644 index 00000000..8212c209 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdSetStencilCompareMask.txt @@ -0,0 +1,57 @@ +vkCmdSetStencilCompareMask(3) +============================= + +Name +---- +vkCmdSetStencilCompareMask - Set the stencil compare mask dynamic state. + +C Specification +--------------- + +include::../protos/vkCmdSetStencilCompareMask.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which to insert the command. + +pname:faceMask:: + The face or faces to which the new mask is to apply. + +pname:compareMask:: + The new value to use for the stencil compare mask. + +Description +----------- + +fname:vkCmdSetStencilCompareMask sets the mask value used for stencil comparisons +on the command buffer specified by pname:commandBuffer. pname:faceMask specifies the +face or faces to which the new values are applied. It a bitmask comprised of members +of the elink:VkStencilFaceFlagBits enumeration, the definition of which is: + +include::../enums/VkStencilFaceFlagBits.txt[] + +The graphics pipeline bound to pname:commandBuffer must have the +ename:VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled. When a pipeline +that does not have ename:VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic state enabled is +first bound, the value if the stencil compare mask is taken from the pipeline and +attempts to change it using fname:vkCmdSetStencilCompareMask results in undefined +behavior. When a pipeline does have ename:VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK dynamic +state enabled is bound, the current value of the stencil compare mask becomes undefined +and must be set using a call to fname:vkCmdSetStencilCompareMask. + +If the stencil test is disabled in the current graphics pipeline, then the value of +the stencil compare mask is ignored. + +include::../validity/protos/vkCmdSetStencilCompareMask.txt[] + +See Also +-------- + +flink:vkCreateGraphicsPipelines, +flink:vkCmdSetStencilWriteMask, +flink:vkCmdSetStencilReference, +slink:VkPipelineDynamicStateCreateInfo + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdSetStencilReference.txt b/doc/specs/vulkan/man/vkCmdSetStencilReference.txt new file mode 100644 index 00000000..dbf9c6ed --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdSetStencilReference.txt @@ -0,0 +1,57 @@ +vkCmdSetStencilReference(3) +=========================== + +Name +---- +vkCmdSetStencilReference - Set the stencil reference dynamic state. + +C Specification +--------------- + +include::../protos/vkCmdSetStencilReference.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which to insert the command. + +pname:faceMask:: + The face or faces to which the command is to apply. + +pname:reference:: + The new value for the stencil reference dynamic state. + +Description +----------- + +fname:vkCmdSetStencilReference sets the reference value used for stencil comparisons +on the command buffer specified by pname:commandBuffer. pname:faceMask specifies the +face or faces to which the new values are applied. It a bitmask comprised of members +of the elink:VkStencilFaceFlagBits enumeration, the definition of which is: + +include::../enums/VkStencilFaceFlagBits.txt[] + +The graphics pipeline bound to pname:commandBuffer must have the +ename:VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled. When a pipeline +that does not have ename:VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic state enabled is +first bound, the value if the stencil reference value is taken from the pipeline and +attempts to change it using fname:vkCmdSetStencilReference results in undefined +behavior. When a pipeline does have ename:VK_DYNAMIC_STATE_STENCIL_REFERENCE dynamic +state enabled is bound, the current value of the stencil reference value becomes undefined +and must be set using a call to fname:vkCmdSetStencilReference. + +If the stencil test is disabled in the current graphics pipeline, then the value of +the stencil compare mask is ignored. + +include::../validity/protos/vkCmdSetStencilReference.txt[] + +See Also +-------- + +flink:vkCreateGraphicsPipelines, +flink:vkCmdSetStencilCompareMask, +flink:vkCmdSetStencilWriteMask, +slink:VkPipelineDynamicStateCreateInfo + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdSetStencilWriteMask.txt b/doc/specs/vulkan/man/vkCmdSetStencilWriteMask.txt new file mode 100644 index 00000000..6c14f33a --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdSetStencilWriteMask.txt @@ -0,0 +1,58 @@ +vkCmdSetStencilWriteMask(3) +=========================== + +Name +---- +vkCmdSetStencilWriteMask - Set the stencil write mask dynamic state. + +C Specification +--------------- + +include::../protos/vkCmdSetStencilWriteMask.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which to insert the command. + +pname:faceMask:: + The face or faces to which the new mask is to apply. + + +pname:writeMask:: + The new value to use for the stencil compare mask. + +Description +----------- + +fname:vkCmdSetStencilWriteMask sets the mask value used for stencil writes +on the command buffer specified by pname:commandBuffer to pname:writeMask. pname:faceMask specifies the +face or faces to which the new values are applied. It a bitmask comprised of members +of the elink:VkStencilFaceFlagBits enumeration, the definition of which is: + +include::../enums/VkStencilFaceFlagBits.txt[] + +The graphics pipeline bound to pname:commandBuffer must have the +ename:VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled. When a pipeline +that does not have ename:VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic state enabled is +first bound, the value of the stencil write mask is taken from the pipeline and +attempts to change it using fname:vkCmdSetStencilWriteMask results in undefined +behavior. When a pipeline does have ename:VK_DYNAMIC_STATE_STENCIL_WRITE_MASK dynamic +state enabled is bound, the current value of the stencil write mask becomes undefined +and must be set using a call to fname:vkCmdSetStencilWriteMask. + +If the stencil test is disabled in the current graphics pipeline, then the value of +the stencil write mask is ignored. + +include::../validity/protos/vkCmdSetStencilWriteMask.txt[] + +See Also +-------- + +flink:vkCreateGraphicsPipelines, +flink:vkCmdSetStencilCompareMask, +flink:vkCmdSetStencilReference, +slink:VkPipelineDynamicStateCreateInfo + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdSetViewport.txt b/doc/specs/vulkan/man/vkCmdSetViewport.txt new file mode 100644 index 00000000..d0aab57a --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdSetViewport.txt @@ -0,0 +1,62 @@ +vkCmdSetViewport(3) +=================== + +Name +---- +vkCmdSetViewport - Set the viewport on a command buffer. + +C Specification +--------------- + +include::../protos/vkCmdSetViewport.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which to insert the command. + +pname:viewportCount:: + The number of viewport rectangles to set. + +pname:pViewports:: + A pointer to an array of structures describing the viewports. + +Description +----------- + +fname:vkCmdSetViewport sets the dynamic viewport state for the command buffer +specified in pname:commandBuffer. pname:viewportCount is the number of viewports +to update and pname:pViewports is a pointer to an array of slink:VkViewport +structures describing the new viewport state. The definition of slink:VkViewport +is: + +include::../structs/VkViewport.txt[] + +The pname:x and pname:y members of slink:VkViewport specifies the +upper left corner of the viewport rectangle, in pixels. The pname:width +and pname:height parameters specify the size of the rectangle, and are also +expressed in pixels. The pname:minDepth and pname:maxDepth members specify the +depth range for the viewport. + +The viewports numbered zero through pname:viewportCount are updated and any +remaining viewports become undefined. + +The graphics pipeline bound to pname:commandBuffer must have the +ename:VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled. When a pipeline +that does not have ename:VK_DYNAMIC_STATE_VIEWPORT dynamic state enabled is +first bound, the origins and extents of the viewports are taken from the pipeline and +attempts to change them using fname:vkCmdSetViewport results in undefined +behavior. When a pipeline does have ename:VK_DYNAMIC_STATE_VIEWPORT dynamic +state enabled is first bound, the current values of the viewport rectangle +origins and extents become undefined and must be set using a call to +fname:vkCmdSetViewport. + +include::../validity/protos/vkCmdSetViewport.txt[] + +See Also +-------- + +flink:vkCreateGraphicsPipelines, slink:VkPipelineDynamicStateCreateInfo + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdUpdateBuffer.txt b/doc/specs/vulkan/man/vkCmdUpdateBuffer.txt new file mode 100644 index 00000000..c1139e27 --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdUpdateBuffer.txt @@ -0,0 +1,45 @@ +vkCmdUpdateBuffer(3) +===================== + +Name +---- +vkCmdUpdateBuffer - Update a buffer's contents from host memory. + +C Specification +--------------- + +include::../protos/vkCmdUpdateBuffer.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which the command is to be placed. + +pname:dstBuffer:: + The destination buffer. + +pname:dstOffset:: + The offset within pname:dstBuffer where the data is to be placed. + +pname:dataSize:: + The size, in bytes of the data to be tranferred into the buffer. + +pname:pData:: + A pointer to the data to be transferred into the buffer. + +Description +----------- + +fname:vkCmdUpdateBuffer updates the content of the buffer object specified in pname:dstBuffer +with the pname:dataSize bytes of host memory sourced from pname:pData. The data is placed at +the offset specified by pname:dstOffset into the buffer object. + +include::../validity/protos/vkCmdUpdateBuffer.txt[] + +See Also +-------- + +flink:vkCmdCopyBuffer + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdWaitEvents.txt b/doc/specs/vulkan/man/vkCmdWaitEvents.txt new file mode 100644 index 00000000..ca63b29c --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdWaitEvents.txt @@ -0,0 +1,138 @@ +vkCmdWaitEvents(3) +================== + +Name +---- +vkCmdWaitEvents - Wait for one or more events and insert a set of memory +barriers. + +C Specification +--------------- + +include::../protos/vkCmdWaitEvents.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer in which to wait. + +pname:eventCount:: + Number of event objects to wait on. + +pname:pEvents:: + Array of pname:eventCount number of event objects to wait on. + +pname:srcStageMask:: + Mask of pipeline stages used to signal all of the events in pname:pEvents. + +pname:dstStageMask:: + Specifies which pipeline stages must wait for the events to become + signaled (see elink:VkPipelineStageFlags for more detail). + +pname:memoryBarrierCount:: + Number of memory barriers to insert after waiting for the events. + +pname:ppMemoryBarriers:: + Array of pointers to memory barrier structures specifying the parameters + of the memory barriers to insert after waiting for the events. Each + element of the array may point to a slink:VkMemoryBarrier, + slink:VkBufferMemoryBarrier, or slink:VkImageMemoryBarrier structure. + +Description +----------- + +fname:vkCmdWaitEvents waits for a number of event objects to become +signalled and inserts a set of memory barriers into the command buffer +specified by pname:commandBuffer. + +fname:vkCmdWaitEvents waits for each of the pname:eventCount event object +specified by pname:pEvents to become signalled. The point at which each is +signalled must have been specified in the command that caused the object to +become signalled (either fname:vkSetEvent or fname:vkCmdSetEvent) and must +also have the corresponding bit set in pname:srcStageMask. + +The pname:ppMemoryBarriers parameter is a pointer to an array of pname:memoryBarrierCount +structures defining the parameters of memory barriers to insert after waiting +for each of the events. Each element of the array may be an instance of +slink:VkMemoryBarrier, slink:VkBufferMemoryBarrier, or slink:VkImageMemoryBarrier, +the definitions of each are, respectively: + +include::../structs/VkMemoryBarrier.txt[] + +include::../structs/VkBufferMemoryBarrier.txt[] + +include::../structs/VkImageMemoryBarrier.txt[] + +The memory barriers specified by pname:ppMemoryBarriers cause writes as described by +pname:outputMask that were written by pipeline stages in pname:srcStageMask +prior to the wait to be made visible to reads as described by +pname:inputMask in pipeline stages in pname:dstStageMask subsequent to the +wait. + +In case of global memory barriers inserted by passing an +slink:VkMemoryBarrier structure to the command prior writes in the requested +pipeline stages to any memory location corresponding to the set of memory +output coherency flags specified in the pname:outputMask member of the +structure are made coherent with subsequent reads in the requested pipeline +stages of any memory location corresponding to the set of memory input +coherency flags specified in the pname:inputMask member of the structure. + +In case of buffer memory barriers inserted by passing an +slink:VkBufferMemoryBarrier structure to the command prior writes in the +requested pipeline stages to the specified sub-range of the buffer +corresponding to the set of memory output coherency flags specified in the +pname:outputMask member of the structure are made coherent with subsequent +reads in the requested pipeline stages of the specified sub-range of the +buffer corresponding to the set of memory input coherency flags specified in +the pname:inputMask member of the structure. + +In case of image memory barriers inserted by passing an +slink:VkImageMemoryBarrier structure to the command prior writes in the +requested pipeline stages to the specified sub-range of the image +corresponding to the set of memory output coherency flags specified in the +pname:outputMask member of the structure are made coherent with subsequent +reads in the requested pipeline stages of the specified sub-range of the +image corresponding to the set of memory input coherency flags specified in +the pname:inputMask member of the structure. Additionally, if the +pname:oldLayout and pname:newLayout members of the structure don't match a +layout transition is performed on the specified sub-range of the image as +part of the memory barrier. + +In case of buffer and image memory barriers the pname:srcQueueFamilyIndex +and pname:dstQueueFamilyIndex members of the corresponding memory barrier +structures can specify the parameters of a transfer of ownership between two +distinct families of queues of a shared buffer or image object created with +the ename:VK_SHARING_MODE_EXCLUSIVE sharing mode. In case of regular +resource transitions both pname:srcQueueFamilyIndex and +pname:dstQueueFamilyIndex should be set to ename:VK_QUEUE_FAMILY_IGNORED to +indicate no transfer of ownership between queue families. In case of +resource transitions involving ownership transfer of shared buffers or +images one of these two members have to match the queue family index the +command buffer specified by pname:commandBuffer was created for, while the other +should specify the queue family index the ownership transfer is released to +or acquired from. Ownership transferring resource transitions have to be +performed both on a queue from the source queue family and on a queue from +the destination queue family (see elink:VkSharingMode for more detail). + +If pname:inputMask is zero in any of the memory barrier structures +then prior writes will only be coherent with any type of subsequent read +after a future resource transition command specifies a non-empty set of +memory input coherency control flags. This allows flushing device output +caches unconditionally. + +If pname:outputMask is zero in any of the memory barrier +structures then subsequent reads will only be coherent with any type of +prior write if an earlier resource transition command specified a non-empty +set of memory output coherency control flags. This allows invalidating +device input caches unconditionally. + +include::../validity/protos/vkCmdWaitEvents.txt[] + +See Also +-------- + +flink:vkCmdSetEvent, flink:vkCmdResetEvent, flink:vkSetEvent, flink:vkResetEvent, flink:vkCmdPipelineBarrier, +slink:VkMemoryBarrier, slink:VkBufferMemoryBarrier, slink:VkImageMemoryBarrier, elink:VkPipelineStageFlagBits + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCmdWriteTimestamp.txt b/doc/specs/vulkan/man/vkCmdWriteTimestamp.txt new file mode 100644 index 00000000..77f1db1a --- /dev/null +++ b/doc/specs/vulkan/man/vkCmdWriteTimestamp.txt @@ -0,0 +1,53 @@ +vkCmdWriteTimestamp(3) +======================= + +Name +---- +vkCmdWriteTimestamp - Write a device timestamp into a query object. + +C Specification +--------------- + +include::../protos/vkCmdWriteTimestamp.txt[] + +Parameters +---------- + +pname:commandBuffer:: + The command buffer into which the command will be placed. + +pname:pipelineStage:: + The stage of the pipeline at which the timestamp will be written. + +pname:queryPool:: + A handle to the query pool object containing the query. + +pname:entry:: + The entry in the query pool at which to write the query. + +Description +----------- + +fname:vkCmdWriteTimestamp places a command into the command buffer specified +by pname:commandBuffer which, when executed, will cause the GPU to write its +internal timestamp into the query pool specified by pname:queryPool at the +entry specified in pname:entry. The timestamp is written when the command +passes the pipeline stage specified by pname:pipelineStage. The pipeline +stage is a single member of the elink:VkPipelineStageFlagBits enumeration, +the definition of which is: + +include::../enums/VkPipelineStageFlagBits.txt[] + +If an implementation is not capable of writing a timestamp value at the +pipeline point specified, it may at its option write the timestamp at +any point appearing later in the logical pipeline. However, it must do +this consistently for similar pipeline configurations. + +include::../validity/protos/vkCmdWriteTimestamp.txt[] + +See Also +-------- + +flink:vkCmdSetEvent + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateAndroidSurfaceKHR.txt b/doc/specs/vulkan/man/vkCreateAndroidSurfaceKHR.txt new file mode 100644 index 00000000..6643ca99 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateAndroidSurfaceKHR.txt @@ -0,0 +1,46 @@ +vkCreateAndroidSurfaceKHR(3) +=========================== + +Name +---- +vkCreateAndroidSurfaceKHR - create a VkSurfaceKHR object for an Android native window. + +C Specification +--------------- + +include::../protos/vkCreateAndroidSurfaceKHR.txt[] + +Parameters +---------- + +pname:instance:: + The VkInstance to associate with the surface. + +pname:pCreateInfo:: + A pointer to an instance of the VkAndroidSurfaceCreateInfoKHR structure containing the parameters affecting the creation of the surface object. + +pname:pAllocator:: + The allocator used for host memory allocated for the surface object. + +pname:pSurface:: + The resulting surface object handle is returned in pSurface. + +Description +----------- + +fname:vkCreateAndroidSurfaceKHR creates a VkSurface associated with the specified android native window. + +pname:pCreateInfo is an instance of the slink:VkAndroidSurfaceCreateInfoKHR +structure, the definition of which is: + +include::../structs/VkAndroidSurfaceCreateInfoKHR.txt[] + +include::../validity/protos/vkCreateAndroidSurfaceKHR.txt[] + +See Also +-------- + +flink:vkDestroySurfaceKHR, flink:vkGetPhysicalDeviceSurfaceCapabilitiesKHR, flink:vkGetPhysicalDeviceSurfaceFormatsKHR, +flink:vkGetPhysicalDeviceSurfacePresentModesKHR, flink:vkCreateSwapchainKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateBuffer.txt b/doc/specs/vulkan/man/vkCreateBuffer.txt new file mode 100644 index 00000000..3374be4e --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateBuffer.txt @@ -0,0 +1,42 @@ +vkCreateBuffer(3) +================== + +Name +---- +vkCreateBuffer - Create a new buffer object. + +C Specification +--------------- + +include::../protos/vkCreateBuffer.txt[] + +Parameters +---------- + +pname:device:: + The device with which to create the new buffer object. + +pname:pCreateInfo:: + Pointer to data structure containing information about the object to be created. + +pname:pBuffer:: + Pointer to a variable to recieve a handle to the new buffer object. + +Description +----------- + +fname:vkCreateBuffer creates a new buffer object using the device specified in pname:device. The +resulting buffer object handle is written into the variable whose address is given in +pname:pBuffer. pname:pCreateInfo is a pointer to a data structure describing the buffer to be +created and is of type slink:VkBufferCreateInfo, whose definition is: + +include::../structs/VkBufferCreateInfo.txt[] + +include::../validity/protos/vkCreateBuffer.txt[] + +See Also +-------- + +flink:vkCreateImage, flink:vkCreateBufferView + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateBufferView.txt b/doc/specs/vulkan/man/vkCreateBufferView.txt new file mode 100644 index 00000000..1f021bd3 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateBufferView.txt @@ -0,0 +1,43 @@ +vkCreateBufferView(3) +====================== + +Name +---- +vkCreateBufferView - Create a new buffer view object. + +C Specification +--------------- + +include::../protos/vkCreateBufferView.txt[] + +Parameters +---------- + +pname:device:: + The device with which to create the buffer view. + +pname:pCreateInfo:: + A pointer to a structure containing information to be placed in the object. + +pname:pView:: + A pointer to a variable which will receive the handle to the new object. + +Description +----------- + +fname:vkCreateBufferView creates a new buffer view using the information contained in +pname:pCreateInfo and the device specified in pname:device. Upon success, a handle to +the new view object is deposited in the variable pointed to by pname:pView. +pname:pCreateInfo should point to an instance of the slink:VkBufferViewCreateInfo structure, +the definition of which is: + +include::../structs/VkBufferViewCreateInfo.txt[] + +include::../validity/protos/vkCreateBufferView.txt[] + +See Also +-------- + +flink:vkCreateBufferView + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateCommandPool.txt b/doc/specs/vulkan/man/vkCreateCommandPool.txt new file mode 100644 index 00000000..518e304e --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateCommandPool.txt @@ -0,0 +1,57 @@ +vkCreateCommandPool(3) +====================== + +Name +---- +vkCreateCommandPool - Create a new command pool object. + +C Specification +--------------- + +include::../protos/vkCreateCommandPool.txt[] + +Parameters +---------- + +pname:device:: + The device with which to create the command pool. + +pname:pCreateInfo:: + A pointer to a structure containing information about the command pool. + +pname:pCommandPool:: + The address of a variable to receive the handle to the new command pool. + +Description +----------- + +fname:vkCreateCommandPool creates a new command pool object using pname:device and places +its handle in the variable whose address is given in pname:pCommandPool. pname:pCreateInfo is +a pointer to an instance of the slink:VkCommandPoolCreateInfo structure which contains +information about how to create the new command pool. Its definition is: + +include::../structs/VkCommandPoolCreateInfo.txt[] + +pname:queueFamilyIndex indicates the family of queues which the command buffer can be +submitted to, as well as the subset of commands which may be recorded on it. + +pname:flags is a bitfield of flags indicating usage behavior for the pool and command +buffers allocated from it. Possible values include: + +ename:VK_COMMAND_POOL_CREATE_TRANSIENT_BIT indicates that command buffers created from the +pool will be short-lived, meaning that they will be reset or destroyed in a relatively +short timeframe. + +ename:VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT controls whether it is legal to call +fname:vkResetCommandBuffer on a command buffer allocated from the pool. If this is not +set, then the command buffers may only be reset in bulk by calling +fname:vkResetCommandPool. + +include::../validity/protos/vkCreateCommandPool.txt[] + +See Also +-------- + +flink:vkDestroyCommandPool, flink:vkResetCommandPool + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateComputePipelines.txt b/doc/specs/vulkan/man/vkCreateComputePipelines.txt new file mode 100644 index 00000000..2be29115 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateComputePipelines.txt @@ -0,0 +1,83 @@ +vkCreateComputePipelines(3) +=========================== + +Name +---- +vkCreateComputePipelines - Creates a new compute pipeline object. + +C Specification +--------------- + +include::../protos/vkCreateComputePipelines.txt[] + +Parameters +---------- + +pname:device:: + A handle to the device to use to create the new compute pipelines. + +pname:pipelineCache:: + A handle to a pipeline cache from which the result of previous compiles may + be retrieved, and to which the result of this compile may be stored. + +pname:createInfoCount:: + The number of pipelines to create. + +pname:pCreateInfos:: + Pointer to an array of pname:createInfoCount + sname:VkComputePipelineCreateInfo structures defining the contents of + the new pipelines. + +pname:pPipelines:: + A pointer to an array to receive the handles to the new compute pipeline + objects. + +Description +----------- + +fname:vkCreateComputePipelines creates new compute pipeline objects using the device specified in +pname:device and the creation information specified in the structures pointed to by pname:pCreateInfos and +deposits the resulting handles in the array pointed to by pname:pPipelines. The definition +of slink:VkComputePipelineCreateInfo is: + +include::../structs/VkComputePipelineCreateInfo.txt[] + +.Create Info Details + +- pname:sType indicates the type of this structure and must be +ename:VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO. + +- pname:pNext is a pointer to an extension-specific structure (can be NULL). + +- pname:stage is a sname:VkPipelineShaderStageCreateInfo describing the +compute shader. + +- pname:flags controls how the driver will create the pipeline. + +- pname:layout the description of binding locations used by both the +pipeline and the descritor sets. + +- pname:basePipelineHandle the pipeline to derive from (can be +VK_NULL_HANDLE, if pipeline is not derived). + +- pname:basePipelineIndex the index into the pname:pCreateInfos parameter +to fname:vkCreateComputePipelines. + +The parameters pname:basePipelineHandle and pname:basePipelineIndex are ignored +unless pname:flags has the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT bit set. If +using the pname:basePipelineIndex parameter, the index must refer to a +pname:pCreateInfos parameter pased to vkCreateComputePipelines that appeared +earlier than the current sname:VkComputePipelineCreateInfo in the list. The +parameters pname:basePipelineHandle and pname:basePipelineIndex are mutually +exclusive. If you specify a valid pname:basePipelineHandle, +pname:basePipelineIndex must be set to -1. If you specify a valid +pname:basePipelineIndex, pname:basePipelineHandle must be VK_NULL_HANDLE. + +include::../validity/protos/vkCreateComputePipelines.txt[] + +See Also +-------- + +flink:vkCreateGraphicsPipelines, flink:vkCmdBindPipeline + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateDescriptorPool.txt b/doc/specs/vulkan/man/vkCreateDescriptorPool.txt new file mode 100644 index 00000000..5820893f --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateDescriptorPool.txt @@ -0,0 +1,78 @@ +vkCreateDescriptorPool(3) +========================= + +Name +---- +vkCreateDescriptorPool - Creates a descriptor pool object. + +C Specification +--------------- + +include::../protos/vkCreateDescriptorPool.txt[] + +Parameters +---------- + +pname:device:: + Logical device which will own the new descriptor pool object. + +pname:pCreateInfo:: + A pointer to a structure containing parameters of the new pool object. + +pname:pDescriptorPool:: + Pointer to a variable which will receive a handle to the new descriptor pool object. + +Description +----------- + +fname:vkCreateDescriptorPool creates a new descriptor pool object using +pname:device. Descriptor sets may be allocated from the resulting descriptor +pool object by calling flink:vkAllocateDescriptorSets. pname:pCreateInfo is a +pointer to an insance of the slink:VkDescriptorPoolCreateInfo structure +containing parameters describing the new pool object. The definition of +slink:VkDescriptorPoolCreateInfo is: + +include::../structs/VkDescriptorPoolCreateInfo.txt[] + +The pname:sType member of the pname:pCreateInfo structure should be +ename:VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO. The pname:pNext member +is reserved for use by extensions and should be set to code:NULL. + +The pname:flags member of slink:VkDescriptorPoolCreateInfo is a set of flags +describing the intended usage of the pool and is formed from members of the +elink:VkDescriptorPoolCreateFlagBits enumeration, the definition of which is: + +include::../enums/VkDescriptorPoolCreateFlagBits.txt[] + +If ename:VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT is set in pname:flags +then descriptor sets allocated from the pool may be returned to the pool by calling +flink:vkFreeDescriptorSets. If this flag is clear then individual sets allocated +from the pool may not be returned to the pool and are considered allocated until +flink:vkResetDescriptorPool is called on the pool object. + +The pname:maxSets member specifies the maximum number of descriptor sets that +will be allocated from the pool. pname:pPoolSizes is a pointer to an array +of pname:poolSizeCount slink:VkDescriptorPoolSize structures, each describing a +type of descriptor and the number of that type of descriptor to be included +in the pool. The definition of the slink:VkDescriptorPoolSize structure is: + +include::../structs/VkDescriptorPoolSize.txt[] + +Each element of the ptext:pPoolSizes array specifies a type of descriptor in +pname:type and the count of that type of descriptor in +pname:descriptorCount. The pname:type member must be a member of the +elink:VkDescriptorType enumeration, the definition of which is: + +include::../enums/VkDescriptorType.txt[] + +Upon success, a handle to the newly created descriptor pool is placed in the variable whose address is +specified in pname:pDescriptorPool. + +include::../validity/protos/vkCreateDescriptorPool.txt[] + +See Also +-------- + +flink:vkAllocateDescriptorSets, flink:vkFreeDescriptorSets, flink:vkResetDescriptorPool, flink:vkDestroyDescriptorPool + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateDescriptorSetLayout.txt b/doc/specs/vulkan/man/vkCreateDescriptorSetLayout.txt new file mode 100644 index 00000000..0973125d --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateDescriptorSetLayout.txt @@ -0,0 +1,75 @@ +vkCreateDescriptorSetLayout(3) +=============================== + +Name +---- +vkCreateDescriptorSetLayout - Create a new descriptor set layout. + +C Specification +--------------- + +include::../protos/vkCreateDescriptorSetLayout.txt[] + +Parameters +---------- + +pname:device:: + The device with which to create the layout object. + +pname:pCreateInfo:: + Pointer to a structure specifying information to be placed in the object + +pname:pSetLayout:: + Pointer to a variable which will receive the new handle. + +Description +----------- + +fname:vkCreateDescriptorSetLayout creates a new descriptor set layout usable by the device specified in +pname:device using the information contained in the structure pointed to by pname:pCreateInfo. If successful, +a handle to the newly created layout object is placed in the variable pointed to by pname:pSetLayout. The +description of the layout is specified in pname:pCreateInfo, which is a pointer to an instance of the +slink:VkDescriptorSetLayoutCreateInfo structure, the definition of which is: + +include::../structs/VkDescriptorSetLayoutCreateInfo.txt[] + +The pname:bindingCount member of pname:pCreateInfo specifies the number of +bindings contained in the set. This is the number of elements in the array +pointed to by pname:pBinding, which is an array of +slink:VkDescriptorSetLayoutBinding structures. The definition of +slink:VkDescriptorSetLayoutBinding is: + +include::../structs/VkDescriptorSetLayoutBinding.txt[] + +Each element of the ptext:pBinding array specifies a descriptor or an array +of descriptors to be included in the set layout. pname:descriptorType +contains the descriptor type and must be one of the elink:VkDescriptorType +enumerants, the complete list of which is: + +include::../enums/VkDescriptorType.txt[] + +The pname:stageFlags member specifies which pipeline shader stages may access the resource. This is a bitwise +combination of the elink:VkShaderStageFlags enumerant, the list of which is: + +include::../enums/VkShaderStageFlagBits.txt[] + +If a shader stage is not included in pname:stageFlags, then the resource may not be accessed from that +stage within any pipeline using the set layout. + +If pname:descriptorType member specifies a ename:VK_DESCRIPTOR_TYPE_SAMPLER or ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER +type descriptor, then the pname:pImmutableSamplers member may be used to initialize a set of _immutable samplers_. +Immutable samplers are permanently bound into the set layout; later binding a sampler into an immutable sampler slot in +a descriptor set is not allowed. If pname:pImmutableSamplers is not code:NULL, then it is considered to be a pointer to an +array of pname:arraySize sampler handles that will be consumed by the set layout and used for the corresponding binding. +If pname:pImmutableSamplers is code:NULL, then the sampler slots are dynamic and sampler handles must be bound into +descriptor sets using this layout. If pname:descriptorType is not one of these descriptor types, then +pname:pImmutableSamplers is ignored. + +include::../validity/protos/vkCreateDescriptorSetLayout.txt[] + +See Also +-------- + +flink:vkAllocateDescriptorSets, flink:vkFreeDescriptorSets, flink:vkCreateDescriptorPool + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateDevice.txt b/doc/specs/vulkan/man/vkCreateDevice.txt new file mode 100644 index 00000000..715e5d2a --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateDevice.txt @@ -0,0 +1,43 @@ +vkCreateDevice(3) +================== + +Name +---- +vkCreateDevice - Create a new device instance. + +C Specification +--------------- + +include::../protos/vkCreateDevice.txt[] + +Parameters +---------- + +pname:physicalDevice:: + Handle to the physical device upon which to create the logical device. + +pname:pCreateInfo:: + Pointer to a structure containing creation info. + +pname:pDevice:: + Pointer to a variable to receive the handle to the new device instance. + +Description +----------- + +fname:vkCreateDevice creates a new device instance on the physical device specified by +pname:physicalDevice and places the resulting device handle in the variable pointed to +by pname:pDevice. Information about how the device should be created is passed in an +instance of slink:VkDeviceCreateInfo whose address is passed in pname:pCreateInfo. +The definition of slink:VkDeviceCreateInfo is: + +include::../structs/VkDeviceCreateInfo.txt[] + +include::../validity/protos/vkCreateDevice.txt[] + +See Also +-------- + +flink:vkDestroyDevice + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateDisplayModeKHR.txt b/doc/specs/vulkan/man/vkCreateDisplayModeKHR.txt new file mode 100644 index 00000000..1f8b4af0 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateDisplayModeKHR.txt @@ -0,0 +1,48 @@ +vkCreateDisplayModeKHR(3) +=========================== + +Name +---- +vkCreateDisplayModeKHR - create a display mode. + +C Specification +--------------- + +include::../protos/vkCreateDisplayModeKHR.txt[] + +Parameters +---------- + +pname:physicalDevice:: + The physical device associated with display. + +pname:display:: + The display to create an additional mode. + +pname:pCreateInfo:: + Is a VkDisplayModeCreateInfoKHR structure describing the new mode to create. + +pname:pAllocator:: + The allocator used for host memory allocated for the mode object. + +pname:pMode:: + Returns the handle of the mode created. + +Description +----------- + +fname:vkCreateDisplayModeKHR creates additional display modes. + +pname:pCreateInfo is an instance of the slink:VkDisplayModeCreateInfoKHR +structure, the definition of which is: + +include::../structs/VkDisplayModeCreateInfoKHR.txt[] + +include::../validity/protos/vkCreateDisplayModeKHR.txt[] + +See Also +-------- + +flink:vkGetDisplayModePropertiesKHR, flink:vkCreateDisplayPlaneSurfaceKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateDisplayPlaneSurfaceKHR.txt b/doc/specs/vulkan/man/vkCreateDisplayPlaneSurfaceKHR.txt new file mode 100644 index 00000000..031ddd8c --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateDisplayPlaneSurfaceKHR.txt @@ -0,0 +1,46 @@ +vkCreateDisplayPlaneSurfaceKHR(3) +================================ + +Name +---- +vkCreateDisplayPlaneSurfaceKHR - create a VkSurfaceKHR structure representing a display plane and mode. + +C Specification +--------------- + +include::../protos/vkCreateDisplayPlaneSurfaceKHR.txt[] + +Parameters +---------- + +pname:instance:: + The VkInstance to associate the surface. + +pname:pCreateInfo:: + A pointer to an instance of the VkDisplaySurfaceCreateInfoKHR structure containing the parameters affecting the creation of the surface object. + +pname:pAllocator:: + The allocator used for host memory allocated for the surface object. + +pname:pSurface:: + The resulting surface object handle is returned in pSurface. + +Description +----------- + +fname:vkCreateDisplayPlaneSurfaceKHR creates a VkSurface associated with the specified display plane and mode. + +pname:pCreateInfo is an instance of the slink:VkDisplaySurfaceCreateInfoKHR +structure, the definition of which is: + +include::../structs/VkDisplaySurfaceCreateInfoKHR.txt[] + +include::../validity/protos/vkCreateDisplayPlaneSurfaceKHR.txt[] + +See Also +-------- + +flink:vkDestroySurfaceKHR, flink:vkGetPhysicalDeviceSurfaceCapabilitiesKHR, flink:vkGetPhysicalDeviceSurfaceFormatsKHR, +flink:vkGetPhysicalDeviceSurfacePresentModesKHR, flink:vkCreateSwapchainKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateEvent.txt b/doc/specs/vulkan/man/vkCreateEvent.txt new file mode 100644 index 00000000..7d55b489 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateEvent.txt @@ -0,0 +1,52 @@ +vkCreateEvent(3) +================= + +Name +---- +vkCreateEvent - Create a new event object. + +C Specification +--------------- + +include::../protos/vkCreateEvent.txt[] + +Parameters +---------- + +pname:device:: + A handle to the device with which to create the event. + +pname:pCreateInfo:: + A pointer to the creation info structure. + +pname:pEvent:: + The address of an VK_EVENT variable that will receive the handle to the new event. + +Description +----------- + +fname:vkCreateEvent creates a new event object using the device specified as +pname:device. A handle to the newly created event object is placed the +variable pointed to by pname:pEvent. pname:pCreateInfo is a pointer to an +instance of a slink:VkEventCreateInfo structure containing information about +the state in which to create the new object. The definition of +slink:VkEventCreateInfo is: + +include::../structs/VkEventCreateInfo.txt[] + +The pname:sType member of the slink:VkEventCreateInfo structure should be set to +ename:VK_STRUCTURE_TYPE_EVENT_CREATE_INFO. The pname:pNext member is reserved +for use by extensions and should be set to code:NULL. + +The pname:flags member specifies additional information about the event to be +created. There are presently no flags defined for this member and it should be +set to zero. + +include::../validity/protos/vkCreateEvent.txt[] + +See Also +-------- + +flink:vkSetEvent, flink:vkResetEvent, flink:vkCmdSetEvent, flink:vkCmdResetEvent + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateFence.txt b/doc/specs/vulkan/man/vkCreateFence.txt new file mode 100644 index 00000000..4b34a2f9 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateFence.txt @@ -0,0 +1,60 @@ +vkCreateFence(3) +================= + +Name +---- +vkCreateFence - Create a new fence object. + +C Specification +--------------- + +include::../protos/vkCreateFence.txt[] + +Parameters +---------- + +pname:device:: + A handle to the device with which to create the fence. + +pname:pCreateInfo:: + A pointer to a structure containing information about how to create the fence. + +pname:pFence:: + A pointer to a variable to receive the handle to the newly created fence object. + +Description +----------- + +fname:vkCreateFence creates a new fence object using the device specified by +pname:device and places the resulting object handle in the variable pointed to +by pname:pFence. Information about how the fence should be created is passed in +an instance of slink:VkFenceCreateInfo whose address is given in +pname:pCreateInfo. The definition of slink:VkFenceCreateInfo is: + +include::../structs/VkFenceCreateInfo.txt[] + +The pname:sType member of the slink:VkFenceCreateInfo structure should be set to +ename:VK_STRUCTURE_TYPE_FENCE_CREATE_INFO. The pname:pNext member is reserved +for use by extensions and should be set to code:NULL. + +The pname:flags member specifies additional information about the fence to be +created. It is a bitfield made up from the members of the elink:VkFenceCreateFlagBits +enumeration, the definition of which is: + +include::../enums/VkFenceCreateFlagBits.txt[] + +If ename:VK_FENCE_CREATE_SIGNALED_BIT is set then the fence is created already +signaled, otherwise, the fence is created in an unsignaled state. + +A fence becomes signaled when it is submitted to a queue with a call to +flink:vkQueueSubmit. A fence may be reset to unsignaled state with a call +to flink:vkResetFences. + +include::../validity/protos/vkCreateFence.txt[] + +See Also +-------- + +flink:vkWaitForFences, flink:vkDestroyFence, flink:vkResetFences, flink:vkQueueSubmit + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateFramebuffer.txt b/doc/specs/vulkan/man/vkCreateFramebuffer.txt new file mode 100644 index 00000000..cc31ca88 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateFramebuffer.txt @@ -0,0 +1,52 @@ +vkCreateFramebuffer(3) +====================== + +Name +---- +vkCreateFramebuffer - Create a new framebuffer object. + +C Specification +--------------- + +include::../protos/vkCreateFramebuffer.txt[] + +Parameters +---------- + +pname:device:: + The device with which to create the framebuffer object. + +pname:pCreateInfo:: + A pointer to a structure containing information about how to create the object. + +pname:pFramebuffer:: + A pointer to a variable which will receive the handle to the new object. + +Description +----------- + +fname:vkCreateFramebuffer creates a new framebuffer object using the information contained in +pname:pCreateInfo and the device specified in pname:device. Upon success, a handle to +the new framebuffer object is deposited in the variable pointed to by pname:pFramebuffer. +pname:pCreateInfo should point to an instance of the slink:VkFramebufferCreateInfo structure, +the definition of which is: + +include::../structs/VkFramebufferCreateInfo.txt[] + +The attachments in pname:pAttachments correspond in order to the attachment descriptions +in the pname:renderPass. The attachment view must have the same format, sample count, +and initial layout as the render pass's attachment description. All attachment views +must also have dimensions at least as large as the framebuffer's pname:width, +pname:height, and pname:layers. + +The framebuffer may be used in combination with any render pass that has the same +attachment count, and corresponding attachments have the same format and sample count. + +include::../validity/protos/vkCreateFramebuffer.txt[] + +See Also +-------- + +flink:vkCmdBeginRenderPass, flink:vkDestroyFramebuffer + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateGraphicsPipelines.txt b/doc/specs/vulkan/man/vkCreateGraphicsPipelines.txt new file mode 100644 index 00000000..d35f87e0 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateGraphicsPipelines.txt @@ -0,0 +1,85 @@ +vkCreateGraphicsPipelines(3) +============================ + +Name +---- +vkCreateGraphicsPipelines - Create graphics pipelines. + +C Specification +--------------- + +include::../protos/vkCreateGraphicsPipelines.txt[] + +Parameters +---------- + +pname:device:: + A handle to the device to use to create the new graphics pipeline(s). + +pname:pipelineCache:: + A handle to a pipeline cache from which the result of previous compiles may + be retrieved, and to which the result of this compile may be stored. + +pname:createInfoCount:: + The number of pipelines to create. + +pname:pCreateInfos:: + Pointer to an array of pname:createInfoCount + sname:VkGraphicsPipelineCreateInfo structures defining the contents of + the new pipelines. + +pname:pPipelines:: + A pointer to an array to receive the handle(s) to the new graphics pipeline object(s). + +Description +----------- + +fname:vkCreateGraphicsPipelines creates new graphics pipeline objects using the device specified in +pname:device and the creation information specified in the structures pointed to by pname:pCreateInfos and +deposits the resulting handles in the array pointed to by pname:pPipelines. The definition +of slink:VkGraphicsPipelineCreateInfo is: + +include::../structs/VkGraphicsPipelineCreateInfo.txt[] + +.Create Info Details + +- pname:pStages points to an array of pname:stageCount slink:VkPipelineShaderStageCreateInfo objects describing the stages comprising the pipeline. At minimum, the vertex shader stage must be defined. + +- pname:pVertexInputState points to a slink:VkPipelineVertexInputStateCreateInfo object describing the layout of the vertex buffers as well as the attributes within the buffers for the pipeline. + +- pname:pInputAssemblyState points to a slink:VkPipelineInputAssemblyStateCreateInfo object describing the input assembly state for the pipeline, including the primitive type and topology. + +- pname:pTessellationState points to a slink:VkPipelineTessellationStateCreateInfo object describing the patch control state for the tesselation stage of the pipeline, or is set to 'NULL' if no tesselation stage is defined. + +- pname:pViewportState points to a slink:VkPipelineViewportStateCreateInfo object describing the viewport state for the pipeline. + +- pname:pRasterizationState points to a slink:VkPipelineRasterizationStateCreateInfo object describing the rasterizer state for the pipeline, including fill mode, clip mode, and face orientation. + +- pname:pMultisampleState points to a slink:VkPipelineMultisampleStateCreateInfo object describing the multisample state for the pipeline. + +- pname:pDepthStencilState points to a slink:VkPipelineDepthStencilStateCreateInfo object describing the depth and stencil state for the pipeline. + +- pname:pColorBlendState points to a slink:VkPipelineColorBlendStateCreateInfo object describing the color buffer state for the pipeline, including state for each of the attachments that will be bound to the framebuffer. + +- pname:flags is an instance of elink:VkPipelineCreateFlags, indicating additional usage hint (e.g., if this pipeline will be used to create derivative pipelines). + +- pname:layout is a handle to a sname:VkPipelineLayout object created with fname:vkCreatePipelineLayout. + +- pname:renderPass is a handle to a sname:VkRenderPass object describing a renderpass the pipeline will be compatible with. + +- pname:subpass is the index of the subpass in the pname:renderPass the pipeline will be compatible with. + +The created pipeline may only be used in a subpass compatible with the provided pname:renderPass and pname:subpass. +Two subpasses are compatible if they have the same index in their render passes, and if the render pass descriptions are +identical except for attachment load and store ops and image layouts. For a render pass with only one subpass, +the subpasses are compatible if they have the same number and kind of attachments, and if corresponding attachments +have the same format and sample count. + +include::../validity/protos/vkCreateGraphicsPipelines.txt[] + +See Also +-------- + +flink:vkCreateComputePipelines, flink:vkCmdBindPipeline, flink:vkDestroyPipeline + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateImage.txt b/doc/specs/vulkan/man/vkCreateImage.txt new file mode 100644 index 00000000..fb89104d --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateImage.txt @@ -0,0 +1,41 @@ +vkCreateImage(3) +================= + +Name +---- +vkCreateImage - Create a new image object. + +C Specification +--------------- + +include::../protos/vkCreateImage.txt[] + +Parameters +---------- + +pname:device:: + A handle to the device with which to create the image. + +pname:pCreateInfo:: + A pointer to a slink:VkImageCreateInfo structure specifying the properties of the new image. + +pname:pImage:: + A pointer to a variable to receive the handle to the resulting image. + +Description +----------- + +fname:vkCreateImage creates a new image object and places the resulting handle in the variable pointed +to by pname:pImage. The properties of the new image are specified in an instance of a slink:VkImageCreateInfo +structure whose address is given in pname:pCreateInfo. The definition of slink:VkImageCreateInfo is: + +include::../structs/VkImageCreateInfo.txt[] + +include::../validity/protos/vkCreateImage.txt[] + +See Also +-------- + +flink:vkCreateSampler + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateImageView.txt b/doc/specs/vulkan/man/vkCreateImageView.txt new file mode 100644 index 00000000..33731b6d --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateImageView.txt @@ -0,0 +1,59 @@ +vkCreateImageView(3) +==================== + +Name +---- +vkCreateImageView - Create an image view from an existing image. + +C Specification +--------------- + +include::../protos/vkCreateImageView.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the image. + +pname:pCreateInfo:: + Specifies properties of the new view. + +pname:pView:: + Returns the requested object. + +Description +----------- + +fname:vkCreateImageView creates a new view of a source image in a compatible format, alowing casting +of image data from one format to another. Image views may be bound into descriptor sets to allow them +to be accessed in shaders, or be bound as color attachments. pname:device specifies the device that +is to be used to create the new view. pname:pCreateInfo is a pointer to an instance of the +slink:VkImageViewCreateInfo structure defining the properties of the new view object. The definition +of slink:VkImageViewCreateInfo is: + +include::../structs/VkImageViewCreateInfo.txt[] + +The pname:sType member of pname:pCreateInfo should be ename:VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO. +The pname:image member contains the handle to the parent object of which to create a view. pname:viewType +specifies the type of view to be created and should be a member of the elink:VkImageViewType enumeration, +the definition of which is: + +include::../enums/VkImageViewType.txt[] + +The pname:format member of pname:pCreateInfo specifies the image format for the newly created view and +should be compatible with the base format of the parent image specified in pname:image. The pname:components +member is an instance of the slink:VkComponentMapping structure which defines component ordering for data +read from the view. The pname:subresourceRange member of the pname:pCreateInfo specifies the +range of the parent resource to be visible through the new view. + +The pname:flags member of pname:pCreateInfo is reserved and must be 0. + +include::../validity/protos/vkCreateImageView.txt[] + +See Also +-------- + +flink:vkCreateImage, flink:vkCreateBuffer, flink:vkCreateBufferView + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateInstance.txt b/doc/specs/vulkan/man/vkCreateInstance.txt new file mode 100644 index 00000000..31693cd1 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateInstance.txt @@ -0,0 +1,121 @@ +vkCreateInstance(3) +==================== + +Name +---- +vkCreateInstance - Create a new Vulkan instance + +C Specification +--------------- + +include::../protos/vkCreateInstance.txt[] + +Parameters +---------- + +pname:pCreateInfo:: + Pointer to instance creation structure. + +pname:pInstance:: + Pointer to variable which will receive the new instance handle. + +Description +----------- + +fname:vkCreateInstance creates a new Vulkan instance and places a handle to it in +the variable pointed to by pname:pInstance. pname:pCreateInfo is a pointer to an +instance of the slink:VkInstanceCreateInfo structure containing information about +how the instance should be created. The definition of slink:VkInstanceCreateInfo +is: + +include::../structs/VkInstanceCreateInfo.txt[] + +The pname:sType member of sname:VkInstanceCreateInfo should be set to ename:VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO. +The pname:pNext member of sname:VkInstanceCreateInfo is reserved for use by extensions +and should be set to code:NULL. + +The pname:pApplicationInfo member, if non-code:NULL, points to an instance of the slink:VkApplicationInfo +structure containing information about the application. The expected contents of the pname:pApplicationInfo +member are documented below. + +The pname:enabledLayerNameCount member of sname:VkInstanceCreateInfo specifies the number of global layers +to enable, and pname:ppEnabledLayerNames is a pointer to an array of pname:enabledLayerNameCount +code:NULL-terminated UTF-8 strings containing the names of layers +that should be enabled globally. If pname:enabledLayerNameCount is zero, then pname:ppEnabledLayerNames +is ignored and no global layers are enabled. + +Similary, information about global extensions is specified in the pname:enabledExtensionNameCount and +pname:ppEnabledExtensionNames members. pname:enabledExtensionNameCount specifies the number of global +extensions to enable and pname:ppEnabledExtensionNames is a pointer to an array of pointers +to code:NULL-terminated UTF-8 strings containing the extension names. If an extension is provided +by a layer, both the layer and extension must be specified at fname:vkCreateInstance time. + +If pname:enabledExtensionNameCount is zero then no extensions are enabled and pname:ppEnabledExtensionNames +is ignored. + +The definition of the slink:VkApplicationInfo structure is as follows: + +include::../structs/VkApplicationInfo.txt[] + +The pname:sType member of slink:VkApplicationInfo should be set to ename:VK_STRUCTURE_TYPE_APPLICATION_INFO. +The pname:pNext member of slink:VkApplicationInfo is reserved for use by extensions and should +be set to code:NULL. + +pname:pApplicationName is a pointer to a code:NULL-terminated UTF-8 string containing the name of +the application. pname:applicationVersion contains an application-specific version number. It is +recommended that new versions of an existing application specify monotonically increasing +values for pname:applicationVersion. + +If the application is built on a reusable engine, the name of the engine may be specified +in the NULL-terminated UTF-8 string pointed to by pname:pEngineName. pname:engineVersion +is the version of the engine used to create the application. + +Finally, pname:apiVersion is the version of the Vulkan API that the application expects to +use. + +Any application memory required by the instance will be allocated by calling functions +specified in the structure pointed to by ptext:pAllocCb. The definition of slink:VkAllocationCallbacks is: + +include::../structs/VkAllocationCallbacks.txt[] + +The slink:VkAllocationCallbacks structure contains two function pointers. pname:pfnAllocation +points to an allocation function whose protoype should be of the following +form: + +[source,{basebackend@docbook:c++:cpp}] +------------------------------------------------------------------------------ +typedef void* (*PFN_vkAllocationFunction)( + void* pUserData, + size_t size, + size_t alignment, + VkSystemAllocationScope allocationScope); +------------------------------------------------------------------------------ + +pname:pUserData is set to the value of pname:pUserData in the allocation info structure +passed to fname:vkCreateInstance. ptext:size is the size of the desired allocation, +ptext:alignment is the desired allocation, in bytes, and ptext:allocationScope represents +the intended usage of the allocation. The return value of function is a pointer +to the newly allocated memory. + +The pname:pfnFree member of slink:VkAllocationCallbacks points to an instance of the +following function: + +[source,{basebackend@docbook:c++:cpp}] +------------------------------------------------------------------------------ +typedef void (*PFN_vkFreeFunction)( + void* pUserData, + void* pMemory); +------------------------------------------------------------------------------ + +Again, the pname:pUserData parameter is initialized to the value passed in the +slink:VkAllocationCallbacks structure passed to fname:vkCreateInstance. ptext:pMemory is a +pointer to the memory to be freed. + +include::../validity/protos/vkCreateInstance.txt[] + +See Also +-------- + +flink:vkDestroyInstance + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateMirSurfaceKHR.txt b/doc/specs/vulkan/man/vkCreateMirSurfaceKHR.txt new file mode 100644 index 00000000..13d2b2c1 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateMirSurfaceKHR.txt @@ -0,0 +1,46 @@ +vkCreateMirSurfaceKHR(3) +======================= + +Name +---- +vkCreateMirSurfaceKHR - create a VkSurfaceKHR object for a Mir window. + +C Specification +--------------- + +include::../protos/vkCreateMirSurfaceKHR.txt[] + +Parameters +---------- + +pname:instance:: + The VkInstance to associate with the surface. + +pname:pCreateInfo:: + A pointer to an instance of the VkMirSurfaceCreateInfoKHR structure containing the parameters affecting the creation of the surface object. + +pname:pAllocator:: + The allocator used for host memory allocated for the surface object. + +pname:pSurface:: + The resulting surface object handle is returned in pSurface. + +Description +----------- + +fname:vkCreateMirSurfaceKHR creates a VkSurface associated with the specified Mir native window. + +pname:pCreateInfo is an instance of the slink:VkMirSurfaceCreateInfoKHR +structure, the definition of which is: + +include::../structs/VkMirSurfaceCreateInfoKHR.txt[] + +include::../validity/protos/vkCreateMirSurfaceKHR.txt[] + +See Also +-------- + +flink:vkDestroySurfaceKHR, flink:vkGetPhysicalDeviceSurfaceCapabilitiesKHR, flink:vkGetPhysicalDeviceSurfaceFormatsKHR, +flink:vkGetPhysicalDeviceSurfacePresentModesKHR, flink:vkCreateSwapchainKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreatePipelineCache.txt b/doc/specs/vulkan/man/vkCreatePipelineCache.txt new file mode 100644 index 00000000..c5477d6e --- /dev/null +++ b/doc/specs/vulkan/man/vkCreatePipelineCache.txt @@ -0,0 +1,46 @@ +vkCreatePipelineCache(3) +======================== + +Name +---- +vkCreatePipelineCache - Creates a new pipeline cache + +C Specification +--------------- + +include::../protos/vkCreatePipelineCache.txt[] + +Parameters +---------- + +pname:device:: + A handle to the device that will create the pipeline cache. + +pname:pCreateInfo:: + A pointer to a sname:VkPipelineCacheCreateInfo object describing the pipeline cache to be created. + +pname:pPipelineCache:: + A pointer that will receive the handle to the newly created pipeline cache. + +Description +----------- + +include::../structs/VkPipelineCacheCreateInfo.txt[] + +.Create Info Details + +- pname:initialDataSize is the size of the initial data to populate the cache. + +- pname:pInitialData is a pointer to the initial data to populate the cache. + +- pname:maxSize specifies an upper bound on the size the cache will grow to, +with -1 indicating that the cache may grow without bound. + +include::../validity/protos/vkCreatePipelineCache.txt[] + +See Also +-------- + +flink:vkCreateGraphicsPipelines, flink:vkCreateComputePipelines, flink:vkGetPipelineCacheData, flink:vkMergePipelineCaches + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreatePipelineLayout.txt b/doc/specs/vulkan/man/vkCreatePipelineLayout.txt new file mode 100644 index 00000000..3a6828f9 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreatePipelineLayout.txt @@ -0,0 +1,53 @@ +vkCreatePipelineLayout(3) +========================= + +Name +---- +vkCreatePipelineLayout - Creates a new pipeline layout object. + +C Specification +--------------- + +include::../protos/vkCreatePipelineLayout.txt[] + +Parameters +---------- + +pname:device:: + The device with which to create the new pipeline layout object. + +pname:pCreateInfo:: + A pointer to structure specifying the properties of the new pipeline layout. + +pname:pPipelineLayout:: + Pointer to a variable to recieve a handle to the new pipeline layout object. + +Description +----------- + +fname:vkCreatePipelineLayout creates a new pipeline layout object for the device specified in +pname:device. The resulting pipeline layout object handle is written into the variable whose +address is given in pname:pPipelineLayout. + +pname:pCreateInfo is a pointer to an instance of a slink:VkPipelineLayoutCreateInfo structure describing +the new pipeline layout. The definition of slink:VkPipelineLayoutCreateInfo is: + +include::../structs/VkPipelineLayoutCreateInfo.txt[] + +The pname:sType member of the slink:VkPipelineLayoutCreateInfo structure should be set to +ename:VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO. The pname:pNext member is reserved for use +by extensions and should be set to code:NULL. + +The pname:setLayoutCount member specifies the number of descriptor sets to +include in the layout and pname:pSetLayouts is a pointer to an array of +pname:setLayoutCount sname:VkDescriptorSetLayout objects describing the +sets, each created with flink:vkCreateDescriptorSetLayout. + +include::../validity/protos/vkCreatePipelineLayout.txt[] + +See Also +-------- + +flink:vkCreateDescriptorSetLayout + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateQueryPool.txt b/doc/specs/vulkan/man/vkCreateQueryPool.txt new file mode 100644 index 00000000..5e859567 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateQueryPool.txt @@ -0,0 +1,50 @@ +vkCreateQueryPool(3) +===================== + +Name +---- +vkCreateQueryPool - Create a new query pool object. + +C Specification +--------------- + +include::../protos/vkCreateQueryPool.txt[] + +Parameters +---------- + +pname:device:: + The device with which to create the query pool object. + +pname:pCreateInfo:: + A pointer to a structure containing information to be placed in the object. + +pname:pQueryPool:: + A pointer to a variable which will receive the handle to the new object. + +Description +----------- + +fname:vkCreateQueryPool creates a new query pool object using the information contained in +pname:pCreateInfo and the device specified in pname:device. Upon success, a handle to +the new query pool object is deposited in the variable pointed to by pname:pQueryPool. +pname:pCreateInfo should point to an instance of the slink:VkQueryPoolCreateInfo structure, +the definition of which is: + +include::../structs/VkQueryPoolCreateInfo.txt[] + +include::../validity/protos/vkCreateQueryPool.txt[] + +Return Value +------------ + +Upon success, fname:vkCreateQueryPool returns ename:VK_SUCCESS and deposits the resulting +query pool handle in the variable pointed to by pname:pQueryPool. Upon failure, a +descriptive error code is returned. + +See Also +-------- + +flink:vkCmdResetQueryPool, flink:vkCmdBeginQuery, flink:vkCmdEndQuery, flink:vkDestroyQueryPool, flink:vkGetQueryPoolResults, flink:vkCmdCopyQueryPoolResults + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateRenderPass.txt b/doc/specs/vulkan/man/vkCreateRenderPass.txt new file mode 100644 index 00000000..bed2c4a4 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateRenderPass.txt @@ -0,0 +1,164 @@ +vkCreateRenderPass(3) +====================== + +Name +---- +vkCreateRenderPass - Create a new render pass object. + +C Specification +--------------- + +include::../protos/vkCreateRenderPass.txt[] + +Parameters +---------- + +pname:device:: + The device with which to create the render pass object. + +pname:pCreateInfo:: + A pointer to a structure containing information to be placed in the object. + +pname:pRenderPass:: + A pointer to a variable which will receive the handle to the new object. + +Description +----------- + +fname:vkCreateRenderPass creates a new render pass object using the information contained in +pname:pCreateInfo and the device specified in pname:device. Upon success, a handle to +the new render pass object is deposited in the variable pointed to by pname:pRenderPass, +pname:pCreateInfo should point to an instance of the slink:VkRenderPassCreateInfo structure, +the definition of which is: + +include::../structs/VkRenderPassCreateInfo.txt[] + +A render pass is a sequence of subpasses, each of which reads from some framebuffer +attachments and writes to others as color and depth/stencil. The subpasses all render +to the same dimensions, and fragments for pixel (x,y,layer) in one subpass only read +framebuffer contents written by earlier subpasses at that same (x,y,layer) location. +It is quite common for a render pass to only contain a single subpass. + +Dependencies between subpasses describe ordering restrictions between them. Without +dependencies, implementations may reorder or overlap execution of two subpasses. + +Attachments +~~~~~~~~~~~ +The attachments used in the render pass are described by a slink:VkAttachmentDescription +structure, defined as: + +include::../structs/VkAttachmentDescription.txt[] + +The pname:format and pname:samples members are respectively the format and the +number of samples of the image that will be used for the attachment. + +The pname:loadOp defines how the contents of the attachment within the render +area will be treated at the beginning of the render pass. A load op of +ename:VK_ATTACHMENT_LOAD_OP_LOAD means the contents within the render area will +be preserved; ename:VK_ATTACHMENT_LOAD_OP_CLEAR means the contents within the +render area will be cleared to a uniform value; +ename:VK_ATTACHMENT_LOAD_OP_DONT_CARE means the application intends to overwrite +all samples in the render area without reading the initial contents, so their +initial contents are unimportant. If the attachment format has both depth and +stencil components, pname:loadOp applies only to the depth data, while +pname:stencilLoadOp defines how the stencil data is handled. pname:stencilLoadOp +is ignored for other formats. + +The pname:storeOp defines whether data rendered to the attachment is committed to memory +at the end of the render pass. ename:VK_ATTACHMENT_STORE_OP_STORE means the data is committed +to memory and will be available for reading after the render pass completes. +ename:VK_ATTACHMENT_STORE_OP_DONT_CARE means the data is not needed after rendering, and may +be discarded; the contents of the attachment will be undefined inside the render area. +If the attachment format has both depth and stencil components, pname:storeOp applies only +to the depth data, while pname:stencilStoreOp defines how the stencil data is +handled. pname:stencilStoreOp is ignored for other formats. + +pname:initialLayout is the layout the attachment image will be in when the render +pass begins. + +pname:finalLayout is the layout the attachment image will be transitioned to when +the render pass ends. + +Subpasses +~~~~~~~~~ +Subpasses of a render pass are described by a slink:VkSubpassDescription structure, +defined as: + +include::../structs/VkSubpassDescription.txt[] + +The pname:pipelineBindPoint indicates whether this is a compute or graphics subpass. +Only graphics subpasses are currently allowed. + +The pname:flags member is currently unused and must be zero. + +pname:pInputAttachments lists which of the render pass's attachments will be +read in the shader in the subpass, and what layout the attachment images +should be transitioned to before the subpass. pname:inputAttachmentCount +indicates the number of input attachments. Input attachments must also be +bound to the pipeline with a descriptor set. + +pname:pColorAttachments lists which of the render pass's attachments will be +used as color attachments in the subpass, and what layout the attachment +images should be transitioned to before the subpass. +pname:colorAttachmentCount indicates the number of color attachments. + +Each entry in pname:pResolveAttachments corresponds to an entry in +pname:pColorAttachments; either pname:pResolveAttachments must be NULL or it +must have pname:colorAttachmentCount entries. If pname:pResolveAttachments +is not NULL, each of its elements corresponds to a color attachment (the +element in pname:pColorAttachments at the same index). At the end of each +subpass, the subpass's color attachments will be resolved to the +corresponding resolve attachments, unless the resolve attachment index is +ename:VK_ATTACHMENT_UNUSED. + +The pname:depthStencilAttachment indicates which attachment will be used for +depth/stencil data and the layout it should be transitioned to before the +subpass. If no depth/stencil attachment is used in the +subpass, the attachment index must be ename:VK_ATTACHMENT_UNUSED. + +The pname:pPreserveAttachments are the attachments that aren't used by a +subpass, but whose contents must be preserved throughout the subpass. If the +contents of an attachment are produced in one subpass and consumed in a +later subpass, the attachment must be preserved in any subpasses on +dependency chains from the producer to consumer. +pname:preserveAttachmentCount indicates the number of preserved attachments. + +If a subpass uses an attachment as both an input attachment and either a color +attachment or a depth/stencil attachment, all pipelines used in the subpass must +disable writes to any components of the attachment format that are used as input. + +Dependencies +~~~~~~~~~~~~ +Dependencies describe a pipeline barrier that must occur between two subpasses, +usually because the destination subpass reads attachment contents written by the +source subpass. Dependencies are described by sname:VkSubpassDependency +structures, defined as: + +include::../structs/VkSubpassDependency.txt[] + +The pname:srcSubpass and pname:dstSubpass are producer and consumer subpasses, +respectively. pname:srcSubpass must be less than or equal to pname:dstSubpass, +so that the order of subpass descriptions is always a valid execution ordering, +and so the dependency graph cannot have cycles. + +The pname:srcStageMask, pname:dstStageMask, pname:outputMask, pname:inputMask, +and pname:byRegion describe the barrier, and have the same meaning as the +VkCmdPipelineBarrier parameters and slink:VkMemoryBarrier members with the same +names. + +If pname:byRegion is ename:VK_TRUE, it describes a per-region (x,y,layer) +dependency, that is for each region, the pname:srcStageMask stages must have +finished in pname:srcSubpass before any pname:dstStageMask stage starts in +pname:dstSubpass for the same region. If pname:byRegion is ename:VK_FALSE, it +describes a global dependency, that is the pname:srcStageMask stages must have +finished for all regions in pname:srcSubpass before any pname:dstStageMask +stage starts in pname:dstSubpass for any region. + +include::../validity/protos/vkCreateRenderPass.txt[] + +See Also +-------- + +flink:vkCmdBeginRenderPass, flink:vkCmdEndRenderPass + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateSampler.txt b/doc/specs/vulkan/man/vkCreateSampler.txt new file mode 100644 index 00000000..f6179b78 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateSampler.txt @@ -0,0 +1,44 @@ +vkCreateSampler(3) +================== + +Name +---- +vkCreateSampler - Create a new sampler object + +C Specification +--------------- + +include::../protos/vkCreateSampler.txt[] + +Parameters +---------- + +pname:device:: + The device used to create the sampler object. + +pname:pCreateInfo:: + A pointer to a structure containing the parameters used to construct the sampler. + +pname:pSampler:: + A pointer to a variable which will receive the handle to the new sampler object. + +Description +----------- + +fname:vkCreateSampler creates a new sampler object using the device specified in +pname:device and places the resulting handle in the variable whose address is given +by pname:pSampler. pname:pCreateInfo is an instance of the slink:VkSamplerCreateInfo +structure whose definition is: + +include::../structs/VkSamplerCreateInfo.txt[] + +The resulting sampler object should be destroyed with a call to flink:vkDestroySampler. + +include::../validity/protos/vkCreateSampler.txt[] + +See Also +-------- + +flink:vkDestroySampler, flink:vkCreateImage + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateSemaphore.txt b/doc/specs/vulkan/man/vkCreateSemaphore.txt new file mode 100644 index 00000000..3a24ae70 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateSemaphore.txt @@ -0,0 +1,57 @@ +vkCreateSemaphore(3) +===================== + +Name +---- +vkCreateSemaphore - Create a new queue semaphore object. + +C Specification +--------------- + +include::../protos/vkCreateSemaphore.txt[] + +Parameters +---------- + +pname:device:: + The device with which to create the queue semaphore object. + +pname:pCreateInfo:: + A pointer to a structure containing information to be placed in the object. + +pname:pSemaphore:: + A pointer to a variable which will receive the handle to the new object. + +Description +----------- + +fname:vkCreateSemaphore creates a new queue semaphore object using the +information contained in pname:pCreateInfo and the device specified in +pname:device. Upon success, a handle to the new queue semaphore object is +deposited in the variable pointed to by pname:pSemaphore. pname:pCreateInfo +should point to an instance of the slink:VkSemaphoreCreateInfo structure, +the definition of which is: + +include::../structs/VkSemaphoreCreateInfo.txt[] + +The pname:sType member of the sname:VkSemaphoreCreateInfo structure should be +set to ename:VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO. The pname:pNext member +is reserved for use by extensions and should be set to code:NULL. + +The pname:flags member of the sname:VkSemaphoreCreateInfo structure pointed +to by pname:pCreateInfo contains flags defining the initial state and +behavior of the semaphore. Currently, no flags are defined. + +// include::../enums/VkSemaphoreCreateFlagBits.txt[] + +The semaphore is created in the unsignaled state and may be signaled by submitting +it to a queue through a call to flink:vkQueueSubmit. + +include::../validity/protos/vkCreateSemaphore.txt[] + +See Also +-------- + +flink:vkDestroySemaphore, flink:vkQueueSubmit + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateShaderModule.txt b/doc/specs/vulkan/man/vkCreateShaderModule.txt new file mode 100644 index 00000000..302796f3 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateShaderModule.txt @@ -0,0 +1,51 @@ +vkCreateShaderModule(3) +======================== + +Name +---- +vkCreateShaderModule - Creates a new shader module object. + +C Specification +--------------- + +include::../protos/vkCreateShaderModule.txt[] + +Parameters +---------- + +pname:device:: + Logical device to own the new object. + +pname:pCreateInfo:: + A pointer to a structure defining the shader module object to be created. + +pname:pShaderModule:: + Pointer to the variable to receive a handle to the new object. + +Description +----------- + +fname:vkCreateShaderModule creates a new shader module from shader source provided by the caller. +pname:device is a handle to the device that is to be used to create the shader module. pname:pCreateInfo +is a pointer to an instance of the slink:VkShaderModuleCreateInfo structure which contains information +needed to construct the module. The definition of slink:VkShaderModuleCreateInfo is: + +include::../structs/VkShaderModuleCreateInfo.txt[] + +The pname:pCode member of pname:pCreateInfo contains a pointer to an opaque code structure describing +the content of the shader module. The pname:codeSize member specifies the length of the data pointed +to by pname:pCreateInfo in bytes. The pname:flags member of pname:pCreateInfo is used to further control +construction of the shader module. However, no flags are currently defined, pname:flags is therefore +reserved and should be set to zero. + +Upon success, a handle to the newly created shader module object is placed in the variable that is pointed +to by pname:pShaderModule. + +include::../validity/protos/vkCreateShaderModule.txt[] + +See Also +-------- + +flink:vkDestroyShaderModule + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateSharedSwapchainsKHR.txt b/doc/specs/vulkan/man/vkCreateSharedSwapchainsKHR.txt new file mode 100644 index 00000000..3bf89b83 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateSharedSwapchainsKHR.txt @@ -0,0 +1,50 @@ +vkCreateSharedSwapchainsKHR(3) +============================= + +Name +---- +vkCreateSharedSwapchainsKHR - create multiple swapchains that share presentable images. + +C Specification +--------------- + +include::../protos/vkCreateSharedSwapchainsKHR.txt[] + +Parameters +---------- + +pname:device:: + The VkDevice assocated with swapchain. + +pname:swapchainCount:: + The count of the array of swapchain create info. + +pname:pCreateInfos:: + A pointer to an array of VkSwapchainCreateInfoKHR structures containing the parameters affecting the creation of the swapchain objects. + +pname:pAllocator:: + The allocator used for host memory allocated for the swapchain objects. + +pname:pSwapchains:: + The array of created swapchains. + +Description +----------- + +fname:vkCreateSharedSwapchainsKHR creates multiple swapchains that share images. + +pname:pCreateInfo is an array of the slink:VkSwapchainCreateInfoKHR +structure, the definition of which is: + +include::../structs/VkSwapchainCreateInfoKHR.txt[] + +include::../validity/protos/vkCreateSharedSwapchainsKHR.txt[] + +See Also +-------- + +flink:vkCreateSwapchainKHR, flink:vkDestroySwapchainKHR, +flink:vkGetSwapchainImagesKHR, flink:vkAcquireNextImageKHR, +flink:vkQueuePresentKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateSwapchainKHR.txt b/doc/specs/vulkan/man/vkCreateSwapchainKHR.txt new file mode 100644 index 00000000..b6c046e1 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateSwapchainKHR.txt @@ -0,0 +1,47 @@ +vkCreateSwapchainKHR(3) +====================== + +Name +---- +vkCreateSwapchainKHR - create a swapchain. + +C Specification +--------------- + +include::../protos/vkCreateSwapchainKHR.txt[] + +Parameters +---------- + +pname:device:: + The VkDevice to associate the swapchain. + +pname:pCreateInfo:: + A pointer to an instance of the VkSwapchainCreateInfoKHR structure containing the parameters affecting the creation of the swapchain object. + +pname:pAllocator:: + The allocator used for host memory allocated for the surface object. + +pname:pSwapchain:: + The resulting swapchain. + +Description +----------- + +fname:vkCreateSwapchainKHR creates a swapchain. + +pname:pCreateInfo is an instance of the slink:VkSwapchainCreateInfoKHR +structure, the definition of which is: + +include::../structs/VkSwapchainCreateInfoKHR.txt[] + +include::../validity/protos/vkCreateSwapchainKHR.txt[] + +See Also +-------- + +flink:vkCreateSharedSwapchainsKHR, flink:vkDestroySwapchainKHR, +flink:vkGetSwapchainImagesKHR, flink:vkAcquireNextImageKHR, +flink:vkQueuePresentKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateWaylandSurfaceKHR.txt b/doc/specs/vulkan/man/vkCreateWaylandSurfaceKHR.txt new file mode 100644 index 00000000..50cdf76e --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateWaylandSurfaceKHR.txt @@ -0,0 +1,46 @@ +vkCreateWaylandSurfaceKHR(3) +=========================== + +Name +---- +vkCreateWaylandSurfaceKHR - create a VkSurfaceKHR object for a Wayland window. + +C Specification +--------------- + +include::../protos/vkCreateWaylandSurfaceKHR.txt[] + +Parameters +---------- + +pname:instance:: + The VkInstance to associate with the surface. + +pname:pCreateInfo:: + A pointer to an instance of the VkWaylandSurfaceCreateInfoKHR structure containing the parameters affecting the creation of the surface object. + +pname:pAllocator:: + The allocator used for host memory allocated for the surface object. + +pname:pSurface:: + The resulting surface object handle is returned in pSurface. + +Description +----------- + +fname:vkCreateWaylandSurfaceKHR creates a VkSurface associated with the specified Wayland native window. + +pname:pCreateInfo is an instance of the slink:VkWaylandSurfaceCreateInfoKHR +structure, the definition of which is: + +include::../structs/VkWaylandSurfaceCreateInfoKHR.txt[] + +include::../validity/protos/vkCreateWaylandSurfaceKHR.txt[] + +See Also +-------- + +flink:vkDestroySurfaceKHR, flink:vkGetPhysicalDeviceSurfaceCapabilitiesKHR, flink:vkGetPhysicalDeviceSurfaceFormatsKHR, +flink:vkGetPhysicalDeviceSurfacePresentModesKHR, flink:vkCreateSwapchainKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateWin32SurfaceKHR.txt b/doc/specs/vulkan/man/vkCreateWin32SurfaceKHR.txt new file mode 100644 index 00000000..2ccba18c --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateWin32SurfaceKHR.txt @@ -0,0 +1,46 @@ +vkCreateWin32SurfaceKHR(3) +========================= + +Name +---- +vkCreateWin32SurfaceKHR - create a VkSurfaceKHR object for a Win32 window. + +C Specification +--------------- + +include::../protos/vkCreateWin32SurfaceKHR.txt[] + +Parameters +---------- + +pname:instance:: + The VkInstance to associate the surface. + +pname:pCreateInfo:: + A pointer to an instance of the VkWin32SurfaceCreateInfoKHR structure containing the parameters affecting the creation of the surface object. + +pname:pAllocator:: + The allocator used for host memory allocated for the surface object. + +pname:pSurface:: + The resulting surface object handle is returned in pSurface. + +Description +----------- + +fname:vkCreateWin32SurfaceKHR creates a VkSurface associated with the specified Win32 native window. + +pname:pCreateInfo is an instance of the slink:VkWin32SurfaceCreateInfoKHR +structure, the definition of which is: + +include::../structs/VkWin32SurfaceCreateInfoKHR.txt[] + +include::../validity/protos/vkCreateWin32SurfaceKHR.txt[] + +See Also +-------- + +flink:vkDestroySurfaceKHR, flink:vkGetPhysicalDeviceSurfaceCapabilitiesKHR, flink:vkGetPhysicalDeviceSurfaceFormatsKHR, +flink:vkGetPhysicalDeviceSurfacePresentModesKHR, flink:vkCreateSwapchainKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateXcbSurfaceKHR.txt b/doc/specs/vulkan/man/vkCreateXcbSurfaceKHR.txt new file mode 100644 index 00000000..2adc97e7 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateXcbSurfaceKHR.txt @@ -0,0 +1,46 @@ +vkCreateXcbSurfaceKHR(3) +======================= + +Name +---- +vkCreateXcbSurfaceKHR - create a VkSurfaceKHR object for a X11 window, using the XCB client-side library. + +C Specification +--------------- + +include::../protos/vkCreateXcbSurfaceKHR.txt[] + +Parameters +---------- + +pname:instance:: + The VkInstance to associate the surface. + +pname:pCreateInfo:: + A pointer to an instance of the VkXcbSurfaceCreateInfoKHR structure containing the parameters affecting the creation of the surface object. + +pname:pAllocator:: + The allocator used for host memory allocated for the surface object. + +pname:pSurface:: + The resulting surface object handle is returned in pSurface. + +Description +----------- + +fname:vkCreateXcbSurfaceKHR creates a VkSurface associated with the X11 window. + +pname:pCreateInfo is an instance of the slink:VkXcbSurfaceCreateInfoKHR +structure, the definition of which is: + +include::../structs/VkXcbSurfaceCreateInfoKHR.txt[] + +include::../validity/protos/vkCreateXcbSurfaceKHR.txt[] + +See Also +-------- + +flink:vkDestroySurfaceKHR, flink:vkGetPhysicalDeviceSurfaceCapabilitiesKHR, flink:vkGetPhysicalDeviceSurfaceFormatsKHR, +flink:vkGetPhysicalDeviceSurfacePresentModesKHR, flink:vkCreateSwapchainKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkCreateXlibSurfaceKHR.txt b/doc/specs/vulkan/man/vkCreateXlibSurfaceKHR.txt new file mode 100644 index 00000000..7ab38042 --- /dev/null +++ b/doc/specs/vulkan/man/vkCreateXlibSurfaceKHR.txt @@ -0,0 +1,46 @@ +vkCreateXlibSurfaceKHR(3) +======================== + +Name +---- +vkCreateXlibSurfaceKHR - create a VkSurfaceKHR object for an X11 window, using the Xlib client-side library. + +C Specification +--------------- + +include::../protos/vkCreateXlibSurfaceKHR.txt[] + +Parameters +---------- + +pname:instance:: + The VkInstance to associate the surface. + +pname:pCreateInfo:: + A pointer to an instance of the VkXlibSurfaceCreateInfoKHR structure containing the parameters affecting the creation of the surface object. + +pname:pAllocator:: + The allocator used for host memory allocated for the surface object. + +pname:pSurface:: + The resulting surface object handle is returned in pSurface. + +Description +----------- + +fname:vkCreateXlibSurfaceKHR creates a VkSurface associated with the specified X11 window. + +pname:pCreateInfo is an instance of the slink:VkXlibSurfaceCreateInfoKHR +structure, the definition of which is: + +include::../structs/VkXlibSurfaceCreateInfoKHR.txt[] + +include::../validity/protos/vkCreateXlibSurfaceKHR.txt[] + +See Also +-------- + +flink:vkDestroySurfaceKHR, flink:vkGetPhysicalDeviceSurfaceCapabilitiesKHR, flink:vkGetPhysicalDeviceSurfaceFormatsKHR, +flink:vkGetPhysicalDeviceSurfacePresentModesKHR, flink:vkCreateSwapchainKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkDestroyBuffer.txt b/doc/specs/vulkan/man/vkDestroyBuffer.txt new file mode 100644 index 00000000..7f052aaa --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyBuffer.txt @@ -0,0 +1,41 @@ +vkDestroyBuffer(3) +================== + +Name +---- +vkDestroyBuffer - Destroy a buffer object + +C Specification +--------------- + +include::../protos/vkDestroyBuffer.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:buffer:: + The handle of the buffer object to destroy. + +Description +----------- + +fname:vkDestroyBuffer destroys the buffer object whose handle is specified in +pname:buffer. pname:buffer must be a valid handle to buffer object created +through a successful call to flink:vkCreateBuffer on pname:device. Attempts to destroy +code:VK_NULL_HANDLE are silently ignored. After a buffer object has been destroyed, +its handle becomes invalid and must not be accessed again. Furthermore, any views +of the buffer previously created through calls to flink:vkCreateBufferView on +the specified buffer also become invalid and should be destroyed before +the parent buffer. + +include::../validity/protos/vkDestroyBuffer.txt[] + +See Also +-------- + +flink:vkCreateBuffer + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkDestroyBufferView.txt b/doc/specs/vulkan/man/vkDestroyBufferView.txt new file mode 100644 index 00000000..72119099 --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyBufferView.txt @@ -0,0 +1,38 @@ +vkDestroyBufferView(3) +====================== + +Name +---- +vkDestroyBufferView - Destroy a buffer view object + +C Specification +--------------- + +include::../protos/vkDestroyBufferView.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:bufferView:: + The handle of the buffer view object to destroy. + +Description +----------- + +fname:vkDestroyBufferView destroys the buffer view object whose handle is specified in +pname:bufferView. pname:bufferView must be a valid handle to buffer view object created +through a successful call to flink:vkCreateBufferView on pname:device. Attempts to destroy +code:VK_NULL_HANDLE are silently ignored. After a buffer view object has been destroyed, +its handle becomes invalid and must not be accessed again. + +include::../validity/protos/vkDestroyBufferView.txt[] + +See Also +-------- + +flink:vkCreateBufferView + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkDestroyCommandPool.txt b/doc/specs/vulkan/man/vkDestroyCommandPool.txt new file mode 100644 index 00000000..5830692c --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyCommandPool.txt @@ -0,0 +1,43 @@ +vkDestroyCommandPool(3) +======================= + +Name +---- +vkDestroyCommandPool - Destroy a command pool object + +C Specification +--------------- + +include::../protos/vkDestroyCommandPool.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:commandPool:: + The command pool to destroy. + +Description +----------- + +fname:vkDestroyCommandPool destroys the command pool object whose handle is specified in +pname:commandPool. pname:commandPool must be a valid handle to command object created +through a successful call to flink:vkCreateCommandPool on pname:device. Attempts to destroy +code:VK_NULL_HANDLE are silently ignored. After a command pool object has been destroyed, +its handle becomes invalid and must not be accessed again. Any command buffers allocated from +the pool also become invalid and must not be accessed. + +All command buffers allocated from the pool must be freed by a call to flink:vkFreeCommandBuffers before the pool +is destroyed. Failure to return command buffers to their command pools before destroying +the pool object may result in resource leaks. + +include::../validity/protos/vkDestroyCommandPool.txt[] + +See Also +-------- + +flink:vkCreateCommandPool, flink:vkResetCommandPool + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkDestroyDescriptorPool.txt b/doc/specs/vulkan/man/vkDestroyDescriptorPool.txt new file mode 100644 index 00000000..14814ece --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyDescriptorPool.txt @@ -0,0 +1,41 @@ +vkDestroyDescriptorPool(3) +========================== + +Name +---- +vkDestroyDescriptorPool - Destroy a descriptor pool object + +C Specification +--------------- + +include::../protos/vkDestroyDescriptorPool.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:descriptorPool:: + The handle of the descriptor pool to destroy. + +Description +----------- + +fname:vkDestroyDescriptorPool destroys the descriptor pool object whose handle is specified in +pname:descriptorPool. pname:descriptorPool must be a valid handle to descriptor pool object created +through a successful call to flink:vkCreateDescriptorPool on pname:device. Attempts to destroy +code:VK_NULL_HANDLE are silently ignored. After a descriptor pool object has been destroyed, +its handle becomes invalid and must not be accessed again. + +Any descriptor sets allocated from the pool should be freed before the pool is destroyed. Not returning +descriptor sets to the pool before destroying the pool may cause a resource leak. + +include::../validity/protos/vkDestroyDescriptorPool.txt[] + +See Also +-------- + +flink:vkCreateDescriptorPool + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkDestroyDescriptorSetLayout.txt b/doc/specs/vulkan/man/vkDestroyDescriptorSetLayout.txt new file mode 100644 index 00000000..eda35941 --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyDescriptorSetLayout.txt @@ -0,0 +1,39 @@ +vkDestroyDescriptorSetLayout(3) +=============================== + +Name +---- +vkDestroyDescriptorSetLayout - Destroy a descriptor set layout object + +C Specification +--------------- + +include::../protos/vkDestroyDescriptorSetLayout.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:descriptorSetLayout:: + The handle of the object to destroy. + +Description +----------- + +fname:vkDestroyDescriptorSetLayout destroys the descriptor set layout object whose handle +is specified in pname:descriptorSetLayout. pname:descriptorSetLayout must be a valid handle +to fence object created through a successful call to flink:vkCreateDescriptorSetLayout on +pname:device. Attempts to destroy code:VK_NULL_HANDLE are silently ignored. After a +descriptor set object has been destroyed, its handle becomes invalid and must not be accessed +again. + +include::../validity/protos/vkDestroyDescriptorSetLayout.txt[] + +See Also +-------- + +flink:vkCreateDescriptorSetLayout + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkDestroyDevice.txt b/doc/specs/vulkan/man/vkDestroyDevice.txt new file mode 100644 index 00000000..f80b18ed --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyDevice.txt @@ -0,0 +1,35 @@ +vkDestroyDevice(3) +================== + +Name +---- +vkDestroyDevice - Destroy a logical device. + +C Specification +--------------- + +include::../protos/vkDestroyDevice.txt[] + +Parameters +---------- + +pname:device:: + A handle to the logical device to destroy. + +Description +----------- + +fname:vkDestroyDevice destroys a logical device. It does not destroy any resources created +by or associated with the device. If those resources are not destroyed, they may be leaked. +Therefore, applications should ensure that all objects created through the logical device +have been destroyed before destroying the device itself. Attempts to destroy code:VK_NULL_HANDLE +are silently ignored. + +include::../validity/protos/vkDestroyDevice.txt[] + +See Also +-------- + +flink:vkCreateDevice, flink:vkDestroyDevice + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkDestroyEvent.txt b/doc/specs/vulkan/man/vkDestroyEvent.txt new file mode 100644 index 00000000..906d2a47 --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyEvent.txt @@ -0,0 +1,39 @@ +vkDestroyEvent(3) +================= + +Name +---- +vkDestroyEvent - Destroy an event object + +C Specification +--------------- + +include::../protos/vkDestroyEvent.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:event:: + The handle of the object to destroy. + +Description +----------- + +fname:vkDestroyEvent destroys the event object whose handle is specified in +pname:event. pname:event must be a valid handle to event object created +through a successful call to flink:vkCreateEvent on pname:device. Attempts to destroy +code:VK_NULL_HANDLE are silently ignored. After a event object has been destroyed, +its handle becomes invalid and must not be accessed again. Results are undefined +if a command buffer is waiting on a event when the event is destroyed. + +include::../validity/protos/vkDestroyEvent.txt[] + +See Also +-------- + +flink:vkCreateEvent + +include::footer.txt[] \ No newline at end of file diff --git a/doc/specs/vulkan/man/vkDestroyFence.txt b/doc/specs/vulkan/man/vkDestroyFence.txt new file mode 100644 index 00000000..d357ad2d --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyFence.txt @@ -0,0 +1,39 @@ +vkDestroyFence(3) +================= + +Name +---- +vkDestroyFence - Destroy a fence object + +C Specification +--------------- + +include::../protos/vkDestroyFence.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:fence:: + The handle of the object to destroy. + +Description +----------- + +fname:vkDestroyFence destroys the fence object whose handle is specified in +pname:fence. pname:fence must be a valid handle to fence object created +through a successful call to flink:vkCreateFence on pname:device. Attempts to destroy +code:VK_NULL_HANDLE are silently ignored. After a fence object has been destroyed, +its handle becomes invalid and must not be accessed again. Results are undefined +if another thread is waiting on a fence when the fence is destroyed. + +include::../validity/protos/vkDestroyFence.txt[] + +See Also +-------- + +flink:vkCreateFence + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkDestroyFramebuffer.txt b/doc/specs/vulkan/man/vkDestroyFramebuffer.txt new file mode 100644 index 00000000..037073f9 --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyFramebuffer.txt @@ -0,0 +1,38 @@ +vkDestroyFramebuffer(3) +======================= + +Name +---- +vkDestroyFramebuffer - Destroy a framebuffer object + +C Specification +--------------- + +include::../protos/vkDestroyFramebuffer.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:framebuffer:: + The handle of the object to destroy. + +Description +----------- + +fname:vkDestroyFramebuffer destroys the framebuffer object whose handle is specified in +pname:framebuffer. pname:framebuffer must be a valid handle to framebuffer object created +through a successful call to flink:vkCreateFramebuffer on pname:device. Attempts to destroy +code:VK_NULL_HANDLE are silently ignored. After a framebuffer object has been destroyed, +its handle becomes invalid and must not be accessed again. + +include::../validity/protos/vkDestroyFramebuffer.txt[] + +See Also +-------- + +flink:vkCreateFramebuffer + +include::footer.txt[] \ No newline at end of file diff --git a/doc/specs/vulkan/man/vkDestroyImage.txt b/doc/specs/vulkan/man/vkDestroyImage.txt new file mode 100644 index 00000000..2c64a698 --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyImage.txt @@ -0,0 +1,39 @@ +vkDestroyImage(3) +================= + +Name +---- +vkDestroyImage - Destroy an image object + +C Specification +--------------- + +include::../protos/vkDestroyImage.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:image:: + The handle of the object to destroy. + +Description +----------- + +fname:vkDestroyImage destroys the image object whose handle is specified in +pname:image. pname:image must be a valid handle to an image object created +through a successful call to flink:vkCreateImage on pname:device. Attempts to destroy +code:VK_NULL_HANDLE are silently ignored. After an image has been destroyed, +its handle becomes invalid and must not be accessed again. Additionally, views of +images immediately become invalid once the parent image has been destroyed. + +include::../validity/protos/vkDestroyImage.txt[] + +See Also +-------- + +flink:vkCreateImage + +include::footer.txt[] \ No newline at end of file diff --git a/doc/specs/vulkan/man/vkDestroyImageView.txt b/doc/specs/vulkan/man/vkDestroyImageView.txt new file mode 100644 index 00000000..0344a9ef --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyImageView.txt @@ -0,0 +1,38 @@ +vkDestroyImageView(3) +===================== + +Name +---- +vkDestroyImageView - Destroy an image view object + +C Specification +--------------- + +include::../protos/vkDestroyImageView.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:imageView:: + The handle of the image view object to destroy. + +Description +----------- + +fname:vkDestroyImageView destroys the image view object whose handle is specified in +pname:imageView. pname:imageView must be a valid handle to an image view object created +through a successful call to flink:vkCreateImageView on pname:device. Attempts to destroy +code:VK_NULL_HANDLE are silently ignored. After an image view has been destroyed, +its handle becomes invalid and must not be accessed again. + +include::../validity/protos/vkDestroyImageView.txt[] + +See Also +-------- + +flink:vkCreateImage, flink:vkDestroyImage, flink:vkCreateImageView + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkDestroyInstance.txt b/doc/specs/vulkan/man/vkDestroyInstance.txt new file mode 100644 index 00000000..d3dfff00 --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyInstance.txt @@ -0,0 +1,35 @@ +vkDestroyInstance(3) +==================== + +Name +---- +vkDestroyInstance - Destroy an instance of Vulkan. + +C Specification +--------------- + +include::../protos/vkDestroyInstance.txt[] + +Parameters +---------- + +pname:instance:: + Vulkan instance to release. + +Description +----------- + +fname:vkDestroyInstance destroys an instance of Vulkan. After destruction of the instance, +all devices (logical and physical) and any objects created by those devices become in valid +and should not be accessed. However, objects allocated directly or indirectly through +the instance are not destroyed automatically and so may be leaked. Applications should destroy +all objects created through pname:instance before destroying the instance itself. + +include::../validity/protos/vkDestroyInstance.txt[] + +See Also +-------- + +flink:vkCreateInstance, flink:vkCreateDevice, flink:vkDestroyDevice + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkDestroyPipeline.txt b/doc/specs/vulkan/man/vkDestroyPipeline.txt new file mode 100644 index 00000000..c585d85c --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyPipeline.txt @@ -0,0 +1,39 @@ +vkDestroyPipeline(3) +==================== + +Name +---- +vkDestroyPipeline - Destroy a pipeline object + +C Specification +--------------- + +include::../protos/vkDestroyPipeline.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:pipeline:: + The handle of the object to destroy. + +Description +----------- + +fname:vkDestroyPipeline destroys the pipeline object whose handle is specified +in pname:pipeline. pname:pipeline must be a valid handle to a pipeline created through +a successful call to flink:vkCreateGraphicsPipelines or flink:vkCreateComputePipelines +on pname:device. Attempts to destroy code:VK_NULL_HANDLE are silently ignored. +Once a pipeline has been destroyed, its handle becomes invalid and must not be accessed +again. + +include::../validity/protos/vkDestroyPipeline.txt[] + +See Also +-------- + +flink:vkCreateGraphicsPipelines, flink:vkCreateComputePipelines + +include::footer.txt[] \ No newline at end of file diff --git a/doc/specs/vulkan/man/vkDestroyPipelineCache.txt b/doc/specs/vulkan/man/vkDestroyPipelineCache.txt new file mode 100644 index 00000000..e1c80554 --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyPipelineCache.txt @@ -0,0 +1,38 @@ +vkDestroyPipelineCache(3) +========================= + +Name +---- +vkDestroyPipelineCache - Destroy a pipeline cache object + +C Specification +--------------- + +include::../protos/vkDestroyPipelineCache.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:pipelineCache:: + The handle of the object to destroy. + +Description +----------- + +fname:vkDestroyPipelineCache destroys the pipeline cache object whose handle is specified in +pname:pipelineCache, which must be a valid handle to a pipeline cache object that was created +by a successful call to flink:vkCreatePipelineCache on pname:device. Attempts to destroy +code:VK_NULL_HANDLE are silently ignored. After a pipeline cache has been destroyed, +its handle becomes invalid and should not be accessed again. + +include::../validity/protos/vkDestroyPipelineCache.txt[] + +See Also +-------- + +flink:vkCreatePipelineCache, flink:vkGetPipelineCacheData, flink:vkMergePipelineCaches + +include::footer.txt[] \ No newline at end of file diff --git a/doc/specs/vulkan/man/vkDestroyPipelineLayout.txt b/doc/specs/vulkan/man/vkDestroyPipelineLayout.txt new file mode 100644 index 00000000..489b75b9 --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyPipelineLayout.txt @@ -0,0 +1,37 @@ +vkDestroyPipelineLayout(3) +========================== + +Name +---- +vkDestroyPipelineLayout - Destroy a pipeline layout object + +C Specification +--------------- + +include::../protos/vkDestroyPipelineLayout.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:pipelineLayout:: + The handle of the object to destroy. + +Description +----------- + +fname:vkDestroyPipelineLayout destroys the pipeline layout object whose handle is specified in +pname:pipelineLayout, which must be a valid handle to a pipeline layout that was created by +pname:device. Attempts to destroy code:VK_NULL_HANDLE are silently ignored. After a pipeline layout +has been destroyed, its handle becomes invalid and should not be accessed again. + +include::../validity/protos/vkDestroyPipelineLayout.txt[] + +See Also +-------- + +flink:vkCreatePipelineLayout + +include::footer.txt[] \ No newline at end of file diff --git a/doc/specs/vulkan/man/vkDestroyQueryPool.txt b/doc/specs/vulkan/man/vkDestroyQueryPool.txt new file mode 100644 index 00000000..eecbfdc6 --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyQueryPool.txt @@ -0,0 +1,37 @@ +vkDestroyQueryPool(3) +===================== + +Name +---- +vkDestroyQueryPool - Destroy a query pool object + +C Specification +--------------- + +include::../protos/vkDestroyQueryPool.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:queryPool:: + The handle of the object to destroy. + +Description +----------- + +fname:vkDestroyQueryPool destroys the query pool whose handle is specified in pname:queryPool, +which must be a valid handle to a query pool that was created by pname:device. Attempts to +destroy code:VK_NULL_HANDLE are silently ignored. After a query pool has been destroyed, +its handle becomes invalid and should not be accessed again. + +include::../validity/protos/vkDestroyQueryPool.txt[] + +See Also +-------- + +flink:vkCreateQueryPool, flink:vkCmdResetQueryPool, flink:vkCmdBeginQuery, flink:vkCmdEndQuery, flink:vkCmdCopyQueryPoolResults, flink:vkGetQueryPoolResults + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkDestroyRenderPass.txt b/doc/specs/vulkan/man/vkDestroyRenderPass.txt new file mode 100644 index 00000000..96aab01a --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyRenderPass.txt @@ -0,0 +1,37 @@ +vkDestroyRenderPass(3) +====================== + +Name +---- +vkDestroyRenderPass - Destroy a render pass object + +C Specification +--------------- + +include::../protos/vkDestroyRenderPass.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:renderPass:: + The handle of the object to destroy. + +Description +----------- + +fname:vkDestroyRenderPass destroys the render pass whose handle is specified in pname:renderPass, +which must be a valid handle to a render pass that was created by pname:device. Attempts to +destroy code:VK_NULL_HANDLE are silently ignored. After a render pass has been destroyed, +its handle becomes invalid and should not be accessed again. + +include::../validity/protos/vkDestroyRenderPass.txt[] + +See Also +-------- + +flink:vkCreateRenderPass + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkDestroySampler.txt b/doc/specs/vulkan/man/vkDestroySampler.txt new file mode 100644 index 00000000..7f88e51a --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroySampler.txt @@ -0,0 +1,37 @@ +vkDestroySampler(3) +=================== + +Name +---- +vkDestroySampler - Destroy a sampler object + +C Specification +--------------- + +include::../protos/vkDestroySampler.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:sampler:: + The handle of the object to destroy. + +Description +----------- + +fname:vkDestroySampler destroys the sampler whose handle is specified in pname:sampler, +which must be a valid handle to a sampler that was created by pname:device. Attempts to +destroy code:VK_NULL_HANDLE are silently ignored. After a sampler has been destroyed, +its handle becomes invalid and should not be accessed again. + +include::../validity/protos/vkDestroySampler.txt[] + +See Also +-------- + +flink:vkCreateSampler + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkDestroySemaphore.txt b/doc/specs/vulkan/man/vkDestroySemaphore.txt new file mode 100644 index 00000000..d7f37a2c --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroySemaphore.txt @@ -0,0 +1,38 @@ +vkDestroySemaphore(3) +===================== + +Name +---- +vkDestroySemaphore - Destroy a semaphore object + +C Specification +--------------- + +include::../protos/vkDestroySemaphore.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:semaphore:: + The handle of the object to destroy. + +Description +----------- + +fname:vkDestroySemaphore destroys the semaphore whose handle is specified in +pname:semaphore, which must be a valid handle to a semaphore that was created +by device pname:device. Attempts to destroy code:VK_NULL_HANDLE are silently +ignored. Once a semaphore has been destroyed, its handle becomes invalid and +must not be reused. + +include::../validity/protos/vkDestroySemaphore.txt[] + +See Also +-------- + +flink:vkCreateSemaphore + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkDestroyShaderModule.txt b/doc/specs/vulkan/man/vkDestroyShaderModule.txt new file mode 100644 index 00000000..cb960854 --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroyShaderModule.txt @@ -0,0 +1,37 @@ +vkDestroyShaderModule(3) +======================== + +Name +---- +vkDestroyShaderModule - Destroy a shader module module + +C Specification +--------------- + +include::../protos/vkDestroyShaderModule.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the object. + +pname:shaderModule:: + The handle of the object to destroy. + +Description +----------- + +fname:vkDestroyShaderModule destroys the shader module specified in pname:shaderModule, +which must be a valid handle to a shader module owned by pname:device. An attempt to destroy +the code:VK_NULL_HANDLE handle are silently ignored. After the shader module has been +destroyed its handle becomes invalid and it should not be accessed again. + +include::../validity/protos/vkDestroyShaderModule.txt[] + +See Also +-------- + +flink:vkCreateShaderModule, flink:vkCreateShader, flink:vkDestroyShader + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkDestroySurfaceKHR.txt b/doc/specs/vulkan/man/vkDestroySurfaceKHR.txt new file mode 100644 index 00000000..43df65ca --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroySurfaceKHR.txt @@ -0,0 +1,40 @@ +vkDestroySurfaceKHR(3) +===================== + +Name +---- +vkDestroySurfaceKHR - destroy a VkSurfaceKHR object. + +C Specification +--------------- + +include::../protos/vkDestroySurfaceKHR.txt[] + +Parameters +---------- + +pname:instance:: + The instance used to create the surface. + +pname:pSurface:: + The handle of the surface to destroy. + +pname:pAllocator:: + The allocator used for host memory allocated for the surface object. + +Description +----------- + +fname:vkDestroySurfaceKHR destroys the VkSurface object. + +include::../validity/protos/vkDestroySurfaceKHR.txt[] + +See Also +-------- + +flink:vkCreateAndroidSurfaceKHR, flink:vkCreateDisplayPlaneSurfaceKHR, +flink:vkCreateMirSurfaceKHR, flink:vkCreateWaylandSurfaceKHR, +flink:vkCreateWin32SurfaceKHR, flink:vkCreateXcbSurfaceKHR, +flink:vkCreateXlibSurfaceKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkDestroySwapchainKHR.txt b/doc/specs/vulkan/man/vkDestroySwapchainKHR.txt new file mode 100644 index 00000000..b0649745 --- /dev/null +++ b/doc/specs/vulkan/man/vkDestroySwapchainKHR.txt @@ -0,0 +1,39 @@ +vkDestroySwapchainKHR(3) +======================= + +Name +---- +vkDestroySwapchainKHR - destroy a swapchain object. + +C Specification +--------------- + +include::../protos/vkDestroySwapchainKHR.txt[] + +Parameters +---------- + +pname:device:: + The VkDevice associated with the swapchain. + +pname:pSwapchain:: + The swapchain to destroy. + +pname:pAllocator:: + The allocator used for host memory allocated for the swapchain object. + +Description +----------- + +fname:vkDestroySwapchainKHR destroys a swapchain. + +include::../validity/protos/vkDestroySwapchainKHR.txt[] + +See Also +-------- + +flink:vkCreateSwapchainKHR, flink:vkCreateSharedSwapchainsKHR, +flink:vkGetSwapchainImagesKHR, flink:vkAcquireNextImageKHR, +flink:vkQueuePresentKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkDeviceWaitIdle.txt b/doc/specs/vulkan/man/vkDeviceWaitIdle.txt new file mode 100644 index 00000000..ceeb0a23 --- /dev/null +++ b/doc/specs/vulkan/man/vkDeviceWaitIdle.txt @@ -0,0 +1,33 @@ +vkDeviceWaitIdle(3) +==================== + +Name +---- +vkDeviceWaitIdle - Wait for a device to become idle. + +C Specification +--------------- + +include::../protos/vkDeviceWaitIdle.txt[] + +Parameters +---------- + +pname:device:: + The handle to the device to idle. + +Description +----------- + +fname:vkDeviceWaitIdle waits for the device specified by pname:device to complete all work submitted +by the application and become idle. It is logically equivalent to calling flink:vkQueueWaitIdle +on all queues associated with the device. + +include::../validity/protos/vkDeviceWaitIdle.txt[] + +See Also +-------- + +flink:vkQueueWaitIdle + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkEndCommandBuffer.txt b/doc/specs/vulkan/man/vkEndCommandBuffer.txt new file mode 100644 index 00000000..07be3d3a --- /dev/null +++ b/doc/specs/vulkan/man/vkEndCommandBuffer.txt @@ -0,0 +1,36 @@ +vkEndCommandBuffer(3) +===================== + +Name +---- +vkEndCommandBuffer - Finish recording a command buffer + +C Specification +--------------- + +include::../protos/vkEndCommandBuffer.txt[] + +Parameters +---------- + +pname:commandBuffer:: + A handle to the command buffer for which recording is to end. + +Description +----------- + +fname:vkEndCommandBuffer ends the recording of a command buffer. The command buffer +must be in the recording state. After recording of a primary command buffer is completed, it +may be submitted to a queue using flink:vkQueueSubmit. After recording of a secondary +command buffer is completed, it may be called from a primary command buffer by a call +to flink:vkCmdExecuteCommands. No further modification to a completed command buffer may +be performed until flink:vkResetCommandBuffer is called on it. + +include::../validity/protos/vkEndCommandBuffer.txt[] + +See Also +-------- + +flink:vkAllocateCommandBuffers, flink:vkFreeCommandBuffers, flink:vkBeginCommandBuffer, flink:vkResetCommandBuffer, flink:vkCmdExecuteCommands + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkEnumerateDeviceExtensionProperties.txt b/doc/specs/vulkan/man/vkEnumerateDeviceExtensionProperties.txt new file mode 100644 index 00000000..a46aaa53 --- /dev/null +++ b/doc/specs/vulkan/man/vkEnumerateDeviceExtensionProperties.txt @@ -0,0 +1,53 @@ +vkEnumerateDeviceExtensionProperties(3) +========================================= + +Name +---- +vkEnumerateDeviceExtensionProperties - Returns properties of available physical device extensions. + +C Specification +--------------- + +include::../protos/vkEnumerateDeviceExtensionProperties.txt[] + +Parameters +---------- + +pname:physicalDevice:: + Physical device to query. + +pname:pLayerName:: + Optional layer name to query. + +pname:pPropertyCount:: + Count indicating number of sname:VkExtensionProperties pointed to by + pname:pProperties. + +pname:pProperties:: + Pointer to an array of sname:VkExtensionProperties. + +Description +----------- + +fname:vkEnumerateDeviceExtensionProperties retrieves properties for +extensions on a physical device whose handle is given in +pname:physicalDevice. To determine the extensions implemented by a layer set +pname:pLayerName to point to the layer's name and any returned extensions +are implemented by that layer. Setting pname:pLayerName to NULL will return +the available non-layer extensions. pname:pPropertyCount must be set to the +size of the VkExtensionProperties array pointed to by pname:pProperties. The +pname:pProperties should point to an array of VkExtensionProperties to be +filled out or null. If null, fname:vkEnumerateDeviceExtensionProperties will +update pPropertyCount with the number of extensions found. The definition of +slink:VkExtensionProperties is as follows: + +include::../structs/VkExtensionProperties.txt[] + +include::../validity/protos/vkEnumerateDeviceExtensionProperties.txt[] + +See Also +-------- + +flink:vkEnumerateDeviceLayerProperties, flink:vkCreateDevice + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkEnumerateDeviceLayerProperties.txt b/doc/specs/vulkan/man/vkEnumerateDeviceLayerProperties.txt new file mode 100644 index 00000000..47375996 --- /dev/null +++ b/doc/specs/vulkan/man/vkEnumerateDeviceLayerProperties.txt @@ -0,0 +1,48 @@ +vkEnumerateDeviceLayerProperties(3) +===================================== + +Name +---- +vkEnumerateDeviceLayerProperties - Returns properties of available physical device layers. + +C Specification +--------------- + +include::../protos/vkEnumerateDeviceLayerProperties.txt[] + +Parameters +---------- + +pname:physicalDevice:: + Physical device to query. + +pname:pPropertyCount:: + Count indicating number of sname:VkLayerProperties pointed to by + pname:pProperties. + +pname:pProperties:: + Pointer to an array of sname:VkLayerProperties. + +Description +----------- + +fname:vkEnumerateDeviceLayerProperties retrieves properties for layers on a +physical device whose handle is given in pname:physicalDevice. +pname:pPropertyCount must be a valid pointer to an integer set to the size +of the slink:VkLayerProperties array pointed to by pname:pProperties. +pname:pProperties must be code:NULL or a pointer to an array of +slink:VkLayerProperties to be filled out. If code:NULL, +fname:vkEnumerateDeviceLayerProperties will update pname:pPropertyCount with +the number of layers found. The definition of slink:VkLayerProperties is as +follows: + +include::../structs/VkLayerProperties.txt[] + +include::../validity/protos/vkEnumerateDeviceLayerProperties.txt[] + +See Also +-------- + +flink:vkEnumerateDeviceLayerProperties, flink:vkCreateDevice + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkEnumerateInstanceExtensionProperties.txt b/doc/specs/vulkan/man/vkEnumerateInstanceExtensionProperties.txt new file mode 100644 index 00000000..c6444e38 --- /dev/null +++ b/doc/specs/vulkan/man/vkEnumerateInstanceExtensionProperties.txt @@ -0,0 +1,57 @@ +vkEnumerateInstanceExtensionProperties(3) +========================================= + +Name +---- +vkEnumerateInstanceExtensionProperties - Returns up to requested number of global extension properties. + +C Specification +--------------- + +include::../protos/vkEnumerateInstanceExtensionProperties.txt[] + +Parameters +---------- + +pname:pLayerName:: + Pointer to optional layer name. If not null, will only return extension + properties for the requested layer. + +pname:pPropertyCount:: + Pointer to count indicating space available on input and structures + returned on output. + +pname:pProperties:: + Pointer to a data structure to receive the results. + +Description +----------- + +fname:vkEnumerateInstanceExtensionProperties retrieves properties for global +extensions of the loader or the optionally specified layer. +pname:pProperties points to an array of sname:VkExtensionProperties where +the return data will be stored. If NULL, +fname:vkEnumerateInstanceExtensionProperties will update the count with the +number of global extensions found. pname:pPropertyCount must point to a +count indicating the number of sname:VkExtensionProperties structures +available. The definition of slink:VkExtensionProperties is as follows: + +include::../structs/VkExtensionProperties.txt[] + +include::../validity/protos/vkEnumerateInstanceExtensionProperties.txt[] + +Return Value +------------ + +Upon success, fname:vkEnumerateInstanceExtensionProperties returns ename:VK_SUCCESS or ename:VK_INCOMPLETE. +ename:VK_INCOMPLETE indicates that the number of extension properties found exceeds the given count. An app +will need to call again with a larger array and count to get all available extension properties. +The number of available extensions could change from one call to the next if an application +updates or installs Vulkan components. + +See Also +-------- + +flink:vkEnumerateInstanceLayerProperties.txt, flink:vkCreateInstance.txt + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkEnumerateInstanceLayerProperties.txt b/doc/specs/vulkan/man/vkEnumerateInstanceLayerProperties.txt new file mode 100644 index 00000000..7f20c50b --- /dev/null +++ b/doc/specs/vulkan/man/vkEnumerateInstanceLayerProperties.txt @@ -0,0 +1,44 @@ +vkEnumerateInstanceLayerProperties(3) +===================================== + +Name +---- +vkEnumerateInstanceLayerProperties - Returns up to requested number of global layer properties. + +C Specification +--------------- + +include::../protos/vkEnumerateInstanceLayerProperties.txt[] + +Parameters +---------- + +pname:pPropertyCount:: + Pointer to count indicating space available on input and structures + returned on output. + +pname:pProperties:: + Pointer to a array to receive the results. + +Description +----------- + +fname:vkEnumerateInstanceLayerProperties retrieves properties for global layers. +pname:pPropertyCount must be a valid pointer to an integer set to the size +of the slink:VkLayerProperties array pointed to by pname:pProperties. +pname:pProperties must be code:NULL or a pointer to an array of +slink:VkLayerProperties to be filled out. If code:NULL, +fname:vkEnumerateInstanceLayerProperties will update pname:pPropertyCount +with the number of layers found. The definition of slink:VkLayerProperties +is as follows: + +include::../structs/VkLayerProperties.txt[] + +include::../validity/protos/vkEnumerateInstanceLayerProperties.txt[] + +See Also +-------- + +flink:vkEnumerateInstanceExtensionProperties.txt, flink:vkCreateInstance + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkEnumeratePhysicalDevices.txt b/doc/specs/vulkan/man/vkEnumeratePhysicalDevices.txt new file mode 100644 index 00000000..f51f0136 --- /dev/null +++ b/doc/specs/vulkan/man/vkEnumeratePhysicalDevices.txt @@ -0,0 +1,53 @@ +vkEnumeratePhysicalDevices(3) +============================= + +Name +---- +vkEnumeratePhysicalDevices - Enumerates the physical devices accessible to a Vulkan instance. + +C Specification +--------------- + +include::../protos/vkEnumeratePhysicalDevices.txt[] + +Parameters +---------- + +pname:instance:: + A handle to the instance to be used to enumerate devices. + +pname:pPhysicalDeviceCount:: + A pointer to a variable containing the maximum number of devices to enumerate. + +pname:pPhysicalDevices:: + A pointer to an array that will be filled with handles to the enumerated devices. + +Description +----------- + +fname:vkEnumeratePhysicalDevices generates a list of the physical devices accessible to the +instance of Vulkan specified in pname:instance. + +pname:pPhysicalDeviceCount is a pointer to a variable which contains the number of devices to +enumerate. pname:pPhysicalDeviceCount must not be code:NULL. pname:pPhysicalDevices is a +pointer to an array of sname:VkPhysicalDevice handles which will be filled with handles +to the enumerated devices. + +If pname:pPhysicalDevices is code:NULL, then the initial value of the variable pointed to +by pname:pPhysicalDeviceCount is ignored and this variable is overwritten with the number of +physical devices accessible to pname:instance. + +If pname:pPhysicalDevices is not code:NULL, then pname:pPhysicalDeviceCount should point +to a variable that has been initialized with the size of the array pointed to by pname:pPhysicalDevices. +No more than this number of physical device handles will be written into the output array. +The actual number of device handles written into pname:pPhysicalDevices is then written into +the variable pointed to pname:pPhysicalDevices. + +include::../validity/protos/vkEnumeratePhysicalDevices.txt[] + +See Also +-------- + +flink:vkGetPhysicalDeviceFeatures, flink:vkCreateDevice + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkFlushMappedMemoryRanges.txt b/doc/specs/vulkan/man/vkFlushMappedMemoryRanges.txt new file mode 100644 index 00000000..bfe15049 --- /dev/null +++ b/doc/specs/vulkan/man/vkFlushMappedMemoryRanges.txt @@ -0,0 +1,57 @@ +vkFlushMappedMemoryRanges(3) +============================ + +Name +---- +vkFlushMappedMemoryRanges - Flush mapped memory ranges. + +C Specification +--------------- + +include::../protos/vkFlushMappedMemoryRanges.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the specified memory ranges. + +pname:memoryRangeCount:: + Number of memory ranges described by pname:pMemoryRanges. + +pname:pMemoryRanges:: + Mapped memory ranges to flush. + +Description +----------- + +fname:vkFlushMappedMemoryRanges flushes zero more more ranges of a mapped memory objects. pname:device +is a handle to the device that owns the memory objects to be flushed. pname:memoryRangeCount is +the number of ranges to flush and pname:pMemoryRanges points to an array of pname:memoryRangeCount +instances of the slink:VkMappedMemoryRange structure, each defining a region of memory +to flush. The definition of slink:VkMappedMemoryRange is: + +include::../structs/VkMappedMemoryRange.txt[] + +For each element of the pname:pMemoryRanges array, pname:memory is the memory object containing +the mapped range, pname:offset is the location of the start of the range within pname:memory, +and pname:size is the size of the region to flush. Both pname:offset and pname:size are +specified in bytes. + +If any referenced region of the memory object is not mapped or extends beyond the bounds of the memory +object then the command has no effect on that region, but is still honored for other regions in +the array. Multiple regions inside the same memory object may be contained in pname:pMemoryRanges, +including ranges that overlap one another. + +Flushing memory ranges ensures that any writes performed by the host become visible to commands +subsequently executing on devices with references to that memory. fname:vkFlushMappedMemoryRanges +has no effect with respect to writes performed by the device. + +include::../validity/protos/vkFlushMappedMemoryRanges.txt[] + +See Also +-------- + +flink:vkMapMemory, flink:vkUnmapMemory, flink:vkAllocateMemory, flink:vkFreeMemory + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkFreeCommandBuffers.txt b/doc/specs/vulkan/man/vkFreeCommandBuffers.txt new file mode 100644 index 00000000..efdd3c3e --- /dev/null +++ b/doc/specs/vulkan/man/vkFreeCommandBuffers.txt @@ -0,0 +1,53 @@ +vkFreeCommandBuffers(3) +======================= + +Name +---- +vkFreeCommandBuffers - Free command buffers. + +C Specification +--------------- + +include::../protos/vkFreeCommandBuffers.txt[] + +Parameters +---------- + +pname:device:: + A handle to the device that owns the command pool and command buffers referenced by the command. + +pname:commandPool:: + A handle to the command pool which owns the command buffers. + +pname:commandBufferCount:: + The number of command buffers to free. + +pname:pCommandBuffers:: + A pointer to an array of handles to the command buffers to free. + +Description +----------- + +fname:vkFreeCommandBuffers frees pname:commandBufferCount command buffers, returning their +resources to the pool specified in pname:commandPool. pname:pCommandBuffers is a pointer to an +array of pname:commandBufferCount basetype:VkCommandBuffer handles to the command buffers +to free. Each command buffer in the array must have been allocated from the pool specified +in pname:commandPool through a call to flink:vkAllocateCommandBuffers. pname:device must be a +handle to the device that owns both pname:commandPool and all of the command buffers referenced +from the array pointed to by pname:pCommandBuffers. + +After command buffers are freed, they may not be referenced again. A command buffer must not +be freed while it is in flight. + +include::../validity/protos/vkFreeCommandBuffers.txt[] + +See Also +-------- + +flink:vkAllocateCommandBuffers, +flink:vkResetCommandBuffer, +flink:vkBeginCommandBuffer, +flink:vkEndCommandBuffer, +flink:vkQueueSubmit + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkFreeDescriptorSets.txt b/doc/specs/vulkan/man/vkFreeDescriptorSets.txt new file mode 100644 index 00000000..718a2c4b --- /dev/null +++ b/doc/specs/vulkan/man/vkFreeDescriptorSets.txt @@ -0,0 +1,51 @@ +vkFreeDescriptorSets(3) +======================= + +Name +---- +vkFreeDescriptorSets - Free one or more descriptor sets + +C Specification +--------------- + +include::../protos/vkFreeDescriptorSets.txt[] + +Parameters +---------- + +pname:device:: + The device that owns the descriptor sets. + +pname:descriptorPool:: + The descriptor pool that the descriptor sets were allocated from. + +pname:descriptorSetCount:: + The number of descriptor sets to free. + +pname:pDescriptorSets:: + An array of pname:descriptorSetCount variables containing the descriptor + set handles to free. + +Description +----------- + +fname:vkFreeDescriptorSets frees descriptor sets. pname:device is a handle +to the device that owns the descriptor pool specified in +pname:descriptorPool, which must be the pool from which the sets were +allocated. Freeing a descriptor set returns its descriptors to the pool from +which it was allocated but does not necessarily free resources associated +with the set. pname:pDescriptorSets is a pointer to an array of descriptor +set handles returned from previous calls to flink:vkAllocateDescriptorSets. +pname:descriptorSetCount specifies the number of descriptor set handles in +the pname:pDescriptorSets array. + +To actually free resources associated with descriptor pools, call flink:vkDestroyDescriptorPool. + +include::../validity/protos/vkFreeDescriptorSets.txt[] + +See Also +-------- + +flink:vkAllocateDescriptorSets, flink:vkCreateDescriptorPool, flink:vkDestroyDescriptorPool. + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkFreeMemory.txt b/doc/specs/vulkan/man/vkFreeMemory.txt new file mode 100644 index 00000000..87bf78c3 --- /dev/null +++ b/doc/specs/vulkan/man/vkFreeMemory.txt @@ -0,0 +1,37 @@ +vkFreeMemory(3) +================ + +Name +---- +vkFreeMemory - Free GPU memory + +C Specification +--------------- + +include::../protos/vkFreeMemory.txt[] + +Parameters +---------- + +pname:device:: + The logical device which owns the memory object. + +pname:mem:: + The memory object to free. + +Description +----------- + +fname:vkFreeMemory frees the memory object whose handle is given in pname:mem. After the memory is freed, +pname:mem becomes invalid and should no longer be used. Further, any resource to which the memory is +bound become invalid and should not be referenced. Such objects should be destroyed or rebound to a new +memory object (if allowed). + +include::../validity/protos/vkFreeMemory.txt[] + +See Also +-------- + +flink:vkAllocateMemory + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetBufferMemoryRequirements.txt b/doc/specs/vulkan/man/vkGetBufferMemoryRequirements.txt new file mode 100644 index 00000000..74fa4767 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetBufferMemoryRequirements.txt @@ -0,0 +1,51 @@ +vkGetBufferMemoryRequirements(3) +================================ + +Name +---- +vkGetBufferMemoryRequirements - Returns the memory requirements for specified Vulkan object. + +C Specification +--------------- + +include::../protos/vkGetBufferMemoryRequirements.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns pname:buffer. + +pname:buffer:: + Object to query. + +pname:pMemoryRequirements:: + Pointer to a data structure to receive the result of the query. + +Description +----------- + +fname:vkGetBufferMemoryRequirements retrieves memory requirements for the buffer whose handle is +given in pname:buffer. The pname:pMemoryRequirements parameter should point to an instance +of an slink:VkMemoryRequirements structure which will be filled with the memory requirements of the +buffer object. The definition of slink:VkMemoryRequirements is as follows: + +include::../structs/VkMemoryRequirements.txt[] + +The pname:size member of slink:VkMemoryRequirements reports the size of the memory allocation, measured +in bytes, required by the buffer. pname:alignment reports the required alignment of the memory allocation, +also measured in bytes. When memory is bound to the buffer object, the offset of the range within +the memory object must be an integer multiple of this value. The pname:memoryTypeBits member is a +bitfield with each set bit representing a valid memory type. Memory types for a device may be +determined by calling flink:vkGetPhysicalDeviceMemoryProperties. The least significant bit +if pname:memoryTypeBits represents the first memory type returned from +flink:vkGetPhysicalDeviceMemoryProperties, the next bit represents the second memory type and so on. + +include::../validity/protos/vkGetBufferMemoryRequirements.txt[] + +See Also +-------- + +flink:vkBindImageMemory + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetDeviceMemoryCommitment.txt b/doc/specs/vulkan/man/vkGetDeviceMemoryCommitment.txt new file mode 100644 index 00000000..fd6fb35b --- /dev/null +++ b/doc/specs/vulkan/man/vkGetDeviceMemoryCommitment.txt @@ -0,0 +1,41 @@ +vkGetDeviceMemoryCommitment(3) +============================== + +Name +---- +vkGetDeviceMemoryCommitment - Query the current commitment for a VkDeviceMemory + +C Specification +--------------- + +include::../protos/vkGetDeviceMemoryCommitment.txt[] + +Parameters +---------- + +pname:device:: + The device object from which pname:memory was allocated. + +pname:memory:: + The device memory object to query. + +pname:pCommittedMemoryInBytes:: + Pointer to a variable which will receive the current memory commitment, in bytes. + +Description +----------- + +fname:vkGetDeviceMemoryCommitment queries the commitment status of a stext:VkDeviceMemory that +was created with the ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT set. + +The number of bytes committed for the given memory object is returned in the +pname:pCommittedMemoryInBytes pointer. + +include::../validity/protos/vkGetDeviceMemoryCommitment.txt[] + +See Also +-------- + +flink:vkGetPhysicalDeviceMemoryProperties, flink:vkAllocateMemory, flink:vkFreeMemory + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetDeviceProcAddr.txt b/doc/specs/vulkan/man/vkGetDeviceProcAddr.txt new file mode 100644 index 00000000..7d0aa915 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetDeviceProcAddr.txt @@ -0,0 +1,50 @@ +vkGetDeviceProcAddr(3) +======================= + +Name +---- +vkGetDeviceProcAddr - Return a function pointer for a command + +C Specification +--------------- + +include::../protos/vkGetDeviceProcAddr.txt[] + +Parameters +---------- + +pname:device:: + The VkDevice whose function pointer to query. + +pname:pName:: + The name of the command. + +Description +----------- + +fname:vkGetDeviceProcAddr returns a function pointer for the command specified +in pname:pName as it corresponds to pname:device. Depending on the operating +system, supporting components, software environment and hardware topology, the +function pointer returned for a single command name may be different for +different values of pname:device. + +Device-specific function pointers only exist for commands that take a +device-child object as their first parameter. In the core API these are +sname:VkDevice, sname:VkQueue, and sname:VkCommandBuffer, though extensions may introduce additional dispatchable device-child object types. fname:vkGetDeviceProcAddr will return code:NULL when pname:pName is not one of these commands. + +include::../validity/protos/vkGetDeviceProcAddr.txt[] + +Return Value +------------ + +Upon success, fname:vkGetDeviceProcAddr returns a function pointer +(PFN_vkVoidFunction) for the command specified in pname:pName. If +pname:pName is not supported by the device or has no corresponding +pname:device, then fname:vkGetDeviceProcAddr returns code:NULL. + +See Also +-------- + +flink:vkGetInstanceProcAddr, flink:vkCreateDevice + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetDeviceQueue.txt b/doc/specs/vulkan/man/vkGetDeviceQueue.txt new file mode 100644 index 00000000..e4bdd556 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetDeviceQueue.txt @@ -0,0 +1,43 @@ +vkGetDeviceQueue(3) +==================== + +Name +---- +vkGetDeviceQueue - Get a queue handle from a device. + +C Specification +--------------- + +include::../protos/vkGetDeviceQueue.txt[] + +Parameters +---------- + +pname:device:: + Handle to the device that is the owner of the queue. + +pname:queueFamilyIndex:: + The family index of the queue within the device. + +pname:queueIndex:: + The index of the queue within the queue family. + +pname:pQueue:: + A pointer to a variable that is to receive the resulting handle. + +Description +----------- + +fname:vkGetDeviceQueue retrieves a handle to a specified queue from the device specified in +pname:device. The queue is identified by its family index, specified in pname:queueFamilyIndex and its +index within the family, specified in pname:queueIndex. pname:pQueue is a pointer to a variable that +will receive the resulting handle. + +include::../validity/protos/vkGetDeviceQueue.txt[] + +See Also +-------- + +flink:vkGetPhysicalDeviceFeatures, flink:vkGetPhysicalDeviceQueueFamilyProperties + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetDisplayModePropertiesKHR.txt b/doc/specs/vulkan/man/vkGetDisplayModePropertiesKHR.txt new file mode 100644 index 00000000..9b2ae737 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetDisplayModePropertiesKHR.txt @@ -0,0 +1,45 @@ +vkGetDisplayModePropertiesKHR(3) +=============================== + +Name +---- +vkGetDisplayModePropertiesKHR - get the set of mode properties supported by the display. + +C Specification +--------------- + +include::../protos/vkGetDisplayModePropertiesKHR.txt[] + +Parameters +---------- + +pname:physicalDevice:: + The physical device associated with the display. + +pname:display:: + A display present on the physical device. + +pname:pPropertyCount:: + The number of entries in the array pointed to by pProperties. + +pname:pProperties:: + A pointer to an array of pPropertyCount VkDisplayModePropertiesKHR structures. + +Description +----------- + +fname:vkGetDisplayModePropertiesKHR gets the array of modes supported by the display. + +pname:pPrpoerties is an array of the slink:VkDisplayModePropertiesKHR +structure, the definition of which is: + +include::../structs/VkDisplayModePropertiesKHR.txt[] + +include::../validity/protos/vkGetDisplayModePropertiesKHR.txt[] + +See Also +-------- + +flink:vkCreateDisplayModeKHR, flink:vkGetDisplayPlaneCapabilitiesKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetDisplayPlaneCapabilitiesKHR.txt b/doc/specs/vulkan/man/vkGetDisplayPlaneCapabilitiesKHR.txt new file mode 100644 index 00000000..81ff2ae4 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetDisplayPlaneCapabilitiesKHR.txt @@ -0,0 +1,45 @@ +vkGetDisplayPlaneCapabilitiesKHR(3) +================================== + +Name +---- +vkGetDisplayPlaneCapabilitiesKHR - get the capabilities of a mode and plane combination. + +C Specification +--------------- + +include::../protos/vkGetDisplayPlaneCapabilitiesKHR.txt[] + +Parameters +---------- + +pname:physicalDevice:: + The physical device associated with the display. + +pname:mode:: + The display mode the application intends to program when using the specified plane. + +pname:planeIndex:: + The plane which the application intends to use with the display. + +pname:pCapabilities:: + A pointer to a VkDisplayPlaneCapabilitiesKHR struct. + +Description +----------- + +fname:vkGetDisplayPlaneCapabilitiesKHR gets the capabilities of a plane and its mode. + +pname:pCapabilities is an instance of the slink:VkDisplayPlaneCapabilitiesKHR +structure, the definition of which is: + +include::../structs/VkDisplayPlaneCapabilitiesKHR.txt[] + +include::../validity/protos/vkGetDisplayPlaneCapabilitiesKHR.txt[] + +See Also +-------- + +flink:vkCreateDisplayPlaneSurfaceKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetDisplayPlaneSupportedDisplaysKHR.txt b/doc/specs/vulkan/man/vkGetDisplayPlaneSupportedDisplaysKHR.txt new file mode 100644 index 00000000..44e820d7 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetDisplayPlaneSupportedDisplaysKHR.txt @@ -0,0 +1,45 @@ +vkGetDisplayPlaneSupportedDisplaysKHR(3) +======================================= + +Name +---- +vkGetDisplayPlaneSupportedDisplaysKHR - get list of displays a plane supports. + +C Specification +--------------- + +include::../protos/vkGetDisplayPlaneSupportedDisplaysKHR.txt[] + +Parameters +---------- + +pname:physicalDevice:: + A valid physical device. + +pname:planeIndex:: + The plane which the application wishes to use. + +pname:pDisplayCount:: + The number of entries in the array pointed to by pDisplays. + +pname:pDisplays:: + A pointer to an array of pDisplayCount VkDisplayKHR handles. + +Description +----------- + +fname:vkGetDisplayPlaneSupportedDisplaysKHR determine which displays a plane is usable with. + +pname:pDisplays is an instance of the slink:VkDisplayKHR +structure, the definition of which is: + +include::../structs/VkDisplayKHR.txt[] + +include::../validity/protos/vkGetDisplayPlaneSupportedDisplaysKHR.txt[] + +See Also +-------- + +flink:vkCreateDisplayPlaneSurfaceKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetEventStatus.txt b/doc/specs/vulkan/man/vkGetEventStatus.txt new file mode 100644 index 00000000..5d9a54f0 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetEventStatus.txt @@ -0,0 +1,39 @@ +vkGetEventStatus(3) +=================== + +Name +---- +vkGetEventStatus - Retrieve the status of an event object. + +C Specification +--------------- + +include::../protos/vkGetEventStatus.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the event. + +pname:event:: + A handle to the event whose status to retrieve. + +Description +----------- + +fname:vkGetEventStatus retrieves the status of the event object specified in pname:event. Event +objects cannot be directly waited for by the host although it is possible to wait within a command +buffer for an event to become signaled by calling flink:vkCmdWaitEvents. Events are set +from within a command buffer by calling flink:vkCmdSetEvent and may be reset by calling +flink:vkCmdResetEvent. On the host, events may be set and reset by calling flink:vkSetEvent +and flink:vkResetEvent, respectively. + +include::../validity/protos/vkGetEventStatus.txt[] + +See Also +-------- + +flink:vkSetEvent, flink:vkResetEvent, flink:vkCmdSetEvent, flink:vkCmdResetEvent, flink:vkCmdWaitEvents + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetFenceStatus.txt b/doc/specs/vulkan/man/vkGetFenceStatus.txt new file mode 100644 index 00000000..b0f3de91 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetFenceStatus.txt @@ -0,0 +1,52 @@ +vkGetFenceStatus(3) +==================== + +Name +---- +vkGetFenceStatus - Return the status of a fence. + +C Specification +--------------- + +include::../protos/vkGetFenceStatus.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns pname:fence. + +pname:fence:: + The fence whose status to return. + +Description +----------- + +fname:vkGetFenceStatus returns the immediate status of the fence whose handle is given in pname:fence. +Fences are initially created in the unsignaled state and are associated with submissions to queues +through a call to flink:vkQueueSubmit. Fences are signaled by the system when work invoked by +flink:vkQueueSubmit completes. Fences may subsequently be reset by calling flink:vkResetFences. +To wait for one or more fences to become signaled, it is recommended that flink:vkWaitForFences +be used in preference to repeatedly polling flink:vkGetFenceStatus. + +include::../validity/protos/vkGetFenceStatus.txt[] + +Return Value +------------ + +Upon success, fname:vkGetFenceStatus returns the status of the fence, +which may be one of: + +* ename:VK_SUCCESS indicates that the fence has completed (its status + is signaled). +* ename:VK_NOT_READY indicates that the fence has not yet completed (its status + is unsignaled). + +Upon failure, a descriptive error code is returned. + +See Also +-------- + +flink:vkCreateFence, flink:vkWaitForFences, flink:vkQueueSubmit + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetImageMemoryRequirements.txt b/doc/specs/vulkan/man/vkGetImageMemoryRequirements.txt new file mode 100644 index 00000000..efcc59d4 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetImageMemoryRequirements.txt @@ -0,0 +1,51 @@ +vkGetImageMemoryRequirements(3) +================================= + +Name +---- +vkGetImageMemoryRequirements - Returns the memory requirements for specified Vulkan object. + +C Specification +--------------- + +include::../protos/vkGetImageMemoryRequirements.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns pname:image. + +pname:image:: + Object to query. + +pname:pMemoryRequirements:: + Pointer to a data structure to receive the result of the query. + +Description +----------- + +fname:vkGetImageMemoryRequirements retrieves memory requirements for the image object whose +handle is given in pname:image. The pname:pMemoryRequirements parameter should point to an instance +of an slink:VkMemoryRequirements structure which will be filled with the memory requirements of the +image object. The definition of slink:VkMemoryRequirements is as follows: + +include::../structs/VkMemoryRequirements.txt[] + +The pname:size member of slink:VkMemoryRequirements reports the size of the memory allocation, measured +in bytes, required by the image. pname:alignment reports the required alignment of the memory allocation, +also measured in bytes. When memory is bound to the image object, the offset of the range within +the memory object must be an integer multiple of this value. The pname:memoryTypeBits member is a +bitfield with each set bit representing a valid memory type. Memory types for a device may be +determined by calling flink:vkGetPhysicalDeviceMemoryProperties. The least significant bit +if pname:memoryTypeBits represents the first memory type returned from +flink:vkGetPhysicalDeviceMemoryProperties, the next bit represents the second memory type and so on. + +include::../validity/protos/vkGetImageMemoryRequirements.txt[] + +See Also +-------- + +flink:vkBindImageMemory, flink:vkGetPhysicalDeviceMemoryProperties + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetImageSparseMemoryRequirements.txt b/doc/specs/vulkan/man/vkGetImageSparseMemoryRequirements.txt new file mode 100644 index 00000000..56a8a881 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetImageSparseMemoryRequirements.txt @@ -0,0 +1,99 @@ +vkGetImageSparseMemoryRequirements(3) +===================================== + +Name +---- +vkGetImageSparseMemoryRequirements - Query the memory requirements for a sparse image. + +C Specification +--------------- + +include::../protos/vkGetImageSparseMemoryRequirements.txt[] + +Parameters +---------- + +pname:device:: + A handle to the device that owns the image being queried. + +pname:image:: + A handle to the image to be queried. + +pname:pSparseMemoryRequirementCount:: + On input, a pointer to a variable containing the number of elements in the array pointed to + by pname:pSparseMemoryRequirements. On output, this variable is overwritten with the number + of elements written into pname:pSparseMemoryRequirements. + +pname:pSparseMemoryRequirements:: + A pointer to an array of structures that will be filled with the requested information. + +Description +----------- + +fname:vkGetImageSparseMemoryRequirements queries the device specified in pname:device for +the memory requirements of the sparse image specified in pname:image, which must be a +handle to a sparse image. + +pname:pSparseMemoryRequirementCount is a pointer to a variable which, on input to the +command contains the number of elements in the array pointed to by +pname:pSparseMemoryRequirements. This is an array of slink:VkSparseImageMemoryRequirements +structures, the definition of which is: + +include::../structs/VkSparseImageMemoryRequirements.txt[] + +Within slink:VkSparseImageMemoryRequirements, the pname:formatProperties member is an +instance of the slink:VkSparseImageFormatProperties structure, the definition of +which is: + +include::../structs/VkSparseImageFormatProperties.txt[] + +The pname:aspectMask member of slink:VkSparseImageFormatProperties specifies the image +aspect or aspects to which the remainder of the properties apply. This is a bitfield +made up from members of the elink:VkImageAspectFlagBits enumeration, the definition +of which is: + +include::../enums/VkImageAspectFlagBits.txt[] + +For each unique aspect of the image, an instance of slink:VkSparseImageFormatProperties is +returned. The pname:imageGranularity member specifies the size, in texels, of the +smallest region that may be uniquely bound within the image specified by pname:image. +Binding is affected by calling flink:vkQueueBindSparse. +It is an instance of the slink:VkExtent3D structure which contains the size of the +sparse binding regions, expressed in texels. + +The pname:flags member is a bitfield made up from members of the elink:VkSparseImageFormatFlagBits +enumeration and describes additional requirements for sparse memory binding. The +definition of which is: + +include::../enums/VkSparseImageFormatFlagBits.txt[] + +The meanings of each of the flags is as follows: + +If ename:VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT is set, the image combines mulitple levels +at the tail of the mip chain into a single residency state for array textures. Otherwise, +mip tail is individually addressable for each array layer. + +If ename:VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT is set, then each mip level outside the +tail is an exact multiple of the block size. + +If ename:VK_SPARSE_IMAGE_FORMAT_NONSTD_BLOCK_SIZE_BIT is set, then the format has a non-standard +block size and the members of the pname:imageGranularity do not match the standard block +size for the format. + +The pname:imageMipTailStartLod member of the slink:VkSparseImageMemoryRequirements structure +contains the level-of-detail at which the mip tail begins for the image specified in +pname:image. + +pname:imageMipTailSize contains the size of the mip tail, pname:imageMipTailOffset +contains its offset, and pname:imageMipTailStride contains the stride between layers in the + +tail for array textures. All three members are expressed in bytes. + +include::../validity/protos/vkGetImageSparseMemoryRequirements.txt[] + +See Also +-------- + +flink:vkQueueBindSparse, flink:vkGetImageMemoryRequirements + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetImageSubresourceLayout.txt b/doc/specs/vulkan/man/vkGetImageSubresourceLayout.txt new file mode 100644 index 00000000..10bdd3e0 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetImageSubresourceLayout.txt @@ -0,0 +1,75 @@ +vkGetImageSubresourceLayout(3) +=============================== + +Name +---- +vkGetImageSubresourceLayout - Retrieve information about an image subresource. + +C Specification +--------------- + +include::../protos/vkGetImageSubresourceLayout.txt[] + +Parameters +---------- + +pname:device:: + A handle to the device that owns the image. + +pname:image:: + A handle to the image about which to retrieve information. + +pname:pSubresource:: + A pointer to a structure describing the subresource. + +pname:pLayout:: + A pointer to a structure that will receive information about the subresource. + +Description +----------- + +fname:vkGetImageSubresourceLayout returns information about the memory layout of a subresource of an image. +pname:device is a handle to the device that owns pname:image, which is the image about which to retrieve +information. A description of the subresource is passsed to the command through an instance of the slink:VkImageSubresource +structure, the address of which is passed in pname:pSubresource. The definition of slink:VkImageSubresource is: + +include::../structs/VkImageSubresource.txt[] + +Within the pname:pSubresource structure, pname:aspectMask is a bitfield describing the aspect of the image and +is made up of a single member of the elink:VkImageAspectFlagBits enumeration, the definition of which is: + +include::../enums/VkImageAspectFlagBits.txt[] + +The ename:VK_IMAGE_ASPECT_COLOR_BIT aspect is valid only for image formats that are usable as color. The +ename:VK_IMAGE_ASPECT_DEPTH_BIT aspect is valid for formats containing depth information and the +ename:VK_IMAGE_ASPECT_STENCIL_BIT aspect is valid only for formats containing stencil information. Note +that some formats contain both depth and stencil information, and +in this case, pname:aspectMask is is used to select which to query. It is not legal to include more than +one member of elink:VkImageAspectFlagBits in pname:aspectMask. Some formats also include metadata +which may be implementation dependent but is queryable by specifying ename:VK_IMAGE_ASPECT_METADATA_BIT. + +For resources that have mipmaps or are multiple array layers, the pname:mipLevel and pname:arrayLayer members describe +the mipmap level and array layer, respectively. For resources that do not have mipmaps or are not layered, +pname:mipLevel and pname:arrayLayer, respectively, should be set to zero. + +Information about the selected sub-resource is returned to the caller in the instance of the slink:VkSubresourceLayout +structure pointed to by pname:pLayout. The definition of slink:VkSubresourceLayout is: + +include::../structs/VkSubresourceLayout.txt[] + +The pname:offset member of the pname:pLayout structure is filled with the relative offset of the start of the sub-resource +from the start of the parent resource's memory binding. The pname:size member is the size of the sub-resource in +memory. The pname:rowPitch specifies the distance in memory of the start of each texel row of the sub-resource +from the start of the previous row. The pname:depthPitch specififes the distance in memory of the start of each +slice of the sub-resource relative to the start of the previous slice. For one-dimensional resources, pname:rowPitch +is zero, and for one- and two-dimensional resources, pname:depthPitch is zero. All four parameters are specified +in bytes. + +include::../validity/protos/vkGetImageSubresourceLayout.txt[] + +See Also +-------- + +flink:vkGetPhysicalDeviceImageFormatProperties + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetInstanceProcAddr.txt b/doc/specs/vulkan/man/vkGetInstanceProcAddr.txt new file mode 100644 index 00000000..8548f830 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetInstanceProcAddr.txt @@ -0,0 +1,64 @@ +vkGetInstanceProcAddr(3) +========================= + +Name +---- +vkGetInstanceProcAddr - Return a function pointer for a command + +C Specification +--------------- + +include::../protos/vkGetInstanceProcAddr.txt[] + +Parameters +---------- + +pname:instance:: + The instance whose function pointer to query + +pname:pName:: + The name of the command + +Description +----------- + +fname:vkGetInstanceProcAddr returns a function pointer for the command +specified in pname:pName as it corresponds to pname:instance. Depending on the +operating system, supporting components, software environment and hardware +topology, the address returned for a single command name may be different for +different values of pname:instance. + +If pname:instance is code:NULL, fname:vkGetInstanceProcAddr will return +non-code:NULL function pointers for the global commands +fname::vkEnumerateInstanceExtensionProperties, +fname:vkEnumerateInstanceLayerProperties, and fname:vkCreateInstance. It will +return code:NULL for all other commands, since they may have different +implementations in different instances. + +If pname:instance is a valid instance, fname:vkGetInstanceProcAddr will return +a non-code:NULL function pointer for any core command except the global +commands listed previously. It will also return non-code:NULL for any extension +command, if there is a layer or driver available that implements the extension. + +The function pointers returned by fname:vkGetInstanceProcAddr may be used with +any object of the appropriate type derived from the pname:instance. For +example, the function pointer for a command with a sname:VkDevice first +parameter can be used with any sname:VkDevice object created from physical +devices belonging to the instance. + +include::../validity/protos/vkGetInstanceProcAddr.txt[] + +Return Value +------------ + +Upon success, fname:vkGetInstanceProcAddr returns the address +(code:PFN_vkVoidFunction) of the command whose name is specified by pname:pName. +If pname:pName is not supported by the Vulkan library, then +fname:vkGetInstanceProcAddr returns code:NULL. + +See Also +-------- + +flink:vkGetDeviceProcAddr, flink:vkCreateInstance + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceDisplayPlanePropertiesKHR.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceDisplayPlanePropertiesKHR.txt new file mode 100644 index 00000000..43760172 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceDisplayPlanePropertiesKHR.txt @@ -0,0 +1,42 @@ +vkGetPhysicalDeviceDisplayPlanePropertiesKHR(3) +============================================== + +Name +---- +vkGetPhysicalDeviceDisplayPlanePropertiesKHR - query the plane properties. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceDisplayPlanePropertiesKHR.txt[] + +Parameters +---------- + +pname:physicalDevice:: + A valid physical device. + +pname:pPropertyCount:: + The number of entries in the array pointed to by pProperties. + +pname:pProperties:: + A pointer to an array of pPropertyCount VkDisplayPlanePropertiesKHR structures. + +Description +----------- + +fname:vkGetPhysicalDeviceDisplayPlanePropertiesKHR provides a list of plane index and its current display. + +pname:pProperties is an instance of the slink:VkDisplayPlanePropertiesKHR +structure, the definition of which is: + +include::../structs/VkDisplayPlanePropertiesKHR.txt[] + +include::../validity/protos/vkGetPhysicalDeviceDisplayPlanePropertiesKHR.txt[] + +See Also +-------- + +flink:vkGetDisplayPlaneSupportedDisplaysKHR, flink:vkGetDisplayPlaneCapabilitiesKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceDisplayPropertiesKHR.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceDisplayPropertiesKHR.txt new file mode 100644 index 00000000..e67e8f6a --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceDisplayPropertiesKHR.txt @@ -0,0 +1,42 @@ +vkGetPhysicalDeviceDisplayPropertiesKHR(3) +========================================= + +Name +---- +vkGetPhysicalDeviceDisplayPropertiesKHR - query information about the available displays. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceDisplayPropertiesKHR.txt[] + +Parameters +---------- + +pname:physicalDevice:: + A valid physical device. + +pname:pPropertyCount:: + The number of entries in the array pointed to by pProperties. + +pname:pProperties:: + A pointer to an array of pPropertyCount VkDisplayPropertiesKHR structures. + +Description +----------- + +fname:vkGetPhysicalDeviceDisplayPropertiesKHR gets the display properties. + +pname:pProperties is an instance of the slink:VkDisplayPropertiesKHR +structure, the definition of which is: + +include::../structs/VkDisplayPropertiesKHR.txt[] + +include::../validity/protos/vkGetPhysicalDeviceDisplayPropertiesKHR.txt[] + +See Also +-------- + +flink:vkGetDisplayModePropertiesKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceFeatures.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceFeatures.txt new file mode 100644 index 00000000..670049c0 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceFeatures.txt @@ -0,0 +1,415 @@ +vkGetPhysicalDeviceFeatures(3) +============================== + +Name +---- +vkGetPhysicalDeviceFeatures - Reports capabilities of a physical device. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceFeatures.txt[] + +Parameters +---------- + +pname:physicalDevice:: + A handle to the physical device. + +pname:pFeatures:: + A pointer to a structure that will be written with the device feature set. + +Description +----------- + +fname:vkGetPhysicalDeviceFeatures returns the set of physical features supported by the physical device +whose handle is passed in pname:physicalDevice. This parameter should be a valid handle to a physical +device returned from a successful call to flink:vkEnumeratePhysicalDevices. pname:pFeatures is a pointer +to an instance of the sname:VkPhysicalDeviceFeatures structure, the definition of which is: + +include::../structs/VkPhysicalDeviceFeatures.txt[] + +Each member of the pname:pFeatures structure represents a feature of the underlying physical device. A brief +description of the members follows: + +* *pname:robustBufferAccess* indicates that out of bounds accesses to buffers via shader + operations are well-defined. + +** When enabled, out-of-bounds buffer reads will return any of the following values: + +*** Values from anywhere within the buffer object. +*** Zero values, or (0,0,0,x) vectors for vector reads where x is a valid value + represented in the type of the vector components and may be any of: +**** 0, 1, or the maximum representable positive integer value, for signed or unsigned + integer components +**** 0.0 or 1.0, for floating-point components + +** When enabled, out-of-bounds writes may modify values within the buffer object or + be ignored. + +** If not enabled, out of bounds accesses may cause undefined behaviour up-to and including + process termination. + +* *pname:fullDrawIndexUint32* indicates the full 32-bit range of indices is supported for + indexed draw calls when using a elink:VkIndexType of ename:VK_INDEX_TYPE_UINT32. + The ptext:maxDrawIndexedIndexValue limit indicates the maximum + index value that may be used (aside from the primitive restart index, which is always + 2^32^-1 when the elink:VkIndexType is ename:VK_INDEX_TYPE_UINT32). If this feature + is supported, ptext:maxDrawIndexedIndexValue must be 2^32^-1; otherwise it must be no + smaller than 2^24^-1. See <>. + [[features-features-fullDrawIndexUint]] + +* *pname:imageCubeArray* indicates whether image views with a elink:VkImageViewType of + ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY can be created and that the corresponding + *ImageCubeArray* SPIR-V OpCapability can be used in shader code. + +* *pname:independentBlend* indicates whether the sname:VkPipelineColorBlendAttachmentState + settings are controlled independently per-attachment. If this is features not supported or + enabled, the sname:VkPipelineColorBlendAttachmentState settings for the first color attachment + will be used for all attachments. Otherwise, a sname:VkPipelineColorBlendAttachmentState + must be provided for each bound color attachment. + +* *pname:geometryShader* indicates whether geometry shaders are supported. If this feature is not + supported or enabled, ename:VK_SHADER_STAGE_GEOMETRY_BIT, + and ename:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT enum values may not be used. This also + indicates whether the *Geometry* SPIR-V OpCapability can be used in shader code. + +* *pname:tessellationShader* indicates whether tessellation control and evaluation shaders are supported. + If this feature is not supported or enabled, the ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, + ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, ename:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT, + ename:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT, and + ename:VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO enum values may not be used. + This also indicates whether the *Tessellation* SPIR-V OpCapability can be used in shader code. + +* *pname:sampleRateShading* indicates whether per-sample shading and multisample interpolation is supported. + If this feature is not supported or enabled, the ptext:sampleShadingEnable member of + the slink:VkPipelineMultisampleStateCreateInfo structure must be set to + ename:VK_FALSE and the ptext:minSampleShading member is ignored. This also indicates whether + the *SampleRateShading* SPIR-V OpCapability can be used in shader code. + +* *pname:dualSourceBlend* indicates whether blend operations which take two sources are supported. + If this feature is not supported or enabled, the ename:VK_BLEND_FACTOR_SRC1_COLOR, + ename:VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, ename:VK_BLEND_FACTOR_SRC1_ALPHA, and ename:VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA + enum values may not be used as source or destination blending factors. + +* *pname:logicOp* indicates whether logic operations are supported. If this feature is not supported + or enabled, the ptext:logicOpEnable member of the slink:VkPipelineColorBlendStateCreateInfo structure + must be set to ename:VK_FALSE and the pname:logicOp member is ignored. + + [[features-features-multiDrawIndirect]] +* *pname:multiDrawIndirect* indicates whether multi-draw indirect is + supported. If this feature is not supported or enabled, the + ptext:drawCount parameter to the flink:vkCmdDrawIndirect and + flink:vkCmdDrawIndexedIndirect commands must be 1. The + ptext:maxDrawIndirectCount member of the slink:VkPhysicalDeviceLimits + structure must also be 1 if this feature is not supported. See + <>. + +* *pname:depthClamp* indicates whether depth clamping is supported. If this feature is not supported + or enabled, the ptext:depthClampEnable member of the sname:VkPipelineRasterizationStateCreateInfo structure + must be set to ename:VK_FALSE. Otherwise, setting ptext:depthClampEnable to ename:VK_TRUE will + enable depth clamping. + +* *pname:depthBiasClamp* indicates whether depth bias clamping is supported. If this feature is not + supported or enabled, the ptext:depthBiasClamp parameter to flink:vkCmdSetDepthBias is ignored. + +* *pname:fillModeNonSolid* indicates whether point and wireframe fill modes are supported. If this feature + is not supported or enabled, the ename:VK_POLYGON_MODE_POINT and ename:VK_POLYGON_MODE_LINE enum + values may not be used. + +* *pname:depthBounds* indicates whether depth bounds tests are supported. If this feature is not supported + or enabled, the ptext:depthBoundsTestEnable member of the sname:VkPipelineDepthStencilStateCreateInfo + structure must be set to ename:VK_FALSE. When ptext:depthBoundsTestEnable is set to ename:VK_FALSE, + the values of the flink:vkCmdSetDepthBounds command may not be used. + +* *pname:wideLines* indicates whether lines with width greater than 1.0 are supported. If this feature is + not supported or enabled, the flink:vkCmdSetLineWidth command may not be used. + . The range and granularity of supported line widths are indicated by the + ptext:lineWidthRange and ptext:lineWidthGranularity members of the slink:VkPhysicalDeviceLimits + structure, respectively. + +* *pname:largePoints* indictates if points with size greater than 1.0 are supported. If this feature + is not supported or enabled, only a point size of 1.0 written by a shader is supported. + The range and granularity of supported point sizes are indicated by the ptext:pointSizeRange and + ptext:pointSizeGranularity members of the ptext:VkPhysicalDeviceLimits structure, respectively. + +* *pname:textureCompressionETC2* indicates whether the ETC2 and EAC compressed texture formats are + supported. If this feature is not supported or enabled, the following formats may not be + used to create images: ++ +-- +* ename:VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK +* ename:VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK +* ename:VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK +* ename:VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK +* ename:VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK +* ename:VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK +* ename:VK_FORMAT_EAC_R11_UNORM_BLOCK +* ename:VK_FORMAT_EAC_R11_SNORM_BLOCK +* ename:VK_FORMAT_EAC_R11G11_UNORM_BLOCK +* ename:VK_FORMAT_EAC_R11G11_SNORM_BLOCK +-- ++ +The fname:vkGetPhysicalDeviceFormatProperties command should be used to check +for the supported properties of individual formats. + +* *pname:textureCompressionASTC_LDR* indicates whether the ASTC LDR compressed texture formats are + supported. If this feature is not supported or enabled, the following formats may not be + used to create images: ++ +-- +* ename:VK_FORMAT_ASTC_4x4_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_4x4_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_5x4_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_5x4_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_5x5_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_5x5_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_6x5_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_6x5_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_6x6_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_6x6_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_8x5_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_8x5_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_8x6_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_8x6_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_8x8_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_8x8_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_10x5_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_10x5_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_10x6_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_10x6_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_10x8_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_10x8_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_10x10_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_10x10_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_12x10_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_12x10_SRGB_BLOCK +* ename:VK_FORMAT_ASTC_12x12_UNORM_BLOCK +* ename:VK_FORMAT_ASTC_12x12_SRGB_BLOCK +-- ++ +The fname:vkGetPhysicalDeviceFormatProperties command should be used to check +for the supported properties of individual formats. + +* *pname:textureCompressionBC* indicates whether the BC compressed texture formats are supported. + If this feature is not supported or enabled, the following formats may not be + used to create images: ++ +-- +* ename:VK_FORMAT_BC1_RGB_UNORM_BLOCK +* ename:VK_FORMAT_BC1_RGB_SRGB_BLOCK +* ename:VK_FORMAT_BC1_RGBA_UNORM_BLOCK +* ename:VK_FORMAT_BC1_RGBA_SRGB_BLOCK +* ename:VK_FORMAT_BC2_UNORM_BLOCK +* ename:VK_FORMAT_BC2_SRGB_BLOCK +* ename:VK_FORMAT_BC3_UNORM_BLOCK +* ename:VK_FORMAT_BC3_SRGB_BLOCK +* ename:VK_FORMAT_BC4_UNORM_BLOCK +* ename:VK_FORMAT_BC4_SNORM_BLOCK +* ename:VK_FORMAT_BC5_UNORM_BLOCK +* ename:VK_FORMAT_BC5_SNORM_BLOCK +* ename:VK_FORMAT_BC6H_UFLOAT_BLOCK +* ename:VK_FORMAT_BC6H_SFLOAT_BLOCK +* ename:VK_FORMAT_BC7_UNORM_BLOCK +* ename:VK_FORMAT_BC7_SRGB_BLOCK +-- ++ +The fname:vkGetPhysicalDeviceFormatProperties command should be used to check +for the supported properties of individual formats. + +* *pname:occlusionQueryPrecise* indicates whether precise (non-conservative) + occlusion queries are supported. Occlusion queries are created in a sname:VkQueryPool by + specifying the ptext:queryType of ename:VK_QUERY_TYPE_OCCLUSION in the sname:VkQueryPoolCreateInfo + structure which is passed to fname:vkCreateQueryPool. If this feature is supported and enabled, + queries of this type may set ename:VK_QUERY_CONTROL_PRECISE_BIT in the ptext:flags + parameter to fname:vkCmdBeginQuery. If this feature is not supported, the implementation can + only support conservative occlusion queries. When any samples are passed, conservative queries + will return between one and the actual number of samples passed. When this feature is enabled + and ename:VK_QUERY_CONTROL_PRECISE_BIT is set, occlusion queries will report the + actual number of samples passed. + +* *pname:pipelineStatisticsQuery* indicates whether the pipeline statistics queries are supported. + If this feature is not supported or enabled, queries of type + ename:VK_QUERY_TYPE_PIPELINE_STATISTICS cannot be created and none of the + elink:VkQueryPipelineStatisticFlagBits bits should be set in the ptext:pipelineStatistics + member of the sname:VkQueryPoolCreateInfo structure. + + * pname:vertexPipelineStoresAndAtomics indicates whether + storage buffers and images support stores and atomic operations + in the vertex, tessellation, and geometry shader stages. If this + feature is not supported or enabled, all storage image, storage texel + buffers and storage buffer variables in shaders for these + stages must be decorated with the *NonWriteable* SPIR-V decoration + (or the _readonly_ memory qualifier in GLSL). + [[features-features-fragmentStoresAndAtomics]] + * pname:fragmentStoresAndAtomics indicates whether storage buffers and + images support stores and atomic operations in the fragment shader stage. + If this feature is not supported or enabled, all storage image, storage + texel buffers and storage buffer variables in shaders for the + fragment stage must be decorated with the *NonWriteable* SPIR-V decoration + (or the _readonly_ memory qualifier in GLSL). + * pname:shaderTessellationAndGeometryPointSize indicates whether the + _PointSize_ shader builtin is available in the tessellation control, + tessellation evaluation, and geometry shader stages. If this feature is + not supported or enabled, the _PointSize_ shader builtin is not available + in these shader stages and all points written from a tessellation or + geometry shader will have a size of 1.0. This also indicates whether + the *TessellationPointSize* SPIR-V OpCapability can be used in shader + code for tessellation control and evaluation shaders, or if the + *GeometryPointSize* SPIR-V OpCapability can be used in shader code + for geometry shaders. An implementation supporting this feature must + also support one or both of the _tessellationShader_ or + _geometryShader_ features. + +* *pname:shaderImageGatherExtended* indicates whether the extended set of image gather + instructions are available in shader code. If this feature is not supported or enabled, + the _textureGatherOffset_ shader instruction only supports offsets that are constant + integer expressions and the _textureGatherOffsets_ shader instruction is not supported. + This also indicates whether the *ImageGatherExtended* SPIR-V OpCapability can be used in + shader code. + +* *pname:shaderStorageImageExtendedFormats* indicates whether the extended storage image + formats are available in shader code. If this feature is not supported or enabled, + the formats requiring the *StorageImageExtendedFormats* SPIR-V OpCapability are not + supported for resources referenced by the ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE descriptor + type. This also indicates whether the *StorageImageExtendedFormats* OpCapability ca + be used in shader code. + +* *pname:shaderStorageImageMultisample* indicates whether multisampled storage images are + supported. If this feature is not supported or enabled, images that are created + with a ptext:usage that includes ename:VK_IMAGE_USAGE_STORAGE_BIT must be created + with ptext:samples equal to 1. This also indicates whether the *StorageImageMultisample* SPIR-V + OpCapability can be used in shader code. + +* *pname:shaderUniformBufferArrayDynamicIndexing* indicates whether arrays of uniform buffers + can be indexed by dynamically uniform integer expressions in shader code. If this feature is not + supported or enabled, resources with a descriptor type of ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER + or ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC can only be indexed by constant + integral expressions when aggregated into arrays in shader code. This corresponds to the + *UniformBufferArrayDynamicIndexing* SPIR-V OpCapability can be used in shader code. + +* *pname:shaderSampledImageArrayDynamicIndexing* indicates whether arrays of samplers or sampled images + can be indexed by dynamically uniform integer expressions in shader code. If this feature is not + supported or enabled, resources with a descriptor type of ename:VK_DESCRIPTOR_TYPE_SAMPLER, + ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER and ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE can + only be indexed by constant integral expressions when aggregated into arrays in shader code. + This also indicates whether the *SampledImageArrayDynamicIndexing* SPIR-V OpCapability can be + used in shader code. + +* *pname:shaderStorageBufferArrayDynamicIndexing* indicates whether arrays of storage buffers can + be indexed by dynamically uniform integer expressions in shader code. If this feature is not + supported or enabled, resources with a descriptor type of ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER + or ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC can only be indexed by constant integral + expressions when aggregated into arrays in shader code. This corresponds to the + *StorageBufferArrayDynamicIndexing* SPIR-V OpCapability can be used in shader code. + +* *pname:shaderStorageImageArrayDynamicIndexing* indicates whether arrays of storage images + can be indexed by dynamically uniform integer expressions in shader code. If this feature + is not supported or enabled, resources with a descriptor type of + ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE can only be indexed by constant integral expressions when + aggregated into arrays in shader code. This also indicates whether the *StorageImageArrayDynamicIndexing* + SPIR-V OpCapability can be used in shader code. + +* *pname:shaderClipDistance* indicates whether clip distances are supported in shader code. + If this feature is not supported or enabled, the _ClipDistance_ shader builtin is not available + in the builtin shader input and output blocks. This also indicates whether the *ClipDistance* + SPIR-V OpCapability can be used in shader code. + +* *pname:shaderCullDistance* indicates whether cull distances are suppored in shader code. + If this feature is not supported or enabled, the _CullDistance_ shader builtin is not available + in the builtin shader input and output blocks. This also indicates whether the *CullDistance* + SPIR-V OpCapability can be used in shader code. + +* *pname:shaderFloat64* indicates whether 64-bit floats (doubles) are supported in shader code. + If this feature is not supported or enabled, the 64-bit floating point types cannot be used in + shader code. This also indicates whether the *Float64* SPIR-V OpCapability can be used in shader code. + +* *pname:shaderInt64* indicates whether 64-bit integers (signed and unsigned) are supported in shader + code. If this feature is not supported or enabled, the 64-bit integer types cannot be used in + shader code. This also indicates whether the *Int64* SPIR-V OpCapability can be used in shader code. + +* *pname:shaderInt16* indicates whether 16-bit integers (signed and unsigned) are supported in shader + code. If this feature is not supported or enabled, the 16-bit integer types cannot be used in + shader code. This also indicates whether the *Int16* SPIR-V OpCapability can be used in shader code. + +* *pname:shaderResourceResidency* indicates whether image operations that return resource residency + information are supported in shader code. If this feature is not supported or enabled, + the image operations which return resource residency information cannot be used in shader code. + This also indicates whether the *SparseResidency* SPIR-V OpCapability can be used in shader code. + The feature requires the ptext:sparseNonResident feature to be supported. + +* *pname:shaderResourceMinLod* indicates whether image operations that specify the minimum resource + level-of-detail (LOD) are supported in shader code. If this feature is not supported or enabled, + the image operations which specify minimum resource LOD cannot be used in shader code. + This also indicates whether the *MinLod* SPIR-V OpCapability can be used in shader code. + +* *pname:alphaToOne* indicates whether the implementation is able to replace the alpha value of the color + fragment output from the fragment shader with the maximum representable alpha value for fixed-point + colors or 1.0 for floating-point colors. If this feature is not supported or enabled, then the + ptext:alphaToOneEnable member of the sname:VkPipelineColorBlendAttachmentState structure must be + set to ename:VK_FALSE. Otherwise setting ptext:alphaToOneEnable to ename:VK_TRUE will enable + alpha-to-one behaviour. + +* *pname:sparseBinding* indicates whether resource memory can be managed at opaque page level instead of + at the object level. If this feature is not supported or enabled, resource memory can only be + bound on a per-object basis using the fname:vkBindBufferMemory and fname:vkBindImageMemory + commands. In this case, buffers and images cannot be created with ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT + and ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT set in the ptext:flags member of the + sname:VkBufferCreateInfo and sname:VkImageCreateInfo structures, respectively. + Otherwise resource memory can be managed as described in + <>. + +* *pname:sparseResidencyBuffer* indicates whether the device can access partially resident + buffers. If this feature is not supported or enabled, buffers cannot be created with + ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT set in the ptext:flags member of the + sname:VkBufferCreateInfo structure. + +* *pname:sparseResidencyImage2D* indicates whether the device can access partially resident + 2D images with 1 sample per pixel. If this feature is not supported or enabled, images + with an ptext:imageType of ename:VK_IMAGE_TYPE_2D and ptext:samples of 1 + cannot be created with ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set + in the ptext:flags member of the sname:VkImageCreateInfo structure. + +* *pname:sparseResidencyImage3D* indicates whether the device can access partially resident + 3D images. If this feature is not supported or enabled, images with an ptext:imageType of + ename:VK_IMAGE_TYPE_3D cannot be created with ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set + in the ptext:flags member of the sname:VkImageCreateInfo structure. + +* *pname:sparseResidency2Samples* indicates whether the physical device can access partially + resident 2D images with 2 samples per pixel. If this feature is not supported or enabled, images + with an ptext:imageType of ename:VK_IMAGE_TYPE_2D and ptext:samples of 2 cannot be created with + ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the ptext:flags member of the sname:VkImageCreateInfo + structure. + +* *pname:sparseResidency4Samples* indicates whether the physical device can access partially + resident 2D images with 4 samples per pixel. If this feature is not supported or enabled, images + with an ptext:imageType of ename:VK_IMAGE_TYPE_2D and ptext:samples of 4 cannot be created with + ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the ptext:flags member of the + sname:VkImageCreateInfo structure. + +* *pname:sparseResidency8Samples* indicates whether the physical device can access partially + resident 2D images with 8 samples per pixel. If this feature is not supported or enabled, images + with an ptext:imageType of ename:VK_IMAGE_TYPE_2D and ptext:samples of 8 cannot be created with + ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the ptext:flags member of the + sname:VkImageCreateInfo structure. + +* *pname:sparseResidency16Samples* indicates whether the physical device can access partially + resident 2D images with 16 samples per pixel. If this feature is not supported or enabled, images + with an ptext:imageType of ename:VK_IMAGE_TYPE_2D and ptext:samples of 16 cannot be created with + ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the ptext:flags member of the + sname:VkImageCreateInfo structure. + +* *pname:sparseResidencyAliased* indicates whether the physical device can correctly access + data aliased into multiple locations. If this feature is not supported or enabled, + the ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT and ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT + enum values may not be used in ptext:flags members of the sname:VkBufferCreateInfo and + sname:VkImageCreateInfo structures, respectively. + +include::../validity/protos/vkGetPhysicalDeviceFeatures.txt[] + +See Also +-------- + +flink:vkGetPhysicalDeviceProperties + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceFormatProperties.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceFormatProperties.txt new file mode 100644 index 00000000..fb7388a2 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceFormatProperties.txt @@ -0,0 +1,68 @@ +vkGetPhysicalDeviceFormatProperties(3) +====================================== + +Name +---- +vkGetPhysicalDeviceFormatProperties - Lists physical device's format capabilities. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceFormatProperties.txt[] + +Parameters +---------- + +pname:physicalDevice:: + A handle to the physical device to query. + +pname:format:: + The format whose properties to query. + +pname:pFormatProperties:: + A pointer to the structure to receive the result of the query. + +Description +----------- + +fname:vkGetPhysicalDeviceFormatProperties queries the device specified by pname:physicalDevice +for its support of the format specified in pname:format and places the result in the +structure pointed to by pname:pFormatProperties. pname:pFormatProperties should point to an +instance of the slink:VkFormatProperties structure, the definition of which is: + +include::../structs/VkFormatProperties.txt[] + +The pname:linearTilingFeatures, pname:optimalTilingFeatures, and pname:bufferFeatures parameters +are a bitwise combination of one or more of the bits specified in elink:VkFormatFeatureFlagBits, +the definition of which is: + +include::../enums/VkFormatFeatureFlagBits.txt[] + +The pname:linearTilingFeatures member contains information about format support in linear images. The +pname:optimalTilingFeatures member contains information about format support in opaque tiled images. +The pname:bufferFeatures member contains information about format support in buffer objects. + +* If ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT is set then image views of this format may be sampled by shaders. This bit should only appear in pname:linearTilingFeatures or pname:optimalTilingFeatures. +* If ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT is set then image views of this format may be used as storage images in shaders. This bit should only appear in pname:linearTilingFeatures or pname:optimalTilingFeatures. +* If ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT is set is set then atomic operations may be performed by shaders on image views of this format. This bit should only appear in pname:linearTilingFeatures or pname:optimalTilingFeatures. +* If ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT is set then buffer views of this format may be used to store uniform values accessible by shaders. This bit should only appear in pname:bufferFeatures. +* If ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT is set then buffer views of this format may be used to store texel data accessible to shaders. This bit should only appear in pname:bufferFeatures. +* If ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT is set then shaders may perform atomic operations on texel data stored in buffers in this format. This bit should only appear in pname:bufferFeatures. +* If ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT is set then this format may be used as a vertex attribute format. This bit should only appear in pname:bufferFeatures. +* If ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT is set then image views of this format may be used as color attachments. This bit should only appear in pname:linearTilingFeatures or pname:optimalTilingFeatures. +* If ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT is set then blending is supported into color attachments of this format. This bit should only appear in pname:linearTilingFeatures or pname:optimalTilingFeatures. +* If ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT is set then image views of this format may be used as depth or stencil attachments. This bit should only appear in pname:linearTilingFeatures or pname:optimalTilingFeatures. +* If ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT is set then images of this format may be used as the source of a blit operation. This bit should only appear in pname:linearTilingFeatures or pname:optimalTilingFeatures. +* If ename:VK_FORMAT_FEATURE_BLIT_DST_BIT is set then images of this format may be used as the destination of a blit operation. This bit should only appear in pname:linearTilingFeatures or pname:optimalTilingFeatures. + +If the physical device does not support the specified format then the output slink:VkFormatProperties +structure is filled with zeros. + +include::../validity/protos/vkGetPhysicalDeviceFormatProperties.txt[] + +See Also +-------- + +flink:vkGetPhysicalDeviceImageFormatProperties, flink:vkGetPhysicalDeviceFeatures + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceImageFormatProperties.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceImageFormatProperties.txt new file mode 100644 index 00000000..c7d45ef7 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceImageFormatProperties.txt @@ -0,0 +1,96 @@ +vkGetPhysicalDeviceImageFormatProperties(3) +=========================================== + +Name +---- +vkGetPhysicalDeviceImageFormatProperties - Lists physical device's image format capabilities. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceImageFormatProperties.txt[] + +Parameters +---------- + +pname:physicalDevice:: + A handle to the physical device upon which to perform the query. + +pname:format:: + The format of the image. + +pname:type:: + The type of the image. + +pname:tiling:: + The tiling mode of the image. + +pname:usage:: + The usage of the image. + +pname:flags:: + Additional flags describing the image. + +pname:pImageFormatProperties:: + A pointer to a structure in which the requested information is returned. + +Description +----------- + +fname:vkGetPhysicalDeviceImageFormatProperties queries the physical device specified in pnane:physicalDevice +about its support for images as if they had been created using the remaining parameters to the command. +These parameters, pname:format, pname:type, pname:tiling and pname:usage have the same meanings as they do +in the slink:VkImageCreateInfo structure, the definition of which is: + +include::../structs/VkImageCreateInfo.txt[] + +In this call, pname:format specifies the format of the image and must be a member of the elink:VkFormat enumeration. +pname:type specifies the type of image for which the format will be used. This is a member of the elink:VkImageType +enumeration, the definition of which is: + +include::../enums/VkImageType.txt[] + +The pname:tiling parameter specifies the tiling layout for the image and must be one of ename:VK_IMAGE_TILING_LINEAR +or ename:VK_IMAGE_TILING_OPTIMAL. The pname:usage parameter specifies the intended usage for the image and +should be a bitwise combination of one or more members of the elink:VkImageUsageFlagBits enumeration, the +definition of which is: + +include::../enums/VkImageUsageFlagBits.txt[] + +If the image format is supported for the specified combination of the pname:format, pname:type, pname:tiling, +pname:usage, and pname:flags parameters, then fname:vkGetPhysicalDeviceImageFormatProperties +places information about how such an image may be used in the instance of the slink:VkImageFormatProperties +structure pointed to by pname:pImageFormatProperties. The definition of slink:VkImageFormatProperties is: + +include::../structs/VkImageFormatProperties.txt[] + +The pname:maxExtent member of the output structure contains the maximum dimensions of an image in the specified +format. The pname:maxMipLevels and pname:maxArrayLayers contain the maximum number of mipmap levels and +maximum number of layers in array forms of images, respectively. If array images are not supported for +the specified format, then pname:maxArrayLayers will be zero. If multisampling is supported for the specified +format, then pname:sampleCounts contains a bitwise combination of the supported sample counts using +members of the elink:VkSampleCountFlagBits enumeration, the definition of which is: + +include::../enums/VkSampleCountFlagBits.txt[] + +Additional sample counts not listed in the elink:VkSampleCountFlagBits enumeration are reserved and their +presence should not be used to imply higher sample counts than listed. + +If multisampling is not supported for the specified format, then pname:sampleCounts will contain zero. + +The pname:maxResourceSize member contains the maximum size in memory of any resource in this format. Note +that it may not be possible to create a resource of the maximum supported extent and array layer count +in every dimension that still fits within the maxium in-memory resource size. + +If the format is not supported in the specified configuration, then +fname:vkGetPhysicalDeviceImageFormatProperties fills the slink:VkImageFormatProperties structure +pointed to by pname:pImageFormatProperties with zeros. + +include::../validity/protos/vkGetPhysicalDeviceImageFormatProperties.txt[] + +See Also +-------- + +flink:vkGetPhysicalDeviceProperties, flink:vkGetPhysicalDeviceFeatures + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceMemoryProperties.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceMemoryProperties.txt new file mode 100644 index 00000000..f36a9edb --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceMemoryProperties.txt @@ -0,0 +1,103 @@ +vkGetPhysicalDeviceMemoryProperties(3) +====================================== + +Name +---- +vkGetPhysicalDeviceMemoryProperties - Reports memory information for the specified physical device. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceMemoryProperties.txt[] + +Parameters +---------- + +pname:physicalDevice:: + A handle to the physical device about which information is to be retrieved. + +pname:pMemoryProperties:: + A pointer to a structure that is to receive the memory information. + +Description +----------- + +fname:vkGetPhysicalDeviceMemoryProperties retrieves information about the memory of the physical +device whose handle is given in pname:physicalDevice. pname:pMemoryProperties should point to an +instance of the sname:VkPhysicalDeviceMemoryProperties structure, into which will be stored the +information about the device. The definition of sname:VkPhysicalDeviceMemoryProperties is as +follows. + +include::../structs/VkPhysicalDeviceMemoryProperties.txt[] + +* pname:memoryTypeCount will be filled with the number of memory types supported by +the device. + +* pname:memoryTypes is an array of ename:VK_MAX_MEMORY_TYPES instances of the +slink:VkMemoryType structures. Upon return from fname:vkGetPhysicalDeviceMemoryProperties, +the first pname:memoryTypeCount elements of pname:memoryTypes will contain valid data. + +* pname:memoryHeapCount will be filled with the number of memory heaps supported by +the device. + +* pname:memoryHeaps is an array of ename:VK_MAX_MEMORY_HEAPS slink:VkMemoryHeap +structures which describe the heaps available to the device. + +The definition of the slink:VkMemoryType structure is as follows: + +include::../structs/VkMemoryType.txt[] + +* pname:propertyFlags is a bitfield made up from members of the elink:VkMemoryPropertyFlagBits +enumeration, which is described below. + +* pname:heapIndex is the index into the ptext:memoryHeaps array returned through this +command from which the memory type will be allocated. + +The elink:VkMemoryPropertyFlagBits enumeration, which forms the available bits for use in the +pname:propertyFlags member of the slink:VkMemoryType structure is defined as follows: + +include::../enums/VkMemoryPropertyFlagBits.txt[] + +* ename:VK_MEMORY_PROPERTY_DEVICE_ONLY represents the case where no bits are set and signifies +that the memory is private to the device. + +* ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT indicates that memory with this property is visible +to the host. That is, a valid host address may be obtained and allocations from this memory +type may be mapped. + +* ename:VK_MEMORY_PROPERTY_HOST_NON_COHERENT_BIT indicates that accesses to mapped memory of this +type is not coherent with accesses to the same memory by the device. Such access must be marhsalled +using calls to flink:vkFlushMappedMemoryRanges or by unmapping the memory. + +* ename:VK_MEMORY_PROPERTY_HOST_UNCACHED_BIT indicates that data stored in memory of this type is not +cached by the host and as such, it is likely that reads from such regions by the host will +be suboptimal. + +* ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT indicates that allocations from this type of memory +may be made on an as-needed basis. In general, allocations from this type of memory will almost +always succeed and return quickly, but first access to such a region may take longer than expected. + +The definition of the slink:VkMemoryHeap structure is as follows: + +include::../structs/VkMemoryHeap.txt[] + +* pname:size specifies the size in bytes of the memory heap. + +* pname:flags is a bitfield made up of the members of the +elink:VkMemoryHeapFlagBits enumeration, the definition of which is: + +include::../enums/VkMemoryHeapFlagBits.txt[] + +* If the ptext:flags member of slink:VkMemoryHeap contains ename:VK_MEMORY_HEAP_HOST_LOCAL_BIT, +then the memory for that heap is located closer to the host than to the device in NUMA (Non-Unified +Memory Architecture) systems. Even in unified architectures, this flag may indicate that access +to this heap is more efficient from the host than from the device. + +include::../validity/protos/vkGetPhysicalDeviceMemoryProperties.txt[] + +See Also +-------- + +flink:vkGetPhysicalDeviceProperties + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceMirPresentationSupportKHR.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceMirPresentationSupportKHR.txt new file mode 100644 index 00000000..42dc4a12 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceMirPresentationSupportKHR.txt @@ -0,0 +1,42 @@ +vkGetPhysicalDeviceMirPresentationSupportKHR(3) +============================================== + +Name +---- +vkGetPhysicalDeviceMirPresentationSupportKHR - query physical device for presentation to Mir. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceMirPresentationSupportKHR.txt[] + +Parameters +---------- + +pname:physicalDevice:: + A physical device handle. + +pname:queueFamilyIndex:: + Index to a queue family. + +pname:connection:: + Pointer to a MirConnection. + +Description +----------- + +fname:vkGetPhysicalDeviceMirPresentationSupportKHR determines whether a queue family of a physical device supports presentation to the Mir compositor. + +pname:connection is an instance of the slink:MirConnection +structure, the definition of which is: + +include::../structs/MirConnection.txt[] + +include::../validity/protos/vkGetPhysicalDeviceMirPresentationSupportKHR.txt[] + +See Also +-------- + +flink:vkQueuePresentKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceProperties.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceProperties.txt new file mode 100644 index 00000000..1fb1b630 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceProperties.txt @@ -0,0 +1,84 @@ +vkGetPhysicalDeviceProperties(3) +================================ + +Name +---- +vkGetPhysicalDeviceProperties - Returns properties of a physical device. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceProperties.txt[] + +Parameters +---------- + +pname:physicalDevice:: + A handle to the physical device. + +pname:pProperties:: + A pointer to a structure that will be written with the device properties. + +Description +----------- + +fname:vkGetPhysicalDeviceProperties returns the properties of the physical device specified in +pname:physicalDevice in the structure pointed to by pname:pProperties. pname:pProperties points +to an instance of the slink:VkPhysicalDeviceProperties structure, the definition of which +is: + +include::../structs/VkPhysicalDeviceProperties.txt[] + +The data returned in the pname:pProperties structure contains information about the physical +device and the driver associated with it. + +The pname:apiVersion member of slink:VkPhysicalDeviceProperties indicates the API version +supported by the physical device. Minor revisions of the API are backward compatible whereas +major versions of the API may break compatibility. The API version is represented as a 32-bit +field where bits 31 - 22 represent the major version, bits 21 - 12 represent the minor version, +and bits 11 - 0 represent the patch version. + +The pname:driverVersion member represents the vendor-specific version of the driver used to +enable the device. + +The pname:vendorID and pname:deviceID members contain the PCI vendor and device identifiers, +respectively. Note that if the device is not physcially a PCI-compliant device, then the +values of pname:vendorID and pname:deviceID are platform dependent and may not be values assigned +by the PCI-SIG. + +The pname:deviceType member indicates the type of device represented by pname:physicalDevice. +pname:deviceType is a member of the elink:VkPhysicalDeviceType enumeration, the definition of +which is: + +include::../enums/VkPhysicalDeviceType.txt[] + +When pname:deviceType is ename:VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU, then the device is typically +one embedded in or tightly coupled with the host CPU that is running the application. When +pname:deviceType is ename:VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, then the device is typically +a separate physical device connected to the host CPU via a slower interlink such as PCI-Express. +If pname:deviceType is ename:VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU, then the device is potentially +emulated (such a stub device or debugger endpoint), a virtual node in a virtualization environment or +otherwise does not fit either category. If the device is running entirely on the CPU, then +pname:deviceType will be ename:VK_PHYSICAL_DEVICE_TYPE_CPU. If the device type is unknown or does +not fit any of these types, then pname:deviceType may be ename:VK_PHYSICAL_DEVICE_TYPE_OTHER. + +The pname:deviceName member of pname:pProperties contains a vendor-supplied human-readable name +for the device encoded as a UTF-8 string which is up to ename:VK_MAX_PHYSICAL_DEVICE_NAME_SIZE +characters long, including a null-terminator. + +pname:pipelineCacheUUID is an array, of size ename:VK_UUID_SIZE, containing 8-bit values that represent +a universally unique signature that identifies the hardware and driver combination. + +pname:limits is an instance of the slink:VkPhysicalDeviceLimits structure which contains limits +on the functionality provided by the device. The definition of slink:VkPhysicalDeviceLimits is: + +include::../structs/VkPhysicalDeviceLimits.txt[] + +include::../validity/protos/vkGetPhysicalDeviceProperties.txt[] + +See Also +-------- + +flink:vkGetPhysicalDeviceFeatures, flink:vkGetPhysicalDeviceProperties + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceQueueFamilyProperties.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceQueueFamilyProperties.txt new file mode 100644 index 00000000..ad7e2bd7 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceQueueFamilyProperties.txt @@ -0,0 +1,94 @@ +vkGetPhysicalDeviceQueueFamilyProperties(3) +=========================================== + +Name +---- +vkGetPhysicalDeviceQueueFamilyProperties - Reports properties of the queues of the specified physical device. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceQueueFamilyProperties.txt[] + +Parameters +---------- + +pname:physicalDevice:: + Physical device to query. + +pname:pQueueFamilyPropertyCount:: + Count indicating number of sname:VkQueueFamilyProperties pointed to by + pname:pQueueFamilyProperties. + +pname:pQueueFamilyProperties:: + Pointer to an array of sname:VkQueueFamilyProperties structures receiving the information about + each particular queue family. + +Description +----------- + +fname:vkGetPhysicalDeviceQueueFamilyProperties retrieves properties of the +queues on a physical device whose handle is given in pname:physicalDevice. +pname:pQueueFamilyPropertyCount must be set to the size of the array pointed +to by pname:pQueueFamilyProperties and thus specifies the number of queue +families to retrieve information for. The pname:pQueueFamilyProperties +parameter should point to an array of sname:VkQueueFamilyProperties +structures to be filled out with the properties of the queue families. If +pname:pQueueFamilyProperties is code:NULL then +fname:vkGetPhysicalDeviceQueueFamilyProperties will update the value pointed +by pname:pQueueFamilyPropertyCount with the number of queue families +available on the specified physical device. + +The device will overwrite the entries of pname:pQueueFamilyProperties with information about the +supported queues, and will write the number of structures filled into the variable pointed to by +pname:pQueueFamilyPropertyCount. Each element of pname:pQueueFamilyProperties is an instance of the +slink:VkQueueFamilyProperties structure, the definition of which is: + +include::../structs/VkQueueFamilyProperties.txt[] + +The members of slink:VkQueueFamilyProperties have the following meanings: + +* pname:queueFlags is a bitfield made up from members of the elink:VkQueueFlagBits enumeration indicating +capabilities of the queue. The list of capabilities is described below. + +* pname:queueCount contains the number of individual queues within the specified queue family. Queues +within a single family are considered identical from a feature support perspective and are directly +compatible with one another. + +* pname:timestampValidBits contains the number of valid bits that will be written to timestamp by +flink:vkCmdWriteTimestamp. Timestamps are always 64-bit unsigned integers. However, less than 64 bits +may actually be valid. Additional bits will contain zeros. If pname:timestampValidBits is zero +then the queue does not support timestamps and flink:vkCmdWriteTimestamp may not be used in command +buffers submitted to queues in this family. If pname:timestampValidBits is non-zero, it must be at +least 32, and may be as high as 64. + +The valid bits that may be contained in pname:queueFlags are comprised of the members of the +elink:VkQueueFlagBits enumeration, the definition of which is: + +include::../enums/VkQueueFlagBits.txt[] + +* If a queue's ptext:queueFlags member contains ename:VK_QUEUE_GRAPHICS_BIT, then it supports graphics +operations such as binding graphics state and graphics pipelines and executing drawing commands. + +* If a queue's ptext:queueFlags member contains ename:VK_QUEUE_COMPUTE_BIT, then it supports compute +operations such as binding compute pipelines and executing compute dispatches. + +* If a queue's ptext:queueFlags member contains ename:VK_QUEUE_TRANSFER_BIT, then it supports transsfer +operations, which include copying data an images. + +* If a queue's ptext:queueFlags member contains ename:VK_QUEUE_SPARSE_BINDING_BIT, then it supports +binding memory to sparse buffer and image resources. + +All Vulkan implementations must expose at least one queue, each of which has at least one queue +capability bit set. Note, though, that it is possible that new sets of capabilities are exposed +by extensions or future API versions and so a queue may have none of the bits listed above +set. + +include::../validity/protos/vkGetPhysicalDeviceQueueFamilyProperties.txt[] + +See Also +-------- + +flink:vkGetPhysicalDeviceFeatures, flink:vkGetPhysicalDeviceProperties, flink:vkGetPhysicalDeviceMemoryProperties, slink:VkQueueFamilyProperties + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceSparseImageFormatProperties.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceSparseImageFormatProperties.txt new file mode 100644 index 00000000..9d1a5f84 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceSparseImageFormatProperties.txt @@ -0,0 +1,107 @@ +vkGetPhysicalDeviceSparseImageFormatProperties(3) +================================================= + +Name +---- +vkGetPhysicalDeviceSparseImageFormatProperties - Retrieve properties of an image format applied to sparse images. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceSparseImageFormatProperties.txt[] + +Parameters +---------- + +pname:physicalDevice:: + The physical device whose properties to query. + +pname:format:: + The format about which to query the device. + +pname:type:: + The dimensionality of the image. + +pname:samples:: + The number of multisamples in the image. + +pname:usage:: + The intended usages for the image. + +pname:tiling:: + A set of flags defining the tiling of the image. + +pname:pPropertyCount:: + A pointer to a variable that contains the number of properties to query. + +pname:pProperties:: + A pointer to an array of slink:VkSparseImageFormatProperties structures that will receive the results of the query. + +Description +----------- + +fname:vkGetPhysicalDeviceSparseImageFormatProperties queries the physical device +specified in pname:physicalDevice for its support of the format described by +the remaining parameters to the command should that format be used with +a sparse image. + +pname:format specifies the format of the image and is a member of the +elink:VkFormat enumeration. pname:type specifies the type of the image +and is a member of the elink:VkImageType enumeration, the definition of +which is: + +include::../enums/VkImageType.txt[] + +The pname:samples parameter specifies the number of samples to be used in +the image and must be a supported sample count for the image format. The +possible values are: + +include::../enums/VkSampleCountFlagBits.txt[] + +If pname:samples is ename:VK_SAMPLE_COUNT_1_BIT then the image is not multisampled. + +The pname:usage parameter is a bitfield made up of members of the elink:VkImageUsageFlagBits +enumeration and specifies the intended usage for the image. The definition of +elink:VkImageUsageFlagBits is: + +include::../enums/VkImageUsageFlagBits.txt[] + +On input, pname:pPropertyCount points to a variable that is populated with +the number of aspects to query about the image. pname:pProperties is a pointer +to an array of at least this many slink:VkSparseImageFormatProperties +structures, the definition of which is: + +include::../structs/VkSparseImageFormatProperties.txt[] + +On return, the variable pointed to by pname:pPropertyCount will be overwritten +with the number of entries in pname:pProperties that were populated by the +command. + +In the slink:VkSparseImageFormatProperties structure, pname:aspectMask contains +the aspects of the image to which this property applies. pname:imageGranularity +contains the size, in texels at which image memory is to be bound to a sparse +image with the specified properties through a call to flink:vkQueueBindSparse. +pname:flags contains a bitfield of the supported flags for this image format, +and is a bitwise combination of members of the elink:VkSparseImageFormatFlagBits +enumeration, the definition of which is: + +include::../enums/VkSparseImageFormatFlagBits.txt[] + +include::../validity/protos/vkGetPhysicalDeviceFormatProperties.txt[] + +Return Value +------------ + +fname:vkGetPhysicalDeviceSparseImageFormatProperties does not return a value. +However, on success, the variable pname:pPropertyCount is overwritten with +the number of structures written into the array pointed to by pname:pProperties. +On failure, the variable is overwritten with zero. + +See Also +-------- + +flink:vkGetImageSparseMemoryRequirements, +flink:vkGetPhysicalDeviceImageFormatProperties, +flink:vkGetPhysicalDeviceFormatProperties + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceSurfaceCapabilitiesKHR.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceSurfaceCapabilitiesKHR.txt new file mode 100644 index 00000000..8a9c05f0 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceSurfaceCapabilitiesKHR.txt @@ -0,0 +1,42 @@ +vkGetPhysicalDeviceSurfaceCapabilitiesKHR(3) +=========================================== + +Name +---- +vkGetPhysicalDeviceSurfaceCapabilitiesKHR - get surface capabilities. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceSurfaceCapabilitiesKHR.txt[] + +Parameters +---------- + +pname:physicalDevice:: + A valid physical device. + +pname:surface:: + VkSurface to query. + +pname:pSurfaceCapabilities:: + A pointer to an instance of VkSurfaceCapabilitiesKHR that will be filled. + +Description +----------- + +fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR queries the basic capabilities of a surface, needed in order to create a swapchain. + +pname:pSurfaceCapabilities is an instance of the slink:VkSurfaceCapabilitiesKHR +structure, the definition of which is: + +include::../structs/VkSurfaceCapabilitiesKHR.txt[] + +include::../validity/protos/vkGetPhysicalDeviceSurfaceCapabilitiesKHR.txt[] + +See Also +-------- + +flink:vkGetPhysicalDeviceSurfaceFormatsKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceSurfaceFormatsKHR.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceSurfaceFormatsKHR.txt new file mode 100644 index 00000000..8030e9e6 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceSurfaceFormatsKHR.txt @@ -0,0 +1,46 @@ +vkGetPhysicalDeviceSurfaceFormatsKHR(3) +====================================== + +Name +---- +vkGetPhysicalDeviceSurfaceFormatsKHR - get color formats supported by surface. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceSurfaceFormatsKHR.txt[] + +Parameters +---------- + +pname:physicalDevice:: + A valid physical device. + +pname:surface:: + VkSurface to query. + +pname:pSurfaceFormatCount:: + The number of elements in the array pointed by pSurfaceFormats . + +pname:pSurfaceFormats:: + A pointer to an array of VkSurfaceFormatKHR. + +Description +----------- + +fname:vkGetPhysicalDeviceSurfaceFormatsKHR queries the supported swapchain format-colorspace pairs for a surface. + +pname:pSurfaceFormats is an instance of the slink:VkSurfaceFormatKHR +structure, the definition of which is: + +include::../structs/VkSurfaceFormatKHR.txt[] + +include::../validity/protos/vkGetPhysicalDeviceSurfaceFormatsKHR.txt[] + +See Also +-------- + +flink:vkGetPhysicalDeviceFormatProperties, flink:vkGetPhysicalDeviceImageFormatProperties, +flink:vkCreateSwapchainKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceSurfacePresentModesKHR.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceSurfacePresentModesKHR.txt new file mode 100644 index 00000000..0dbb6ffa --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceSurfacePresentModesKHR.txt @@ -0,0 +1,45 @@ +vkGetPhysicalDeviceSurfacePresentModesKHR(3) +=========================================== + +Name +---- +vkGetPhysicalDeviceSurfacePresentModesKHR - get supported presentation modes. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceSurfacePresentModesKHR.txt[] + +Parameters +---------- + +pname:physicalDevice:: + A valid physical device. + +pname:surface:: + The VkSurface to query. + +pname:pPresentModeCount:: + The number of elements in the array pointed by pPresentModes. + +pname:pPresentModes:: + Pointer to an array of VkPresentModeKHR. + +Description +----------- + +fname:vkCreateWaylandSurfaceKHR queries the supported presentation modes for a surface. + +pname:pPresentModes is an instance of the slink:VkPresentModeKHR +structure, the definition of which is: + +include::../structs/VkPresentModeKHR.txt[] + +include::../validity/protos/vkGetPhysicalDeviceSurfacePresentModesKHR.txt[] + +See Also +-------- + +flink:vkQueuePresentKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceSurfaceSupportKHR.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceSurfaceSupportKHR.txt new file mode 100644 index 00000000..fb5b295e --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceSurfaceSupportKHR.txt @@ -0,0 +1,40 @@ +vkGetPhysicalDeviceSurfaceSupportKHR(3) +====================================== + +Name +---- +vkGetPhysicalDeviceSurfaceSupportKHR - query if presentation is supported. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceSurfaceSupportKHR.txt[] + +Parameters +---------- + +pname:physicalDevice:: + A valid physical device. + +pname:queueFamilyIndex:: + A queue family. + +pname:surface:: + The surface to query. + +pname:pSupported:: + Indicates is presentation is supported. + +Description +----------- + +fname:vkGetPhysicalDeviceSurfaceSupportKHR determines whether a queue family of a physical device supports presentation to a given surface. + +include::../validity/protos/vkGetPhysicalDeviceSurfaceSupportKHR.txt[] + +See Also +-------- + +flink:vkQueuePresentKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceWaylandPresentationSupportKHR.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceWaylandPresentationSupportKHR.txt new file mode 100644 index 00000000..b17b79b7 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceWaylandPresentationSupportKHR.txt @@ -0,0 +1,37 @@ +vkGetPhysicalDeviceWaylandPresentationSupportKHR(3) +================================================== + +Name +---- +vkGetPhysicalDeviceWaylandPresentationSupportKHR - query physical device for presentation to Wayland. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceWaylandPresentationSupportKHR.txt[] + +Parameters +---------- + +pname:physicalDevice:: + A physical device handle. + +pname:queueFamilyIndex:: + Index to a queue family. + +pname:connection:: + Pointer to a wl_display associated with the Wayland compositor. + +Description +----------- + +fname:vkGetPhysicalDeviceWaylandPresentationSupportKHR determines whether a queue family of a physical device supports presentation to the Wayland compositor. + +include::../validity/protos/vkGetPhysicalDeviceWaylandPresentationSupportKHR.txt[] + +See Also +-------- + +flink:vkQueuePresentKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceWin32PresentationSupportKHR.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceWin32PresentationSupportKHR.txt new file mode 100644 index 00000000..c3d9e26e --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceWin32PresentationSupportKHR.txt @@ -0,0 +1,34 @@ +vkGetPhysicalDeviceWin32PresentationSupportKHR(3) +================================================ + +Name +---- +vkGetPhysicalDeviceWin32PresentationSupportKHR - query physical device for presentation to Windows desktop. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceWin32PresentationSupportKHR.txt[] + +Parameters +---------- + +pname:physicalDevice:: + A physical device handle. + +pname:queueFamilyIndex:: + Index to a queue family. + +Description +----------- + +fname:vkCreateWaylandSurfaceKHR determines whether a queue family of a physical device supports presentation to the Microsoft Windows desktop. + +include::../validity/protos/vkGetPhysicalDeviceWin32PresentationSupportKHR.txt[] + +See Also +-------- + +flink:vkQueuePresentKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceXcbPresentationSupportKHR.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceXcbPresentationSupportKHR.txt new file mode 100644 index 00000000..66e5807b --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceXcbPresentationSupportKHR.txt @@ -0,0 +1,40 @@ +vkGetPhysicalDeviceXcbPresentationSupportKHR(3) +============================================== + +Name +---- +vkGetPhysicalDeviceXcbPresentationSupportKHR - query physical device for presentation to X11 server using XCB. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceXcbPresentationSupportKHR.txt[] + +Parameters +---------- + +pname:physicalDevice:: + A physical device handle. + +pname:queueFamilyIndex:: + Index to a queue family. + +pname:connection:: + Pointer to a xcb_connection_t. + +pname:visual_id:: + An xcb_visualid_t. + +Description +----------- + +fname:vkGetPhysicalDeviceXcbPresentationSupportKHR determines whether a queue family of a physical device supports presentation to an X11 server, using the XCB client-side library. + +include::../validity/protos/vkGetPhysicalDeviceXcbPresentationSupportKHR.txt[] + +See Also +-------- + +flink:vkQueuePresentKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPhysicalDeviceXlibPresentationSupportKHR.txt b/doc/specs/vulkan/man/vkGetPhysicalDeviceXlibPresentationSupportKHR.txt new file mode 100644 index 00000000..0a40c926 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPhysicalDeviceXlibPresentationSupportKHR.txt @@ -0,0 +1,40 @@ +vkGetPhysicalDeviceXlibPresentationSupportKHR(3) +=============================================== + +Name +---- +vkGetPhysicalDeviceXlibPresentationSupportKHR - query physical device for presentation to X11 server using Xlib. + +C Specification +--------------- + +include::../protos/vkGetPhysicalDeviceXlibPresentationSupportKHR.txt[] + +Parameters +---------- + +pname:physicalDevice:: + A physical device handle. + +pname:queueFamilyIndex:: + Index to a queue family. + +pname:dpy:: + Pointer to an Xlib Display. + +pname:visualID:: + An X11 VisualID. + +Description +----------- + +fname:vkGetPhysicalDeviceXlibPresentationSupportKHR determines whether a queue family of a physical device supports presentation to an X11 server, using the Xlib client-side library. + +include::../validity/protos/vkGetPhysicalDeviceXlibPresentationSupportKHR.txt[] + +See Also +-------- + +flink:vkQueuePresentKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetPipelineCacheData.txt b/doc/specs/vulkan/man/vkGetPipelineCacheData.txt new file mode 100644 index 00000000..29939262 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetPipelineCacheData.txt @@ -0,0 +1,47 @@ +vkGetPipelineCacheData(3) +========================= + +Name +---- +vkGetPipelineCacheData - Get the data store from a pipeline cache + +C Specification +--------------- + +include::../protos/vkGetPipelineCacheData.txt[] + +Parameters +---------- + +pname:device:: + A handle to the device that is the parent of the pipeline cache. + +pname:pipelineCache:: + The pipeline cache whose data will be returned. + +pname:pDataSize:: + A pointer to a variable to receive the size (in bytes) of the data retrieved from the cache. + +pname:pData:: + A pointer to memory where the cache's data will be stored. + +Description +----------- + +fname:vkGetPipelineCacheData fills the output buffer pname:pData with a copy of the data +store of a pipeline cache, as a step in the process of the application retrieving and saving +the cache data. pname:pDataSize points to a variable that, on entry, contains the size +of the data area pointed to by pname:pData. If pname:pData is code:NULL, then the initial +value of the variable addressed by pname:pDataSize is ignored and overwritten with the +size of the data that would be returned. Otherwise, it is used to determine the size of +data that may be written to pname:pData, which should be large enough to receive the +entire data blob. + +include::../validity/protos/vkGetPipelineCacheData.txt[] + +See Also +-------- + +flink:vkCreatePipelineCache, flink:vkMergePipelineCaches + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetQueryPoolResults.txt b/doc/specs/vulkan/man/vkGetQueryPoolResults.txt new file mode 100644 index 00000000..686f61c1 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetQueryPoolResults.txt @@ -0,0 +1,66 @@ +vkGetQueryPoolResults(3) +========================= + +Name +---- +vkGetQueryPoolResults - Copy results of queries in a query pool to a host memory region. + +C Specification +--------------- + +include::../protos/vkGetQueryPoolResults.txt[] + +Parameters +---------- + +pname:device:: + Logical device owning the query pool. + +pname:queryPool:: + The query pool whose results should be copied to the buffer object. + +pname:startQuery:: + The index of the first query in the query pool whose results should be copied to the buffer object. + +pname:queryCount:: + The number of queries in the query pool whose results should be copied to the buffer object. + +pname:dataSize:: + The size of the data area pointed to by pname:pData. + +pname:pData:: + A pointer to a buffer that will be filled with query results. + +pname:stride:: + The stride, in bytes between the start of each query object in memory. + +pname:flags:: + The flags controlling the behavior of the query result copy command (see elink:VkQueryResultFlags). + +Description +----------- + +fname:vkGetQueryPoolResults copies the results of pname:queryCount number of queries in the query pool specified +by pname:queryPool starting from index pname:startQuery. The results are written to the host memory buffer specified +by pname:pData. pname:dataSize contains the size of the output buffer. If pname:pData is not code:NULL, +then the output buffer size must be large enough to hold the query results. The semantics of when and what values +written to the destination buffer are defined by the type of the queries in the query pool, the query control +flags passed to flink:vkCmdBeginQuery, and the query result control flags specified by pname:flags. + +include::../validity/protos/vkGetQueryPoolResults.txt[] + +Return Value +------------ + +Upon success, fname:vkGetQueryPoolResults returns ename:VK_SUCCESS and query results are +deposited in the buffer pointed to by pname:pData. If only some of the results are available, +fname:vkGetQueryPoolResults returns ename:VK_NOT_READY; in this case, if pname:flags contains +ename:VK_QUERY_RESULT_PARTIAL_BIT, partial results are deposited in the buffer pointed to by +pname:pData. Upon failure, a descriptive error code is returned. + +See Also +-------- + +flink:vkCmdCopyQueryPoolResults, elink:VkQueryResultFlags, flink:vkCmdBeginQuery, elink:VkQueryControlFlags + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetRenderAreaGranularity.txt b/doc/specs/vulkan/man/vkGetRenderAreaGranularity.txt new file mode 100644 index 00000000..766e2d32 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetRenderAreaGranularity.txt @@ -0,0 +1,61 @@ +vkGetRenderAreaGranularity(3) +============================= + +Name +---- +vkGetRenderAreaGranularity - Returns the granularity for optimal render area. + +C Specification +--------------- + +include::../protos/vkGetRenderAreaGranularity.txt[] + +Parameters +---------- + +pname:device:: + The device in which pname:renderPass was created. + +pname:renderPass:: + The render pass for which to query the render area granularity. + +pname:pGranularity:: + A pointer to a structure containing the return value. + +Description +----------- + +fname:vkGetRenderAreaGranularity returns the granularity at which the ptext:renderArea member of the +slink:VkRenderPassBeginInfo structure should be for optimal performance. pname:device +must be the device which created pname:renderPass. The pname:renderPass +parameter must be the same as the one given in the slink:VkRenderPassBeginInfo structure for which +the render area is relevant. pname:pGranularity must point to an instance of the slink:VkExtent2D +structure, which will be filled if fname:vkGetRenderAreaGranularity is successful. The definitions +of the slink:VkExtent2D structure is: + +include::../structs/VkExtent2D.txt[] + +The conditions leading to an optimal ptext:renderArea are: + +* the ptext:offset.x member of ptext:renderArea must be a multiple of the pname:width member of + the returned slink:VkExtent2D (the horizontal granularity). + +* the ptext:offset.y member of ptext:renderArea must be a multiple of the pname:height of the + returned slink:VkExtent2D (the vertical granularity). + +* it must be true that either the ptext:offset.width member of ptext:renderArea is a multiple of the + horizontal granularity or that ptext:offset.x + ptext:offset.width is equal to the + pname:width of the ptext:framebuffer in the slink:VkRenderPassBeginInfo. + +* it must be true that either the ptext:offset.height member of ptext:renderArea is a multiple of the + vertical granularity or that ptext:offset.y + ptext:offset.height is equal to the + pname:height of the ptext:framebuffer in the slink:VkRenderPassBeginInfo. + +include::../validity/protos/vkGetRenderAreaGranularity.txt[] + +See Also +-------- + +flink:vkCmdBeginRenderPass + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkGetSwapchainImagesKHR.txt b/doc/specs/vulkan/man/vkGetSwapchainImagesKHR.txt new file mode 100644 index 00000000..9e55a254 --- /dev/null +++ b/doc/specs/vulkan/man/vkGetSwapchainImagesKHR.txt @@ -0,0 +1,41 @@ +vkGetSwapchainImagesKHR(3) +========================= + +Name +---- +vkGetSwapchainImagesKHR - obtain the array of presentable images associated with a swapchain. + +C Specification +--------------- + +include::../protos/vkGetSwapchainImagesKHR.txt[] + +Parameters +---------- + +pname:device:: + The VkDevice associated with swapchain. + +pname:swapchain:: + The swwapchain. + +pname:pSwapchainImageCount:: + The number of elements in the array pointed by pSwapchainImages. + +pname:pSwapchainImages:: + The returned array of images. + +Description +----------- + +fname:vkGetSwapchainImagesKHR gets the array of images from a swapchain. + +include::../validity/protos/vkGetSwapchainImagesKHR.txt[] + +See Also +-------- + +flink:vkCreateSwapchainKHR, flink:vkCreateSharedSwapchainsKHR, +flink:vkAcquireNextImageKHR, flink:vkDestroySwapchainKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkInvalidateMappedMemoryRanges.txt b/doc/specs/vulkan/man/vkInvalidateMappedMemoryRanges.txt new file mode 100644 index 00000000..28308af2 --- /dev/null +++ b/doc/specs/vulkan/man/vkInvalidateMappedMemoryRanges.txt @@ -0,0 +1,52 @@ +vkInvalidateMappedMemoryRanges(3) +================================= + +Name +---- +vkInvalidateMappedMemoryRanges - Invalidate ranges of mapped memory objects. + +C Specification +--------------- + +include::../protos/vkInvalidateMappedMemoryRanges.txt[] + +Parameters +---------- + +pname:device:: + A handle to the logical device which owns the specified memory ranges. + +pname:memoryRangeCount:: + Number of memory ranges described by pname:pMemoryRanges. + +pname:pMemoryRanges:: + Memory ranges to invalidate. + +Description +----------- + +fname:vkInvalidateMappedMemoryRanges invalidates a number of ranges of a number of mapped memory +objects. pname:device is the handle to the device that owns the memory objects referenced by +the call. pname:memoryRangeCount specifies the number of memory ranges to invalidate and pname:pMemoryRanges +is a pointer to an array of slink:VkMappedMemoryRange structures describing the memory ranges +to be invalidated. The definition of slink:VkMappedMemoryRange is: + +include::../structs/VkMappedMemoryRange.txt[] + +The pname:sType member of each element of pname:pMemoryRanges should be set to ename:VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE. +The pname:memory member of the structure specifies the handle to the device memory object containing the +mapped region and pname:offset and pname:size specify the starting offset and size of the region, in bytes, respectively. +Areas of regions that extend outside the mapped portion of the parent memory object are ignored and +have no effect. + +After invalidation, any data stored in the referenced region is discarded and should be considered +stale. + +include::../validity/protos/vkInvalidateMappedMemoryRanges.txt[] + +See Also +-------- + +flink:vkFlushMappedMemoryRanges + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkMapMemory.txt b/doc/specs/vulkan/man/vkMapMemory.txt new file mode 100644 index 00000000..3f9f2234 --- /dev/null +++ b/doc/specs/vulkan/man/vkMapMemory.txt @@ -0,0 +1,49 @@ +vkMapMemory(3) +=============== + +Name +---- +vkMapMemory - Map a memory object into application address space. + +C Specification +--------------- + +include::../protos/vkMapMemory.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the memory object. + +pname:memory:: + A handle to the memory object to map. + +pname:offset:: + Start offset of the memory region to map. + +pname:size:: + Size of the memory region to map. + +pname:flags:: + This parameter is reserved and must be zero. + +pname:ppData:: + The pointer to a variable to receive the resulting application-visible address. + +Description +----------- + +fname:vkMapMemory maps a region of the memory object specified in `mem` into application +address space and returns the resulting pointer in the variable pointed to by `ppData`. +The mapped memory region starts at offset pname:offset and has a size of pname:size. +The `flags` parameter is reserved and should be set to zero. + +include::../validity/protos/vkMapMemory.txt[] + +See Also +-------- + +flink:vkUnmapMemory, flink:vkFlushMappedMemoryRanges, flink:vkInvalidateMappedMemoryRanges + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkMergePipelineCaches.txt b/doc/specs/vulkan/man/vkMergePipelineCaches.txt new file mode 100644 index 00000000..12dd44a7 --- /dev/null +++ b/doc/specs/vulkan/man/vkMergePipelineCaches.txt @@ -0,0 +1,41 @@ +vkMergePipelineCaches(3) +======================== + +Name +---- +vkMergePipelineCaches - Combine the data stores of pipeline caches. + +C Specification +--------------- + +include::../protos/vkMergePipelineCaches.txt[] + +Parameters +---------- + +pname:device:: + A handle to the device that is the parent of the pipeline caches. + +pname:dstCache:: + The pipeline cache the combined data will be stored into. + +pname:srcCacheCount:: + The number of pipeline caches in the pSrcCaches array. + +pname:pSrcCaches:: + An array of pipeline caches to be combined. + +Description +----------- + +This command combines the caches in the pname:pSrcCaches array, storing the +result in pname:dstCache. + +include::../validity/protos/vkMergePipelineCaches.txt[] + +See Also +-------- + +flink:vkCreatePipelineCache, flink:vkCreateGraphicsPipelines, flink:vkCreateComputePipelines, flink:vkGetPipelineCacheData + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkQueueBindSparse.txt b/doc/specs/vulkan/man/vkQueueBindSparse.txt new file mode 100644 index 00000000..a8d2ef82 --- /dev/null +++ b/doc/specs/vulkan/man/vkQueueBindSparse.txt @@ -0,0 +1,167 @@ +vkQueueBindSparse(3) +==================== + +Name +---- +vkQueueBindSparse - Bind device memory to a sparse resource object. + +C Specification +--------------- + +include::../protos/vkQueueBindSparse.txt[] + +Parameters +---------- + +pname:queue:: + The queue upon which to perform the operation. + +pname:bindInfoCount:: + The number of binding operations to perform. + +pname:pBindInfo:: + A pointer to an array of pname:bindInfoCount data structures describing + the binding operations to perform. + +pname:fence:: + A handle to a fence object that will be signaled when the binding + operation completes. + +Description +----------- + +fname:vkQueueBindSparse binds memory to sparse resources. The number of +binding operations to perform is specified in pname:bindInfoCount and +the binding operation takes place on the queue specified in pname:queue. +pname:queue must be the handle to a queue that is a member of a family +that supports the ename:VK_QUEUE_SPARSE_MEMMGR_BIT capability. + +pname:pBindInfo is a pointer to an array of pname:bindInfoCount +slink:VkBindSparseInfo structures describing each of the binding operations. +The definition of slink:VkBindSparseInfo is: + +include::../structs/VkBindSparseInfo.txt[] + +The pname:sType member of slink:VkBindSparseInfo should be +ename:VK_STRUCTURE_TYPE_BIND_SPARSE_INFO. The pname:pNext member is reserved +for use by extensions and should be set to code:NULL. + +The pname:waitSemaphoreCount member specifies the number of semaphores +that should be waited on before the binding operation takes place. +pname:pWaitSemaphores is a pointer to an array of basetype:VkSemaphore +objects to wait on. If pname:waitSemaphoreCount is zero then the value +of pname:pWaitSemaphores is ignored and the command will not wait before +performing the bind operations. + +The pname:bufferBindCount parameter specifies the number of binding +operations to apply to buffer objects. The pname:pBufferBinds parameter +is a pointer to an array of pname:bufferBindCount slink:VkSparseBufferMemoryBindInfo +structures describing the binding operations for buffers to be performed +by the command. The definition of slink:VkSparseBufferMemoryBindInfo is: + +include::../structs/VkSparseBufferMemoryBindInfo.txt[] + +The pname:buffer member of slink:VkSparseBufferMemoryBindInfo specifies the +target buffer, pname:bindCount specifies the number of binding operations +to apply to that buffer, and pname:pBinds is a pointer to an array of +slink:VkSparseMemoryBind structures describing the bindings. If +pname:bindCount is zero then the value of pname:pBinds is ignored and no +bindings are performed. The definition of slink:VkSparseMemoryBind is: + +include::../structs/VkSparseMemoryBind.txt[] + +For each element of the array of slink:VkSparseMemoryBind structures, +pname:resourceOffset and pname:size specify the starting offset +and size of the region in the buffer. Both are specified in bytes. +pname:memoryOffset specifies the offset of the region of the memory +object specified by pname:memory that is to be bound to the specified region +in the buffer object. pname:memoryOffset is also specified in bytes. +pname:resourceOffset, pname:size and pname:memoryOffset must each satisfy +the alignment requirements of the buffer. This is returned in the +ptext:alignment field of the slink:VkMemoryRequirements structure filled by a call to +flink:vkGetBufferMemoryRequirements. + +The pname:flags member of the slink:VkSparseMemoryBind structure is a +bitfield comprising members of the elink:VkSparseMemoryBindFlagBits +enumeration, the definition of which is: + +include::../enums/VkSparseMemoryBindFlagBits.txt[] + +If ename:VK_SPARSE_MEMORY_BIND_REPLICATE_BLOCK_BIT is set, only a single +block of memory is consumed from pname:memory and is replicated throughout +the region of the buffer object specified pname:resourceOffset and +pname:size as many times as neccessary to fill it. + +All other bits in pname:flags are reserved and should be set to zero. + +The ptext:imageOpaqueBindCount member specifies the number of opaque +image memory binding operations to execute and ptext:pImageOpaqueBinds +is a pointer to an array of ptext:imageOpaqueBindCount +slink:VkSparseImageOpaqueMemoryBindInfo structures describing those +operations. If ptext:imageOpaqueBindCount is zero then the value of +ptext:pImageOpaqueBinds is ignored and no binding operations are performed. +The definition of slink:VkSparseImageOpaqueMemoryBindInfo is: + +include::../structs/VkSparseImageOpaqueMemoryBindInfo.txt[] + +The pname:image member of the slink:VkSparseImageOpaqueMemoryBindInfo structure +specifies the image that is the target of the binding operation. pname:bindCount +specifies the number of binding operations to be applied to pname:image and +pname:pBinds is a pointer to an array of slink:VkSparseMemoryBind structures +describing those operations. If pname:bindCount is zero then the value of +pname:pBinds is ignored. Opaque memory binding operations are expressed +in terms of byte offsets. The slink:VkSparseMemoryBind structures pointed +to by the pname:pBinds member of slink:VkSparseImageOpaqueMemoryBindInfo +are interpreted as described for buffers above. + +The ptext:imageBindCount member of the slink:VkBindSparseInfo specifies the +number of non-opaque image bindings to perform, and the ptext:pImageBinds +member of the structure is a pointer to an array of ptext:imageBindCount +slink:VkSparseImageMemoryBindInfo structures describing those operations. +If ptext:imageBindCount is zero then the value of ptext:pImageBinds is +ignored. The definition of slink:VkSparseImageMemoryBindInfo is: + +include::../structs/VkSparseImageMemoryBindInfo.txt[] + +Within slink:VkSparseImageMemoryBindInfo, the pname:image member specifies +the image that is to be the target of the binding operation. pname:bindCount +specifies the number of binding operations to execute and pname:pBinds +is a pointer to an array of pname:bindCount slink:VkSparseImageMemoryBind +structes describing those operations. The definition of +slink:VkSparseImageMemoryBind is: + +include::../structs/VkSparseImageMemoryBind.txt[] + +The pname:subresource member of slink:VkSparseImageMemoryBind specifies the +subresource within the image to bind memory to. The pname:offset and +pname:extent members specify the region within the image subresource +to bind memory to. pname:offset and pname:extent are instances of the +slink:VkOffset3D and slink:VkExtent3D structures, respectively, and are +expressed in texels. The pname:memoryOffset member specifies the offset within +the memory object specified by pname:memory from which to bind memory. +pname:memoryOffset is expressed in bytes. Its value and the values contained +in pname:offset and pname:extent must satisfy device-specific alignment +requirements. + +The pname:flags member within slink:VkSparseImageMemoryBind has the same +interpretation as the similarly named member in slink:VkSparseMemoryBind. + +The ptext:signalSemaphoreCount parameter specifies the number of semaphores +to signal after the binding operations are complete. ptext:pSignalSemaphores +is a pointer to an array of ptext:signalSemaphoreCount basetype:VkSemaphore +objects to signal at this point. If ptext:signalSemaphoreCount is zero +then the value of ptext:pSignalSemaphores is ignored and no semaphores are +signaled as a result of the operation. + +include::../validity/protos/vkQueueBindSparse.txt[] + +See Also +-------- + +flink:vkQueueSubmit, +flink:vkBindBufferMemory, +flink:vkGetBufferMemoryRequirements, +flink:vkGetImageMemoryRequirements, +flink:vkBindImageMemory + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkQueuePresentKHR.txt b/doc/specs/vulkan/man/vkQueuePresentKHR.txt new file mode 100644 index 00000000..6b954189 --- /dev/null +++ b/doc/specs/vulkan/man/vkQueuePresentKHR.txt @@ -0,0 +1,40 @@ +vkQueuePresentKHR(3) +=================== + +Name +---- +vkQueuePresentKHR - queue an image for presentation. + +C Specification +--------------- + +include::../protos/vkQueuePresentKHR.txt[] + +Parameters +---------- + +pname:queue:: + A VkQueue that is capable of presentation to the target surface. + +pname:pPresentInfo:: + A pointer to a VkPresentInfoKHR structure specifying the parameters of the presentation. + +Description +----------- + +fname:vkQueuePresentKHR queues an image for presentation. + +pname:pPresentInfo is an instance of the slink:VkPresentInfoKHR +structure, the definition of which is: + +include::../structs/VkPresentInfoKHR.txt[] + +include::../validity/protos/vkQueuePresentKHR.txt[] + +See Also +-------- + +flink:vkGetPhysicalDeviceSurfacePresentModesKHR, flink:vkAcquireNextImageKHR, +flink:vkCreateSwapchainKHR + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkQueueSubmit.txt b/doc/specs/vulkan/man/vkQueueSubmit.txt new file mode 100644 index 00000000..163bc2a3 --- /dev/null +++ b/doc/specs/vulkan/man/vkQueueSubmit.txt @@ -0,0 +1,79 @@ +vkQueueSubmit(3) +================= + +Name +---- +vkQueueSubmit - Submits a sequence of semaphores or command buffers to a queue. + +C Specification +--------------- + +include::../protos/vkQueueSubmit.txt[] + +Parameters +---------- + +pname:queue:: + The queue to which to submit work. + +pname:submitCount:: + The number of submissions to make. + +pname:pSubmits:: + The address of an array of pname:submitCount slink:VkSubmitInfo + structures to submit to pname:queue. + +pname:fence:: + An optional fence object that will be signaled when all command buffers referenced in + pname:pSubmits have completed execution. + +Description +----------- + +fname:vkQueueSubmit makes one or more submissions to a the queue specified in pname:queue. +Each submision is represented by an element of an array of slink:VkSubmitInfo structures, +the address of which is specified in pname:pSubmits. The length of the array is +given by pname:submitCount. If pname:submitCount is zero then, pSubmits may be code:NULL, +in which case, no work is submitted to the queue. The definition of slink:VkSubmitInfo +is: + +include::../structs/VkSubmitInfo.txt[] + +If the pname:waitSemaphoreCount member of slink:VkSubmitInfo is not zero, +then pname:pWaitSemaphores is a pointer to an array of +pname:waitSemaphoreCount sname:VkSemaphore handles which will be waited on +before any further work is performed by the queue. + +After all semaphores specified in pname:pWaitSemaphores (if any) have become +signaled, the command buffers specified in pname:pCommandBuffers are +executed and those semaphores are again reset to the unsignaled state. +pname:pCommandBuffers is a pointer to an array of pname:commandBufferCount +sname:VkCommandBuffer handles to the command buffers to execute. If +pname:commandBufferCount is zero then pname:pCommandBuffers may be code:NULL +and no work is performed on the queue as a result. + +After all work specified in pname:pCommandBuffers (if any) has completed, +the semaphores specified in pname:pSignalSemaphores are signaled. +pname:pSignalSemaphores is a pointer to an array of +pname:signalSemaphoreCount sname:VkSemaphore handles. If +pname:signalSemaphoreCount is zero then pname:pSignalSemaphores may be +code:NULL. + +pname:fence is an optional handle to a fence which, if not code:VK_NULL_HANDLE, is +signaled when execution of the all elements of pname:pCommandBuffers in pname:pSubmits is completed. +If pname:submitCount is zero, but pname:fence is not code:NULL, the fence will still +be submitted to the queue and will become signaled when all work previusly submitted +to the queue has completed. + +An implementation may, at its option, choose to merge the submissions specified in +pname:pSubmits, but at least one submission is made to the queue and the work represented +by pname:pSubmits is guaranteed to complete in finite time. + +include::../validity/protos/vkQueueSubmit.txt[] + +See Also +-------- + +flink:vkBeginCommandBuffer, flink:vkEndCommandBuffer, flink:vkCreateSemaphore + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkQueueWaitIdle.txt b/doc/specs/vulkan/man/vkQueueWaitIdle.txt new file mode 100644 index 00000000..cbc4f285 --- /dev/null +++ b/doc/specs/vulkan/man/vkQueueWaitIdle.txt @@ -0,0 +1,36 @@ +vkQueueWaitIdle(3) +=================== + +Name +---- +vkQueueWaitIdle - Wait for a queue to become idle. + +C Specification +--------------- + +include::../protos/vkQueueWaitIdle.txt[] + +Parameters +---------- + +pname:queue:: + A handle to the queue that is to become idle. + +Description +----------- + +fname:vkQueueWaitIdle waits for all work submitted to the specified queue to complete and for +the queue to become idle. After the queue becomes idle, the following guarantees are made: + +* Any command buffers previously submitted to the queue have completed execution. +* Any events set or reset by command buffers submitted to that queue will be in their new state. +* Any semaphores signaled by previous calls to flink:vkQueueSubmit will have reached signaled state. + +include::../validity/protos/vkQueueWaitIdle.txt[] + +See Also +-------- + +flink:vkDeviceWaitIdle, flink:vkQueueSubmit + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkResetCommandBuffer.txt b/doc/specs/vulkan/man/vkResetCommandBuffer.txt new file mode 100644 index 00000000..bef2608f --- /dev/null +++ b/doc/specs/vulkan/man/vkResetCommandBuffer.txt @@ -0,0 +1,43 @@ +vkResetCommandBuffer(3) +======================= + +Name +---- +vkResetCommandBuffer - Reset a command buffer. + +C Specification +--------------- + +include::../protos/vkResetCommandBuffer.txt[] + +Parameters +---------- + +pname:commandBuffer:: + Command buffer to reset. + +pname:flags:: + Flags controlling the behavior of the Reset operation. For more details, + see elink:VkCommandBufferResetFlags. + +Description +----------- + +fname:vkResetCommandBuffer resets the command buffer specified in pname:commandBuffer to a +state where it can begin recording commands, i.e. it can be rebuilt by calling +fname:vkBeginCommandBuffer. Note that it is necessary to reset a command buffer +which encountered an error during build before it can be reused. + +If pname:flags includes ename:VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT, then most or +all memory resources currently owned by the command buffer should be returned to the +parent command pool. If this flag is not set, then the command buffer may hold onto +memory resources and reuse them when recording commands. + +include::../validity/protos/vkResetCommandBuffer.txt[] + +See Also +-------- + +flink:vkBeginCommandBuffer, flink:vkEndCommandBuffer + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkResetCommandPool.txt b/doc/specs/vulkan/man/vkResetCommandPool.txt new file mode 100644 index 00000000..c1f10e91 --- /dev/null +++ b/doc/specs/vulkan/man/vkResetCommandPool.txt @@ -0,0 +1,47 @@ +vkResetCommandPool(3) +===================== + +Name +---- +vkResetCommandPool - Reset a command pool. + +C Specification +--------------- + +include::../protos/vkResetCommandPool.txt[] + +Parameters +---------- + +pname:device:: + The device the command pool was created from. + +pname:commandPool:: + Command pool to reset. + +pname:flags:: + Flags controlling the behavior of the Reset operation. For more details, + see elink:VkCmdPoolResetFlags. + +Description +----------- + +fname:vkResetCommandPool resets the command pool specified in pname:commandPool to a +state that depends on the pname:flags. If pname:flags includes +ename:VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT, then the pool's memory is returned +to the system. If ename:VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT is not used, then the +pool's memory is return to an "unallocated" state which command buffers can allocate +from. + +Resetting a pool implicitly resets all command buffers that were created from it, where +resetting the command buffers is treated as if ename:VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT +were used. + +include::../validity/protos/vkResetCommandPool.txt[] + +See Also +-------- + +flink:vkCreateCommandPool, flink:vkDestroyCommandPool + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkResetDescriptorPool.txt b/doc/specs/vulkan/man/vkResetDescriptorPool.txt new file mode 100644 index 00000000..d2b98c82 --- /dev/null +++ b/doc/specs/vulkan/man/vkResetDescriptorPool.txt @@ -0,0 +1,36 @@ +vkResetDescriptorPool(3) +======================== + +Name +---- +vkResetDescriptorPool - Resets a descriptor pool object. + +C Specification +--------------- + +include::../protos/vkResetDescriptorPool.txt[] + +Parameters +---------- + +pname:device:: + Handle to the logical device which owns the descriptor pool object. + +pname:descriptorPool:: + Handle to the descriptor pool object which needs to be reset. + +Description +----------- + +fname:vkResetDescriptorPool returns all descriptor sets allocated from pname:descriptorPool to +the pool. This returns the pool to its initial state. pname:device must be the handle to the device +that owns the pool. + +include::../validity/protos/vkResetDescriptorPool.txt[] + +See Also +-------- + +flink:vkCreateDescriptorPool, flink:vkAllocateDescriptorSets, flink:vkFreeDescriptorSets + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkResetEvent.txt b/doc/specs/vulkan/man/vkResetEvent.txt new file mode 100644 index 00000000..6b1b4c52 --- /dev/null +++ b/doc/specs/vulkan/man/vkResetEvent.txt @@ -0,0 +1,34 @@ +vkResetEvent(3) +================ + +Name +---- +vkResetEvent - Reset an event to non-signaled state. + +C Specification +--------------- + +include::../protos/vkResetEvent.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the event. + +pname:event:: + A handle to the event object to reset. + +Description +----------- + +fname:vkResetEvent resets the event object specified by pname:event to the non-signaled state. + +include::../validity/protos/vkResetEvent.txt[] + +See Also +-------- + +flink:vkSetEvent, flink:vkCreateEvent + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkResetFences.txt b/doc/specs/vulkan/man/vkResetFences.txt new file mode 100644 index 00000000..d00c2bf7 --- /dev/null +++ b/doc/specs/vulkan/man/vkResetFences.txt @@ -0,0 +1,38 @@ +vkResetFences(3) +================ + +Name +---- +vkResetFences - Resets one or more fence objects. + +C Specification +--------------- + +include::../protos/vkResetFences.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the specified fences. + +pname:fenceCount:: + Number of fences specified under pname:pFences. + +pname:pFences:: + Fences to reset. + +Description +----------- + +fname:vkResetFences resets the status of the pname:fenceCount fences whose +handles are passed in the pname:pFences array to unsignaled. + +include::../validity/protos/vkResetFences.txt[] + +See Also +-------- + +flink:vkCreateFence, flink:vkDestroyFence, flink:vkGetFenceStatus, flink:vkWaitForFences + +include::footer.txt[] \ No newline at end of file diff --git a/doc/specs/vulkan/man/vkSetEvent.txt b/doc/specs/vulkan/man/vkSetEvent.txt new file mode 100644 index 00000000..5e8d91ae --- /dev/null +++ b/doc/specs/vulkan/man/vkSetEvent.txt @@ -0,0 +1,38 @@ +vkSetEvent(3) +============== + +Name +---- +vkSetEvent - Set an event to signaled state. + +C Specification +--------------- + +include::../protos/vkSetEvent.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the event. + +pname:event:: + Handle to the event object to signal. + +Description +----------- + +fname:vkSetEvent sets the event object specified by pname:event to signaled state. +pname:event must be an event object owned by pname:device. Subsequent calls to +flink:vkGetEventStatus on pname:event will return the new status. If any command +buffers are currently executing on any queue on pname:device and are waiting on +the event specified by pname:event, then they will be unblocked. + +include::../validity/protos/vkSetEvent.txt[] + +See Also +-------- + +flink:vkResetEvent, flink:vkGetEventStatus, flink:vkCmdSetEvent, flink:vkCmdWaitEvents + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkUnmapMemory.txt b/doc/specs/vulkan/man/vkUnmapMemory.txt new file mode 100644 index 00000000..365ef0a9 --- /dev/null +++ b/doc/specs/vulkan/man/vkUnmapMemory.txt @@ -0,0 +1,34 @@ +vkUnmapMemory(3) +================= + +Name +---- +vkUnmapMemory - Unmap a previously mapped memory object. + +C Specification +--------------- + +include::../protos/vkUnmapMemory.txt[] + +Parameters +---------- + +pname:device:: + Logical device which owns the memory object. + +pname:memory:: + A handle to the memory object to unmap. + +Description +----------- + +fname:vkUnmapMemory unmaps the previously mapped memory object specified by pname:memory. + +include::../validity/protos/vkUnmapMemory.txt[] + +See Also +-------- + +flink:vkMapMemory + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkUpdateDescriptorSets.txt b/doc/specs/vulkan/man/vkUpdateDescriptorSets.txt new file mode 100644 index 00000000..e68a6fa4 --- /dev/null +++ b/doc/specs/vulkan/man/vkUpdateDescriptorSets.txt @@ -0,0 +1,124 @@ +vkUpdateDescriptorSets(3) +========================= + +Name +---- +vkUpdateDescriptorSets - Update the contents of a descriptor set object. + +C Specification +--------------- + +include::../protos/vkUpdateDescriptorSets.txt[] + +Parameters +---------- + +pname:device:: + A handle to the device on which to update descriptor sets. + +pname:descriptorWriteCount:: + Number of descriptor set write requests. + +pname:pDescriptorWrites:: + Pointer to an array of pname:descriptorWriteCount number of + slink:VkWriteDescriptorSet structures each specifying the parameters of + a descriptor write request to a descriptor set. + +pname:descriptorCopyCount:: + Number of descriptor set copy requests. + +pname:pDescriptorCopies:: + Pointer to an array of pname:descriptorCopyCount number of + slink:VkCopyDescriptorSet structures each specifying the parameters of a + descriptor copy request between two descriptor sets. + +Description +----------- + +fname:vkUpdateDescriptorSets allows performing one or more descriptor set +update operations. + +There are two types of descriptor set update operations: descriptor write and descriptor copy requests. + +Descriptor write requests allow writing descriptor data coming from buffer view, image view, and sampler objects +to a range of descriptors within a destination descriptor set. Each descriptor write request is described +by an instance of the sname:VkWriteDescriptorSet structure. The definition of this structure is: + +include::../structs/VkWriteDescriptorSet.txt[] + +Additionally, the structure contains a pointer to an array of pname:descriptorCount +data structures that specify the buffer view, image view, and/or sampler +objects from where the descriptor data is sourced. The information about each +of the descriptor updates is stored in up to three arrays, ptext:pTexelBufferInfo, +which is an array of stext:VkBufferView handles, and pname:pImageInfo and +pname:pBufferInfo, which are arrays of slink:VkDescriptorImageInfo and +slink:VkDescriptorBufferInfo structures, respectively. The definitions of these +structures are as follows: + +include::../structs/VkDescriptorImageInfo.txt[] +include::../structs/VkDescriptorBufferInfo.txt[] + +Which of the ptext:pImageInfo, ptext:pBufferInfo and ptext:pTexelBufferView arrays is used +is determined from the value of ptext:descriptorType, as follows: + +If descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, +ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, or ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, +then the entries in ptext:pBufferInfo are used to update the descriptors and ptext:pImageInfo and +ptext:pTexelBufferInfo parameters are ignored. For each entry of ptext:pBufferInfo, ptext:buffer +specifies the handle of the buffer to bind to the descriptor set, and ptext:offset and ptext:range +specify the starting offset and size of the range of the buffer to bind, respectively, in bytes. + +For ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC and ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC +descriptor types, ptext:offset is the base offset from which the dynamic offset is applied and ptext:range +is the static size used for all dynamic offsets. + +If ptext:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or +ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, then the ptext:pTexelBufferView array are used to +update the descriptors, and the ptext:pImageInfo and ptext:pBufferInfo parameters are ignored. + +If ptext:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLER, ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, +ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or +ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the members in ptext:pImageInfo array are used to update the +descriptors and the ptext:pBufferInfo and ptext:pTexelBufferInfo members are ignored. + +Within each element of the ptext:pImageInfo array, the ptext:sampler member is a handle to the +sampler to bind and is used for descriptor types ename:VK_DESCRIPTOR_TYPE_SAMPLER and +ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER. The ptext:imageView is the image view handle +used for descriptor updates of type ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, +ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT. +The ptext:imageLayout member specifies the layout of the image and is used with descriptor types +ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, +ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT. + +A single descriptor write request may only update a continuous range of descriptors of the same type +though that range may cross binding boundaries. See slink:VkWriteDescriptorSet for more information. + +Descriptor copy requests allow copying a range of descriptors between a source and destination descriptor set. +Each descriptor copy request is described by an instance of the sname:VkCopyDescriptorSet structure, the definition +of which is: + +include::../structs/VkCopyDescriptorSet.txt[] + +This structure specifies the source and destination descriptor sets of the +copy operation in the pname:srcSet and pname:dstSet members, respectively. +The pname:srcBinding and pname:srcArrayElement members of the structure +specify the first entry in the source descriptor set that should be copied; +the pname:dstBinding and pname:dstArrayElement members specify the first +entry in the destination descriptor set where the source descriptors should +be copied to, while the pname:descriptorCount member specifies the number of +descriptors to copy. A single descriptor copy request may only copy between +two continuous ranges of descriptors of the same type though both the source +and desintation ranges may cross binding boundaries. See +slink:VkCopyDescriptorSet for more information. + +Attempting to update the contents of a descriptor set that is used by any command buffer that is pending +execution may result in undefined behavior. + +include::../validity/protos/vkUpdateDescriptorSets.txt[] + +See Also +-------- + +slink:VkWriteDescriptorSet, slink:VkCopyDescriptorSet, slink:VkDescriptorBufferInfo, slink:VkDescriptorImageInfo + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkWaitForFences.txt b/doc/specs/vulkan/man/vkWaitForFences.txt new file mode 100644 index 00000000..350b954c --- /dev/null +++ b/doc/specs/vulkan/man/vkWaitForFences.txt @@ -0,0 +1,56 @@ +vkWaitForFences(3) +=================== + +Name +---- +vkWaitForFences - Wait for one or more fences to become signaled. + +C Specification +--------------- + +include::../protos/vkWaitForFences.txt[] + +Parameters +---------- + +pname:device:: + The device owning the fences to be waited upon. + +pname:fenceCount:: + The number of fences to wait on. + +pname:pFences:: + The address of an array of fences to wait on. + +pname:waitAll:: + If true, wait for all fences to become signaled. Otherwise, wait for at least one fence to become signaled. + +pname:timeout:: + Timeout, in nanoseconds, to wait for fences to become signaled. + +Description +----------- + +fname:vkWaitForFences waits for one or more fences become signaled. pname:fenceCount is +the number of fences to wait on and pname:pFences is a pointer to an array of pname:fenceCount +fences. If pname:waitAll is code:VK_TRUE, then fname:vkWaitForFences waits for all fences in +the array to become signaled, otherwise it will return when any fence in the array becomes +signaled. If none of the fences are signaled before pname:timeout nanoseconds elapses, +then fname:vkWaitForFences will return without any fence necessarily becoming +signaled. + +include::../validity/protos/vkWaitForFences.txt[] + +Return Value +------------ + +Upon successful detection of a signaled fence, fname:vkWaitForFences returns ename:VK_SUCCESS. +If pname:timeout nanoseconds pass before any fence becomes signaled, fname:vkWaitForFences +returns ename:VK_TIMEOUT. Upon failure, a descriptive error code is returned. + +See Also +-------- + +flink:vkCreateFence, flink:vkDestroyFence, flink:vkResetFences + +include::footer.txt[] diff --git a/doc/specs/vulkan/man/vkman.css b/doc/specs/vulkan/man/vkman.css new file mode 100644 index 00000000..9499e4e9 --- /dev/null +++ b/doc/specs/vulkan/man/vkman.css @@ -0,0 +1,301 @@ +/* + CSS stylesheet for XHTML produced by DocBook XSL stylesheets. + Tested with XSL stylesheets 1.61.2, 1.67.2 +*/ + +span.strong { + font-weight: bold; +} + +body blockquote { + margin-top: .75em; + line-height: 1.5; + margin-bottom: .75em; +} + +html body { + margin: 1em 5% 1em 5%; + font-family: tahoma, veranda, sans-serif; +} + +body div { + margin: 0; +} + +h1, h2, h3, h4, h5, h6 +{ + color: #527bbd; + font-family: tahoma, verdana, sans-serif; +} + +.type { + color: #333333; + font-family: "courier new", monospace; + /* font-size: 1.2em; */ +} + +code { + font-family: "courier new", monospace; + /* font-size: 1.2em; */ +} + +div.toc p:first-child, +div.list-of-figures p:first-child, +div.list-of-tables p:first-child, +div.list-of-examples p:first-child, +div.example p.title, +div.sidebar p.title +{ + font-weight: bold; + color: #527bbd; + font-family: tahoma, verdana, sans-serif; + margin-bottom: 0.2em; +} + +div.refnamediv +{ + font-weight: bold; + color: #333377; +} + +em.parameter { + font-style: normal; + color: #000060; + font-family: "courier new", monospace; +} + +body h1 { + margin: .0em 0 0 -4%; + line-height: 1.3; + border-bottom: 2px solid silver; +} + +body h2 { + margin: 0.5em 0 0 -4%; + line-height: 1.3; + border-bottom: 2px solid silver; +} + +body h3 { + margin: .8em 0 0 -3%; + line-height: 1.3; +} + +body h4 { + margin: .8em 0 0 -3%; + line-height: 1.3; +} + +body h5 { + margin: .8em 0 0 -2%; + line-height: 1.3; +} + +body h6 { + margin: .8em 0 0 -1%; + line-height: 1.3; +} + +body hr { + border: none; /* Broken on IE6 */ +} +div.footnotes hr { + border: 1px solid silver; +} + +div.navheader th, div.navheader td, div.navfooter td { + font-family: sans-serif; + font-size: 0.9em; + font-weight: bold; + color: #527bbd; +} +div.navheader img, div.navfooter img { + border-style: none; +} +div.navheader a, div.navfooter a { + font-weight: normal; +} +div.navfooter hr { + border: 1px solid silver; +} + +body td { + line-height: 1.2 +} + +body th { + line-height: 1.2; +} + +ol { + line-height: 1.2; +} + +ul, body dir, body menu { + line-height: 1.2; +} + +html { + margin: 0; + padding: 0; +} + +body h1, body h2, body h3, body h4, body h5, body h6 { + margin-left: 0 +} + +body pre { + margin: 0.5em 10% 0.5em 1em; + line-height: 1.0; + color: #333333; +} + +tt.literal, code.literal { + color: navy; +} + +.programlisting, .screen { + border: 1px solid silver; + background: #f4f4f4; + margin: 0.5em 10% 0.5em 0; + padding: 0.5em 1em; + font-family: "courier new", monospace; +} + +div.sidebar { + background: #ffffee; + margin: 1.0em 10% 0.5em 0; + padding: 0.5em 1em; + border: 1px solid silver; +} +div.sidebar * { padding: 0; } +div.sidebar div { margin: 0; } +div.sidebar p.title { + margin-top: 0.5em; + margin-bottom: 0.2em; +} + +div.bibliomixed { + margin: 0.5em 5% 0.5em 1em; +} + +div.glossary dt { + font-weight: bold; +} +div.glossary dd p { + margin-top: 0.2em; +} + +dl { + margin: .8em 0; + line-height: 1.2; +} + +dt { + margin-top: 0.5em; +} + +dt span.term { + font-style: normal; + color: navy; +} + +div.variablelist dd p { + margin-top: 0; +} + +div.itemizedlist li, div.orderedlist li { + margin-left: -0.8em; + margin-top: 0.5em; +} + +ul, ol { + list-style-position: outside; +} + +div.sidebar ul, div.sidebar ol { + margin-left: 2.8em; +} + +div.itemizedlist p.title, +div.orderedlist p.title, +div.variablelist p.title +{ + margin-bottom: -0.8em; +} + +div.revhistory table { + border-collapse: collapse; + border: none; +} +div.revhistory th { + border: none; + color: #527bbd; + font-family: tahoma, verdana, sans-serif; +} +div.revhistory td { + border: 1px solid silver; +} + +/* Keep TOC and index lines close together. */ +div.toc dl, div.toc dt, +div.list-of-figures dl, div.list-of-figures dt, +div.list-of-tables dl, div.list-of-tables dt, +div.indexdiv dl, div.indexdiv dt +{ + line-height: normal; + margin-top: 0; + margin-bottom: 0; +} + +/* + Table styling does not work because of overriding attributes in + generated HTML. +*/ +div.table table, +div.informaltable table +{ + margin-left: 0; + margin-right: 5%; + margin-bottom: 0.8em; +} +div.informaltable table +{ + margin-top: 0.4em +} +div.table thead, +div.table tfoot, +div.table tbody, +div.informaltable thead, +div.informaltable tfoot, +div.informaltable tbody +{ + /* No effect in IE6. */ + border-top: 3px solid #527bbd; + border-bottom: 3px solid #527bbd; +} +div.table thead, div.table tfoot, +div.informaltable thead, div.informaltable tfoot +{ + font-weight: bold; +} + +div.mediaobject img { + margin-bottom: 0.8em; +} +div.figure p.title, +div.table p.title +{ + margin-top: 1em; + margin-bottom: 0.4em; +} + +div.calloutlist p +{ + margin-top: 0em; + margin-bottom: 0.4em; +} + +@media print { + div.navheader, div.navfooter { display: none; } +} diff --git a/doc/specs/vulkan/protos/vkAllocateCommandBuffers.txt b/doc/specs/vulkan/protos/vkAllocateCommandBuffers.txt new file mode 100644 index 00000000..42478e6b --- /dev/null +++ b/doc/specs/vulkan/protos/vkAllocateCommandBuffers.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkAllocateCommandBuffers,vkAllocateCommandBuffers]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkAllocateCommandBuffers( + VkDevice device, + const VkCommandBufferAllocateInfo* pAllocateInfo, + VkCommandBuffer* pCommandBuffers); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkAllocateDescriptorSets.txt b/doc/specs/vulkan/protos/vkAllocateDescriptorSets.txt new file mode 100644 index 00000000..7d800835 --- /dev/null +++ b/doc/specs/vulkan/protos/vkAllocateDescriptorSets.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkAllocateDescriptorSets,vkAllocateDescriptorSets]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkAllocateDescriptorSets( + VkDevice device, + const VkDescriptorSetAllocateInfo* pAllocateInfo, + VkDescriptorSet* pDescriptorSets); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkAllocateMemory.txt b/doc/specs/vulkan/protos/vkAllocateMemory.txt new file mode 100644 index 00000000..83c05014 --- /dev/null +++ b/doc/specs/vulkan/protos/vkAllocateMemory.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkAllocateMemory,vkAllocateMemory]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkAllocateMemory( + VkDevice device, + const VkMemoryAllocateInfo* pAllocateInfo, + const VkAllocationCallbacks* pAllocator, + VkDeviceMemory* pMemory); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkBeginCommandBuffer.txt b/doc/specs/vulkan/protos/vkBeginCommandBuffer.txt new file mode 100644 index 00000000..e2bab4f5 --- /dev/null +++ b/doc/specs/vulkan/protos/vkBeginCommandBuffer.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkBeginCommandBuffer,vkBeginCommandBuffer]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkBeginCommandBuffer( + VkCommandBuffer commandBuffer, + const VkCommandBufferBeginInfo* pBeginInfo); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkBindBufferMemory.txt b/doc/specs/vulkan/protos/vkBindBufferMemory.txt new file mode 100644 index 00000000..14b53f96 --- /dev/null +++ b/doc/specs/vulkan/protos/vkBindBufferMemory.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkBindBufferMemory,vkBindBufferMemory]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkBindBufferMemory( + VkDevice device, + VkBuffer buffer, + VkDeviceMemory memory, + VkDeviceSize memoryOffset); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkBindImageMemory.txt b/doc/specs/vulkan/protos/vkBindImageMemory.txt new file mode 100644 index 00000000..f1e69659 --- /dev/null +++ b/doc/specs/vulkan/protos/vkBindImageMemory.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkBindImageMemory,vkBindImageMemory]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkBindImageMemory( + VkDevice device, + VkImage image, + VkDeviceMemory memory, + VkDeviceSize memoryOffset); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdBeginQuery.txt b/doc/specs/vulkan/protos/vkCmdBeginQuery.txt new file mode 100644 index 00000000..bfcd81a7 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdBeginQuery.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdBeginQuery,vkCmdBeginQuery]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdBeginQuery( + VkCommandBuffer commandBuffer, + VkQueryPool queryPool, + uint32_t query, + VkQueryControlFlags flags); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdBeginRenderPass.txt b/doc/specs/vulkan/protos/vkCmdBeginRenderPass.txt new file mode 100644 index 00000000..0970ec3f --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdBeginRenderPass.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdBeginRenderPass,vkCmdBeginRenderPass]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdBeginRenderPass( + VkCommandBuffer commandBuffer, + const VkRenderPassBeginInfo* pRenderPassBegin, + VkSubpassContents contents); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdBindDescriptorSets.txt b/doc/specs/vulkan/protos/vkCmdBindDescriptorSets.txt new file mode 100644 index 00000000..9026d06a --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdBindDescriptorSets.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdBindDescriptorSets,vkCmdBindDescriptorSets]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdBindDescriptorSets( + VkCommandBuffer commandBuffer, + VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, + uint32_t firstSet, + uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets, + uint32_t dynamicOffsetCount, + const uint32_t* pDynamicOffsets); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdBindIndexBuffer.txt b/doc/specs/vulkan/protos/vkCmdBindIndexBuffer.txt new file mode 100644 index 00000000..73d6204f --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdBindIndexBuffer.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdBindIndexBuffer,vkCmdBindIndexBuffer]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdBindIndexBuffer( + VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkIndexType indexType); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdBindPipeline.txt b/doc/specs/vulkan/protos/vkCmdBindPipeline.txt new file mode 100644 index 00000000..e86375a0 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdBindPipeline.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdBindPipeline,vkCmdBindPipeline]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdBindPipeline( + VkCommandBuffer commandBuffer, + VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdBindVertexBuffers.txt b/doc/specs/vulkan/protos/vkCmdBindVertexBuffers.txt new file mode 100644 index 00000000..5ae19f33 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdBindVertexBuffers.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdBindVertexBuffers,vkCmdBindVertexBuffers]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdBindVertexBuffers( + VkCommandBuffer commandBuffer, + uint32_t firstBinding, + uint32_t bindingCount, + const VkBuffer* pBuffers, + const VkDeviceSize* pOffsets); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdBlitImage.txt b/doc/specs/vulkan/protos/vkCmdBlitImage.txt new file mode 100644 index 00000000..a48e7291 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdBlitImage.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdBlitImage,vkCmdBlitImage]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdBlitImage( + VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageBlit* pRegions, + VkFilter filter); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdClearAttachments.txt b/doc/specs/vulkan/protos/vkCmdClearAttachments.txt new file mode 100644 index 00000000..0f79c41c --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdClearAttachments.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdClearAttachments,vkCmdClearAttachments]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdClearAttachments( + VkCommandBuffer commandBuffer, + uint32_t attachmentCount, + const VkClearAttachment* pAttachments, + uint32_t rectCount, + const VkClearRect* pRects); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdClearColorImage.txt b/doc/specs/vulkan/protos/vkCmdClearColorImage.txt new file mode 100644 index 00000000..d2148d59 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdClearColorImage.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdClearColorImage,vkCmdClearColorImage]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdClearColorImage( + VkCommandBuffer commandBuffer, + VkImage image, + VkImageLayout imageLayout, + const VkClearColorValue* pColor, + uint32_t rangeCount, + const VkImageSubresourceRange* pRanges); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdClearDepthStencilImage.txt b/doc/specs/vulkan/protos/vkCmdClearDepthStencilImage.txt new file mode 100644 index 00000000..2a5523fe --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdClearDepthStencilImage.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdClearDepthStencilImage,vkCmdClearDepthStencilImage]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdClearDepthStencilImage( + VkCommandBuffer commandBuffer, + VkImage image, + VkImageLayout imageLayout, + const VkClearDepthStencilValue* pDepthStencil, + uint32_t rangeCount, + const VkImageSubresourceRange* pRanges); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdCopyBuffer.txt b/doc/specs/vulkan/protos/vkCmdCopyBuffer.txt new file mode 100644 index 00000000..da33d0db --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdCopyBuffer.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdCopyBuffer,vkCmdCopyBuffer]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdCopyBuffer( + VkCommandBuffer commandBuffer, + VkBuffer srcBuffer, + VkBuffer dstBuffer, + uint32_t regionCount, + const VkBufferCopy* pRegions); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdCopyBufferToImage.txt b/doc/specs/vulkan/protos/vkCmdCopyBufferToImage.txt new file mode 100644 index 00000000..50d2e2cc --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdCopyBufferToImage.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdCopyBufferToImage,vkCmdCopyBufferToImage]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdCopyBufferToImage( + VkCommandBuffer commandBuffer, + VkBuffer srcBuffer, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkBufferImageCopy* pRegions); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdCopyImage.txt b/doc/specs/vulkan/protos/vkCmdCopyImage.txt new file mode 100644 index 00000000..ab27bfb2 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdCopyImage.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdCopyImage,vkCmdCopyImage]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdCopyImage( + VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageCopy* pRegions); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdCopyImageToBuffer.txt b/doc/specs/vulkan/protos/vkCmdCopyImageToBuffer.txt new file mode 100644 index 00000000..2e3332e0 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdCopyImageToBuffer.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdCopyImageToBuffer,vkCmdCopyImageToBuffer]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdCopyImageToBuffer( + VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkBuffer dstBuffer, + uint32_t regionCount, + const VkBufferImageCopy* pRegions); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdCopyQueryPoolResults.txt b/doc/specs/vulkan/protos/vkCmdCopyQueryPoolResults.txt new file mode 100644 index 00000000..72ad53c9 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdCopyQueryPoolResults.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdCopyQueryPoolResults,vkCmdCopyQueryPoolResults]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdCopyQueryPoolResults( + VkCommandBuffer commandBuffer, + VkQueryPool queryPool, + uint32_t firstQuery, + uint32_t queryCount, + VkBuffer dstBuffer, + VkDeviceSize dstOffset, + VkDeviceSize stride, + VkQueryResultFlags flags); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdDispatch.txt b/doc/specs/vulkan/protos/vkCmdDispatch.txt new file mode 100644 index 00000000..8e1154b1 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdDispatch.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdDispatch,vkCmdDispatch]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdDispatch( + VkCommandBuffer commandBuffer, + uint32_t x, + uint32_t y, + uint32_t z); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdDispatchIndirect.txt b/doc/specs/vulkan/protos/vkCmdDispatchIndirect.txt new file mode 100644 index 00000000..10160bbd --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdDispatchIndirect.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdDispatchIndirect,vkCmdDispatchIndirect]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdDispatchIndirect( + VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdDraw.txt b/doc/specs/vulkan/protos/vkCmdDraw.txt new file mode 100644 index 00000000..6124ab81 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdDraw.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdDraw,vkCmdDraw]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdDraw( + VkCommandBuffer commandBuffer, + uint32_t vertexCount, + uint32_t instanceCount, + uint32_t firstVertex, + uint32_t firstInstance); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdDrawIndexed.txt b/doc/specs/vulkan/protos/vkCmdDrawIndexed.txt new file mode 100644 index 00000000..b983bc90 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdDrawIndexed.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdDrawIndexed,vkCmdDrawIndexed]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdDrawIndexed( + VkCommandBuffer commandBuffer, + uint32_t indexCount, + uint32_t instanceCount, + uint32_t firstIndex, + int32_t vertexOffset, + uint32_t firstInstance); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdDrawIndexedIndirect.txt b/doc/specs/vulkan/protos/vkCmdDrawIndexedIndirect.txt new file mode 100644 index 00000000..bee567af --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdDrawIndexedIndirect.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdDrawIndexedIndirect,vkCmdDrawIndexedIndirect]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdDrawIndexedIndirect( + VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + uint32_t drawCount, + uint32_t stride); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdDrawIndirect.txt b/doc/specs/vulkan/protos/vkCmdDrawIndirect.txt new file mode 100644 index 00000000..e5872018 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdDrawIndirect.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdDrawIndirect,vkCmdDrawIndirect]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdDrawIndirect( + VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + uint32_t drawCount, + uint32_t stride); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdEndQuery.txt b/doc/specs/vulkan/protos/vkCmdEndQuery.txt new file mode 100644 index 00000000..886b314b --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdEndQuery.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdEndQuery,vkCmdEndQuery]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdEndQuery( + VkCommandBuffer commandBuffer, + VkQueryPool queryPool, + uint32_t query); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdEndRenderPass.txt b/doc/specs/vulkan/protos/vkCmdEndRenderPass.txt new file mode 100644 index 00000000..3b5de4c6 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdEndRenderPass.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdEndRenderPass,vkCmdEndRenderPass]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdEndRenderPass( + VkCommandBuffer commandBuffer); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdExecuteCommands.txt b/doc/specs/vulkan/protos/vkCmdExecuteCommands.txt new file mode 100644 index 00000000..7e2d7311 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdExecuteCommands.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdExecuteCommands,vkCmdExecuteCommands]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdExecuteCommands( + VkCommandBuffer commandBuffer, + uint32_t commandBufferCount, + const VkCommandBuffer* pCommandBuffers); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdFillBuffer.txt b/doc/specs/vulkan/protos/vkCmdFillBuffer.txt new file mode 100644 index 00000000..2bd1f19a --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdFillBuffer.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdFillBuffer,vkCmdFillBuffer]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdFillBuffer( + VkCommandBuffer commandBuffer, + VkBuffer dstBuffer, + VkDeviceSize dstOffset, + VkDeviceSize size, + uint32_t data); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdNextSubpass.txt b/doc/specs/vulkan/protos/vkCmdNextSubpass.txt new file mode 100644 index 00000000..55b1744c --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdNextSubpass.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdNextSubpass,vkCmdNextSubpass]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdNextSubpass( + VkCommandBuffer commandBuffer, + VkSubpassContents contents); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdPipelineBarrier.txt b/doc/specs/vulkan/protos/vkCmdPipelineBarrier.txt new file mode 100644 index 00000000..ed8c6f2f --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdPipelineBarrier.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdPipelineBarrier,vkCmdPipelineBarrier]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdPipelineBarrier( + VkCommandBuffer commandBuffer, + VkPipelineStageFlags srcStageMask, + VkPipelineStageFlags dstStageMask, + VkDependencyFlags dependencyFlags, + uint32_t memoryBarrierCount, + const VkMemoryBarrier* pMemoryBarriers, + uint32_t bufferMemoryBarrierCount, + const VkBufferMemoryBarrier* pBufferMemoryBarriers, + uint32_t imageMemoryBarrierCount, + const VkImageMemoryBarrier* pImageMemoryBarriers); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdPushConstants.txt b/doc/specs/vulkan/protos/vkCmdPushConstants.txt new file mode 100644 index 00000000..8e40a302 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdPushConstants.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdPushConstants,vkCmdPushConstants]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdPushConstants( + VkCommandBuffer commandBuffer, + VkPipelineLayout layout, + VkShaderStageFlags stageFlags, + uint32_t offset, + uint32_t size, + const void* pValues); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdResetEvent.txt b/doc/specs/vulkan/protos/vkCmdResetEvent.txt new file mode 100644 index 00000000..6f435243 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdResetEvent.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdResetEvent,vkCmdResetEvent]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdResetEvent( + VkCommandBuffer commandBuffer, + VkEvent event, + VkPipelineStageFlags stageMask); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdResetQueryPool.txt b/doc/specs/vulkan/protos/vkCmdResetQueryPool.txt new file mode 100644 index 00000000..ceec1922 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdResetQueryPool.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdResetQueryPool,vkCmdResetQueryPool]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdResetQueryPool( + VkCommandBuffer commandBuffer, + VkQueryPool queryPool, + uint32_t firstQuery, + uint32_t queryCount); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdResolveImage.txt b/doc/specs/vulkan/protos/vkCmdResolveImage.txt new file mode 100644 index 00000000..c52f1855 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdResolveImage.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdResolveImage,vkCmdResolveImage]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdResolveImage( + VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageResolve* pRegions); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdSetBlendConstants.txt b/doc/specs/vulkan/protos/vkCmdSetBlendConstants.txt new file mode 100644 index 00000000..bf0f2cd6 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdSetBlendConstants.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdSetBlendConstants,vkCmdSetBlendConstants]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdSetBlendConstants( + VkCommandBuffer commandBuffer, + const float blendConstants[4]); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdSetDepthBias.txt b/doc/specs/vulkan/protos/vkCmdSetDepthBias.txt new file mode 100644 index 00000000..59c935a6 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdSetDepthBias.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdSetDepthBias,vkCmdSetDepthBias]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdSetDepthBias( + VkCommandBuffer commandBuffer, + float depthBiasConstantFactor, + float depthBiasClamp, + float depthBiasSlopeFactor); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdSetDepthBounds.txt b/doc/specs/vulkan/protos/vkCmdSetDepthBounds.txt new file mode 100644 index 00000000..46b623bb --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdSetDepthBounds.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdSetDepthBounds,vkCmdSetDepthBounds]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdSetDepthBounds( + VkCommandBuffer commandBuffer, + float minDepthBounds, + float maxDepthBounds); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdSetEvent.txt b/doc/specs/vulkan/protos/vkCmdSetEvent.txt new file mode 100644 index 00000000..12f879cc --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdSetEvent.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdSetEvent,vkCmdSetEvent]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdSetEvent( + VkCommandBuffer commandBuffer, + VkEvent event, + VkPipelineStageFlags stageMask); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdSetLineWidth.txt b/doc/specs/vulkan/protos/vkCmdSetLineWidth.txt new file mode 100644 index 00000000..897f1089 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdSetLineWidth.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdSetLineWidth,vkCmdSetLineWidth]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdSetLineWidth( + VkCommandBuffer commandBuffer, + float lineWidth); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdSetScissor.txt b/doc/specs/vulkan/protos/vkCmdSetScissor.txt new file mode 100644 index 00000000..0f81df31 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdSetScissor.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdSetScissor,vkCmdSetScissor]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdSetScissor( + VkCommandBuffer commandBuffer, + uint32_t firstScissor, + uint32_t scissorCount, + const VkRect2D* pScissors); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdSetStencilCompareMask.txt b/doc/specs/vulkan/protos/vkCmdSetStencilCompareMask.txt new file mode 100644 index 00000000..72d9578f --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdSetStencilCompareMask.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdSetStencilCompareMask,vkCmdSetStencilCompareMask]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdSetStencilCompareMask( + VkCommandBuffer commandBuffer, + VkStencilFaceFlags faceMask, + uint32_t compareMask); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdSetStencilReference.txt b/doc/specs/vulkan/protos/vkCmdSetStencilReference.txt new file mode 100644 index 00000000..26a91349 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdSetStencilReference.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdSetStencilReference,vkCmdSetStencilReference]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdSetStencilReference( + VkCommandBuffer commandBuffer, + VkStencilFaceFlags faceMask, + uint32_t reference); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdSetStencilWriteMask.txt b/doc/specs/vulkan/protos/vkCmdSetStencilWriteMask.txt new file mode 100644 index 00000000..6e81becc --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdSetStencilWriteMask.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdSetStencilWriteMask,vkCmdSetStencilWriteMask]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdSetStencilWriteMask( + VkCommandBuffer commandBuffer, + VkStencilFaceFlags faceMask, + uint32_t writeMask); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdSetViewport.txt b/doc/specs/vulkan/protos/vkCmdSetViewport.txt new file mode 100644 index 00000000..158651cc --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdSetViewport.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdSetViewport,vkCmdSetViewport]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdSetViewport( + VkCommandBuffer commandBuffer, + uint32_t firstViewport, + uint32_t viewportCount, + const VkViewport* pViewports); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdUpdateBuffer.txt b/doc/specs/vulkan/protos/vkCmdUpdateBuffer.txt new file mode 100644 index 00000000..11fdf397 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdUpdateBuffer.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdUpdateBuffer,vkCmdUpdateBuffer]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdUpdateBuffer( + VkCommandBuffer commandBuffer, + VkBuffer dstBuffer, + VkDeviceSize dstOffset, + VkDeviceSize dataSize, + const uint32_t* pData); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdWaitEvents.txt b/doc/specs/vulkan/protos/vkCmdWaitEvents.txt new file mode 100644 index 00000000..99fa47ef --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdWaitEvents.txt @@ -0,0 +1,22 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdWaitEvents,vkCmdWaitEvents]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdWaitEvents( + VkCommandBuffer commandBuffer, + uint32_t eventCount, + const VkEvent* pEvents, + VkPipelineStageFlags srcStageMask, + VkPipelineStageFlags dstStageMask, + uint32_t memoryBarrierCount, + const VkMemoryBarrier* pMemoryBarriers, + uint32_t bufferMemoryBarrierCount, + const VkBufferMemoryBarrier* pBufferMemoryBarriers, + uint32_t imageMemoryBarrierCount, + const VkImageMemoryBarrier* pImageMemoryBarriers); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCmdWriteTimestamp.txt b/doc/specs/vulkan/protos/vkCmdWriteTimestamp.txt new file mode 100644 index 00000000..4d0e5500 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCmdWriteTimestamp.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCmdWriteTimestamp,vkCmdWriteTimestamp]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkCmdWriteTimestamp( + VkCommandBuffer commandBuffer, + VkPipelineStageFlagBits pipelineStage, + VkQueryPool queryPool, + uint32_t query); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateBuffer.txt b/doc/specs/vulkan/protos/vkCreateBuffer.txt new file mode 100644 index 00000000..01169900 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateBuffer.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateBuffer,vkCreateBuffer]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateBuffer( + VkDevice device, + const VkBufferCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkBuffer* pBuffer); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateBufferView.txt b/doc/specs/vulkan/protos/vkCreateBufferView.txt new file mode 100644 index 00000000..1e00ca71 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateBufferView.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateBufferView,vkCreateBufferView]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateBufferView( + VkDevice device, + const VkBufferViewCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkBufferView* pView); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateCommandPool.txt b/doc/specs/vulkan/protos/vkCreateCommandPool.txt new file mode 100644 index 00000000..1ac342e0 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateCommandPool.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateCommandPool,vkCreateCommandPool]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateCommandPool( + VkDevice device, + const VkCommandPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkCommandPool* pCommandPool); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateComputePipelines.txt b/doc/specs/vulkan/protos/vkCreateComputePipelines.txt new file mode 100644 index 00000000..9e950cc6 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateComputePipelines.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateComputePipelines,vkCreateComputePipelines]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateComputePipelines( + VkDevice device, + VkPipelineCache pipelineCache, + uint32_t createInfoCount, + const VkComputePipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, + VkPipeline* pPipelines); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateDescriptorPool.txt b/doc/specs/vulkan/protos/vkCreateDescriptorPool.txt new file mode 100644 index 00000000..9601a177 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateDescriptorPool.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateDescriptorPool,vkCreateDescriptorPool]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateDescriptorPool( + VkDevice device, + const VkDescriptorPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorPool* pDescriptorPool); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateDescriptorSetLayout.txt b/doc/specs/vulkan/protos/vkCreateDescriptorSetLayout.txt new file mode 100644 index 00000000..8e101194 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateDescriptorSetLayout.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateDescriptorSetLayout,vkCreateDescriptorSetLayout]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateDescriptorSetLayout( + VkDevice device, + const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorSetLayout* pSetLayout); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateDevice.txt b/doc/specs/vulkan/protos/vkCreateDevice.txt new file mode 100644 index 00000000..559a88ef --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateDevice.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateDevice,vkCreateDevice]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateDevice( + VkPhysicalDevice physicalDevice, + const VkDeviceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDevice* pDevice); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateEvent.txt b/doc/specs/vulkan/protos/vkCreateEvent.txt new file mode 100644 index 00000000..c5259ec0 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateEvent.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateEvent,vkCreateEvent]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateEvent( + VkDevice device, + const VkEventCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkEvent* pEvent); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateFence.txt b/doc/specs/vulkan/protos/vkCreateFence.txt new file mode 100644 index 00000000..f86b5e82 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateFence.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateFence,vkCreateFence]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateFence( + VkDevice device, + const VkFenceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkFence* pFence); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateFramebuffer.txt b/doc/specs/vulkan/protos/vkCreateFramebuffer.txt new file mode 100644 index 00000000..4436c547 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateFramebuffer.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateFramebuffer,vkCreateFramebuffer]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateFramebuffer( + VkDevice device, + const VkFramebufferCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkFramebuffer* pFramebuffer); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateGraphicsPipelines.txt b/doc/specs/vulkan/protos/vkCreateGraphicsPipelines.txt new file mode 100644 index 00000000..cca6838a --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateGraphicsPipelines.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateGraphicsPipelines,vkCreateGraphicsPipelines]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateGraphicsPipelines( + VkDevice device, + VkPipelineCache pipelineCache, + uint32_t createInfoCount, + const VkGraphicsPipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, + VkPipeline* pPipelines); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateImage.txt b/doc/specs/vulkan/protos/vkCreateImage.txt new file mode 100644 index 00000000..e23d6069 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateImage.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateImage,vkCreateImage]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateImage( + VkDevice device, + const VkImageCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkImage* pImage); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateImageView.txt b/doc/specs/vulkan/protos/vkCreateImageView.txt new file mode 100644 index 00000000..a0fce087 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateImageView.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateImageView,vkCreateImageView]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateImageView( + VkDevice device, + const VkImageViewCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkImageView* pView); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateInstance.txt b/doc/specs/vulkan/protos/vkCreateInstance.txt new file mode 100644 index 00000000..ee96c33b --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateInstance.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateInstance,vkCreateInstance]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateInstance( + const VkInstanceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkInstance* pInstance); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreatePipelineCache.txt b/doc/specs/vulkan/protos/vkCreatePipelineCache.txt new file mode 100644 index 00000000..bcf383a1 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreatePipelineCache.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreatePipelineCache,vkCreatePipelineCache]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreatePipelineCache( + VkDevice device, + const VkPipelineCacheCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkPipelineCache* pPipelineCache); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreatePipelineLayout.txt b/doc/specs/vulkan/protos/vkCreatePipelineLayout.txt new file mode 100644 index 00000000..1adcfc88 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreatePipelineLayout.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreatePipelineLayout,vkCreatePipelineLayout]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreatePipelineLayout( + VkDevice device, + const VkPipelineLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkPipelineLayout* pPipelineLayout); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateQueryPool.txt b/doc/specs/vulkan/protos/vkCreateQueryPool.txt new file mode 100644 index 00000000..f8e62d0f --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateQueryPool.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateQueryPool,vkCreateQueryPool]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateQueryPool( + VkDevice device, + const VkQueryPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkQueryPool* pQueryPool); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateRenderPass.txt b/doc/specs/vulkan/protos/vkCreateRenderPass.txt new file mode 100644 index 00000000..018a1334 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateRenderPass.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateRenderPass,vkCreateRenderPass]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateRenderPass( + VkDevice device, + const VkRenderPassCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkRenderPass* pRenderPass); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateSampler.txt b/doc/specs/vulkan/protos/vkCreateSampler.txt new file mode 100644 index 00000000..d09c5198 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateSampler.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateSampler,vkCreateSampler]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateSampler( + VkDevice device, + const VkSamplerCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSampler* pSampler); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateSemaphore.txt b/doc/specs/vulkan/protos/vkCreateSemaphore.txt new file mode 100644 index 00000000..306373f8 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateSemaphore.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateSemaphore,vkCreateSemaphore]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateSemaphore( + VkDevice device, + const VkSemaphoreCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSemaphore* pSemaphore); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkCreateShaderModule.txt b/doc/specs/vulkan/protos/vkCreateShaderModule.txt new file mode 100644 index 00000000..aa8240b5 --- /dev/null +++ b/doc/specs/vulkan/protos/vkCreateShaderModule.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkCreateShaderModule,vkCreateShaderModule]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkCreateShaderModule( + VkDevice device, + const VkShaderModuleCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkShaderModule* pShaderModule); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyBuffer.txt b/doc/specs/vulkan/protos/vkDestroyBuffer.txt new file mode 100644 index 00000000..708d6a87 --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyBuffer.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyBuffer,vkDestroyBuffer]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyBuffer( + VkDevice device, + VkBuffer buffer, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyBufferView.txt b/doc/specs/vulkan/protos/vkDestroyBufferView.txt new file mode 100644 index 00000000..969e41cb --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyBufferView.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyBufferView,vkDestroyBufferView]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyBufferView( + VkDevice device, + VkBufferView bufferView, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyCommandPool.txt b/doc/specs/vulkan/protos/vkDestroyCommandPool.txt new file mode 100644 index 00000000..e8e958a5 --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyCommandPool.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyCommandPool,vkDestroyCommandPool]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyCommandPool( + VkDevice device, + VkCommandPool commandPool, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyDescriptorPool.txt b/doc/specs/vulkan/protos/vkDestroyDescriptorPool.txt new file mode 100644 index 00000000..4c7453c1 --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyDescriptorPool.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyDescriptorPool,vkDestroyDescriptorPool]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyDescriptorPool( + VkDevice device, + VkDescriptorPool descriptorPool, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyDescriptorSetLayout.txt b/doc/specs/vulkan/protos/vkDestroyDescriptorSetLayout.txt new file mode 100644 index 00000000..e8d6d359 --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyDescriptorSetLayout.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyDescriptorSetLayout,vkDestroyDescriptorSetLayout]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyDescriptorSetLayout( + VkDevice device, + VkDescriptorSetLayout descriptorSetLayout, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyDevice.txt b/doc/specs/vulkan/protos/vkDestroyDevice.txt new file mode 100644 index 00000000..d603fc00 --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyDevice.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyDevice,vkDestroyDevice]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyDevice( + VkDevice device, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyEvent.txt b/doc/specs/vulkan/protos/vkDestroyEvent.txt new file mode 100644 index 00000000..338037d1 --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyEvent.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyEvent,vkDestroyEvent]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyEvent( + VkDevice device, + VkEvent event, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyFence.txt b/doc/specs/vulkan/protos/vkDestroyFence.txt new file mode 100644 index 00000000..e9e8226a --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyFence.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyFence,vkDestroyFence]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyFence( + VkDevice device, + VkFence fence, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyFramebuffer.txt b/doc/specs/vulkan/protos/vkDestroyFramebuffer.txt new file mode 100644 index 00000000..bc28a928 --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyFramebuffer.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyFramebuffer,vkDestroyFramebuffer]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyFramebuffer( + VkDevice device, + VkFramebuffer framebuffer, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyImage.txt b/doc/specs/vulkan/protos/vkDestroyImage.txt new file mode 100644 index 00000000..676d216a --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyImage.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyImage,vkDestroyImage]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyImage( + VkDevice device, + VkImage image, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyImageView.txt b/doc/specs/vulkan/protos/vkDestroyImageView.txt new file mode 100644 index 00000000..ddc90270 --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyImageView.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyImageView,vkDestroyImageView]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyImageView( + VkDevice device, + VkImageView imageView, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyInstance.txt b/doc/specs/vulkan/protos/vkDestroyInstance.txt new file mode 100644 index 00000000..39dc8701 --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyInstance.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyInstance,vkDestroyInstance]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyInstance( + VkInstance instance, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyPipeline.txt b/doc/specs/vulkan/protos/vkDestroyPipeline.txt new file mode 100644 index 00000000..9da272a4 --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyPipeline.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyPipeline,vkDestroyPipeline]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyPipeline( + VkDevice device, + VkPipeline pipeline, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyPipelineCache.txt b/doc/specs/vulkan/protos/vkDestroyPipelineCache.txt new file mode 100644 index 00000000..f659d327 --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyPipelineCache.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyPipelineCache,vkDestroyPipelineCache]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyPipelineCache( + VkDevice device, + VkPipelineCache pipelineCache, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyPipelineLayout.txt b/doc/specs/vulkan/protos/vkDestroyPipelineLayout.txt new file mode 100644 index 00000000..0e10f039 --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyPipelineLayout.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyPipelineLayout,vkDestroyPipelineLayout]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyPipelineLayout( + VkDevice device, + VkPipelineLayout pipelineLayout, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyQueryPool.txt b/doc/specs/vulkan/protos/vkDestroyQueryPool.txt new file mode 100644 index 00000000..dc678994 --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyQueryPool.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyQueryPool,vkDestroyQueryPool]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyQueryPool( + VkDevice device, + VkQueryPool queryPool, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyRenderPass.txt b/doc/specs/vulkan/protos/vkDestroyRenderPass.txt new file mode 100644 index 00000000..62c2665d --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyRenderPass.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyRenderPass,vkDestroyRenderPass]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyRenderPass( + VkDevice device, + VkRenderPass renderPass, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroySampler.txt b/doc/specs/vulkan/protos/vkDestroySampler.txt new file mode 100644 index 00000000..566021c6 --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroySampler.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroySampler,vkDestroySampler]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroySampler( + VkDevice device, + VkSampler sampler, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroySemaphore.txt b/doc/specs/vulkan/protos/vkDestroySemaphore.txt new file mode 100644 index 00000000..e47f171e --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroySemaphore.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroySemaphore,vkDestroySemaphore]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroySemaphore( + VkDevice device, + VkSemaphore semaphore, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDestroyShaderModule.txt b/doc/specs/vulkan/protos/vkDestroyShaderModule.txt new file mode 100644 index 00000000..1b3b786e --- /dev/null +++ b/doc/specs/vulkan/protos/vkDestroyShaderModule.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDestroyShaderModule,vkDestroyShaderModule]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkDestroyShaderModule( + VkDevice device, + VkShaderModule shaderModule, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkDeviceWaitIdle.txt b/doc/specs/vulkan/protos/vkDeviceWaitIdle.txt new file mode 100644 index 00000000..59adc77e --- /dev/null +++ b/doc/specs/vulkan/protos/vkDeviceWaitIdle.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkDeviceWaitIdle,vkDeviceWaitIdle]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkDeviceWaitIdle( + VkDevice device); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkEndCommandBuffer.txt b/doc/specs/vulkan/protos/vkEndCommandBuffer.txt new file mode 100644 index 00000000..f2eec750 --- /dev/null +++ b/doc/specs/vulkan/protos/vkEndCommandBuffer.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkEndCommandBuffer,vkEndCommandBuffer]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkEndCommandBuffer( + VkCommandBuffer commandBuffer); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkEnumerateDeviceExtensionProperties.txt b/doc/specs/vulkan/protos/vkEnumerateDeviceExtensionProperties.txt new file mode 100644 index 00000000..425f3c92 --- /dev/null +++ b/doc/specs/vulkan/protos/vkEnumerateDeviceExtensionProperties.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkEnumerateDeviceExtensionProperties,vkEnumerateDeviceExtensionProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkEnumerateDeviceExtensionProperties( + VkPhysicalDevice physicalDevice, + const char* pLayerName, + uint32_t* pPropertyCount, + VkExtensionProperties* pProperties); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkEnumerateDeviceLayerProperties.txt b/doc/specs/vulkan/protos/vkEnumerateDeviceLayerProperties.txt new file mode 100644 index 00000000..0c3e21f6 --- /dev/null +++ b/doc/specs/vulkan/protos/vkEnumerateDeviceLayerProperties.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkEnumerateDeviceLayerProperties,vkEnumerateDeviceLayerProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkEnumerateDeviceLayerProperties( + VkPhysicalDevice physicalDevice, + uint32_t* pPropertyCount, + VkLayerProperties* pProperties); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkEnumerateInstanceExtensionProperties.txt b/doc/specs/vulkan/protos/vkEnumerateInstanceExtensionProperties.txt new file mode 100644 index 00000000..6b0b68c1 --- /dev/null +++ b/doc/specs/vulkan/protos/vkEnumerateInstanceExtensionProperties.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkEnumerateInstanceExtensionProperties,vkEnumerateInstanceExtensionProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkEnumerateInstanceExtensionProperties( + const char* pLayerName, + uint32_t* pPropertyCount, + VkExtensionProperties* pProperties); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkEnumerateInstanceLayerProperties.txt b/doc/specs/vulkan/protos/vkEnumerateInstanceLayerProperties.txt new file mode 100644 index 00000000..fe799c8f --- /dev/null +++ b/doc/specs/vulkan/protos/vkEnumerateInstanceLayerProperties.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkEnumerateInstanceLayerProperties,vkEnumerateInstanceLayerProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkEnumerateInstanceLayerProperties( + uint32_t* pPropertyCount, + VkLayerProperties* pProperties); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkEnumeratePhysicalDevices.txt b/doc/specs/vulkan/protos/vkEnumeratePhysicalDevices.txt new file mode 100644 index 00000000..53f14c0a --- /dev/null +++ b/doc/specs/vulkan/protos/vkEnumeratePhysicalDevices.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkEnumeratePhysicalDevices,vkEnumeratePhysicalDevices]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkEnumeratePhysicalDevices( + VkInstance instance, + uint32_t* pPhysicalDeviceCount, + VkPhysicalDevice* pPhysicalDevices); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkFlushMappedMemoryRanges.txt b/doc/specs/vulkan/protos/vkFlushMappedMemoryRanges.txt new file mode 100644 index 00000000..f36319d9 --- /dev/null +++ b/doc/specs/vulkan/protos/vkFlushMappedMemoryRanges.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkFlushMappedMemoryRanges,vkFlushMappedMemoryRanges]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkFlushMappedMemoryRanges( + VkDevice device, + uint32_t memoryRangeCount, + const VkMappedMemoryRange* pMemoryRanges); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkFreeCommandBuffers.txt b/doc/specs/vulkan/protos/vkFreeCommandBuffers.txt new file mode 100644 index 00000000..1d3d7e59 --- /dev/null +++ b/doc/specs/vulkan/protos/vkFreeCommandBuffers.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkFreeCommandBuffers,vkFreeCommandBuffers]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkFreeCommandBuffers( + VkDevice device, + VkCommandPool commandPool, + uint32_t commandBufferCount, + const VkCommandBuffer* pCommandBuffers); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkFreeDescriptorSets.txt b/doc/specs/vulkan/protos/vkFreeDescriptorSets.txt new file mode 100644 index 00000000..d25d43b9 --- /dev/null +++ b/doc/specs/vulkan/protos/vkFreeDescriptorSets.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkFreeDescriptorSets,vkFreeDescriptorSets]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkFreeDescriptorSets( + VkDevice device, + VkDescriptorPool descriptorPool, + uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkFreeMemory.txt b/doc/specs/vulkan/protos/vkFreeMemory.txt new file mode 100644 index 00000000..3fb765f2 --- /dev/null +++ b/doc/specs/vulkan/protos/vkFreeMemory.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkFreeMemory,vkFreeMemory]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkFreeMemory( + VkDevice device, + VkDeviceMemory memory, + const VkAllocationCallbacks* pAllocator); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetBufferMemoryRequirements.txt b/doc/specs/vulkan/protos/vkGetBufferMemoryRequirements.txt new file mode 100644 index 00000000..9c05a1d0 --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetBufferMemoryRequirements.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetBufferMemoryRequirements,vkGetBufferMemoryRequirements]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkGetBufferMemoryRequirements( + VkDevice device, + VkBuffer buffer, + VkMemoryRequirements* pMemoryRequirements); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetDeviceMemoryCommitment.txt b/doc/specs/vulkan/protos/vkGetDeviceMemoryCommitment.txt new file mode 100644 index 00000000..40b0d694 --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetDeviceMemoryCommitment.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetDeviceMemoryCommitment,vkGetDeviceMemoryCommitment]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkGetDeviceMemoryCommitment( + VkDevice device, + VkDeviceMemory memory, + VkDeviceSize* pCommittedMemoryInBytes); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetDeviceProcAddr.txt b/doc/specs/vulkan/protos/vkGetDeviceProcAddr.txt new file mode 100644 index 00000000..3cf182af --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetDeviceProcAddr.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetDeviceProcAddr,vkGetDeviceProcAddr]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +PFN_vkVoidFunction vkGetDeviceProcAddr( + VkDevice device, + const char* pName); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetDeviceQueue.txt b/doc/specs/vulkan/protos/vkGetDeviceQueue.txt new file mode 100644 index 00000000..e23ec0cc --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetDeviceQueue.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetDeviceQueue,vkGetDeviceQueue]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkGetDeviceQueue( + VkDevice device, + uint32_t queueFamilyIndex, + uint32_t queueIndex, + VkQueue* pQueue); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetEventStatus.txt b/doc/specs/vulkan/protos/vkGetEventStatus.txt new file mode 100644 index 00000000..60fad1e4 --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetEventStatus.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetEventStatus,vkGetEventStatus]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkGetEventStatus( + VkDevice device, + VkEvent event); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetFenceStatus.txt b/doc/specs/vulkan/protos/vkGetFenceStatus.txt new file mode 100644 index 00000000..ffbe2c82 --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetFenceStatus.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetFenceStatus,vkGetFenceStatus]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkGetFenceStatus( + VkDevice device, + VkFence fence); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetImageMemoryRequirements.txt b/doc/specs/vulkan/protos/vkGetImageMemoryRequirements.txt new file mode 100644 index 00000000..979de9e1 --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetImageMemoryRequirements.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetImageMemoryRequirements,vkGetImageMemoryRequirements]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkGetImageMemoryRequirements( + VkDevice device, + VkImage image, + VkMemoryRequirements* pMemoryRequirements); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetImageSparseMemoryRequirements.txt b/doc/specs/vulkan/protos/vkGetImageSparseMemoryRequirements.txt new file mode 100644 index 00000000..dcc65703 --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetImageSparseMemoryRequirements.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetImageSparseMemoryRequirements,vkGetImageSparseMemoryRequirements]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkGetImageSparseMemoryRequirements( + VkDevice device, + VkImage image, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements* pSparseMemoryRequirements); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetImageSubresourceLayout.txt b/doc/specs/vulkan/protos/vkGetImageSubresourceLayout.txt new file mode 100644 index 00000000..62067f7a --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetImageSubresourceLayout.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetImageSubresourceLayout,vkGetImageSubresourceLayout]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkGetImageSubresourceLayout( + VkDevice device, + VkImage image, + const VkImageSubresource* pSubresource, + VkSubresourceLayout* pLayout); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetInstanceProcAddr.txt b/doc/specs/vulkan/protos/vkGetInstanceProcAddr.txt new file mode 100644 index 00000000..526630f5 --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetInstanceProcAddr.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetInstanceProcAddr,vkGetInstanceProcAddr]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +PFN_vkVoidFunction vkGetInstanceProcAddr( + VkInstance instance, + const char* pName); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetPhysicalDeviceFeatures.txt b/doc/specs/vulkan/protos/vkGetPhysicalDeviceFeatures.txt new file mode 100644 index 00000000..8950e4d9 --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetPhysicalDeviceFeatures.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetPhysicalDeviceFeatures,vkGetPhysicalDeviceFeatures]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkGetPhysicalDeviceFeatures( + VkPhysicalDevice physicalDevice, + VkPhysicalDeviceFeatures* pFeatures); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetPhysicalDeviceFormatProperties.txt b/doc/specs/vulkan/protos/vkGetPhysicalDeviceFormatProperties.txt new file mode 100644 index 00000000..d2c611cc --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetPhysicalDeviceFormatProperties.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetPhysicalDeviceFormatProperties,vkGetPhysicalDeviceFormatProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkGetPhysicalDeviceFormatProperties( + VkPhysicalDevice physicalDevice, + VkFormat format, + VkFormatProperties* pFormatProperties); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetPhysicalDeviceImageFormatProperties.txt b/doc/specs/vulkan/protos/vkGetPhysicalDeviceImageFormatProperties.txt new file mode 100644 index 00000000..d9487414 --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetPhysicalDeviceImageFormatProperties.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetPhysicalDeviceImageFormatProperties,vkGetPhysicalDeviceImageFormatProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkGetPhysicalDeviceImageFormatProperties( + VkPhysicalDevice physicalDevice, + VkFormat format, + VkImageType type, + VkImageTiling tiling, + VkImageUsageFlags usage, + VkImageCreateFlags flags, + VkImageFormatProperties* pImageFormatProperties); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetPhysicalDeviceMemoryProperties.txt b/doc/specs/vulkan/protos/vkGetPhysicalDeviceMemoryProperties.txt new file mode 100644 index 00000000..73ec1476 --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetPhysicalDeviceMemoryProperties.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetPhysicalDeviceMemoryProperties,vkGetPhysicalDeviceMemoryProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkGetPhysicalDeviceMemoryProperties( + VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties* pMemoryProperties); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetPhysicalDeviceProperties.txt b/doc/specs/vulkan/protos/vkGetPhysicalDeviceProperties.txt new file mode 100644 index 00000000..c18aa5d4 --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetPhysicalDeviceProperties.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetPhysicalDeviceProperties,vkGetPhysicalDeviceProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkGetPhysicalDeviceProperties( + VkPhysicalDevice physicalDevice, + VkPhysicalDeviceProperties* pProperties); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetPhysicalDeviceQueueFamilyProperties.txt b/doc/specs/vulkan/protos/vkGetPhysicalDeviceQueueFamilyProperties.txt new file mode 100644 index 00000000..5e3c3d73 --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetPhysicalDeviceQueueFamilyProperties.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetPhysicalDeviceQueueFamilyProperties,vkGetPhysicalDeviceQueueFamilyProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkGetPhysicalDeviceQueueFamilyProperties( + VkPhysicalDevice physicalDevice, + uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties* pQueueFamilyProperties); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetPhysicalDeviceSparseImageFormatProperties.txt b/doc/specs/vulkan/protos/vkGetPhysicalDeviceSparseImageFormatProperties.txt new file mode 100644 index 00000000..676180f8 --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetPhysicalDeviceSparseImageFormatProperties.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetPhysicalDeviceSparseImageFormatProperties,vkGetPhysicalDeviceSparseImageFormatProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkGetPhysicalDeviceSparseImageFormatProperties( + VkPhysicalDevice physicalDevice, + VkFormat format, + VkImageType type, + VkSampleCountFlagBits samples, + VkImageUsageFlags usage, + VkImageTiling tiling, + uint32_t* pPropertyCount, + VkSparseImageFormatProperties* pProperties); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetPipelineCacheData.txt b/doc/specs/vulkan/protos/vkGetPipelineCacheData.txt new file mode 100644 index 00000000..b124767a --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetPipelineCacheData.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetPipelineCacheData,vkGetPipelineCacheData]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkGetPipelineCacheData( + VkDevice device, + VkPipelineCache pipelineCache, + size_t* pDataSize, + void* pData); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetQueryPoolResults.txt b/doc/specs/vulkan/protos/vkGetQueryPoolResults.txt new file mode 100644 index 00000000..daa0e688 --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetQueryPoolResults.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetQueryPoolResults,vkGetQueryPoolResults]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkGetQueryPoolResults( + VkDevice device, + VkQueryPool queryPool, + uint32_t firstQuery, + uint32_t queryCount, + size_t dataSize, + void* pData, + VkDeviceSize stride, + VkQueryResultFlags flags); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkGetRenderAreaGranularity.txt b/doc/specs/vulkan/protos/vkGetRenderAreaGranularity.txt new file mode 100644 index 00000000..6e9e3549 --- /dev/null +++ b/doc/specs/vulkan/protos/vkGetRenderAreaGranularity.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkGetRenderAreaGranularity,vkGetRenderAreaGranularity]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkGetRenderAreaGranularity( + VkDevice device, + VkRenderPass renderPass, + VkExtent2D* pGranularity); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkInvalidateMappedMemoryRanges.txt b/doc/specs/vulkan/protos/vkInvalidateMappedMemoryRanges.txt new file mode 100644 index 00000000..e7259bdf --- /dev/null +++ b/doc/specs/vulkan/protos/vkInvalidateMappedMemoryRanges.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkInvalidateMappedMemoryRanges,vkInvalidateMappedMemoryRanges]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkInvalidateMappedMemoryRanges( + VkDevice device, + uint32_t memoryRangeCount, + const VkMappedMemoryRange* pMemoryRanges); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkMapMemory.txt b/doc/specs/vulkan/protos/vkMapMemory.txt new file mode 100644 index 00000000..adcb1940 --- /dev/null +++ b/doc/specs/vulkan/protos/vkMapMemory.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkMapMemory,vkMapMemory]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkMapMemory( + VkDevice device, + VkDeviceMemory memory, + VkDeviceSize offset, + VkDeviceSize size, + VkMemoryMapFlags flags, + void** ppData); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkMergePipelineCaches.txt b/doc/specs/vulkan/protos/vkMergePipelineCaches.txt new file mode 100644 index 00000000..ab5253f6 --- /dev/null +++ b/doc/specs/vulkan/protos/vkMergePipelineCaches.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkMergePipelineCaches,vkMergePipelineCaches]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkMergePipelineCaches( + VkDevice device, + VkPipelineCache dstCache, + uint32_t srcCacheCount, + const VkPipelineCache* pSrcCaches); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkQueueBindSparse.txt b/doc/specs/vulkan/protos/vkQueueBindSparse.txt new file mode 100644 index 00000000..8a4faed5 --- /dev/null +++ b/doc/specs/vulkan/protos/vkQueueBindSparse.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkQueueBindSparse,vkQueueBindSparse]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkQueueBindSparse( + VkQueue queue, + uint32_t bindInfoCount, + const VkBindSparseInfo* pBindInfo, + VkFence fence); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkQueueSubmit.txt b/doc/specs/vulkan/protos/vkQueueSubmit.txt new file mode 100644 index 00000000..69da1fee --- /dev/null +++ b/doc/specs/vulkan/protos/vkQueueSubmit.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkQueueSubmit,vkQueueSubmit]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkQueueSubmit( + VkQueue queue, + uint32_t submitCount, + const VkSubmitInfo* pSubmits, + VkFence fence); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkQueueWaitIdle.txt b/doc/specs/vulkan/protos/vkQueueWaitIdle.txt new file mode 100644 index 00000000..756649e0 --- /dev/null +++ b/doc/specs/vulkan/protos/vkQueueWaitIdle.txt @@ -0,0 +1,12 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkQueueWaitIdle,vkQueueWaitIdle]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkQueueWaitIdle( + VkQueue queue); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkResetCommandBuffer.txt b/doc/specs/vulkan/protos/vkResetCommandBuffer.txt new file mode 100644 index 00000000..9eb4d3a6 --- /dev/null +++ b/doc/specs/vulkan/protos/vkResetCommandBuffer.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkResetCommandBuffer,vkResetCommandBuffer]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkResetCommandBuffer( + VkCommandBuffer commandBuffer, + VkCommandBufferResetFlags flags); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkResetCommandPool.txt b/doc/specs/vulkan/protos/vkResetCommandPool.txt new file mode 100644 index 00000000..9d17f662 --- /dev/null +++ b/doc/specs/vulkan/protos/vkResetCommandPool.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkResetCommandPool,vkResetCommandPool]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkResetCommandPool( + VkDevice device, + VkCommandPool commandPool, + VkCommandPoolResetFlags flags); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkResetDescriptorPool.txt b/doc/specs/vulkan/protos/vkResetDescriptorPool.txt new file mode 100644 index 00000000..15108273 --- /dev/null +++ b/doc/specs/vulkan/protos/vkResetDescriptorPool.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkResetDescriptorPool,vkResetDescriptorPool]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkResetDescriptorPool( + VkDevice device, + VkDescriptorPool descriptorPool, + VkDescriptorPoolResetFlags flags); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkResetEvent.txt b/doc/specs/vulkan/protos/vkResetEvent.txt new file mode 100644 index 00000000..7f465880 --- /dev/null +++ b/doc/specs/vulkan/protos/vkResetEvent.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkResetEvent,vkResetEvent]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkResetEvent( + VkDevice device, + VkEvent event); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkResetFences.txt b/doc/specs/vulkan/protos/vkResetFences.txt new file mode 100644 index 00000000..b79c7c53 --- /dev/null +++ b/doc/specs/vulkan/protos/vkResetFences.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkResetFences,vkResetFences]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkResetFences( + VkDevice device, + uint32_t fenceCount, + const VkFence* pFences); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkSetEvent.txt b/doc/specs/vulkan/protos/vkSetEvent.txt new file mode 100644 index 00000000..3c93570c --- /dev/null +++ b/doc/specs/vulkan/protos/vkSetEvent.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkSetEvent,vkSetEvent]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkSetEvent( + VkDevice device, + VkEvent event); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkUnmapMemory.txt b/doc/specs/vulkan/protos/vkUnmapMemory.txt new file mode 100644 index 00000000..13dea463 --- /dev/null +++ b/doc/specs/vulkan/protos/vkUnmapMemory.txt @@ -0,0 +1,13 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkUnmapMemory,vkUnmapMemory]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkUnmapMemory( + VkDevice device, + VkDeviceMemory memory); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkUpdateDescriptorSets.txt b/doc/specs/vulkan/protos/vkUpdateDescriptorSets.txt new file mode 100644 index 00000000..11abbce8 --- /dev/null +++ b/doc/specs/vulkan/protos/vkUpdateDescriptorSets.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkUpdateDescriptorSets,vkUpdateDescriptorSets]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +void vkUpdateDescriptorSets( + VkDevice device, + uint32_t descriptorWriteCount, + const VkWriteDescriptorSet* pDescriptorWrites, + uint32_t descriptorCopyCount, + const VkCopyDescriptorSet* pDescriptorCopies); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/protos/vkWaitForFences.txt b/doc/specs/vulkan/protos/vkWaitForFences.txt new file mode 100644 index 00000000..13c58c2a --- /dev/null +++ b/doc/specs/vulkan/protos/vkWaitForFences.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[vkWaitForFences,vkWaitForFences]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +VkResult vkWaitForFences( + VkDevice device, + uint32_t fenceCount, + const VkFence* pFences, + VkBool32 waitAll, + uint64_t timeout); +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/sandboxCopy b/doc/specs/vulkan/sandboxCopy new file mode 100755 index 00000000..1e1f25c6 --- /dev/null +++ b/doc/specs/vulkan/sandboxCopy @@ -0,0 +1,18 @@ +#!/bin/sh +specdir=../../../out/ +RHOST=kaylee +RPATH=/home/khronos/memberftp/vulkan/ + +cd $specdir || (echo "Can't cd to $specdir !" ; exit 1) +# Create tarball and upload/copy/extract that to speed things +echo "Creating tarball" +tar czpf /tmp/tarball.tgz . +echo "Uploading tarball" +scp /tmp/tarball.tgz $RHOST:$RPATH +echo "Extracting tarball on server" +# Could add "&& rm tarball.tgz" but nice to have around +ssh $RHOST "cd $RPATH && tar xzpf tarball.tgz" +echo "Removing tarball" +rm /tmp/tarball.tgz + +# scp -rp * $RHOST:$RPATH diff --git a/doc/specs/vulkan/structs/VkAllocationCallbacks.txt b/doc/specs/vulkan/structs/VkAllocationCallbacks.txt new file mode 100644 index 00000000..f020b1e2 --- /dev/null +++ b/doc/specs/vulkan/structs/VkAllocationCallbacks.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkAllocationCallbacks,VkAllocationCallbacks]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkAllocationCallbacks { + void* pUserData; + PFN_vkAllocationFunction pfnAllocation; + PFN_vkReallocationFunction pfnReallocation; + PFN_vkFreeFunction pfnFree; + PFN_vkInternalAllocationNotification pfnInternalAllocation; + PFN_vkInternalFreeNotification pfnInternalFree; +} VkAllocationCallbacks; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkApplicationInfo.txt b/doc/specs/vulkan/structs/VkApplicationInfo.txt new file mode 100644 index 00000000..2e1c980d --- /dev/null +++ b/doc/specs/vulkan/structs/VkApplicationInfo.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkApplicationInfo,VkApplicationInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkApplicationInfo { + VkStructureType sType; + const void* pNext; + const char* pApplicationName; + uint32_t applicationVersion; + const char* pEngineName; + uint32_t engineVersion; + uint32_t apiVersion; +} VkApplicationInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkAttachmentDescription.txt b/doc/specs/vulkan/structs/VkAttachmentDescription.txt new file mode 100644 index 00000000..6af82941 --- /dev/null +++ b/doc/specs/vulkan/structs/VkAttachmentDescription.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkAttachmentDescription,VkAttachmentDescription]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkAttachmentDescription { + VkAttachmentDescriptionFlags flags; + VkFormat format; + VkSampleCountFlagBits samples; + VkAttachmentLoadOp loadOp; + VkAttachmentStoreOp storeOp; + VkAttachmentLoadOp stencilLoadOp; + VkAttachmentStoreOp stencilStoreOp; + VkImageLayout initialLayout; + VkImageLayout finalLayout; +} VkAttachmentDescription; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkAttachmentReference.txt b/doc/specs/vulkan/structs/VkAttachmentReference.txt new file mode 100644 index 00000000..e52f77f2 --- /dev/null +++ b/doc/specs/vulkan/structs/VkAttachmentReference.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkAttachmentReference,VkAttachmentReference]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkAttachmentReference { + uint32_t attachment; + VkImageLayout layout; +} VkAttachmentReference; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkBindSparseInfo.txt b/doc/specs/vulkan/structs/VkBindSparseInfo.txt new file mode 100644 index 00000000..be684d65 --- /dev/null +++ b/doc/specs/vulkan/structs/VkBindSparseInfo.txt @@ -0,0 +1,24 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkBindSparseInfo,VkBindSparseInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkBindSparseInfo { + VkStructureType sType; + const void* pNext; + uint32_t waitSemaphoreCount; + const VkSemaphore* pWaitSemaphores; + uint32_t bufferBindCount; + const VkSparseBufferMemoryBindInfo* pBufferBinds; + uint32_t imageOpaqueBindCount; + const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds; + uint32_t imageBindCount; + const VkSparseImageMemoryBindInfo* pImageBinds; + uint32_t signalSemaphoreCount; + const VkSemaphore* pSignalSemaphores; +} VkBindSparseInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkBufferCopy.txt b/doc/specs/vulkan/structs/VkBufferCopy.txt new file mode 100644 index 00000000..aedc756a --- /dev/null +++ b/doc/specs/vulkan/structs/VkBufferCopy.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkBufferCopy,VkBufferCopy]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkBufferCopy { + VkDeviceSize srcOffset; + VkDeviceSize dstOffset; + VkDeviceSize size; +} VkBufferCopy; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkBufferCreateInfo.txt b/doc/specs/vulkan/structs/VkBufferCreateInfo.txt new file mode 100644 index 00000000..35d28a25 --- /dev/null +++ b/doc/specs/vulkan/structs/VkBufferCreateInfo.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkBufferCreateInfo,VkBufferCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkBufferCreateInfo { + VkStructureType sType; + const void* pNext; + VkBufferCreateFlags flags; + VkDeviceSize size; + VkBufferUsageFlags usage; + VkSharingMode sharingMode; + uint32_t queueFamilyIndexCount; + const uint32_t* pQueueFamilyIndices; +} VkBufferCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkBufferImageCopy.txt b/doc/specs/vulkan/structs/VkBufferImageCopy.txt new file mode 100644 index 00000000..1c334afd --- /dev/null +++ b/doc/specs/vulkan/structs/VkBufferImageCopy.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkBufferImageCopy,VkBufferImageCopy]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkBufferImageCopy { + VkDeviceSize bufferOffset; + uint32_t bufferRowLength; + uint32_t bufferImageHeight; + VkImageSubresourceLayers imageSubresource; + VkOffset3D imageOffset; + VkExtent3D imageExtent; +} VkBufferImageCopy; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkBufferMemoryBarrier.txt b/doc/specs/vulkan/structs/VkBufferMemoryBarrier.txt new file mode 100644 index 00000000..aceddb09 --- /dev/null +++ b/doc/specs/vulkan/structs/VkBufferMemoryBarrier.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkBufferMemoryBarrier,VkBufferMemoryBarrier]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkBufferMemoryBarrier { + VkStructureType sType; + const void* pNext; + VkAccessFlags srcAccessMask; + VkAccessFlags dstAccessMask; + uint32_t srcQueueFamilyIndex; + uint32_t dstQueueFamilyIndex; + VkBuffer buffer; + VkDeviceSize offset; + VkDeviceSize size; +} VkBufferMemoryBarrier; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkBufferViewCreateInfo.txt b/doc/specs/vulkan/structs/VkBufferViewCreateInfo.txt new file mode 100644 index 00000000..e59d1b55 --- /dev/null +++ b/doc/specs/vulkan/structs/VkBufferViewCreateInfo.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkBufferViewCreateInfo,VkBufferViewCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkBufferViewCreateInfo { + VkStructureType sType; + const void* pNext; + VkBufferViewCreateFlags flags; + VkBuffer buffer; + VkFormat format; + VkDeviceSize offset; + VkDeviceSize range; +} VkBufferViewCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkClearAttachment.txt b/doc/specs/vulkan/structs/VkClearAttachment.txt new file mode 100644 index 00000000..d6802fd8 --- /dev/null +++ b/doc/specs/vulkan/structs/VkClearAttachment.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkClearAttachment,VkClearAttachment]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkClearAttachment { + VkImageAspectFlags aspectMask; + uint32_t colorAttachment; + VkClearValue clearValue; +} VkClearAttachment; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkClearColorValue.txt b/doc/specs/vulkan/structs/VkClearColorValue.txt new file mode 100644 index 00000000..ee43a733 --- /dev/null +++ b/doc/specs/vulkan/structs/VkClearColorValue.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkClearColorValue,VkClearColorValue]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef union VkClearColorValue { + float float32[4]; + int32_t int32[4]; + uint32_t uint32[4]; +} VkClearColorValue; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkClearDepthStencilValue.txt b/doc/specs/vulkan/structs/VkClearDepthStencilValue.txt new file mode 100644 index 00000000..319844e2 --- /dev/null +++ b/doc/specs/vulkan/structs/VkClearDepthStencilValue.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkClearDepthStencilValue,VkClearDepthStencilValue]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkClearDepthStencilValue { + float depth; + uint32_t stencil; +} VkClearDepthStencilValue; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkClearRect.txt b/doc/specs/vulkan/structs/VkClearRect.txt new file mode 100644 index 00000000..e8a05137 --- /dev/null +++ b/doc/specs/vulkan/structs/VkClearRect.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkClearRect,VkClearRect]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkClearRect { + VkRect2D rect; + uint32_t baseArrayLayer; + uint32_t layerCount; +} VkClearRect; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkClearValue.txt b/doc/specs/vulkan/structs/VkClearValue.txt new file mode 100644 index 00000000..43278cb6 --- /dev/null +++ b/doc/specs/vulkan/structs/VkClearValue.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkClearValue,VkClearValue]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef union VkClearValue { + VkClearColorValue color; + VkClearDepthStencilValue depthStencil; +} VkClearValue; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkCommandBufferAllocateInfo.txt b/doc/specs/vulkan/structs/VkCommandBufferAllocateInfo.txt new file mode 100644 index 00000000..212e5027 --- /dev/null +++ b/doc/specs/vulkan/structs/VkCommandBufferAllocateInfo.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkCommandBufferAllocateInfo,VkCommandBufferAllocateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkCommandBufferAllocateInfo { + VkStructureType sType; + const void* pNext; + VkCommandPool commandPool; + VkCommandBufferLevel level; + uint32_t commandBufferCount; +} VkCommandBufferAllocateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkCommandBufferBeginInfo.txt b/doc/specs/vulkan/structs/VkCommandBufferBeginInfo.txt new file mode 100644 index 00000000..668fe29f --- /dev/null +++ b/doc/specs/vulkan/structs/VkCommandBufferBeginInfo.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkCommandBufferBeginInfo,VkCommandBufferBeginInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkCommandBufferBeginInfo { + VkStructureType sType; + const void* pNext; + VkCommandBufferUsageFlags flags; + const VkCommandBufferInheritanceInfo* pInheritanceInfo; +} VkCommandBufferBeginInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkCommandBufferInheritanceInfo.txt b/doc/specs/vulkan/structs/VkCommandBufferInheritanceInfo.txt new file mode 100644 index 00000000..9cd43604 --- /dev/null +++ b/doc/specs/vulkan/structs/VkCommandBufferInheritanceInfo.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkCommandBufferInheritanceInfo,VkCommandBufferInheritanceInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkCommandBufferInheritanceInfo { + VkStructureType sType; + const void* pNext; + VkRenderPass renderPass; + uint32_t subpass; + VkFramebuffer framebuffer; + VkBool32 occlusionQueryEnable; + VkQueryControlFlags queryFlags; + VkQueryPipelineStatisticFlags pipelineStatistics; +} VkCommandBufferInheritanceInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkCommandPoolCreateInfo.txt b/doc/specs/vulkan/structs/VkCommandPoolCreateInfo.txt new file mode 100644 index 00000000..386d7a9b --- /dev/null +++ b/doc/specs/vulkan/structs/VkCommandPoolCreateInfo.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkCommandPoolCreateInfo,VkCommandPoolCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkCommandPoolCreateInfo { + VkStructureType sType; + const void* pNext; + VkCommandPoolCreateFlags flags; + uint32_t queueFamilyIndex; +} VkCommandPoolCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkComponentMapping.txt b/doc/specs/vulkan/structs/VkComponentMapping.txt new file mode 100644 index 00000000..6367b234 --- /dev/null +++ b/doc/specs/vulkan/structs/VkComponentMapping.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkComponentMapping,VkComponentMapping]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkComponentMapping { + VkComponentSwizzle r; + VkComponentSwizzle g; + VkComponentSwizzle b; + VkComponentSwizzle a; +} VkComponentMapping; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkComputePipelineCreateInfo.txt b/doc/specs/vulkan/structs/VkComputePipelineCreateInfo.txt new file mode 100644 index 00000000..d2896a1d --- /dev/null +++ b/doc/specs/vulkan/structs/VkComputePipelineCreateInfo.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkComputePipelineCreateInfo,VkComputePipelineCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkComputePipelineCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineCreateFlags flags; + VkPipelineShaderStageCreateInfo stage; + VkPipelineLayout layout; + VkPipeline basePipelineHandle; + int32_t basePipelineIndex; +} VkComputePipelineCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkCopyDescriptorSet.txt b/doc/specs/vulkan/structs/VkCopyDescriptorSet.txt new file mode 100644 index 00000000..01e874ad --- /dev/null +++ b/doc/specs/vulkan/structs/VkCopyDescriptorSet.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkCopyDescriptorSet,VkCopyDescriptorSet]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkCopyDescriptorSet { + VkStructureType sType; + const void* pNext; + VkDescriptorSet srcSet; + uint32_t srcBinding; + uint32_t srcArrayElement; + VkDescriptorSet dstSet; + uint32_t dstBinding; + uint32_t dstArrayElement; + uint32_t descriptorCount; +} VkCopyDescriptorSet; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkDescriptorBufferInfo.txt b/doc/specs/vulkan/structs/VkDescriptorBufferInfo.txt new file mode 100644 index 00000000..f4aa9b16 --- /dev/null +++ b/doc/specs/vulkan/structs/VkDescriptorBufferInfo.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDescriptorBufferInfo,VkDescriptorBufferInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkDescriptorBufferInfo { + VkBuffer buffer; + VkDeviceSize offset; + VkDeviceSize range; +} VkDescriptorBufferInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkDescriptorImageInfo.txt b/doc/specs/vulkan/structs/VkDescriptorImageInfo.txt new file mode 100644 index 00000000..64c9dcc8 --- /dev/null +++ b/doc/specs/vulkan/structs/VkDescriptorImageInfo.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDescriptorImageInfo,VkDescriptorImageInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkDescriptorImageInfo { + VkSampler sampler; + VkImageView imageView; + VkImageLayout imageLayout; +} VkDescriptorImageInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkDescriptorPoolCreateInfo.txt b/doc/specs/vulkan/structs/VkDescriptorPoolCreateInfo.txt new file mode 100644 index 00000000..697b10f8 --- /dev/null +++ b/doc/specs/vulkan/structs/VkDescriptorPoolCreateInfo.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDescriptorPoolCreateInfo,VkDescriptorPoolCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkDescriptorPoolCreateInfo { + VkStructureType sType; + const void* pNext; + VkDescriptorPoolCreateFlags flags; + uint32_t maxSets; + uint32_t poolSizeCount; + const VkDescriptorPoolSize* pPoolSizes; +} VkDescriptorPoolCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkDescriptorPoolSize.txt b/doc/specs/vulkan/structs/VkDescriptorPoolSize.txt new file mode 100644 index 00000000..eb94d7e2 --- /dev/null +++ b/doc/specs/vulkan/structs/VkDescriptorPoolSize.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDescriptorPoolSize,VkDescriptorPoolSize]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkDescriptorPoolSize { + VkDescriptorType type; + uint32_t descriptorCount; +} VkDescriptorPoolSize; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkDescriptorSetAllocateInfo.txt b/doc/specs/vulkan/structs/VkDescriptorSetAllocateInfo.txt new file mode 100644 index 00000000..a1cc090c --- /dev/null +++ b/doc/specs/vulkan/structs/VkDescriptorSetAllocateInfo.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDescriptorSetAllocateInfo,VkDescriptorSetAllocateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkDescriptorSetAllocateInfo { + VkStructureType sType; + const void* pNext; + VkDescriptorPool descriptorPool; + uint32_t descriptorSetCount; + const VkDescriptorSetLayout* pSetLayouts; +} VkDescriptorSetAllocateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkDescriptorSetLayoutBinding.txt b/doc/specs/vulkan/structs/VkDescriptorSetLayoutBinding.txt new file mode 100644 index 00000000..832d5a56 --- /dev/null +++ b/doc/specs/vulkan/structs/VkDescriptorSetLayoutBinding.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDescriptorSetLayoutBinding,VkDescriptorSetLayoutBinding]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkDescriptorSetLayoutBinding { + uint32_t binding; + VkDescriptorType descriptorType; + uint32_t descriptorCount; + VkShaderStageFlags stageFlags; + const VkSampler* pImmutableSamplers; +} VkDescriptorSetLayoutBinding; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkDescriptorSetLayoutCreateInfo.txt b/doc/specs/vulkan/structs/VkDescriptorSetLayoutCreateInfo.txt new file mode 100644 index 00000000..4ef7fddf --- /dev/null +++ b/doc/specs/vulkan/structs/VkDescriptorSetLayoutCreateInfo.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDescriptorSetLayoutCreateInfo,VkDescriptorSetLayoutCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkDescriptorSetLayoutCreateInfo { + VkStructureType sType; + const void* pNext; + VkDescriptorSetLayoutCreateFlags flags; + uint32_t bindingCount; + const VkDescriptorSetLayoutBinding* pBindings; +} VkDescriptorSetLayoutCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkDeviceCreateInfo.txt b/doc/specs/vulkan/structs/VkDeviceCreateInfo.txt new file mode 100644 index 00000000..dc8f5b25 --- /dev/null +++ b/doc/specs/vulkan/structs/VkDeviceCreateInfo.txt @@ -0,0 +1,22 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDeviceCreateInfo,VkDeviceCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkDeviceCreateInfo { + VkStructureType sType; + const void* pNext; + VkDeviceCreateFlags flags; + uint32_t queueCreateInfoCount; + const VkDeviceQueueCreateInfo* pQueueCreateInfos; + uint32_t enabledLayerCount; + const char* const* ppEnabledLayerNames; + uint32_t enabledExtensionCount; + const char* const* ppEnabledExtensionNames; + const VkPhysicalDeviceFeatures* pEnabledFeatures; +} VkDeviceCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkDeviceQueueCreateInfo.txt b/doc/specs/vulkan/structs/VkDeviceQueueCreateInfo.txt new file mode 100644 index 00000000..c680437f --- /dev/null +++ b/doc/specs/vulkan/structs/VkDeviceQueueCreateInfo.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDeviceQueueCreateInfo,VkDeviceQueueCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkDeviceQueueCreateInfo { + VkStructureType sType; + const void* pNext; + VkDeviceQueueCreateFlags flags; + uint32_t queueFamilyIndex; + uint32_t queueCount; + const float* pQueuePriorities; +} VkDeviceQueueCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkDispatchIndirectCommand.txt b/doc/specs/vulkan/structs/VkDispatchIndirectCommand.txt new file mode 100644 index 00000000..8344871f --- /dev/null +++ b/doc/specs/vulkan/structs/VkDispatchIndirectCommand.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDispatchIndirectCommand,VkDispatchIndirectCommand]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkDispatchIndirectCommand { + uint32_t x; + uint32_t y; + uint32_t z; +} VkDispatchIndirectCommand; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkDrawIndexedIndirectCommand.txt b/doc/specs/vulkan/structs/VkDrawIndexedIndirectCommand.txt new file mode 100644 index 00000000..5e40dee5 --- /dev/null +++ b/doc/specs/vulkan/structs/VkDrawIndexedIndirectCommand.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDrawIndexedIndirectCommand,VkDrawIndexedIndirectCommand]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkDrawIndexedIndirectCommand { + uint32_t indexCount; + uint32_t instanceCount; + uint32_t firstIndex; + int32_t vertexOffset; + uint32_t firstInstance; +} VkDrawIndexedIndirectCommand; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkDrawIndirectCommand.txt b/doc/specs/vulkan/structs/VkDrawIndirectCommand.txt new file mode 100644 index 00000000..bbe50cd1 --- /dev/null +++ b/doc/specs/vulkan/structs/VkDrawIndirectCommand.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkDrawIndirectCommand,VkDrawIndirectCommand]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkDrawIndirectCommand { + uint32_t vertexCount; + uint32_t instanceCount; + uint32_t firstVertex; + uint32_t firstInstance; +} VkDrawIndirectCommand; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkEventCreateInfo.txt b/doc/specs/vulkan/structs/VkEventCreateInfo.txt new file mode 100644 index 00000000..582594d7 --- /dev/null +++ b/doc/specs/vulkan/structs/VkEventCreateInfo.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkEventCreateInfo,VkEventCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkEventCreateInfo { + VkStructureType sType; + const void* pNext; + VkEventCreateFlags flags; +} VkEventCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkExtensionProperties.txt b/doc/specs/vulkan/structs/VkExtensionProperties.txt new file mode 100644 index 00000000..eebaaabc --- /dev/null +++ b/doc/specs/vulkan/structs/VkExtensionProperties.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkExtensionProperties,VkExtensionProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkExtensionProperties { + char extensionName[VK_MAX_EXTENSION_NAME_SIZE]; + uint32_t specVersion; +} VkExtensionProperties; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkExtent2D.txt b/doc/specs/vulkan/structs/VkExtent2D.txt new file mode 100644 index 00000000..c21ef024 --- /dev/null +++ b/doc/specs/vulkan/structs/VkExtent2D.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkExtent2D,VkExtent2D]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkExtent2D { + uint32_t width; + uint32_t height; +} VkExtent2D; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkExtent3D.txt b/doc/specs/vulkan/structs/VkExtent3D.txt new file mode 100644 index 00000000..54a0727c --- /dev/null +++ b/doc/specs/vulkan/structs/VkExtent3D.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkExtent3D,VkExtent3D]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkExtent3D { + uint32_t width; + uint32_t height; + uint32_t depth; +} VkExtent3D; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkFenceCreateInfo.txt b/doc/specs/vulkan/structs/VkFenceCreateInfo.txt new file mode 100644 index 00000000..f61bb1fd --- /dev/null +++ b/doc/specs/vulkan/structs/VkFenceCreateInfo.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkFenceCreateInfo,VkFenceCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkFenceCreateInfo { + VkStructureType sType; + const void* pNext; + VkFenceCreateFlags flags; +} VkFenceCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkFormatProperties.txt b/doc/specs/vulkan/structs/VkFormatProperties.txt new file mode 100644 index 00000000..8bf36967 --- /dev/null +++ b/doc/specs/vulkan/structs/VkFormatProperties.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkFormatProperties,VkFormatProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkFormatProperties { + VkFormatFeatureFlags linearTilingFeatures; + VkFormatFeatureFlags optimalTilingFeatures; + VkFormatFeatureFlags bufferFeatures; +} VkFormatProperties; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkFramebufferCreateInfo.txt b/doc/specs/vulkan/structs/VkFramebufferCreateInfo.txt new file mode 100644 index 00000000..2dde233d --- /dev/null +++ b/doc/specs/vulkan/structs/VkFramebufferCreateInfo.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkFramebufferCreateInfo,VkFramebufferCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkFramebufferCreateInfo { + VkStructureType sType; + const void* pNext; + VkFramebufferCreateFlags flags; + VkRenderPass renderPass; + uint32_t attachmentCount; + const VkImageView* pAttachments; + uint32_t width; + uint32_t height; + uint32_t layers; +} VkFramebufferCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkGraphicsPipelineCreateInfo.txt b/doc/specs/vulkan/structs/VkGraphicsPipelineCreateInfo.txt new file mode 100644 index 00000000..c31cbb41 --- /dev/null +++ b/doc/specs/vulkan/structs/VkGraphicsPipelineCreateInfo.txt @@ -0,0 +1,31 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkGraphicsPipelineCreateInfo,VkGraphicsPipelineCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkGraphicsPipelineCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineCreateFlags flags; + uint32_t stageCount; + const VkPipelineShaderStageCreateInfo* pStages; + const VkPipelineVertexInputStateCreateInfo* pVertexInputState; + const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState; + const VkPipelineTessellationStateCreateInfo* pTessellationState; + const VkPipelineViewportStateCreateInfo* pViewportState; + const VkPipelineRasterizationStateCreateInfo* pRasterizationState; + const VkPipelineMultisampleStateCreateInfo* pMultisampleState; + const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState; + const VkPipelineColorBlendStateCreateInfo* pColorBlendState; + const VkPipelineDynamicStateCreateInfo* pDynamicState; + VkPipelineLayout layout; + VkRenderPass renderPass; + uint32_t subpass; + VkPipeline basePipelineHandle; + int32_t basePipelineIndex; +} VkGraphicsPipelineCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkImageBlit.txt b/doc/specs/vulkan/structs/VkImageBlit.txt new file mode 100644 index 00000000..d1d39fe7 --- /dev/null +++ b/doc/specs/vulkan/structs/VkImageBlit.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageBlit,VkImageBlit]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkImageBlit { + VkImageSubresourceLayers srcSubresource; + VkOffset3D srcOffsets[2]; + VkImageSubresourceLayers dstSubresource; + VkOffset3D dstOffsets[2]; +} VkImageBlit; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkImageCopy.txt b/doc/specs/vulkan/structs/VkImageCopy.txt new file mode 100644 index 00000000..a88330b5 --- /dev/null +++ b/doc/specs/vulkan/structs/VkImageCopy.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageCopy,VkImageCopy]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkImageCopy { + VkImageSubresourceLayers srcSubresource; + VkOffset3D srcOffset; + VkImageSubresourceLayers dstSubresource; + VkOffset3D dstOffset; + VkExtent3D extent; +} VkImageCopy; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkImageCreateInfo.txt b/doc/specs/vulkan/structs/VkImageCreateInfo.txt new file mode 100644 index 00000000..6e29630f --- /dev/null +++ b/doc/specs/vulkan/structs/VkImageCreateInfo.txt @@ -0,0 +1,27 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageCreateInfo,VkImageCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkImageCreateInfo { + VkStructureType sType; + const void* pNext; + VkImageCreateFlags flags; + VkImageType imageType; + VkFormat format; + VkExtent3D extent; + uint32_t mipLevels; + uint32_t arrayLayers; + VkSampleCountFlagBits samples; + VkImageTiling tiling; + VkImageUsageFlags usage; + VkSharingMode sharingMode; + uint32_t queueFamilyIndexCount; + const uint32_t* pQueueFamilyIndices; + VkImageLayout initialLayout; +} VkImageCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkImageFormatProperties.txt b/doc/specs/vulkan/structs/VkImageFormatProperties.txt new file mode 100644 index 00000000..540afebf --- /dev/null +++ b/doc/specs/vulkan/structs/VkImageFormatProperties.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageFormatProperties,VkImageFormatProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkImageFormatProperties { + VkExtent3D maxExtent; + uint32_t maxMipLevels; + uint32_t maxArrayLayers; + VkSampleCountFlags sampleCounts; + VkDeviceSize maxResourceSize; +} VkImageFormatProperties; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkImageMemoryBarrier.txt b/doc/specs/vulkan/structs/VkImageMemoryBarrier.txt new file mode 100644 index 00000000..e8f1f212 --- /dev/null +++ b/doc/specs/vulkan/structs/VkImageMemoryBarrier.txt @@ -0,0 +1,22 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageMemoryBarrier,VkImageMemoryBarrier]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkImageMemoryBarrier { + VkStructureType sType; + const void* pNext; + VkAccessFlags srcAccessMask; + VkAccessFlags dstAccessMask; + VkImageLayout oldLayout; + VkImageLayout newLayout; + uint32_t srcQueueFamilyIndex; + uint32_t dstQueueFamilyIndex; + VkImage image; + VkImageSubresourceRange subresourceRange; +} VkImageMemoryBarrier; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkImageResolve.txt b/doc/specs/vulkan/structs/VkImageResolve.txt new file mode 100644 index 00000000..7d84a278 --- /dev/null +++ b/doc/specs/vulkan/structs/VkImageResolve.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageResolve,VkImageResolve]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkImageResolve { + VkImageSubresourceLayers srcSubresource; + VkOffset3D srcOffset; + VkImageSubresourceLayers dstSubresource; + VkOffset3D dstOffset; + VkExtent3D extent; +} VkImageResolve; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkImageSubresource.txt b/doc/specs/vulkan/structs/VkImageSubresource.txt new file mode 100644 index 00000000..5dcaa9a4 --- /dev/null +++ b/doc/specs/vulkan/structs/VkImageSubresource.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageSubresource,VkImageSubresource]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkImageSubresource { + VkImageAspectFlags aspectMask; + uint32_t mipLevel; + uint32_t arrayLayer; +} VkImageSubresource; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkImageSubresourceLayers.txt b/doc/specs/vulkan/structs/VkImageSubresourceLayers.txt new file mode 100644 index 00000000..8cc452c5 --- /dev/null +++ b/doc/specs/vulkan/structs/VkImageSubresourceLayers.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageSubresourceLayers,VkImageSubresourceLayers]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkImageSubresourceLayers { + VkImageAspectFlags aspectMask; + uint32_t mipLevel; + uint32_t baseArrayLayer; + uint32_t layerCount; +} VkImageSubresourceLayers; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkImageSubresourceRange.txt b/doc/specs/vulkan/structs/VkImageSubresourceRange.txt new file mode 100644 index 00000000..5eb591f9 --- /dev/null +++ b/doc/specs/vulkan/structs/VkImageSubresourceRange.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageSubresourceRange,VkImageSubresourceRange]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkImageSubresourceRange { + VkImageAspectFlags aspectMask; + uint32_t baseMipLevel; + uint32_t levelCount; + uint32_t baseArrayLayer; + uint32_t layerCount; +} VkImageSubresourceRange; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkImageViewCreateInfo.txt b/doc/specs/vulkan/structs/VkImageViewCreateInfo.txt new file mode 100644 index 00000000..55b1d8aa --- /dev/null +++ b/doc/specs/vulkan/structs/VkImageViewCreateInfo.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkImageViewCreateInfo,VkImageViewCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkImageViewCreateInfo { + VkStructureType sType; + const void* pNext; + VkImageViewCreateFlags flags; + VkImage image; + VkImageViewType viewType; + VkFormat format; + VkComponentMapping components; + VkImageSubresourceRange subresourceRange; +} VkImageViewCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkInstanceCreateInfo.txt b/doc/specs/vulkan/structs/VkInstanceCreateInfo.txt new file mode 100644 index 00000000..9f26c7e6 --- /dev/null +++ b/doc/specs/vulkan/structs/VkInstanceCreateInfo.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkInstanceCreateInfo,VkInstanceCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkInstanceCreateInfo { + VkStructureType sType; + const void* pNext; + VkInstanceCreateFlags flags; + const VkApplicationInfo* pApplicationInfo; + uint32_t enabledLayerCount; + const char* const* ppEnabledLayerNames; + uint32_t enabledExtensionCount; + const char* const* ppEnabledExtensionNames; +} VkInstanceCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkLayerProperties.txt b/doc/specs/vulkan/structs/VkLayerProperties.txt new file mode 100644 index 00000000..bd21c2b8 --- /dev/null +++ b/doc/specs/vulkan/structs/VkLayerProperties.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkLayerProperties,VkLayerProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkLayerProperties { + char layerName[VK_MAX_EXTENSION_NAME_SIZE]; + uint32_t specVersion; + uint32_t implementationVersion; + char description[VK_MAX_DESCRIPTION_SIZE]; +} VkLayerProperties; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkMappedMemoryRange.txt b/doc/specs/vulkan/structs/VkMappedMemoryRange.txt new file mode 100644 index 00000000..91a48a73 --- /dev/null +++ b/doc/specs/vulkan/structs/VkMappedMemoryRange.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkMappedMemoryRange,VkMappedMemoryRange]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkMappedMemoryRange { + VkStructureType sType; + const void* pNext; + VkDeviceMemory memory; + VkDeviceSize offset; + VkDeviceSize size; +} VkMappedMemoryRange; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkMemoryAllocateInfo.txt b/doc/specs/vulkan/structs/VkMemoryAllocateInfo.txt new file mode 100644 index 00000000..44703d03 --- /dev/null +++ b/doc/specs/vulkan/structs/VkMemoryAllocateInfo.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkMemoryAllocateInfo,VkMemoryAllocateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkMemoryAllocateInfo { + VkStructureType sType; + const void* pNext; + VkDeviceSize allocationSize; + uint32_t memoryTypeIndex; +} VkMemoryAllocateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkMemoryBarrier.txt b/doc/specs/vulkan/structs/VkMemoryBarrier.txt new file mode 100644 index 00000000..b3b00846 --- /dev/null +++ b/doc/specs/vulkan/structs/VkMemoryBarrier.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkMemoryBarrier,VkMemoryBarrier]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkMemoryBarrier { + VkStructureType sType; + const void* pNext; + VkAccessFlags srcAccessMask; + VkAccessFlags dstAccessMask; +} VkMemoryBarrier; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkMemoryHeap.txt b/doc/specs/vulkan/structs/VkMemoryHeap.txt new file mode 100644 index 00000000..b11aa12b --- /dev/null +++ b/doc/specs/vulkan/structs/VkMemoryHeap.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkMemoryHeap,VkMemoryHeap]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkMemoryHeap { + VkDeviceSize size; + VkMemoryHeapFlags flags; +} VkMemoryHeap; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkMemoryRequirements.txt b/doc/specs/vulkan/structs/VkMemoryRequirements.txt new file mode 100644 index 00000000..c4fbe9a5 --- /dev/null +++ b/doc/specs/vulkan/structs/VkMemoryRequirements.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkMemoryRequirements,VkMemoryRequirements]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkMemoryRequirements { + VkDeviceSize size; + VkDeviceSize alignment; + uint32_t memoryTypeBits; +} VkMemoryRequirements; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkMemoryType.txt b/doc/specs/vulkan/structs/VkMemoryType.txt new file mode 100644 index 00000000..891fefc1 --- /dev/null +++ b/doc/specs/vulkan/structs/VkMemoryType.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkMemoryType,VkMemoryType]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkMemoryType { + VkMemoryPropertyFlags propertyFlags; + uint32_t heapIndex; +} VkMemoryType; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkOffset2D.txt b/doc/specs/vulkan/structs/VkOffset2D.txt new file mode 100644 index 00000000..43288775 --- /dev/null +++ b/doc/specs/vulkan/structs/VkOffset2D.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkOffset2D,VkOffset2D]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkOffset2D { + int32_t x; + int32_t y; +} VkOffset2D; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkOffset3D.txt b/doc/specs/vulkan/structs/VkOffset3D.txt new file mode 100644 index 00000000..f5e73e1c --- /dev/null +++ b/doc/specs/vulkan/structs/VkOffset3D.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkOffset3D,VkOffset3D]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkOffset3D { + int32_t x; + int32_t y; + int32_t z; +} VkOffset3D; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPhysicalDeviceFeatures.txt b/doc/specs/vulkan/structs/VkPhysicalDeviceFeatures.txt new file mode 100644 index 00000000..67bcfcc6 --- /dev/null +++ b/doc/specs/vulkan/structs/VkPhysicalDeviceFeatures.txt @@ -0,0 +1,67 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPhysicalDeviceFeatures,VkPhysicalDeviceFeatures]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPhysicalDeviceFeatures { + VkBool32 robustBufferAccess; + VkBool32 fullDrawIndexUint32; + VkBool32 imageCubeArray; + VkBool32 independentBlend; + VkBool32 geometryShader; + VkBool32 tessellationShader; + VkBool32 sampleRateShading; + VkBool32 dualSrcBlend; + VkBool32 logicOp; + VkBool32 multiDrawIndirect; + VkBool32 drawIndirectFirstInstance; + VkBool32 depthClamp; + VkBool32 depthBiasClamp; + VkBool32 fillModeNonSolid; + VkBool32 depthBounds; + VkBool32 wideLines; + VkBool32 largePoints; + VkBool32 alphaToOne; + VkBool32 multiViewport; + VkBool32 samplerAnisotropy; + VkBool32 textureCompressionETC2; + VkBool32 textureCompressionASTC_LDR; + VkBool32 textureCompressionBC; + VkBool32 occlusionQueryPrecise; + VkBool32 pipelineStatisticsQuery; + VkBool32 vertexPipelineStoresAndAtomics; + VkBool32 fragmentStoresAndAtomics; + VkBool32 shaderTessellationAndGeometryPointSize; + VkBool32 shaderImageGatherExtended; + VkBool32 shaderStorageImageExtendedFormats; + VkBool32 shaderStorageImageMultisample; + VkBool32 shaderStorageImageReadWithoutFormat; + VkBool32 shaderStorageImageWriteWithoutFormat; + VkBool32 shaderUniformBufferArrayDynamicIndexing; + VkBool32 shaderSampledImageArrayDynamicIndexing; + VkBool32 shaderStorageBufferArrayDynamicIndexing; + VkBool32 shaderStorageImageArrayDynamicIndexing; + VkBool32 shaderClipDistance; + VkBool32 shaderCullDistance; + VkBool32 shaderFloat64; + VkBool32 shaderInt64; + VkBool32 shaderInt16; + VkBool32 shaderResourceResidency; + VkBool32 shaderResourceMinLod; + VkBool32 sparseBinding; + VkBool32 sparseResidencyBuffer; + VkBool32 sparseResidencyImage2D; + VkBool32 sparseResidencyImage3D; + VkBool32 sparseResidency2Samples; + VkBool32 sparseResidency4Samples; + VkBool32 sparseResidency8Samples; + VkBool32 sparseResidency16Samples; + VkBool32 sparseResidencyAliased; + VkBool32 variableMultisampleRate; + VkBool32 inheritedQueries; +} VkPhysicalDeviceFeatures; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPhysicalDeviceLimits.txt b/doc/specs/vulkan/structs/VkPhysicalDeviceLimits.txt new file mode 100644 index 00000000..cd0b5c75 --- /dev/null +++ b/doc/specs/vulkan/structs/VkPhysicalDeviceLimits.txt @@ -0,0 +1,118 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPhysicalDeviceLimits,VkPhysicalDeviceLimits]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPhysicalDeviceLimits { + uint32_t maxImageDimension1D; + uint32_t maxImageDimension2D; + uint32_t maxImageDimension3D; + uint32_t maxImageDimensionCube; + uint32_t maxImageArrayLayers; + uint32_t maxTexelBufferElements; + uint32_t maxUniformBufferRange; + uint32_t maxStorageBufferRange; + uint32_t maxPushConstantsSize; + uint32_t maxMemoryAllocationCount; + uint32_t maxSamplerAllocationCount; + VkDeviceSize bufferImageGranularity; + VkDeviceSize sparseAddressSpaceSize; + uint32_t maxBoundDescriptorSets; + uint32_t maxPerStageDescriptorSamplers; + uint32_t maxPerStageDescriptorUniformBuffers; + uint32_t maxPerStageDescriptorStorageBuffers; + uint32_t maxPerStageDescriptorSampledImages; + uint32_t maxPerStageDescriptorStorageImages; + uint32_t maxPerStageDescriptorInputAttachments; + uint32_t maxPerStageResources; + uint32_t maxDescriptorSetSamplers; + uint32_t maxDescriptorSetUniformBuffers; + uint32_t maxDescriptorSetUniformBuffersDynamic; + uint32_t maxDescriptorSetStorageBuffers; + uint32_t maxDescriptorSetStorageBuffersDynamic; + uint32_t maxDescriptorSetSampledImages; + uint32_t maxDescriptorSetStorageImages; + uint32_t maxDescriptorSetInputAttachments; + uint32_t maxVertexInputAttributes; + uint32_t maxVertexInputBindings; + uint32_t maxVertexInputAttributeOffset; + uint32_t maxVertexInputBindingStride; + uint32_t maxVertexOutputComponents; + uint32_t maxTessellationGenerationLevel; + uint32_t maxTessellationPatchSize; + uint32_t maxTessellationControlPerVertexInputComponents; + uint32_t maxTessellationControlPerVertexOutputComponents; + uint32_t maxTessellationControlPerPatchOutputComponents; + uint32_t maxTessellationControlTotalOutputComponents; + uint32_t maxTessellationEvaluationInputComponents; + uint32_t maxTessellationEvaluationOutputComponents; + uint32_t maxGeometryShaderInvocations; + uint32_t maxGeometryInputComponents; + uint32_t maxGeometryOutputComponents; + uint32_t maxGeometryOutputVertices; + uint32_t maxGeometryTotalOutputComponents; + uint32_t maxFragmentInputComponents; + uint32_t maxFragmentOutputAttachments; + uint32_t maxFragmentDualSrcAttachments; + uint32_t maxFragmentCombinedOutputResources; + uint32_t maxComputeSharedMemorySize; + uint32_t maxComputeWorkGroupCount[3]; + uint32_t maxComputeWorkGroupInvocations; + uint32_t maxComputeWorkGroupSize[3]; + uint32_t subPixelPrecisionBits; + uint32_t subTexelPrecisionBits; + uint32_t mipmapPrecisionBits; + uint32_t maxDrawIndexedIndexValue; + uint32_t maxDrawIndirectCount; + float maxSamplerLodBias; + float maxSamplerAnisotropy; + uint32_t maxViewports; + uint32_t maxViewportDimensions[2]; + float viewportBoundsRange[2]; + uint32_t viewportSubPixelBits; + size_t minMemoryMapAlignment; + VkDeviceSize minTexelBufferOffsetAlignment; + VkDeviceSize minUniformBufferOffsetAlignment; + VkDeviceSize minStorageBufferOffsetAlignment; + int32_t minTexelOffset; + uint32_t maxTexelOffset; + int32_t minTexelGatherOffset; + uint32_t maxTexelGatherOffset; + float minInterpolationOffset; + float maxInterpolationOffset; + uint32_t subPixelInterpolationOffsetBits; + uint32_t maxFramebufferWidth; + uint32_t maxFramebufferHeight; + uint32_t maxFramebufferLayers; + VkSampleCountFlags framebufferColorSampleCounts; + VkSampleCountFlags framebufferDepthSampleCounts; + VkSampleCountFlags framebufferStencilSampleCounts; + VkSampleCountFlags framebufferNoAttachmentsSampleCounts; + uint32_t maxColorAttachments; + VkSampleCountFlags sampledImageColorSampleCounts; + VkSampleCountFlags sampledImageIntegerSampleCounts; + VkSampleCountFlags sampledImageDepthSampleCounts; + VkSampleCountFlags sampledImageStencilSampleCounts; + VkSampleCountFlags storageImageSampleCounts; + uint32_t maxSampleMaskWords; + VkBool32 timestampComputeAndGraphics; + float timestampPeriod; + uint32_t maxClipDistances; + uint32_t maxCullDistances; + uint32_t maxCombinedClipAndCullDistances; + uint32_t discreteQueuePriorities; + float pointSizeRange[2]; + float lineWidthRange[2]; + float pointSizeGranularity; + float lineWidthGranularity; + VkBool32 strictLines; + VkBool32 standardSampleLocations; + VkDeviceSize optimalBufferCopyOffsetAlignment; + VkDeviceSize optimalBufferCopyRowPitchAlignment; + VkDeviceSize nonCoherentAtomSize; +} VkPhysicalDeviceLimits; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPhysicalDeviceMemoryProperties.txt b/doc/specs/vulkan/structs/VkPhysicalDeviceMemoryProperties.txt new file mode 100644 index 00000000..b696877d --- /dev/null +++ b/doc/specs/vulkan/structs/VkPhysicalDeviceMemoryProperties.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPhysicalDeviceMemoryProperties,VkPhysicalDeviceMemoryProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPhysicalDeviceMemoryProperties { + uint32_t memoryTypeCount; + VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES]; + uint32_t memoryHeapCount; + VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS]; +} VkPhysicalDeviceMemoryProperties; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPhysicalDeviceProperties.txt b/doc/specs/vulkan/structs/VkPhysicalDeviceProperties.txt new file mode 100644 index 00000000..db29dc8b --- /dev/null +++ b/doc/specs/vulkan/structs/VkPhysicalDeviceProperties.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPhysicalDeviceProperties,VkPhysicalDeviceProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPhysicalDeviceProperties { + uint32_t apiVersion; + uint32_t driverVersion; + uint32_t vendorID; + uint32_t deviceID; + VkPhysicalDeviceType deviceType; + char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]; + uint8_t pipelineCacheUUID[VK_UUID_SIZE]; + VkPhysicalDeviceLimits limits; + VkPhysicalDeviceSparseProperties sparseProperties; +} VkPhysicalDeviceProperties; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPhysicalDeviceSparseProperties.txt b/doc/specs/vulkan/structs/VkPhysicalDeviceSparseProperties.txt new file mode 100644 index 00000000..003c894c --- /dev/null +++ b/doc/specs/vulkan/structs/VkPhysicalDeviceSparseProperties.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPhysicalDeviceSparseProperties,VkPhysicalDeviceSparseProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPhysicalDeviceSparseProperties { + VkBool32 residencyStandard2DBlockShape; + VkBool32 residencyStandard2DMultisampleBlockShape; + VkBool32 residencyStandard3DBlockShape; + VkBool32 residencyAlignedMipSize; + VkBool32 residencyNonResidentStrict; +} VkPhysicalDeviceSparseProperties; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPipelineCacheCreateInfo.txt b/doc/specs/vulkan/structs/VkPipelineCacheCreateInfo.txt new file mode 100644 index 00000000..f2474d01 --- /dev/null +++ b/doc/specs/vulkan/structs/VkPipelineCacheCreateInfo.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineCacheCreateInfo,VkPipelineCacheCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPipelineCacheCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineCacheCreateFlags flags; + size_t initialDataSize; + const void* pInitialData; +} VkPipelineCacheCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPipelineColorBlendAttachmentState.txt b/doc/specs/vulkan/structs/VkPipelineColorBlendAttachmentState.txt new file mode 100644 index 00000000..1827f4e7 --- /dev/null +++ b/doc/specs/vulkan/structs/VkPipelineColorBlendAttachmentState.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineColorBlendAttachmentState,VkPipelineColorBlendAttachmentState]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPipelineColorBlendAttachmentState { + VkBool32 blendEnable; + VkBlendFactor srcColorBlendFactor; + VkBlendFactor dstColorBlendFactor; + VkBlendOp colorBlendOp; + VkBlendFactor srcAlphaBlendFactor; + VkBlendFactor dstAlphaBlendFactor; + VkBlendOp alphaBlendOp; + VkColorComponentFlags colorWriteMask; +} VkPipelineColorBlendAttachmentState; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPipelineColorBlendStateCreateInfo.txt b/doc/specs/vulkan/structs/VkPipelineColorBlendStateCreateInfo.txt new file mode 100644 index 00000000..71f86d60 --- /dev/null +++ b/doc/specs/vulkan/structs/VkPipelineColorBlendStateCreateInfo.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineColorBlendStateCreateInfo,VkPipelineColorBlendStateCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPipelineColorBlendStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineColorBlendStateCreateFlags flags; + VkBool32 logicOpEnable; + VkLogicOp logicOp; + uint32_t attachmentCount; + const VkPipelineColorBlendAttachmentState* pAttachments; + float blendConstants[4]; +} VkPipelineColorBlendStateCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPipelineDepthStencilStateCreateInfo.txt b/doc/specs/vulkan/structs/VkPipelineDepthStencilStateCreateInfo.txt new file mode 100644 index 00000000..57380c79 --- /dev/null +++ b/doc/specs/vulkan/structs/VkPipelineDepthStencilStateCreateInfo.txt @@ -0,0 +1,24 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineDepthStencilStateCreateInfo,VkPipelineDepthStencilStateCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPipelineDepthStencilStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineDepthStencilStateCreateFlags flags; + VkBool32 depthTestEnable; + VkBool32 depthWriteEnable; + VkCompareOp depthCompareOp; + VkBool32 depthBoundsTestEnable; + VkBool32 stencilTestEnable; + VkStencilOpState front; + VkStencilOpState back; + float minDepthBounds; + float maxDepthBounds; +} VkPipelineDepthStencilStateCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPipelineDynamicStateCreateInfo.txt b/doc/specs/vulkan/structs/VkPipelineDynamicStateCreateInfo.txt new file mode 100644 index 00000000..b62e0fd9 --- /dev/null +++ b/doc/specs/vulkan/structs/VkPipelineDynamicStateCreateInfo.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineDynamicStateCreateInfo,VkPipelineDynamicStateCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPipelineDynamicStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineDynamicStateCreateFlags flags; + uint32_t dynamicStateCount; + const VkDynamicState* pDynamicStates; +} VkPipelineDynamicStateCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPipelineInputAssemblyStateCreateInfo.txt b/doc/specs/vulkan/structs/VkPipelineInputAssemblyStateCreateInfo.txt new file mode 100644 index 00000000..4a1ca8f6 --- /dev/null +++ b/doc/specs/vulkan/structs/VkPipelineInputAssemblyStateCreateInfo.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineInputAssemblyStateCreateInfo,VkPipelineInputAssemblyStateCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPipelineInputAssemblyStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineInputAssemblyStateCreateFlags flags; + VkPrimitiveTopology topology; + VkBool32 primitiveRestartEnable; +} VkPipelineInputAssemblyStateCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPipelineLayoutCreateInfo.txt b/doc/specs/vulkan/structs/VkPipelineLayoutCreateInfo.txt new file mode 100644 index 00000000..732849c4 --- /dev/null +++ b/doc/specs/vulkan/structs/VkPipelineLayoutCreateInfo.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineLayoutCreateInfo,VkPipelineLayoutCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPipelineLayoutCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineLayoutCreateFlags flags; + uint32_t setLayoutCount; + const VkDescriptorSetLayout* pSetLayouts; + uint32_t pushConstantRangeCount; + const VkPushConstantRange* pPushConstantRanges; +} VkPipelineLayoutCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPipelineMultisampleStateCreateInfo.txt b/doc/specs/vulkan/structs/VkPipelineMultisampleStateCreateInfo.txt new file mode 100644 index 00000000..a00e527a --- /dev/null +++ b/doc/specs/vulkan/structs/VkPipelineMultisampleStateCreateInfo.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineMultisampleStateCreateInfo,VkPipelineMultisampleStateCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPipelineMultisampleStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineMultisampleStateCreateFlags flags; + VkSampleCountFlagBits rasterizationSamples; + VkBool32 sampleShadingEnable; + float minSampleShading; + const VkSampleMask* pSampleMask; + VkBool32 alphaToCoverageEnable; + VkBool32 alphaToOneEnable; +} VkPipelineMultisampleStateCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPipelineRasterizationStateCreateInfo.txt b/doc/specs/vulkan/structs/VkPipelineRasterizationStateCreateInfo.txt new file mode 100644 index 00000000..8b8bf1e7 --- /dev/null +++ b/doc/specs/vulkan/structs/VkPipelineRasterizationStateCreateInfo.txt @@ -0,0 +1,25 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineRasterizationStateCreateInfo,VkPipelineRasterizationStateCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPipelineRasterizationStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineRasterizationStateCreateFlags flags; + VkBool32 depthClampEnable; + VkBool32 rasterizerDiscardEnable; + VkPolygonMode polygonMode; + VkCullModeFlags cullMode; + VkFrontFace frontFace; + VkBool32 depthBiasEnable; + float depthBiasConstantFactor; + float depthBiasClamp; + float depthBiasSlopeFactor; + float lineWidth; +} VkPipelineRasterizationStateCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPipelineShaderStageCreateInfo.txt b/doc/specs/vulkan/structs/VkPipelineShaderStageCreateInfo.txt new file mode 100644 index 00000000..3885187b --- /dev/null +++ b/doc/specs/vulkan/structs/VkPipelineShaderStageCreateInfo.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineShaderStageCreateInfo,VkPipelineShaderStageCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPipelineShaderStageCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineShaderStageCreateFlags flags; + VkShaderStageFlagBits stage; + VkShaderModule module; + const char* pName; + const VkSpecializationInfo* pSpecializationInfo; +} VkPipelineShaderStageCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPipelineTessellationStateCreateInfo.txt b/doc/specs/vulkan/structs/VkPipelineTessellationStateCreateInfo.txt new file mode 100644 index 00000000..ff1eec6e --- /dev/null +++ b/doc/specs/vulkan/structs/VkPipelineTessellationStateCreateInfo.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineTessellationStateCreateInfo,VkPipelineTessellationStateCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPipelineTessellationStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineTessellationStateCreateFlags flags; + uint32_t patchControlPoints; +} VkPipelineTessellationStateCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPipelineVertexInputStateCreateInfo.txt b/doc/specs/vulkan/structs/VkPipelineVertexInputStateCreateInfo.txt new file mode 100644 index 00000000..7147a9a3 --- /dev/null +++ b/doc/specs/vulkan/structs/VkPipelineVertexInputStateCreateInfo.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineVertexInputStateCreateInfo,VkPipelineVertexInputStateCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPipelineVertexInputStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineVertexInputStateCreateFlags flags; + uint32_t vertexBindingDescriptionCount; + const VkVertexInputBindingDescription* pVertexBindingDescriptions; + uint32_t vertexAttributeDescriptionCount; + const VkVertexInputAttributeDescription* pVertexAttributeDescriptions; +} VkPipelineVertexInputStateCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPipelineViewportStateCreateInfo.txt b/doc/specs/vulkan/structs/VkPipelineViewportStateCreateInfo.txt new file mode 100644 index 00000000..f0ef3722 --- /dev/null +++ b/doc/specs/vulkan/structs/VkPipelineViewportStateCreateInfo.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPipelineViewportStateCreateInfo,VkPipelineViewportStateCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPipelineViewportStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineViewportStateCreateFlags flags; + uint32_t viewportCount; + const VkViewport* pViewports; + uint32_t scissorCount; + const VkRect2D* pScissors; +} VkPipelineViewportStateCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkPushConstantRange.txt b/doc/specs/vulkan/structs/VkPushConstantRange.txt new file mode 100644 index 00000000..4139d2eb --- /dev/null +++ b/doc/specs/vulkan/structs/VkPushConstantRange.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkPushConstantRange,VkPushConstantRange]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkPushConstantRange { + VkShaderStageFlags stageFlags; + uint32_t offset; + uint32_t size; +} VkPushConstantRange; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkQueryPoolCreateInfo.txt b/doc/specs/vulkan/structs/VkQueryPoolCreateInfo.txt new file mode 100644 index 00000000..4b9e436e --- /dev/null +++ b/doc/specs/vulkan/structs/VkQueryPoolCreateInfo.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkQueryPoolCreateInfo,VkQueryPoolCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkQueryPoolCreateInfo { + VkStructureType sType; + const void* pNext; + VkQueryPoolCreateFlags flags; + VkQueryType queryType; + uint32_t queryCount; + VkQueryPipelineStatisticFlags pipelineStatistics; +} VkQueryPoolCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkQueueFamilyProperties.txt b/doc/specs/vulkan/structs/VkQueueFamilyProperties.txt new file mode 100644 index 00000000..33a1ee6b --- /dev/null +++ b/doc/specs/vulkan/structs/VkQueueFamilyProperties.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkQueueFamilyProperties,VkQueueFamilyProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkQueueFamilyProperties { + VkQueueFlags queueFlags; + uint32_t queueCount; + uint32_t timestampValidBits; + VkExtent3D minImageTransferGranularity; +} VkQueueFamilyProperties; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkRect2D.txt b/doc/specs/vulkan/structs/VkRect2D.txt new file mode 100644 index 00000000..13343c32 --- /dev/null +++ b/doc/specs/vulkan/structs/VkRect2D.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkRect2D,VkRect2D]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkRect2D { + VkOffset2D offset; + VkExtent2D extent; +} VkRect2D; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkRenderPassBeginInfo.txt b/doc/specs/vulkan/structs/VkRenderPassBeginInfo.txt new file mode 100644 index 00000000..5ec72f01 --- /dev/null +++ b/doc/specs/vulkan/structs/VkRenderPassBeginInfo.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkRenderPassBeginInfo,VkRenderPassBeginInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkRenderPassBeginInfo { + VkStructureType sType; + const void* pNext; + VkRenderPass renderPass; + VkFramebuffer framebuffer; + VkRect2D renderArea; + uint32_t clearValueCount; + const VkClearValue* pClearValues; +} VkRenderPassBeginInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkRenderPassCreateInfo.txt b/doc/specs/vulkan/structs/VkRenderPassCreateInfo.txt new file mode 100644 index 00000000..eaf9166a --- /dev/null +++ b/doc/specs/vulkan/structs/VkRenderPassCreateInfo.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkRenderPassCreateInfo,VkRenderPassCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkRenderPassCreateInfo { + VkStructureType sType; + const void* pNext; + VkRenderPassCreateFlags flags; + uint32_t attachmentCount; + const VkAttachmentDescription* pAttachments; + uint32_t subpassCount; + const VkSubpassDescription* pSubpasses; + uint32_t dependencyCount; + const VkSubpassDependency* pDependencies; +} VkRenderPassCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkSamplerCreateInfo.txt b/doc/specs/vulkan/structs/VkSamplerCreateInfo.txt new file mode 100644 index 00000000..11465226 --- /dev/null +++ b/doc/specs/vulkan/structs/VkSamplerCreateInfo.txt @@ -0,0 +1,30 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSamplerCreateInfo,VkSamplerCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkSamplerCreateInfo { + VkStructureType sType; + const void* pNext; + VkSamplerCreateFlags flags; + VkFilter magFilter; + VkFilter minFilter; + VkSamplerMipmapMode mipmapMode; + VkSamplerAddressMode addressModeU; + VkSamplerAddressMode addressModeV; + VkSamplerAddressMode addressModeW; + float mipLodBias; + VkBool32 anisotropyEnable; + float maxAnisotropy; + VkBool32 compareEnable; + VkCompareOp compareOp; + float minLod; + float maxLod; + VkBorderColor borderColor; + VkBool32 unnormalizedCoordinates; +} VkSamplerCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkSemaphoreCreateInfo.txt b/doc/specs/vulkan/structs/VkSemaphoreCreateInfo.txt new file mode 100644 index 00000000..2b5afec4 --- /dev/null +++ b/doc/specs/vulkan/structs/VkSemaphoreCreateInfo.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSemaphoreCreateInfo,VkSemaphoreCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkSemaphoreCreateInfo { + VkStructureType sType; + const void* pNext; + VkSemaphoreCreateFlags flags; +} VkSemaphoreCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkShaderModuleCreateInfo.txt b/doc/specs/vulkan/structs/VkShaderModuleCreateInfo.txt new file mode 100644 index 00000000..b02bc25f --- /dev/null +++ b/doc/specs/vulkan/structs/VkShaderModuleCreateInfo.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkShaderModuleCreateInfo,VkShaderModuleCreateInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkShaderModuleCreateInfo { + VkStructureType sType; + const void* pNext; + VkShaderModuleCreateFlags flags; + size_t codeSize; + const uint32_t* pCode; +} VkShaderModuleCreateInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkSparseBufferMemoryBindInfo.txt b/doc/specs/vulkan/structs/VkSparseBufferMemoryBindInfo.txt new file mode 100644 index 00000000..7d9d519c --- /dev/null +++ b/doc/specs/vulkan/structs/VkSparseBufferMemoryBindInfo.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSparseBufferMemoryBindInfo,VkSparseBufferMemoryBindInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkSparseBufferMemoryBindInfo { + VkBuffer buffer; + uint32_t bindCount; + const VkSparseMemoryBind* pBinds; +} VkSparseBufferMemoryBindInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkSparseImageFormatProperties.txt b/doc/specs/vulkan/structs/VkSparseImageFormatProperties.txt new file mode 100644 index 00000000..a0f0e1e5 --- /dev/null +++ b/doc/specs/vulkan/structs/VkSparseImageFormatProperties.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSparseImageFormatProperties,VkSparseImageFormatProperties]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkSparseImageFormatProperties { + VkImageAspectFlags aspectMask; + VkExtent3D imageGranularity; + VkSparseImageFormatFlags flags; +} VkSparseImageFormatProperties; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkSparseImageMemoryBind.txt b/doc/specs/vulkan/structs/VkSparseImageMemoryBind.txt new file mode 100644 index 00000000..f0998817 --- /dev/null +++ b/doc/specs/vulkan/structs/VkSparseImageMemoryBind.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSparseImageMemoryBind,VkSparseImageMemoryBind]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkSparseImageMemoryBind { + VkImageSubresource subresource; + VkOffset3D offset; + VkExtent3D extent; + VkDeviceMemory memory; + VkDeviceSize memoryOffset; + VkSparseMemoryBindFlags flags; +} VkSparseImageMemoryBind; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkSparseImageMemoryBindInfo.txt b/doc/specs/vulkan/structs/VkSparseImageMemoryBindInfo.txt new file mode 100644 index 00000000..e92d24df --- /dev/null +++ b/doc/specs/vulkan/structs/VkSparseImageMemoryBindInfo.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSparseImageMemoryBindInfo,VkSparseImageMemoryBindInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkSparseImageMemoryBindInfo { + VkImage image; + uint32_t bindCount; + const VkSparseImageMemoryBind* pBinds; +} VkSparseImageMemoryBindInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkSparseImageMemoryRequirements.txt b/doc/specs/vulkan/structs/VkSparseImageMemoryRequirements.txt new file mode 100644 index 00000000..9efd4752 --- /dev/null +++ b/doc/specs/vulkan/structs/VkSparseImageMemoryRequirements.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSparseImageMemoryRequirements,VkSparseImageMemoryRequirements]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkSparseImageMemoryRequirements { + VkSparseImageFormatProperties formatProperties; + uint32_t imageMipTailFirstLod; + VkDeviceSize imageMipTailSize; + VkDeviceSize imageMipTailOffset; + VkDeviceSize imageMipTailStride; +} VkSparseImageMemoryRequirements; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkSparseImageOpaqueMemoryBindInfo.txt b/doc/specs/vulkan/structs/VkSparseImageOpaqueMemoryBindInfo.txt new file mode 100644 index 00000000..1b76ca4e --- /dev/null +++ b/doc/specs/vulkan/structs/VkSparseImageOpaqueMemoryBindInfo.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSparseImageOpaqueMemoryBindInfo,VkSparseImageOpaqueMemoryBindInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkSparseImageOpaqueMemoryBindInfo { + VkImage image; + uint32_t bindCount; + const VkSparseMemoryBind* pBinds; +} VkSparseImageOpaqueMemoryBindInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkSparseMemoryBind.txt b/doc/specs/vulkan/structs/VkSparseMemoryBind.txt new file mode 100644 index 00000000..c47ed002 --- /dev/null +++ b/doc/specs/vulkan/structs/VkSparseMemoryBind.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSparseMemoryBind,VkSparseMemoryBind]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkSparseMemoryBind { + VkDeviceSize resourceOffset; + VkDeviceSize size; + VkDeviceMemory memory; + VkDeviceSize memoryOffset; + VkSparseMemoryBindFlags flags; +} VkSparseMemoryBind; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkSpecializationInfo.txt b/doc/specs/vulkan/structs/VkSpecializationInfo.txt new file mode 100644 index 00000000..81353066 --- /dev/null +++ b/doc/specs/vulkan/structs/VkSpecializationInfo.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSpecializationInfo,VkSpecializationInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkSpecializationInfo { + uint32_t mapEntryCount; + const VkSpecializationMapEntry* pMapEntries; + size_t dataSize; + const void* pData; +} VkSpecializationInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkSpecializationMapEntry.txt b/doc/specs/vulkan/structs/VkSpecializationMapEntry.txt new file mode 100644 index 00000000..73f753c8 --- /dev/null +++ b/doc/specs/vulkan/structs/VkSpecializationMapEntry.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSpecializationMapEntry,VkSpecializationMapEntry]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkSpecializationMapEntry { + uint32_t constantID; + uint32_t offset; + size_t size; +} VkSpecializationMapEntry; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkStencilOpState.txt b/doc/specs/vulkan/structs/VkStencilOpState.txt new file mode 100644 index 00000000..deedccfa --- /dev/null +++ b/doc/specs/vulkan/structs/VkStencilOpState.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkStencilOpState,VkStencilOpState]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkStencilOpState { + VkStencilOp failOp; + VkStencilOp passOp; + VkStencilOp depthFailOp; + VkCompareOp compareOp; + uint32_t compareMask; + uint32_t writeMask; + uint32_t reference; +} VkStencilOpState; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkSubmitInfo.txt b/doc/specs/vulkan/structs/VkSubmitInfo.txt new file mode 100644 index 00000000..3fcd40f5 --- /dev/null +++ b/doc/specs/vulkan/structs/VkSubmitInfo.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSubmitInfo,VkSubmitInfo]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkSubmitInfo { + VkStructureType sType; + const void* pNext; + uint32_t waitSemaphoreCount; + const VkSemaphore* pWaitSemaphores; + const VkPipelineStageFlags* pWaitDstStageMask; + uint32_t commandBufferCount; + const VkCommandBuffer* pCommandBuffers; + uint32_t signalSemaphoreCount; + const VkSemaphore* pSignalSemaphores; +} VkSubmitInfo; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkSubpassDependency.txt b/doc/specs/vulkan/structs/VkSubpassDependency.txt new file mode 100644 index 00000000..2b7ccfe5 --- /dev/null +++ b/doc/specs/vulkan/structs/VkSubpassDependency.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSubpassDependency,VkSubpassDependency]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkSubpassDependency { + uint32_t srcSubpass; + uint32_t dstSubpass; + VkPipelineStageFlags srcStageMask; + VkPipelineStageFlags dstStageMask; + VkAccessFlags srcAccessMask; + VkAccessFlags dstAccessMask; + VkDependencyFlags dependencyFlags; +} VkSubpassDependency; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkSubpassDescription.txt b/doc/specs/vulkan/structs/VkSubpassDescription.txt new file mode 100644 index 00000000..670c6183 --- /dev/null +++ b/doc/specs/vulkan/structs/VkSubpassDescription.txt @@ -0,0 +1,22 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSubpassDescription,VkSubpassDescription]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkSubpassDescription { + VkSubpassDescriptionFlags flags; + VkPipelineBindPoint pipelineBindPoint; + uint32_t inputAttachmentCount; + const VkAttachmentReference* pInputAttachments; + uint32_t colorAttachmentCount; + const VkAttachmentReference* pColorAttachments; + const VkAttachmentReference* pResolveAttachments; + const VkAttachmentReference* pDepthStencilAttachment; + uint32_t preserveAttachmentCount; + const uint32_t* pPreserveAttachments; +} VkSubpassDescription; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkSubresourceLayout.txt b/doc/specs/vulkan/structs/VkSubresourceLayout.txt new file mode 100644 index 00000000..7a8fe35a --- /dev/null +++ b/doc/specs/vulkan/structs/VkSubresourceLayout.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkSubresourceLayout,VkSubresourceLayout]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkSubresourceLayout { + VkDeviceSize offset; + VkDeviceSize size; + VkDeviceSize rowPitch; + VkDeviceSize arrayPitch; + VkDeviceSize depthPitch; +} VkSubresourceLayout; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkVertexInputAttributeDescription.txt b/doc/specs/vulkan/structs/VkVertexInputAttributeDescription.txt new file mode 100644 index 00000000..0cbb92a6 --- /dev/null +++ b/doc/specs/vulkan/structs/VkVertexInputAttributeDescription.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkVertexInputAttributeDescription,VkVertexInputAttributeDescription]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkVertexInputAttributeDescription { + uint32_t location; + uint32_t binding; + VkFormat format; + uint32_t offset; +} VkVertexInputAttributeDescription; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkVertexInputBindingDescription.txt b/doc/specs/vulkan/structs/VkVertexInputBindingDescription.txt new file mode 100644 index 00000000..533bb49a --- /dev/null +++ b/doc/specs/vulkan/structs/VkVertexInputBindingDescription.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkVertexInputBindingDescription,VkVertexInputBindingDescription]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkVertexInputBindingDescription { + uint32_t binding; + uint32_t stride; + VkVertexInputRate inputRate; +} VkVertexInputBindingDescription; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkViewport.txt b/doc/specs/vulkan/structs/VkViewport.txt new file mode 100644 index 00000000..7a05b296 --- /dev/null +++ b/doc/specs/vulkan/structs/VkViewport.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkViewport,VkViewport]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkViewport { + float x; + float y; + float width; + float height; + float minDepth; + float maxDepth; +} VkViewport; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/structs/VkWriteDescriptorSet.txt b/doc/specs/vulkan/structs/VkWriteDescriptorSet.txt new file mode 100644 index 00000000..4081de36 --- /dev/null +++ b/doc/specs/vulkan/structs/VkWriteDescriptorSet.txt @@ -0,0 +1,22 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +[[VkWriteDescriptorSet,VkWriteDescriptorSet]] +["source","{basebackend@docbook:c++:cpp}",title=""] +endif::doctype-manpage[] +ifdef::doctype-manpage[] +["source","{basebackend@docbook:c++:cpp}"] +endif::doctype-manpage[] +------------------------------------------------------------------------------ +typedef struct VkWriteDescriptorSet { + VkStructureType sType; + const void* pNext; + VkDescriptorSet dstSet; + uint32_t dstBinding; + uint32_t dstArrayElement; + uint32_t descriptorCount; + VkDescriptorType descriptorType; + const VkDescriptorImageInfo* pImageInfo; + const VkDescriptorBufferInfo* pBufferInfo; + const VkBufferView* pTexelBufferView; +} VkWriteDescriptorSet; +------------------------------------------------------------------------------ diff --git a/doc/specs/vulkan/style/styleguide.txt b/doc/specs/vulkan/style/styleguide.txt new file mode 100644 index 00000000..d6768c85 --- /dev/null +++ b/doc/specs/vulkan/style/styleguide.txt @@ -0,0 +1,956 @@ +// Copyright (c) 2015-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + +Vulkan Style Guide +================== +Jon Leech +include::../specversion.txt[] +:toc2: +:toclevels: 3 +:max-width: 100 +:numbered: +:doctype: book +:imagewidth: 800 +:fullimagewidth: {svgpdf@pdf:scaledwidth="75%":width="800"} +:cl: : + +:leveloffset: 1 + +// :icons: +// :toc-placement: manual + +<<<< + +include::../copyright.txt[] + +<<<< + +[[introduction]] += Introduction + +This is the Vulkan Documentation Style Guide, containing the collected +rules, guidelines, tricks, and tips for authors contributing to the Vulkan +API Specification (the _Specification_), reference pages, and other +documentation such as white papers and tutorials (if and when we have them). +These are collectively referred to as _Vulkan Documentation_ or just +_documentation_ below. The primary focus and inspiration is the +Specification, although all of the markup and most of the writing style is +equally applicable to the reference pages. + +The primary purpose of the style guide is to achieve consistency of both +source and output documents. Consistency makes it easier for editors, +reviewers, and users of our documentation to understand and modify it. When +the style guide makes prescriptive statements, please follow them unless +there are compelling reasons not to. If you have a strong desire to change +these guidelines, you can try to make a case starting with the Specification +editors, and proceeding to the Vulkan Working Group if need be. + +[NOTE] +.Note +==== +But be prepared to make the numerous merge requests applying those changes +to all parts of our documentation, if your change request is accepted! +==== + +The style guide is broken into two major sections: + + * <> - how to write asciidoc and XML source that + follows consistent formatting and layout guidelines, tags special terms + and phrases for proper processing by the spec generation tools, etc. + * <> - overall and fine-grained structure and + conventions, normative language use, API naming conventions, common + words and phrases to use (and those not to use), linking and + cross-referencing, etc. + + +[[introduction-asciidoc]] +== Asciidoc Markup + +Vulkan Documentation is primarily written in Asciidoc, a form of text markup +language. Asciidoc is documented on its website at http://www.asciidoc.org/. + +[[userguide]] +References to the Asciidoc User Guide are to sections in the document at +http://asciidoc.org/userguide.html . + +Asciidoc packages are available for Linux, MacOS, and Microsoft Windows, +together with the other toolchain components required to generate output +documents corresponding to the markup. Note that we are currently using the +original _asciidoc_ tool. Other tools to process Asciidoc markup, such as +_asciidoctor_, are also available, but are not currently usable for our +documents. While asciidoctor supports the basic Asciidoc markup syntax, it +does not support asciidoc macros, which are used extensively in the +documentation. It is possible to move from asciidoc to asciidoctor, but this +will be a significant effort, taking place after Vulkan 1.0 is published. + +This guide does not address the toolchain and build process, just source +documents. + + +[[markup]] += Markup Style + +This chapter demonstrates Asciidoc and Specification structure, including +text layout and markup style. + +Chapters and sections follow a rigid template consisting of an optional +anchor (if other parts of the document cross-reference the section) followed +by a one line title (see section 11.2 of the <>) and a +blank line. The anchor is typically the base name of the file containing the +chapter, with a lowercased version of the section name following, with +spaces replaced by dashes. + +Always use the one-line title form, with one to five = signs preceding the +chapter/section title. The two-line title form cannot be easily searched for +and often looks like other types of asciidoc delimiters. + +Always precede the anchor by two blank lines (except at the beginning of a +file), and follow the title by a blank line, to set off sections visibly. + +.Example Markup +---- +[[markup]] += Markup Style + + +[[markup-sample-section]] +== Sample Section +---- + + +[[markup-sample-section]] +== Sample Section + +This is a sample section of the Vulkan Specification, nested one level +inside a chapter. Sections can be nested up to level 5, although not all +levels are included in the Table of Contents. + + +[[markup-layout]] +== Layout, Line Lengths, and Lists + +Asciidoc source should be text filled to 76 columns with hard line breaks. +Except when necessary for lists or other markup, text should begin at the +first column of each line (leading spaces are often semantically meaningful +in asciidoc markup). + +UTF-8 characters outside the ASCII subset should be used sparingly, only +when needed for non-English names. Instead use asciidoc markup for special +characters, if required. For example, two hyphens produces an en-dash: + +[NOTE] +.Example Markup +==== + +`An -- en-dash` -> An -- en-dash +==== + +As an exception, multiplication should be marked with the unicode +multiplication symbol ``×'' (and *not* an asterisk) when used in plain +text. In math sections, the same symbol should be referred to as `\times`. +In code sections, a conventional asterisk (`*`) should be used instead. + +See chapter 10 of the <> for supported special +characters, as well as use of entity references. + +Quotation marks should use the 66/99 convention. That is, double asymmetric +quotation marks, indicated by double back-ticks as opening marks and double +apostrophes as closing marks (\`\`like this''), which renders ``like this''. + +_Never_ use hard tabs or trailing blanks. + +* In some cases, limitations of asciidoc markup may result in lines that are + longer than 76 characters and cannot easily be shortened without + compromising the output documents. + + +[[markup-samplesection-lists]] +=== Lists + + * Bullet lists are the preferred form of list, aside from glossary + definitions. + * Lists should have text indented by 4 spaces and the list item delimiter + (e.g. one or more asterisks, for bullet lists) indented by two spaces. ++ +-- +Note that continuation blocks for list items longer than one paragraph +cannot be indented, only the first paragraph. + +In general, successive list items should not be separated by white space. +However, list continuation blocks must be followed by a blank line due to +limitations of the asciidoc parser. +-- + + * Indent bullet lists two spaces (to the bullet), 4 spaces (to the text, + if it extends over multiple lines). This lets us visually distinguish + lists from other kinds of markup. + ** Nested lists should align the leftmost list item delimiter (bullet, + etc.) with the parent delimiter. + +.Example Markup +---- + * This is the first item in a bullet list. + * The second item is described with two paragraphs. The second + paragraph is in a continuation block: ++ +-- +This is the second paragraph. +-- + + ** This is a nested list item for the second item. Since it + follows a continuation block, it must be separated by a + blank line from that block. +---- + + +[[markup-samplesection-anchors]] +=== Anchors and Cross-references + +In general, chapters and sections should always have anchors, following the +naming convention <>. Anchors to other sections of +the document may be inserted as needed. In addition, the autogenerated +include files defining commands, structures, enumerations and flags all +define anchors whose name is the name of the command or type being defined, +so it's easy to link to a (for example) a command name such as +<>. + +If you want a cross-reference to an anchor to appear as something other than +the raw anchor name, always make sure to include that text as part of the +cross-reference. There are several different toolchains followed for various +forms of asciidoc output, and not all of them treat anchors without alt-text +the same way. + +.Example Markup +---- +In general, chapters and sections should always have anchors, +following the naming convention <>. +Link to a command name such as <>. +---- + + +[[markup-markup]] +== Markup Macros and Normative Terminology + +This section discusses Asciidoc macros used in the document. In addition to +the macros defined by asciidoc itself, additional macros are defined by the +Specification and Reference Page configuration files. + + +=== API Markup Macros + +These macros must: be used to tag command, structure, enumeration, +enumerant, and other Vulkan-specific names so they can be rendered in a +distinctive fashion, link to definitions of those names, and be easily +searched for in the source documents. The validation scripts (`make +allchecks` output) also rely on these macros being used consistently and +correctly. The API markup macros, with examples of their use, are in the +following table: + +.API Markup Macros +[width="100%",options="header",cols="20%,80%"] +|===== +| Macro Name | Usage and Meaning +| flink{cl} | Generates a cross-reference or link to the definition of + the command name in the macro argument. Example: + flink{cl}vkCreateCommandPool -> flink:vkCreateCommandPool. +| fname{cl} | Formats the macro argument like flink{cl}. Does not + generate a cross-reference. Example: + fname{cl}vkCreateCommandPool -> fname:vkCreateCommandPool. + The flink{cl} macro is preferred. +| ftext{cl} | Formats the macro argument like fname{cl}. May contain + asterisks for wildcards. Not validated. Example: + ftext{cl}vkCmd* -> ftext:vkCmd*. + + Only use ftext{cl} when it is necessary to describe + something that should be rendered like a command name, + but is not actually one (e.g. is a wildcard or subset of + an actual command name). +| slink{cl} | Generates a cross-reference or link to the definition + of the structure in the macro argument. Example: + slink{cl}VkCommandPoolCreateInfo -> + slink:VkCommandPoolCreateInfo. +| sname{cl} | Formats the macro argument like slink{cl}. Does not + generate a cross-reference. May also be an abstract + structure name. Examples: sname{cl}VkCommandPoolCreateInfo + -> sname:VkCommandPoolCreateInfo, sname{cl}VK_NULL_HANDLE + -> sname:VK_NULL_HANDLE. The slink{cl} macro is preferred. +| stext{cl} | Formats the macro argument like sname{cl}. May contain + asterisks for wildcards. Not validated. Example: + stext{cl}Vk*CreateInfo -> stext:Vk*CreateInfo. + + Only use stext{cl} when it is necessary to describe + something that should be rendered like a structure name, + but is not actually one (e.g. is a wildcard or subset of + an actual structure name). +| elink{cl} | Formats the macro argument as a Vulkan enumerantion + name and links to the definition of that enumeration type. + Example: ename{cl}VkResult -> ename:VkResult. +| ename{cl} | Formats the macro argument as a Vulkan enumerant name. + Example: ename{cl}VK_EVENT_SET -> ename:VK_EVENT_SET. +| etext{cl} | Formats the macro argument like ename{cl}. Not validated. + Examples: etext{cl}_RANGE_SIZE -> etext:_RANGE_SIZE, + etext{cl}VK_IMAGE_CREATE_SPARSE_* -> + etext:VK_IMAGE_CREATE_SPARSE_* + + Only use stext{cl} when it is necessary to describe + something that should be rendered like a enumerant name, + but is not actually one (e.g. is a wildcard or subset of + an actual enumerant name). +| pname{cl} | Formats the macro argument as a Vulkan parameter or + structure member name. Example: pname{cl}device -> + pname:device. +| ptext{cl} | Formats the macro argument like pname{cl}. May contain + asterisks for wildcards. Not validated. Example: + ptext{cl}sparseResidency* -> ptext:sparseResidency*. + + Only use ptext{cl} when it is necessary to describe + something that should be rendered like a parameter name, + but is not actually one (e.g. is a wildcard or subset of + an actual parameter name). +| tlink{cl} | Generates a cross-reference or link to the definition + of the Vulkan type in the macro argument. Example: + tlink{cl}PFN_vkAllocationFunction -> + tlink:PFN_vkAllocationFunction. This is only used for + function pointer types at present. +| tname{cl} | Formats the macro argument like tlink{cl}. Does not + generate a cross-reference. Example: + tname{cl}PFN_vkAllocationFunction -> + tname:PFN_vkAllocationFunction. The tlink{cl} macro is + preferred. +| basetype{cl} | Formats the macro argument like a basic scalar type + or API handle name. Not validated. Examples: + basetype{cl}uint32_t -> basetype:uint32_t, + basetype{cl}VkDeviceSize -> basetype:VkDeviceSize. +| code{cl} | Formats the macro argument as a code sample. Primarily + used for SPIR-V keywords. Examples: code{cl}ClipDistance + -> code:ClipDistance, code{cl}NULL -> code:NULL. +|===== + + +==== Other Markup + +Uses of standard Asciidoc markup are less common. Occasional asterisk markup +is used for *emphasis*. Backtick markup is sometimes used for the C `NULL` +macro, but the code{cl} macro should be used for code:NULL instead. + +.Example Markup +---- +*emphasis* +`NULL` +code:NULL +---- + + +==== Glossary Terms + +_Glossary terms_ are currently marked up using underscore markup where they +are defined in the documents, as well as being added to the formal Glossary +appendix in the Specification. However, we will probably change to using +custom macros soon, to enable linkage between the glossary appendix and +definitions in the spec body. + +.Example Markup +---- +_Glossary terms_ +---- + + +=== Normative Terminology + +Normative terminology is precisely defined in section 1.3 of the Vulkan API +Specification, and is used to visually tag terms which express mandatory and +optional behavior of Vulkan implementations, and of applications using +Vulkan. + +Whenever one of these terms appears in the Specification, it must: be tagged +using the macros, to indicate that its use has been carefully considered and +is consistent with the definitions in section 1.3. This is extremely +important for determining IP that is in and out of Scope during Ratification +reviews. The normative terminology macros are defined in the following +table: + +.Normative Terminology Macros +[width="100%",options="header"] +|===== +| Macro Name | Meaning +| can{cl} | can: +| cannot{cl} | cannot: +| may{cl} | may: +| maynot{cl} | maynot: +| must{cl} | must: +| mustnot{cl} | mustnot: +| optional{cl} | optional: +| optionally{cl} | optionally: +| recommend{cl} | recommend: +| required{cl} | required: +| should{cl} | should: +| shouldnot{cl} | shouldnot: +|===== + +Because asciidoc macro names cannot contain spaces, macros which correspond +to multiple words (maynot{cl}, mustnot{cl}, and shouldnot{cl}) drop those +spaces. Also note that the macros are lower-case only, so language should be +written such that these terms do not appear at the beginning of a sentence +(if really necessary, additional capitalized macros could be added). + + +==== Optional Behavior + +If a described behavior of the implementation is not necessary for +conformance, use the terms _may:_ or _optional:_ to describe it. + +If a described usage pattern by the application is allowed but +not necessary, use the term _can:_ to describe it. + + +==== Optional Functionality + +If functionality (rather than behavior) is optional, it should be +described as + +.Example Markup +---- +not required: +---- + +Implementations are not mandated to support functionality which is not +required:, but if they do, they must: behave as described by the +Specification. The term _functionality_ includes API features, extensions, +and layers. + + +[[markup-informative]] +== Informative, Editing and Implementor's Notes + +There are several possible types of notes. Depending on the type of output, +they are rendered in different styles, but always include a note title, and +are usually set off in a box or with an icon. While asciidoc supports a wide +set of _admonition paragraphs_ such as TIP, IMPORTANT, WARNING, and CAUTION, +we always use the NOTE form, augmented by a note title. Each type of note is +discussed below. + + +[[markup-informative-notes]] +=== Informative Notes + +Informative notes always appear as part of the document, but are considered +non-normative. They usually describe usage advice for applications, and are +always given the title _Note_, as in the following example: + +[NOTE] +.Note +==== +This is an informative note. +==== + +.Example Markup +---- +[NOTE] +.Note +==== +This is an informative note. +==== +---- + +If an entire chapter or section is considered informative, it should begin +with the sentence: + +.Example Markup +---- +This chapter/section is Informative. +---- + + +=== Editing Notes + +Editing notes only appear in internal (non-published) versions of documents, +via asciidoc conditionals, and should be removed from the source before +pushing content to a canonical (master or per-extension) public repository. +They usually tag places where an outstanding bug or Gitlab/Github issue is +being worked, and are always given the title _editing-note_, as in the +following example: + +ifdef::editing-notes[] +[NOTE] +.editing-note +==== +This is an editing note, marked up as follows: +==== +endif::editing-notes[] + +.Example Markup +---- +\ifdef::editing-notes[] +[NOTE] +.editing-note +==== +Contents of an editing note go here. It is good practice to include a +bug/issue number, or link to the bug/issue, in the editing note. +==== +\endif::editing-notes[] +---- + + +=== Implementor's Notes + +Implementor's notes may or may not appear in published versions of +documents, via asciidoc conditionals. They describe suggested approaches or +guidelines for people writing Vulkan implementations, and are rare because +the hardware being targeted varies so widely. They are always given the +title _Implementor's Note_, as in the following example: + +ifdef::implementation-guide[] +.Implementor's Note +==== +This is an implementor's note, marked up as follows: +==== +endif::implementation-guide[] + +.Example Markup +---- +\ifdef::implementation-guide[] +.Implementor's Note +==== +Contents of an implementor's note go here. +==== +\endif::implementation-guide[] +---- + + +== Word Choices + +There are a variety of common terms that have several equivalent word +choices. Always use the words in the first column instead of the alternate +terms. This list may not be comprehensive; when in doubt, be guided by the +existing API Specification. + +.Word Choices +[width="100%",options="header"] +|===== +| Use This | Instead Of | Comments +| allocate | create + | When describing objects or memory resulting from + ftext:vkAllocate* commands. +| application | client | +| command | function + | Except when talking about function pointers returned by + ftext:vkGet*ProcAddr commands. +| create | allocate + | When describing objects resulting from ftext:vkCreate* + commands. +| depth/stencil | packed (interleaved, combined, _other prefix_) + depth/stencil, depth-stencil, DepthStencil, etc. + | Combined format implicit in the name. +| device | GPU + | Implementations on non-GPU devices are possible. +| host endianness | platform endianness | +| implementation| system | +| it is | it's | In general, avoid contractions. +| member | field | +| pname:parameter are/is + | pname:parameter specifies (denotes, indicates) + | In rare cases when _are_ or _if_ are not grammatically + appropriate, _specifies_ may be used instead. +| begins / begun | starts / started | For ftext:vkBegin* - also see ``finish'' +| finishes / finished | ends / ended | For ftext:vkEnd* - also see ``begins'' +| used | referenced | When describing attachments specified in a + subpass description. +| statically used | referenced | When describing resources or push constants + accessed by shader code +| a more specific term | referenced | For all other situations. +| component | channel | Specifically this refers to color channels/components +|===== + +[NOTE] +.Note +==== +The ``begin/start'' and ``end/finish'' distinction is still being sorted out. +See Gitlab issue #61. +==== + + +=== Terms to Avoid + +Don't describe anything in the documentation using vague or wishy-washy +terms. Our goal is to precisely describe behavior of implementations. + +The normative terms may:, optional:, and should: are available when +implementations may make choices of behavior, but when such choices are +allowed, each choice still must: have well-defined behavior. + +.Terms to Avoid +[width="100%",options="header"] +|===== +| Bad Term | Comments +| expect | And variants such as _expected_ +| likely | And variants such as _will likely_ +| allowed, could, generally, might, probably, perhaps + | And all other such terms of choice. Use _may:_ or _can:_ + depending on the context. +| may: or maynot: | Just use _may:_. +|===== + + +[[writingstyle]] += Writing Style + + +[[writingstyle-misc]] +== Miscellaneous Grammar, Spelling, and Punctuation Issues + +=== Use the Oxford Comma (Serial Comma) + +When writing a sentence listing a series of items, include a comma before +the ``and'' separating the last item. + +*Correct:* The red, green, blue, and alpha components. + +*Incorrect:* The red, green, blue and alpha components. + +Also see http://blog.oxforddictionaries.com/2011/06/oxford-comma/ + +=== Numbers in Text + +When describing the need for a small number of objects, smaller than ten, spell +the number out (e.g. ``one''). If you are describing a literal value that is a +small number, you may use a numeric value (e.g. ``1''). + +For example, instead of writing that a bitfield ``contains 1 or more bits'', +write that it ``contains one or more bits''. A counter example is that it is okay +to write ``For non-stereoscopic-3D applications, this value is 1.'' + + +[[writingstyle-describing]] +== Describing Commands and Parameters + +The Specification describes API commands followed by descriptions of their +parameters, which are usually simple scalar types, handles or pointers to +Vulkan objects or arrays of objects, or structures containing combinations +of scalar types and objects. The templates and examples shown and annotated +here are based on the Specification. Do not vary from them without +compelling need. + +Normative parts of the Specification should describe _what_ something does, +rather than _how_ or _why_ an application would want to use it. + +[NOTE] +.Guideline +==== +As a simple example, say + +``To create a command pool, call fname:vkCreateCommandPool'' + +rather than + +``You/The application/The user can create a command pool by calling +fname:vkCreateCommandPool''. + +==== + +Explanations of _why_ and _how_ should largely be confined to reference +documentation, sample code, tutorials, and other such documents. Occasional +non-normative explanations can be included in the Specification using +<>. + + +[[writingstyle-latexmath]] +== LaTeX Math Markup + +There is a considerable amount of math in the documentation, ranging from +simple arithmetic expressions to complicated conditionals. For the most +part, math is marked up using LaTeX math notation, which is either passed +through to the Mathjax browser renderer for HTML outputs, or passed through +to LaTeX for PDF outputs. For some very simple math expressions, asciidoc +markup can be used. + +[NOTE] +.Note +==== +We still haven't got the latexmath vs. asciidoc font situation sorted out +for all target output forms, so there can be some visual inconsistencies. +==== + +While LaTeX math macros, including the amsmath package, are supported, +general LaTeX constructs are not. + +_Inline math_ is encoded using the latexmath{cl} macro. For example: + + * latexmath:[$[0,1\]$] + * latexmath:[$x \cdot 0 = 0 \cdot x = 0$] + * latexmath:[${\textbf c} = t {\textbf c}_1 + (1-t){\textbf c}_2. $] + +.Example Markup +---- + latexmath:[$[0,1\]$] + latexmath:[$x \cdot 0 = 0 \cdot x = 0$] + latexmath:[${\textbf c} = t {\textbf c}_1 + (1-t){\textbf c}_2. $] +---- + +Note the escaped bracket in markup for the first expression, which is +necessary to work around asciidoc macro parsing: + + +_Block math_ is used for more complex equations. This example uses the +amsmath `align*` macros to delimit the expression: + +[latexmath] ++++++++++++++++++++ +\begin{align*} +c_{RGB} & = + \begin{cases} + \frac{c_{sRGB}}{12.92} & \textrm{for } c_{sRGB} \leq 0.04045 \\ + \left ( \frac{c_{sRGB}+0.055}{1.055} \right )^{2.4} & \textrm{for } c_{sRGB} > 0.04045 + \end{cases} +\end{align*} ++++++++++++++++++++ + +.Example Markup +---- +[latexmath] ++++++++++++++++++++ +\begin{align*} +c_{RGB} & = + \begin{cases} + \frac{c_{sRGB}}{12.92} & \textrm{for } c_{sRGB} \leq 0.04045 \\ + \left ( \frac{c_{sRGB}+0.055}{1.055} \right )^{2.4} & \textrm{for } c_{sRGB} > 0.04045 + \end{cases} +\end{align*} ++++++++++++++++++++ +---- + +This example uses normal LaTeX math brackets to delimit the expression: + +[latexmath] ++++++++++++++++++++ +\[ +V = + \begin{cases} + (-1)^S \times 0.0, & E = 0, M = 0 \\ + (-1)^S \times 2^{-14} \times { M \over 2^{10} }, + & E = 0, M \neq 0 \\ + (-1)^S \times 2^{E-15} \times { \left( 1 + { M \over 2^{10} } \right) }, + & 0 < E < 31 \\ + (-1)^S \times Inf, & E = 31, M = 0 \\ + NaN, & E = 31, M \neq 0 + \end{cases} +\] ++++++++++++++++++++ + +.Example Markup +---- +[latexmath] ++++++++++++++++++++ +\[ +V = + \begin{cases} + (-1)^S \times 0.0, & E = 0, M = 0 \\ + (-1)^S \times 2^{-14} \times { M \over 2^{10} }, + & E = 0, M \neq 0 \\ + (-1)^S \times 2^{E-15} \times { \left( 1 + { M \over 2^{10} } \right) }, + & 0 < E < 31 \\ + (-1)^S \times Inf, & E = 31, M = 0 \\ + NaN, & E = 31, M \neq 0 + \end{cases} +\] ++++++++++++++++++++ +---- + + +[[writingstyle-example]] +== An Example Command Description + +The <> is a sample based on the Specification, +and describes a command in enough detail to see the different usage patterns +and layout / markup used. Informative notes discussing markup and guidelines +are interspersed with the example description to explain how and why it +looks as it does. + + +[[sample-command]] +== Sample Command Description: Creating Command Pools + +To create a command pool, call: + +[NOTE] +.Guideline +==== +Use a short, active sentence when describing what commands do, instead of +more passive phrasing like ``A command pool is created by calling:'' or ``The +application may create a command pool by calling:''. +==== + +include::../protos/vkCreateCommandPool.txt[] + +[NOTE] +.Guideline +==== +After the description, include the autogenerated prototype for the command +from the `../protos/` directory: + + include::../protos/vkCreateCommandPool.txt[] + +Note that each autogenerated command, enumeration, flag, or structure +definition include file also defines a corresponding asciidoc anchor which +is the base name of the file. In this case, the anchor is named +`vkCreateCommandPool`. +==== + + * pname:device is the logical device that the command pool is created on. + * pname:pCreateInfo points to an instance of the + slink:VkCommandPoolCreateInfo structure containing information used to + create the command pool. + * pname:pAllocator controls host memory allocation as described in the + <> chapter. + * pname:pCommandPool points to a handle in which the created command pool + object is returned. + +[NOTE] +.Guideline +==== +Each command parameter is described in a separate bullet list entry, +followed by validity rules, then detailed descriptions of any new +structures, flags, or enumerations introduced by this command. + +Each parameter should appear as a separate bullet list item beginning with +the parameter name, in the same order as parameters appear in the command. +This aids in extracting short descriptions of parameters for inclusion in +annotated headers and similar documentation. Make sure to tag each parameter +with the pname{cl} macro. + +Strive for compact notation, and in particular always try to use the +phrasing ``pname{cl}param _is_'' rather than wordier forms such as +``pname{cl}param _specifies_'' or ``The pname{cl}param parameter specifies''. In +general there is no need to describe a parameter which is a Vulkan object +handle *as* a handle; for example, say ``pname{cl}device is the logical +device'' rather than ``pname{cl}device is a handle to the logical device''. An +exception is object creation functions, where a pointer to a handle of the +proper type is used to return the newly created object. +==== + +include::../validity/protos/vkCreateCommandPool.txt[] + +[NOTE] +.Guideline +==== +Parameter and member validation language for commands and structures is also +autogenerated from vk.xml, and included from the `../validity/` directories: + + include::../validity/protos/vkCreateCommandPool.txt[] +==== + +The sname:VkCommandPoolCreateInfo structure is defined as follows: + +include::../structs/VkCommandPoolCreateInfo.txt[] + +[NOTE] +.Guideline +==== +Structures and enumerations first used as parameters of a command are +described next, by including the autogenerated interface file for that +structure or enumeration: + + include::../structs/VkCommandPoolCreateInfo.txt[] + +==== + + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an extension-specific structure. + * pname:flags is a combination of bitfield flags indicating usage behavior + for the pool and command buffers allocated from it. Possible values + include: ++ +-- +include::../enums/VkCommandPoolCreateFlagBits.txt[] + +** ename:VK_COMMAND_POOL_CREATE_TRANSIENT_BIT indicates that command buffers + allocated from the pool will be short-lived. +** ename:VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT controls whether + command buffers allocated from the pool can: be individually reset. +-- + * pname:queueFamilyIndex designates a queue family. Command buffers in + this command pool must: be submitted on queues from the same family. + +[NOTE] +.Guideline +==== +Each structure member is described in a separate bullet list entry. For the +stext:Vk*CreateInfo structures in particular, there is standard boilerplate +for the pname:sType and pname:pNext members, followed by the members +specific to the structure. + +---- + * pname:sType is the type of this structure. + * pname:pNext is `NULL` or a pointer to an + extension-specific structure. +---- + +In some cases, such as when the type of a member is itself a new type, the +entry will cover multiple paragraphs. In these cases the normal list nesting +and indentation guidelines cannot be applied due to limitations of the +asciidoc parser. It is usually best to append a block following the first +paragraph of such a list item: + +---- + * pname:flags is a combination of bitfield flags + indicating usage behavior for the pool and + command buffers allocated from it. Possible + values include: ++ +-- +\include::../enums/VkCommandPoolCreateFlagBits.txt[] + +** ename:VK_COMMAND_POOL_CREATE_TRANSIENT_BIT + indicates that command buffers allocated + from the pool will be short-lived. +** ename:VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT + controls whether command buffers allocated from + the pool can: be individually reset. +-- +---- +==== + +include::../validity/structs/VkCommandPoolCreateInfo.txt[] + +[NOTE] +.Guideline +==== +Following the definition of structure members, include the validity language +for this structure: + + include::../validity/structs/VkCommandPoolCreateInfo.txt[] +==== + + +// = API Naming Conventions +// +// It's not clear these belong in this document. They are currently +// captured in the member Wiki under API_Design/Cleanup +// +// If they do go here, we would discuss naming conventions starting with +// prefixes, camelCase, suffixes for size and arrayness, choice of names for +// similar parameters, templates for CreateInfo structs, parameter naming & +// ordering (especially length/array pointer pairs), etc. + + += To Be Done + + * Something about Image formats + * Something about validation scripts + * Something about pictures + * Glossary lists + * New param/enum macros + += Revision History + +* February 16, 2016 - Place asciidoc conversion post-release. +* February 9, 2016 - Added quotation mark convention. +* February 1, 2016 - add the Oxford Comma section and issue resolution. +* January 26, 2016 - add bullet-list style description of command parameters. +* January 11, 2016 - add ``Numbers in Text'' section from WSI work. +* December 16, 2015 - Make ``begin / end'' preferred terms to ``start / + finish''. +* December 15, 2015 - Make ``implementation'' preferred term instead of + ``system''. +* December 13, 2015 - Add tlink{cl}/tname{cl} macros for function pointer + types. +* December 10, 2015 - Initial release for feedback. diff --git a/doc/specs/vulkan/validity/protos/vkAllocateCommandBuffers.txt b/doc/specs/vulkan/validity/protos/vkAllocateCommandBuffers.txt new file mode 100644 index 00000000..6aaf34c5 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkAllocateCommandBuffers.txt @@ -0,0 +1,56 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pAllocateInfo must: be a pointer to a valid sname:VkCommandBufferAllocateInfo structure +* pname:pCommandBuffers must: be a pointer to an array of pname:pAllocateInfo->commandBufferCount sname:VkCommandBuffer handles +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:pAllocateInfo->commandPool must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkAllocateDescriptorSets.txt b/doc/specs/vulkan/validity/protos/vkAllocateDescriptorSets.txt new file mode 100644 index 00000000..d5596f3d --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkAllocateDescriptorSets.txt @@ -0,0 +1,56 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pAllocateInfo must: be a pointer to a valid sname:VkDescriptorSetAllocateInfo structure +* pname:pDescriptorSets must: be a pointer to an array of pname:pAllocateInfo->descriptorSetCount sname:VkDescriptorSet handles +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:pAllocateInfo->descriptorPool must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkAllocateMemory.txt b/doc/specs/vulkan/validity/protos/vkAllocateMemory.txt new file mode 100644 index 00000000..a1257ddd --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkAllocateMemory.txt @@ -0,0 +1,46 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pAllocateInfo must: be a pointer to a valid sname:VkMemoryAllocateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pMemory must: be a pointer to a sname:VkDeviceMemory handle +* The number of currently valid memory objects, allocated from pname:device, must: be less than sname:VkPhysicalDeviceLimits::pname:maxMemoryAllocationCount +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +* ename:VK_ERROR_TOO_MANY_OBJECTS +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkBeginCommandBuffer.txt b/doc/specs/vulkan/validity/protos/vkBeginCommandBuffer.txt new file mode 100644 index 00000000..e9c221e8 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkBeginCommandBuffer.txt @@ -0,0 +1,59 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:pBeginInfo must: be a pointer to a valid sname:VkCommandBufferBeginInfo structure +* pname:commandBuffer mustnot: be in the recording state +* If pname:commandBuffer was allocated from a sname:VkCommandPool which did not have the ename:VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT flag set, pname:commandBuffer must: be in the initial state. +* If pname:commandBuffer is a secondary command buffer, the pname:pInheritanceInfo member of pname:pBeginInfo must: be a valid sname:VkCommandBufferInheritanceInfo structure +* If pname:commandBuffer is a secondary command buffer and either the pname:occlusionQueryEnable member of the pname:pInheritanceInfo member of pname:pBeginInfo is ename:VK_FALSE, or the precise occlusion queries feature is not enabled, the pname:queryFlags member of the pname:pInheritanceInfo member pname:pBeginInfo mustnot: contain ename:VK_QUERY_CONTROL_PRECISE_BIT +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkBindBufferMemory.txt b/doc/specs/vulkan/validity/protos/vkBindBufferMemory.txt new file mode 100644 index 00000000..0d7ecbbf --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkBindBufferMemory.txt @@ -0,0 +1,68 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:buffer must: be a valid sname:VkBuffer handle +* pname:memory must: be a valid sname:VkDeviceMemory handle +* pname:buffer must: have been created, allocated or retrieved from pname:device +* pname:memory must: have been created, allocated or retrieved from pname:device +* Each of pname:device, pname:buffer and pname:memory must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* pname:buffer mustnot: already be backed by a memory object +* pname:buffer mustnot: have been created with any sparse memory binding flags +* pname:memoryOffset must: be less than the size of pname:memory +* If pname:buffer was created with the ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, pname:memoryOffset must: be a multiple of the value of sname:VkPhysicalDeviceLimits::pname:minTexelBufferOffsetAlignment +* If pname:buffer was created with the ename:VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, pname:memoryOffset must: be a multiple of the value of sname:VkPhysicalDeviceLimits::pname:minUniformBufferOffsetAlignment +* If pname:buffer was created with the ename:VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, pname:memoryOffset must: be a multiple of the value of sname:VkPhysicalDeviceLimits::pname:minStorageBufferOffsetAlignment +* pname:memory must: have been allocated using one of the memory types allowed in the pname:memoryTypeBits member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetBufferMemoryRequirements with pname:buffer +* The sum of pname:memoryOffset and the size of pname:buffer must: be less than or equal to the size of pname:memory +* pname:memoryOffset must: be an integer multiple of the pname:alignment member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetBufferMemoryRequirements with pname:buffer +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:buffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkBindImageMemory.txt b/doc/specs/vulkan/validity/protos/vkBindImageMemory.txt new file mode 100644 index 00000000..b98df89b --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkBindImageMemory.txt @@ -0,0 +1,65 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:image must: be a valid sname:VkImage handle +* pname:memory must: be a valid sname:VkDeviceMemory handle +* pname:image must: have been created, allocated or retrieved from pname:device +* pname:memory must: have been created, allocated or retrieved from pname:device +* Each of pname:device, pname:image and pname:memory must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* pname:image mustnot: already be backed by a memory object +* pname:image mustnot: have been created with any sparse memory binding flags +* pname:memoryOffset must: be less than the size of pname:memory +* pname:memory must: have been allocated using one of the memory types allowed in the pname:memoryTypeBits member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetImageMemoryRequirements with pname:image +* pname:memoryOffset must: be an integer multiple of the pname:alignment member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetImageMemoryRequirements with pname:image +* pname:memory must: have storage from pname:memoryOffset onwards equal to or greater than the pname:size member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetImageMemoryRequirements with pname:image +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:image must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdBeginQuery.txt b/doc/specs/vulkan/validity/protos/vkCmdBeginQuery.txt new file mode 100644 index 00000000..e658f571 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdBeginQuery.txt @@ -0,0 +1,59 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:queryPool must: be a valid sname:VkQueryPool handle +* pname:flags must: be a valid combination of elink:VkQueryControlFlagBits values +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics or compute operations +* Each of pname:commandBuffer and pname:queryPool must: have been created, allocated or retrieved from the same sname:VkDevice +* The query identified by pname:queryPool and pname:query must: currently not be <> +* The query identified by pname:queryPool and pname:query must: be unavailable +* If the <> feature is not enabled, or the pname:queryType used to create pname:queryPool was not ename:VK_QUERY_TYPE_OCCLUSION, pname:flags mustnot: contain ename:VK_QUERY_CONTROL_PRECISE_BIT +* pname:queryPool must: have been created with a pname:queryType that differs from that of any other queries that have been made <>, and are currently still active within pname:commandBuffer +* pname:query must: be less than the number of queries in pname:queryPool +* If the pname:queryType used to create pname:queryPool was ename:VK_QUERY_TYPE_OCCLUSION, the sname:VkCommandPool that pname:commandBuffer was created from must: support graphics operations +* If the pname:queryType used to create pname:queryPool was ename:VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the pname:pipelineStatistics indicate graphics operations, the sname:VkCommandPool that pname:commandBuffer was created from must: support graphics operations +* If the pname:queryType used to create pname:queryPool was ename:VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the pname:pipelineStatistics indicate compute operations, the sname:VkCommandPool that pname:commandBuffer was created from must: support compute operations +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdBeginRenderPass.txt b/doc/specs/vulkan/validity/protos/vkCmdBeginRenderPass.txt new file mode 100644 index 00000000..2a36fc1e --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdBeginRenderPass.txt @@ -0,0 +1,55 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:pRenderPassBegin must: be a pointer to a valid sname:VkRenderPassBeginInfo structure +* pname:contents must: be a valid elink:VkSubpassContents value +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* This command must: only be called outside of a render pass instance +* pname:commandBuffer must: be a primary sname:VkCommandBuffer +* If any of the pname:initialLayout or pname:finalLayout member of the sname:VkAttachmentDescription structures or the pname:layout member of the sname:VkAttachmentReference structures specified when creating the render pass specified in the pname:renderPass member of pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL then the corresponding attachment image of the framebuffer specified in the pname:framebuffer member of pname:pRenderPassBegin must: have been created with ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT set +* If any of the pname:initialLayout or pname:finalLayout member of the sname:VkAttachmentDescription structures or the pname:layout member of the sname:VkAttachmentReference structures specified when creating the render pass specified in the pname:renderPass member of pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then the corresponding attachment image of the framebuffer specified in the pname:framebuffer member of pname:pRenderPassBegin must: have been created with ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set +* If any of the pname:initialLayout or pname:finalLayout member of the sname:VkAttachmentDescription structures or the pname:layout member of the sname:VkAttachmentReference structures specified when creating the render pass specified in the pname:renderPass member of pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL then the corresponding attachment image of the framebuffer specified in the pname:framebuffer member of pname:pRenderPassBegin must: have been created with ename:VK_IMAGE_USAGE_SAMPLED_BIT or ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT set +* If any of the pname:initialLayout or pname:finalLayout member of the sname:VkAttachmentDescription structures or the pname:layout member of the sname:VkAttachmentReference structures specified when creating the render pass specified in the pname:renderPass member of pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_BIT then the corresponding attachment image of the framebuffer specified in the pname:framebuffer member of pname:pRenderPassBegin must: have been created with ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT set +* If any of the pname:initialLayout or pname:finalLayout member of the sname:VkAttachmentDescription structures or the pname:layout member of the sname:VkAttachmentReference structures specified when creating the render pass specified in the pname:renderPass member of pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_TRANSFER_DST_BIT then the corresponding attachment image of the framebuffer specified in the pname:framebuffer member of pname:pRenderPassBegin must: have been created with ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT set +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary|Outside|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdBindDescriptorSets.txt b/doc/specs/vulkan/validity/protos/vkCmdBindDescriptorSets.txt new file mode 100644 index 00000000..aae8663c --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdBindDescriptorSets.txt @@ -0,0 +1,58 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:pipelineBindPoint must: be a valid elink:VkPipelineBindPoint value +* pname:layout must: be a valid sname:VkPipelineLayout handle +* pname:pDescriptorSets must: be a pointer to an array of pname:descriptorSetCount valid sname:VkDescriptorSet handles +* If pname:dynamicOffsetCount is not `0`, pname:pDynamicOffsets must: be a pointer to an array of pname:dynamicOffsetCount basetype:uint32_t values +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics or compute operations +* The value of pname:descriptorSetCount must: be greater than `0` +* Each of pname:commandBuffer, pname:layout and the elements of pname:pDescriptorSets must: have been created, allocated or retrieved from the same sname:VkDevice +* Any given element of pname:pDescriptorSets must: have been created with a sname:VkDescriptorSetLayout that matches the sname:VkDescriptorSetLayout at set _n_ in pname:layout, where _n_ is the sum of the index into pname:pDescriptorSets and pname:firstSet +* pname:dynamicOffsetCount must: be equal to the total number of dynamic descriptors in pname:pDescriptorSets +* pname:pipelineBindPoint must: be supported by the pname:commandBuffer's parent sname:VkCommandPool's queue family +* Any given element of pname:pDynamicOffsets must: satisfy the required alignment for the corresponding descriptor binding's descriptor type +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdBindIndexBuffer.txt b/doc/specs/vulkan/validity/protos/vkCmdBindIndexBuffer.txt new file mode 100644 index 00000000..45744663 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdBindIndexBuffer.txt @@ -0,0 +1,53 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:buffer must: be a valid sname:VkBuffer handle +* pname:indexType must: be a valid elink:VkIndexType value +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* Each of pname:commandBuffer and pname:buffer must: have been created, allocated or retrieved from the same sname:VkDevice +* The value of pname:offset must: be less than the size of pname:buffer +* The sum of pname:offset, and the address of the range of sname:VkDeviceMemory object that's backing pname:buffer, must: be a multiple of the type indicated by pname:indexType +* pname:buffer must: have been created with the ename:VK_BUFFER_USAGE_INDEX_BUFFER_BIT flag +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdBindPipeline.txt b/doc/specs/vulkan/validity/protos/vkCmdBindPipeline.txt new file mode 100644 index 00000000..793302e6 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdBindPipeline.txt @@ -0,0 +1,56 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:pipelineBindPoint must: be a valid elink:VkPipelineBindPoint value +* pname:pipeline must: be a valid sname:VkPipeline handle +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics or compute operations +* Each of pname:commandBuffer and pname:pipeline must: have been created, allocated or retrieved from the same sname:VkDevice +* If the value of pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_COMPUTE, the sname:VkCommandPool that pname:commandBuffer was allocated from must: support compute operations +* If the value of pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_GRAPHICS, the sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* If the value of pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_COMPUTE, pname:pipeline must: be a compute pipeline +* If the value of pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_GRAPHICS, pname:pipeline must: be a graphics pipeline +* If the <> feature is not supported, pname:pipeline is a graphics pipeline, the current subpass has no attachments, and this is not the first call to this function with a graphics pipeline after transitioning to the current subpass, then the sample count specified by this pipeline must: match that set in the previous pipeline +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdBindVertexBuffers.txt b/doc/specs/vulkan/validity/protos/vkCmdBindVertexBuffers.txt new file mode 100644 index 00000000..8cdf316d --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdBindVertexBuffers.txt @@ -0,0 +1,55 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:pBuffers must: be a pointer to an array of pname:bindingCount valid sname:VkBuffer handles +* pname:pOffsets must: be a pointer to an array of pname:bindingCount basetype:VkDeviceSize values +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* The value of pname:bindingCount must: be greater than `0` +* Each of pname:commandBuffer and the elements of pname:pBuffers must: have been created, allocated or retrieved from the same sname:VkDevice +* pname:firstBinding must: be less than sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindings +* The sum of pname:firstBinding and pname:bindingCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindings +* All elements of pname:pOffsets must: be less than the size of the corresponding element in pname:pBuffers +* All elements of pname:pBuffers must: have been created with the ename:VK_BUFFER_USAGE_VERTEX_BUFFER_BIT flag +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdBlitImage.txt b/doc/specs/vulkan/validity/protos/vkCmdBlitImage.txt new file mode 100644 index 00000000..d42f8f44 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdBlitImage.txt @@ -0,0 +1,72 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:srcImage must: be a valid sname:VkImage handle +* pname:srcImageLayout must: be a valid elink:VkImageLayout value +* pname:dstImage must: be a valid sname:VkImage handle +* pname:dstImageLayout must: be a valid elink:VkImageLayout value +* pname:pRegions must: be a pointer to an array of pname:regionCount valid sname:VkImageBlit structures +* pname:filter must: be a valid elink:VkFilter value +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* This command must: only be called outside of a render pass instance +* The value of pname:regionCount must: be greater than `0` +* Each of pname:commandBuffer, pname:srcImage and pname:dstImage must: have been created, allocated or retrieved from the same sname:VkDevice +* The source region specified by a given element of pname:pRegions must: be a region that is contained within pname:srcImage +* The destination region specified by a given element of pname:pRegions must: be a region that is contained within pname:dstImage +* The union of all source regions, and the union of all destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory +* pname:srcImage must: use a format that supports ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT, which is indicated by sname:VkFormatProperties::pname:linearTilingFeatures (for linear tiled images) or sname:VkFormatProperties::pname:optimalTilingFeatures (for optimally tiled images) - as returned by fname:vkGetPhysicalDeviceFormatProperties +* pname:srcImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag +* pname:srcImageLayout must: specify the layout of the subresources of pname:srcImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice +* pname:srcImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL +* pname:dstImage must: use a format that supports ename:VK_FORMAT_FEATURE_BLIT_DST_BIT, which is indicated by sname:VkFormatProperties::pname:linearTilingFeatures (for linear tiled images) or sname:VkFormatProperties::pname:optimalTilingFeatures (for optimally tiled images) - as returned by fname:vkGetPhysicalDeviceFormatProperties +* pname:dstImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag +* pname:dstImageLayout must: specify the layout of the subresources of pname:dstImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice +* pname:dstImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL +* The sample count of pname:srcImage and pname:dstImage must: both be equal to ename:VK_SAMPLE_COUNT_1_BIT +* If either of pname:srcImage or pname:dstImage was created with a signed integer elink:VkFormat, the other must: also have been created with a signed integer elink:VkFormat +* If either of pname:srcImage or pname:dstImage was created with an unsigned integer elink:VkFormat, the other must: also have been created with an unsigned integer elink:VkFormat +* If either of pname:srcImage or pname:dstImage was created with a depth/stencil format, the other must: have exactly the same format +* If pname:srcImage was created with a depth/stencil format, pname:filter must: be ename:VK_FILTER_NEAREST +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Outside|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdClearAttachments.txt b/doc/specs/vulkan/validity/protos/vkCmdClearAttachments.txt new file mode 100644 index 00000000..d9201802 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdClearAttachments.txt @@ -0,0 +1,55 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:pAttachments must: be a pointer to an array of pname:attachmentCount valid sname:VkClearAttachment structures +* pname:pRects must: be a pointer to an array of pname:rectCount sname:VkClearRect structures +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* This command must: only be called inside of a render pass instance +* The value of pname:attachmentCount must: be greater than `0` +* The value of pname:rectCount must: be greater than `0` +* If the pname:aspectMask member of any given element of pname:pAttachments contains ename:VK_IMAGE_ASPECT_COLOR_BIT, the pname:colorAttachment member of those elements must: refer to a valid color attachment in the current subpass +* The rectangular region specified by a given element of pname:pRects must: be contained within the render area of the current render pass instance +* The layers specified by a given element of pname:pRects must: be contained within every attachment that pname:pAttachments refers to +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Inside|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdClearColorImage.txt b/doc/specs/vulkan/validity/protos/vkCmdClearColorImage.txt new file mode 100644 index 00000000..2c137663 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdClearColorImage.txt @@ -0,0 +1,59 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:image must: be a valid sname:VkImage handle +* pname:imageLayout must: be a valid elink:VkImageLayout value +* pname:pColor must: be a pointer to a valid sname:VkClearColorValue union +* pname:pRanges must: be a pointer to an array of pname:rangeCount valid sname:VkImageSubresourceRange structures +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics or compute operations +* This command must: only be called outside of a render pass instance +* The value of pname:rangeCount must: be greater than `0` +* Each of pname:commandBuffer and pname:image must: have been created, allocated or retrieved from the same sname:VkDevice +* pname:image must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag +* pname:imageLayout must: specify the layout of the subresource ranges of pname:image specified in pname:pRanges at the time this command is executed on a sname:VkDevice +* pname:imageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL +* The image range of any given element of pname:pRanges must: be a subresource range that is contained within pname:image +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Outside|GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdClearDepthStencilImage.txt b/doc/specs/vulkan/validity/protos/vkCmdClearDepthStencilImage.txt new file mode 100644 index 00000000..64dcab46 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdClearDepthStencilImage.txt @@ -0,0 +1,58 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:image must: be a valid sname:VkImage handle +* pname:imageLayout must: be a valid elink:VkImageLayout value +* pname:pDepthStencil must: be a pointer to a valid sname:VkClearDepthStencilValue structure +* pname:pRanges must: be a pointer to an array of pname:rangeCount valid sname:VkImageSubresourceRange structures +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* This command must: only be called outside of a render pass instance +* The value of pname:rangeCount must: be greater than `0` +* Each of pname:commandBuffer and pname:image must: have been created, allocated or retrieved from the same sname:VkDevice +* pname:image must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag +* pname:imageLayout must: specify the layout of the subresource ranges of pname:image specified in pname:pRanges at the time this command is executed on a sname:VkDevice +* pname:imageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL +* The image range of any given element of pname:pRanges must: be a subresource range that is contained within pname:image +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Outside|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdCopyBuffer.txt b/doc/specs/vulkan/validity/protos/vkCmdCopyBuffer.txt new file mode 100644 index 00000000..666bb9b5 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdCopyBuffer.txt @@ -0,0 +1,60 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:srcBuffer must: be a valid sname:VkBuffer handle +* pname:dstBuffer must: be a valid sname:VkBuffer handle +* pname:pRegions must: be a pointer to an array of pname:regionCount sname:VkBufferCopy structures +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support transfer, graphics or compute operations +* This command must: only be called outside of a render pass instance +* The value of pname:regionCount must: be greater than `0` +* Each of pname:commandBuffer, pname:srcBuffer and pname:dstBuffer must: have been created, allocated or retrieved from the same sname:VkDevice +* The sum of the pname:srcOffset and pname:copySize members of a given element of pname:pRegions must: be less than or equal to the size of pname:srcBuffer +* The sum of the pname:dstOffset and pname:copySize members of a given element of pname:pRegions must: be less than or equal to the size of pname:dstBuffer +* The union of the source regions, and the union of the destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory +* pname:srcBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage flag +* pname:dstBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Outside|TRANSFER + +GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdCopyBufferToImage.txt b/doc/specs/vulkan/validity/protos/vkCmdCopyBufferToImage.txt new file mode 100644 index 00000000..ccc35e2b --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdCopyBufferToImage.txt @@ -0,0 +1,64 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:srcBuffer must: be a valid sname:VkBuffer handle +* pname:dstImage must: be a valid sname:VkImage handle +* pname:dstImageLayout must: be a valid elink:VkImageLayout value +* pname:pRegions must: be a pointer to an array of pname:regionCount valid sname:VkBufferImageCopy structures +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support transfer, graphics or compute operations +* This command must: only be called outside of a render pass instance +* The value of pname:regionCount must: be greater than `0` +* Each of pname:commandBuffer, pname:srcBuffer and pname:dstImage must: have been created, allocated or retrieved from the same sname:VkDevice +* The buffer region specified by a given element of pname:pRegions must: be a region that is contained within pname:srcBuffer +* The image region specified by a given element of pname:pRegions must: be a region that is contained within pname:dstImage +* The union of all source regions, and the union of all destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory +* pname:srcBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage flag +* pname:dstImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag +* pname:dstImage must: have a sample count equal to ename:VK_SAMPLE_COUNT_1_BIT +* pname:dstImageLayout must: specify the layout of the subresources of pname:dstImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice +* pname:dstImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Outside|TRANSFER + +GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdCopyImage.txt b/doc/specs/vulkan/validity/protos/vkCmdCopyImage.txt new file mode 100644 index 00000000..3566c7f8 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdCopyImage.txt @@ -0,0 +1,68 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:srcImage must: be a valid sname:VkImage handle +* pname:srcImageLayout must: be a valid elink:VkImageLayout value +* pname:dstImage must: be a valid sname:VkImage handle +* pname:dstImageLayout must: be a valid elink:VkImageLayout value +* pname:pRegions must: be a pointer to an array of pname:regionCount valid sname:VkImageCopy structures +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support transfer, graphics or compute operations +* This command must: only be called outside of a render pass instance +* The value of pname:regionCount must: be greater than `0` +* Each of pname:commandBuffer, pname:srcImage and pname:dstImage must: have been created, allocated or retrieved from the same sname:VkDevice +* The source region specified by a given element of pname:pRegions must: be a region that is contained within pname:srcImage +* The destination region specified by a given element of pname:pRegions must: be a region that is contained within pname:dstImage +* The union of all source regions, and the union of all destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory +* pname:srcImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag +* pname:srcImageLayout must: specify the layout of the subresources of pname:srcImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice +* pname:srcImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL +* pname:dstImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag +* pname:dstImageLayout must: specify the layout of the subresources of pname:dstImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice +* pname:dstImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL +* The elink:VkFormat of each of pname:srcImage and pname:dstImage must: be compatible, as defined <> +* The sample count of pname:srcImage and pname:dstImage must: match +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Outside|TRANSFER + +GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdCopyImageToBuffer.txt b/doc/specs/vulkan/validity/protos/vkCmdCopyImageToBuffer.txt new file mode 100644 index 00000000..a1cf40c8 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdCopyImageToBuffer.txt @@ -0,0 +1,64 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:srcImage must: be a valid sname:VkImage handle +* pname:srcImageLayout must: be a valid elink:VkImageLayout value +* pname:dstBuffer must: be a valid sname:VkBuffer handle +* pname:pRegions must: be a pointer to an array of pname:regionCount valid sname:VkBufferImageCopy structures +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support transfer, graphics or compute operations +* This command must: only be called outside of a render pass instance +* The value of pname:regionCount must: be greater than `0` +* Each of pname:commandBuffer, pname:srcImage and pname:dstBuffer must: have been created, allocated or retrieved from the same sname:VkDevice +* The image region specified by a given element of pname:pRegions must: be a region that is contained within pname:srcImage +* The buffer region specified by a given element of pname:pRegions must: be a region that is contained within pname:dstBuffer +* The union of all source regions, and the union of all destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory +* pname:srcImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag +* pname:srcImage must: have a sample count equal to ename:VK_SAMPLE_COUNT_1_BIT +* pname:srcImageLayout must: specify the layout of the subresources of pname:srcImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice +* pname:srcImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL +* pname:dstBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Outside|TRANSFER + +GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdCopyQueryPoolResults.txt b/doc/specs/vulkan/validity/protos/vkCmdCopyQueryPoolResults.txt new file mode 100644 index 00000000..f543ca1b --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdCopyQueryPoolResults.txt @@ -0,0 +1,59 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:queryPool must: be a valid sname:VkQueryPool handle +* pname:dstBuffer must: be a valid sname:VkBuffer handle +* pname:flags must: be a valid combination of elink:VkQueryResultFlagBits values +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics or compute operations +* This command must: only be called outside of a render pass instance +* Each of pname:commandBuffer, pname:queryPool and pname:dstBuffer must: have been created, allocated or retrieved from the same sname:VkDevice +* pname:firstQuery must: be less than the number of queries in pname:queryPool +* The sum of pname:firstQuery and pname:queryCount must: be less than or equal to the number of queries in pname:queryPool +* If ename:VK_QUERY_RESULT_64_BIT is not set in pname:flags then pname:dstOffset and pname:stride must be multiples of `4` +* If ename:VK_QUERY_RESULT_64_BIT is set in pname:flags then pname:dstOffset and pname:stride must be multiples of `8` +* pname:dstBuffer must: have enough storage, from pname:dstOffset, to contain the result of each query, as described <> +* If the pname:queryType used to create pname:queryPool was ename:VK_QUERY_TYPE_TIMESTAMP, pname:flags mustnot: contain ename:VK_QUERY_RESULT_PARTIAL_BIT +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Outside|GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdDispatch.txt b/doc/specs/vulkan/validity/protos/vkCmdDispatch.txt new file mode 100644 index 00000000..00ca3c2c --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdDispatch.txt @@ -0,0 +1,61 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support compute operations +* This command must: only be called outside of a render pass instance +* pname:x must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[0] +* pname:y must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[1] +* pname:z must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[2] +* For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_COMPUTE, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <> +* Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline +* A valid compute pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_COMPUTE +* For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_COMPUTE, with a sname:VkPipelineLayout that is compatible for push constants with the one used to create the current sname:VkPipeline, as described in <> +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with code:ImplicitLod, code:Dref or code:Proj in their name, in any shader stage +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage +* If the <> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set +* If the <> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set +* Any slink:VkImage being sampled with ename:VK_FILTER_LINEAR as a result of this command must: be of a format which supports linear filtering, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Outside|COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdDispatchIndirect.txt b/doc/specs/vulkan/validity/protos/vkCmdDispatchIndirect.txt new file mode 100644 index 00000000..ca01458f --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdDispatchIndirect.txt @@ -0,0 +1,63 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:buffer must: be a valid sname:VkBuffer handle +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support compute operations +* This command must: only be called outside of a render pass instance +* Each of pname:commandBuffer and pname:buffer must: have been created, allocated or retrieved from the same sname:VkDevice +* For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_COMPUTE, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <> +* Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline +* A valid compute pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_COMPUTE +* pname:buffer must: have been created with the ename:VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set +* The value of pname:offset must: be a multiple of `4` +* The sum of pname:offset and the size of sname:VkDispatchIndirectCommand must: be less than or equal to the size of pname:buffer +* For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_COMPUTE, with a sname:VkPipelineLayout that is compatible for push constants with the one used to create the current sname:VkPipeline, as described in <> +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with code:ImplicitLod, code:Dref or code:Proj in their name, in any shader stage +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage +* If the <> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set +* If the <> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set +* Any slink:VkImage being sampled with ename:VK_FILTER_LINEAR as a result of this command must: be of a format which supports linear filtering, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Outside|COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdDraw.txt b/doc/specs/vulkan/validity/protos/vkCmdDraw.txt new file mode 100644 index 00000000..89e75d28 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdDraw.txt @@ -0,0 +1,62 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* This command must: only be called inside of a render pass instance +* For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <> +* For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for push constants, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <> +* Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline +* All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must: have valid buffers bound +* For a given vertex buffer binding, any attribute data fetched must: be entirely contained within the corresponding vertex buffer binding, as described in <> +* A valid graphics pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_GRAPHICS +* If the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must: have been set on the current command buffer +* Every input attachment used by the current subpass must: be bound to the pipeline via a descriptor set +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with code:ImplicitLod, code:Dref or code:Proj in their name, in any shader stage +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage +* If the <> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set +* If the <> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set +* Any slink:VkImage being sampled with ename:VK_FILTER_LINEAR as a result of this command must: be of a format which supports linear filtering, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Inside|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdDrawIndexed.txt b/doc/specs/vulkan/validity/protos/vkCmdDrawIndexed.txt new file mode 100644 index 00000000..34e933c5 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdDrawIndexed.txt @@ -0,0 +1,63 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* This command must: only be called inside of a render pass instance +* For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <> +* For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for push constants, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <> +* Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline +* All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must: have valid buffers bound +* For a given vertex buffer binding, any attribute data fetched must: be entirely contained within the corresponding vertex buffer binding, as described in <> +* A valid graphics pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_GRAPHICS +* If the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must: have been set on the current command buffer +* The total value of (pname:indexSize * (pname:firstIndex + pname:indexCount) + pname:offset) must: be less than or equal to the size of the currently bound index buffer, with indexSize being based on the type specified by pname:indexType, where the index buffer, pname:indexType, and pname:offset are specified via fname:vkCmdBindIndexBuffer +* Every input attachment used by the current subpass must: be bound to the pipeline via a descriptor set +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with code:ImplicitLod, code:Dref or code:Proj in their name, in any shader stage +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage +* If the <> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set +* If the <> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set +* Any slink:VkImage being sampled with ename:VK_FILTER_LINEAR as a result of this command must: be of a format which supports linear filtering, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Inside|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdDrawIndexedIndirect.txt b/doc/specs/vulkan/validity/protos/vkCmdDrawIndexedIndirect.txt new file mode 100644 index 00000000..635c7f90 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdDrawIndexedIndirect.txt @@ -0,0 +1,70 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:buffer must: be a valid sname:VkBuffer handle +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* This command must: only be called inside of a render pass instance +* Each of pname:commandBuffer and pname:buffer must: have been created, allocated or retrieved from the same sname:VkDevice +* The value of pname:offset must: be a multiple of `4` +* If pname:drawCount is greater than `1`, the value of pname:stride must: be a multiple of `4` and must: be greater than or equal to sizeof(sname:VkDrawIndexedIndirectCommand) +* If the <> feature is not enabled, the value of pname:drawCount must: be `0` or `1` +* If the <> feature is not enabled, all the pname:firstInstance members of the sname:VkDrawIndexedIndirectCommand structures accessed by this command must: be code:0 +* For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <> +* For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for push constants, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <> +* Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline +* All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must: have valid buffers bound +* A valid graphics pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_GRAPHICS +* If the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must: have been set on the current command buffer +* If pname:drawCount is equal to `1`, the total value of (pname:offset + sizeof(sname:VkDrawIndexedIndirectCommand)) must: be less than or equal to the size of pname:buffer +* If pname:drawCount is greater than `1`, the total value of (pname:stride x (pname:drawCount - 1) + pname:offset + sizeof(sname:VkDrawIndexedIndirectCommand)) must: be less than or equal to the size of pname:buffer +* pname:drawCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxDrawIndirectCount +* Every input attachment used by the current subpass must: be bound to the pipeline via a descriptor set +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with code:ImplicitLod, code:Dref or code:Proj in their name, in any shader stage +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage +* If the <> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set +* If the <> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set +* Any slink:VkImage being sampled with ename:VK_FILTER_LINEAR as a result of this command must: be of a format which supports linear filtering, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Inside|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdDrawIndirect.txt b/doc/specs/vulkan/validity/protos/vkCmdDrawIndirect.txt new file mode 100644 index 00000000..5ef99288 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdDrawIndirect.txt @@ -0,0 +1,70 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:buffer must: be a valid sname:VkBuffer handle +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* This command must: only be called inside of a render pass instance +* Each of pname:commandBuffer and pname:buffer must: have been created, allocated or retrieved from the same sname:VkDevice +* The value of pname:offset must: be a multiple of `4` +* If pname:drawCount is greater than `1`, the value of pname:stride must: be a multiple of `4` and must: be greater than or equal to sizeof(sname:VkDrawIndirectCommand) +* If the <> feature is not enabled, the value of pname:drawCount must: be `0` or `1` +* If the <> feature is not enabled, all the pname:firstInstance members of the sname:VkDrawIndirectCommand structures accessed by this command must: be code:0 +* For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <> +* For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for push constants, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <> +* Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline +* All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must: have valid buffers bound +* A valid graphics pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_GRAPHICS +* If the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must: have been set on the current command buffer +* If pname:drawCount is equal to `1`, the total value of (pname:offset + sizeof(sname:VkDrawIndirectCommand)) must: be less than or equal to the size of pname:buffer +* If pname:drawCount is greater than `1`, the total value of (pname:stride x (pname:drawCount - 1) + pname:offset + sizeof(sname:VkDrawIndirectCommand)) must: be less than or equal to the size of pname:buffer +* pname:drawCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxDrawIndirectCount +* Every input attachment used by the current subpass must: be bound to the pipeline via a descriptor set +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with code:ImplicitLod, code:Dref or code:Proj in their name, in any shader stage +* If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage +* If the <> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set +* If the <> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set +* Any slink:VkImage being sampled with ename:VK_FILTER_LINEAR as a result of this command must: be of a format which supports linear filtering, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Inside|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdEndQuery.txt b/doc/specs/vulkan/validity/protos/vkCmdEndQuery.txt new file mode 100644 index 00000000..1109ec3a --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdEndQuery.txt @@ -0,0 +1,52 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:queryPool must: be a valid sname:VkQueryPool handle +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics or compute operations +* Each of pname:commandBuffer and pname:queryPool must: have been created, allocated or retrieved from the same sname:VkDevice +* The query identified by pname:queryPool and pname:query must: currently be <> +* pname:query must: be less than the number of queries in pname:queryPool +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdEndRenderPass.txt b/doc/specs/vulkan/validity/protos/vkCmdEndRenderPass.txt new file mode 100644 index 00000000..130b881e --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdEndRenderPass.txt @@ -0,0 +1,49 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* This command must: only be called inside of a render pass instance +* pname:commandBuffer must: be a primary sname:VkCommandBuffer +* The current subpass index must: be equal to the number of subpasses in the render pass minus one +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary|Inside|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdExecuteCommands.txt b/doc/specs/vulkan/validity/protos/vkCmdExecuteCommands.txt new file mode 100644 index 00000000..0e2e8a45 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdExecuteCommands.txt @@ -0,0 +1,67 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:pCommandBuffers must: be a pointer to an array of pname:commandBufferCount valid sname:VkCommandBuffer handles +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support transfer, graphics or compute operations +* pname:commandBuffer must: be a primary sname:VkCommandBuffer +* The value of pname:commandBufferCount must: be greater than `0` +* Each of pname:commandBuffer and the elements of pname:pCommandBuffers must: have been created, allocated or retrieved from the same sname:VkDevice +* pname:commandBuffer must: have been created with a pname:level value of VK_COMMAND_BUFFER_LEVEL_PRIMARY +* Any given element of pname:pCommandBuffers must: have been created with a pname:level value of VK_COMMAND_BUFFER_LEVEL_SECONDARY +* Any given element of pname:pCommandBuffers mustnot: be already pending execution in pname:commandBuffer, or appear twice in pname:pCommandBuffers, unless it was created with the ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag +* Any given element of pname:pCommandBuffers mustnot: be already pending execution in any other sname:VkCommandBuffer, unless it was created with the ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag +* Any given element of pname:pCommandBuffers must: be in the executable state +* If fname:vkCmdExecuteCommands is being called within a render pass instance, that render pass instance must: have been begun with the pname:contents parameter of fname:vkCmdBeginRenderPass set to ename:VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS +* If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with the ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT +* If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with the pname:subpass member of the pname:inheritanceInfo structure set to the index of the subpass which the given command buffer will be executed in +* If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with a render pass that is compatible with the current render pass - see <> +* If fname:vkCmdExecuteCommands is being called within a render pass instance, and any given element of pname:pCommandBuffers was recorded with the pname:framebuffer member of the sname:VkCommandBufferInheritanceInfo structure not equal to sname:VK_NULL_HANDLE, that sname:VkFramebuffer must: be compatible with the sname:VkFramebuffer used in the current render pass instance +* If the <> feature is not enabled, pname:commandBuffer mustnot: have any queries <> +* If pname:commandBuffer has a ename:VK_QUERY_TYPE_OCCLUSION query <>, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferBeginInfo::pname:occlusionQueryEnable set to ename:VK_TRUE +* If pname:commandBuffer has a ename:VK_QUERY_TYPE_OCCLUSION query <>, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferBeginInfo::pname:queryFlags having all bits set that are set for the query +* If pname:commandBuffer has a ename:VK_QUERY_TYPE_PIPELINE_STATISTICS query <>, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferBeginInfo::pname:pipelineStatistics having all bits set that are set in the sname:VkQueryPool the query uses +* Any given element of pname:pCommandBuffers mustnot: begin any query types that are <> in pname:commandBuffer +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary|Both|TRANSFER + +GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdFillBuffer.txt b/doc/specs/vulkan/validity/protos/vkCmdFillBuffer.txt new file mode 100644 index 00000000..478a5abe --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdFillBuffer.txt @@ -0,0 +1,55 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:dstBuffer must: be a valid sname:VkBuffer handle +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics or compute operations +* This command must: only be called outside of a render pass instance +* Each of pname:commandBuffer and pname:dstBuffer must: have been created, allocated or retrieved from the same sname:VkDevice +* If pname:size is not equal to ename:VK_WHOLE_SIZE, the sum of pname:dstOffset and pname:size must: be less than or equal to the size of pname:dstBuffer +* pname:dstBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag +* pname:dstOffset must: be a multiple of `4` +* If pname:size is not equal to ename:VK_WHOLE_SIZE, pname:size must: be a multiple of `4` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Outside|GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdNextSubpass.txt b/doc/specs/vulkan/validity/protos/vkCmdNextSubpass.txt new file mode 100644 index 00000000..8be45e3f --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdNextSubpass.txt @@ -0,0 +1,50 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:contents must: be a valid elink:VkSubpassContents value +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* This command must: only be called inside of a render pass instance +* pname:commandBuffer must: be a primary sname:VkCommandBuffer +* The current subpass index must: be less than the number of subpasses in the render pass minus one +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary|Inside|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdPipelineBarrier.txt b/doc/specs/vulkan/validity/protos/vkCmdPipelineBarrier.txt new file mode 100644 index 00000000..15b2f1c8 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdPipelineBarrier.txt @@ -0,0 +1,62 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:srcStageMask must: be a valid combination of elink:VkPipelineStageFlagBits values +* pname:srcStageMask mustnot: be `0` +* pname:dstStageMask must: be a valid combination of elink:VkPipelineStageFlagBits values +* pname:dstStageMask mustnot: be `0` +* pname:dependencyFlags must: be a valid combination of elink:VkDependencyFlagBits values +* If pname:memoryBarrierCount is not `0`, pname:pMemoryBarriers must: be a pointer to an array of pname:memoryBarrierCount valid sname:VkMemoryBarrier structures +* If pname:bufferMemoryBarrierCount is not `0`, pname:pBufferMemoryBarriers must: be a pointer to an array of pname:bufferMemoryBarrierCount valid sname:VkBufferMemoryBarrier structures +* If pname:imageMemoryBarrierCount is not `0`, pname:pImageMemoryBarriers must: be a pointer to an array of pname:imageMemoryBarrierCount valid sname:VkImageMemoryBarrier structures +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support transfer, graphics or compute operations +* If the <> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT +* If the <> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT +* If the <> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT +* If the <> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT +* If fname:vkCmdPipelineBarrier is called within a render pass instance, the render pass must: declare at least one self-dependency from the current subpass to itself - see <> +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|TRANSFER + +GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdPushConstants.txt b/doc/specs/vulkan/validity/protos/vkCmdPushConstants.txt new file mode 100644 index 00000000..8da745d0 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdPushConstants.txt @@ -0,0 +1,57 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:layout must: be a valid sname:VkPipelineLayout handle +* pname:stageFlags must: be a valid combination of elink:VkShaderStageFlagBits values +* pname:stageFlags mustnot: be `0` +* pname:pValues must: be a pointer to an array of pname:size bytes +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics or compute operations +* The value of pname:size must: be greater than `0` +* Each of pname:commandBuffer and pname:layout must: have been created, allocated or retrieved from the same sname:VkDevice +* pname:stageFlags must: match exactly the shader stages used in pname:layout for the range specified by pname:offset and pname:size +* pname:offset must: be a multiple of `4` +* pname:size must: be a multiple of `4` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdResetEvent.txt b/doc/specs/vulkan/validity/protos/vkCmdResetEvent.txt new file mode 100644 index 00000000..ff9e54c9 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdResetEvent.txt @@ -0,0 +1,55 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:event must: be a valid sname:VkEvent handle +* pname:stageMask must: be a valid combination of elink:VkPipelineStageFlagBits values +* pname:stageMask mustnot: be `0` +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics or compute operations +* This command must: only be called outside of a render pass instance +* Each of pname:commandBuffer and pname:event must: have been created, allocated or retrieved from the same sname:VkDevice +* If the <> feature is not enabled, pname:stageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT +* If the <> feature is not enabled, pname:stageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Outside|GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdResetQueryPool.txt b/doc/specs/vulkan/validity/protos/vkCmdResetQueryPool.txt new file mode 100644 index 00000000..df2412c4 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdResetQueryPool.txt @@ -0,0 +1,53 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:queryPool must: be a valid sname:VkQueryPool handle +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics or compute operations +* This command must: only be called outside of a render pass instance +* Each of pname:commandBuffer and pname:queryPool must: have been created, allocated or retrieved from the same sname:VkDevice +* pname:firstQuery must: be less than the number of queries in pname:queryPool +* The sum of pname:firstQuery and pname:queryCount must: be less than or equal to the number of queries in pname:queryPool +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Outside|GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdResolveImage.txt b/doc/specs/vulkan/validity/protos/vkCmdResolveImage.txt new file mode 100644 index 00000000..8457a8b6 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdResolveImage.txt @@ -0,0 +1,66 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:srcImage must: be a valid sname:VkImage handle +* pname:srcImageLayout must: be a valid elink:VkImageLayout value +* pname:dstImage must: be a valid sname:VkImage handle +* pname:dstImageLayout must: be a valid elink:VkImageLayout value +* pname:pRegions must: be a pointer to an array of pname:regionCount valid sname:VkImageResolve structures +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* This command must: only be called outside of a render pass instance +* The value of pname:regionCount must: be greater than `0` +* Each of pname:commandBuffer, pname:srcImage and pname:dstImage must: have been created, allocated or retrieved from the same sname:VkDevice +* The source region specified by a given element of pname:pRegions must: be a region that is contained within pname:srcImage +* The destination region specified by a given element of pname:pRegions must: be a region that is contained within pname:dstImage +* The union of all source regions, and the union of all destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory +* pname:srcImage must: have a sample count equal to any valid sample count value other than ename:VK_SAMPLE_COUNT_1_BIT +* pname:dstImage must: have a sample count equal to ename:VK_SAMPLE_COUNT_1_BIT +* pname:srcImageLayout must: specify the layout of the subresources of pname:srcImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice +* pname:srcImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL +* pname:dstImageLayout must: specify the layout of the subresources of pname:dstImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice +* pname:dstImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL +* If pname:dstImage was created with pname:tiling equal to ename:VK_IMAGE_TILING_LINEAR, pname:dstImage must: have been created with a pname:format that supports being a color attachment, as specified by the ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +* If pname:dstImage was created with pname:tiling equal to ename:VK_IMAGE_TILING_OPTIMAL, pname:dstImage must: have been created with a pname:format that supports being a color attachment, as specified by the ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Outside|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdSetBlendConstants.txt b/doc/specs/vulkan/validity/protos/vkCmdSetBlendConstants.txt new file mode 100644 index 00000000..20a74391 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdSetBlendConstants.txt @@ -0,0 +1,47 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdSetDepthBias.txt b/doc/specs/vulkan/validity/protos/vkCmdSetDepthBias.txt new file mode 100644 index 00000000..3f1f7ee2 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdSetDepthBias.txt @@ -0,0 +1,48 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* If the <> feature is not enabled, the value of pname:depthBiasClamp must: be code:0.0 +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdSetDepthBounds.txt b/doc/specs/vulkan/validity/protos/vkCmdSetDepthBounds.txt new file mode 100644 index 00000000..418a87c2 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdSetDepthBounds.txt @@ -0,0 +1,49 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* The value of pname:minDepthBounds must: be between `0.0` and `1.0`, inclusive +* The value of pname:maxDepthBounds must: be between `0.0` and `1.0`, inclusive +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdSetEvent.txt b/doc/specs/vulkan/validity/protos/vkCmdSetEvent.txt new file mode 100644 index 00000000..ff9e54c9 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdSetEvent.txt @@ -0,0 +1,55 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:event must: be a valid sname:VkEvent handle +* pname:stageMask must: be a valid combination of elink:VkPipelineStageFlagBits values +* pname:stageMask mustnot: be `0` +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics or compute operations +* This command must: only be called outside of a render pass instance +* Each of pname:commandBuffer and pname:event must: have been created, allocated or retrieved from the same sname:VkDevice +* If the <> feature is not enabled, pname:stageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT +* If the <> feature is not enabled, pname:stageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Outside|GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdSetLineWidth.txt b/doc/specs/vulkan/validity/protos/vkCmdSetLineWidth.txt new file mode 100644 index 00000000..fba02f82 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdSetLineWidth.txt @@ -0,0 +1,48 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* If the <> feature is not enabled, the value of pname:lineWidth must: be `1.0` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdSetScissor.txt b/doc/specs/vulkan/validity/protos/vkCmdSetScissor.txt new file mode 100644 index 00000000..377db428 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdSetScissor.txt @@ -0,0 +1,54 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:pScissors must: be a pointer to an array of pname:scissorCount sname:VkRect2D structures +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* The value of pname:scissorCount must: be greater than `0` +* pname:firstScissor must: be less than sname:VkPhysicalDeviceLimits::pname:maxViewports +* The sum of pname:firstScissor and pname:scissorCount must: be between `1` and sname:VkPhysicalDeviceLimits::pname:maxViewports, inclusive +* The pname:x and pname:y members of pname:offset must: be greater than or equal to `0` +* Evaluation of (pname:offset.x + pname:extent.width) mustnot: cause a signed integer addition overflow +* Evaluation of (pname:offset.y + pname:extent.height) mustnot: cause a signed integer addition overflow +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdSetStencilCompareMask.txt b/doc/specs/vulkan/validity/protos/vkCmdSetStencilCompareMask.txt new file mode 100644 index 00000000..663f4400 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdSetStencilCompareMask.txt @@ -0,0 +1,49 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:faceMask must: be a valid combination of elink:VkStencilFaceFlagBits values +* pname:faceMask mustnot: be `0` +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdSetStencilReference.txt b/doc/specs/vulkan/validity/protos/vkCmdSetStencilReference.txt new file mode 100644 index 00000000..663f4400 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdSetStencilReference.txt @@ -0,0 +1,49 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:faceMask must: be a valid combination of elink:VkStencilFaceFlagBits values +* pname:faceMask mustnot: be `0` +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdSetStencilWriteMask.txt b/doc/specs/vulkan/validity/protos/vkCmdSetStencilWriteMask.txt new file mode 100644 index 00000000..663f4400 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdSetStencilWriteMask.txt @@ -0,0 +1,49 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:faceMask must: be a valid combination of elink:VkStencilFaceFlagBits values +* pname:faceMask mustnot: be `0` +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdSetViewport.txt b/doc/specs/vulkan/validity/protos/vkCmdSetViewport.txt new file mode 100644 index 00000000..267623ba --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdSetViewport.txt @@ -0,0 +1,51 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:pViewports must: be a pointer to an array of pname:viewportCount valid sname:VkViewport structures +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations +* The value of pname:viewportCount must: be greater than `0` +* pname:firstViewport must: be less than sname:VkPhysicalDeviceLimits::pname:maxViewports +* The sum of pname:firstViewport and pname:viewportCount must: be between `1` and sname:VkPhysicalDeviceLimits::pname:maxViewports, inclusive +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdUpdateBuffer.txt b/doc/specs/vulkan/validity/protos/vkCmdUpdateBuffer.txt new file mode 100644 index 00000000..be252789 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdUpdateBuffer.txt @@ -0,0 +1,59 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:dstBuffer must: be a valid sname:VkBuffer handle +* pname:pData must: be a pointer to an array of pname:dataSize/4 basetype:uint32_t values +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support transfer, graphics or compute operations +* This command must: only be called outside of a render pass instance +* Each of pname:commandBuffer and pname:dstBuffer must: have been created, allocated or retrieved from the same sname:VkDevice +* The sum of pname:dstOffset and pname:dataSize must: be less than or equal to the size of pname:dstBuffer +* pname:dstBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag +* The value of pname:dstOffset must: be a multiple of `4` +* The value of pname:dataSize must: be greater than `0` +* The value of pname:dataSize must: be less than `65536` +* The value of pname:dataSize must: be a multiple of `4` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Outside|TRANSFER + +GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdWaitEvents.txt b/doc/specs/vulkan/validity/protos/vkCmdWaitEvents.txt new file mode 100644 index 00000000..b44f4af9 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdWaitEvents.txt @@ -0,0 +1,64 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:pEvents must: be a pointer to an array of pname:eventCount valid sname:VkEvent handles +* pname:srcStageMask must: be a valid combination of elink:VkPipelineStageFlagBits values +* pname:srcStageMask mustnot: be `0` +* pname:dstStageMask must: be a valid combination of elink:VkPipelineStageFlagBits values +* pname:dstStageMask mustnot: be `0` +* If pname:memoryBarrierCount is not `0`, pname:pMemoryBarriers must: be a pointer to an array of pname:memoryBarrierCount valid sname:VkMemoryBarrier structures +* If pname:bufferMemoryBarrierCount is not `0`, pname:pBufferMemoryBarriers must: be a pointer to an array of pname:bufferMemoryBarrierCount valid sname:VkBufferMemoryBarrier structures +* If pname:imageMemoryBarrierCount is not `0`, pname:pImageMemoryBarriers must: be a pointer to an array of pname:imageMemoryBarrierCount valid sname:VkImageMemoryBarrier structures +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics or compute operations +* The value of pname:eventCount must: be greater than `0` +* Each of pname:commandBuffer and the elements of pname:pEvents must: have been created, allocated or retrieved from the same sname:VkDevice +* pname:srcStageMask must: be the bitwise OR of the pname:stageMask parameter used in previous calls to fname:vkCmdSetEvent with any of the members of pname:pEvents and VK_PIPELINE_STAGE_HOST_BIT if any of the members of pname:pEvents was set using fname:vkSetEvent +* If the <> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT +* If the <> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT +* If the <> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT +* If the <> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT +* If pname:pEvents includes one or more events that will be signaled by fname:vkSetEvent after pname:commandBuffer has been submitted to a queue, then fname:vkCmdWaitEvents mustnot: be called inside a render pass instance +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCmdWriteTimestamp.txt b/doc/specs/vulkan/validity/protos/vkCmdWriteTimestamp.txt new file mode 100644 index 00000000..d728e7e4 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCmdWriteTimestamp.txt @@ -0,0 +1,53 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:pipelineStage must: be a valid elink:VkPipelineStageFlagBits value +* pname:queryPool must: be a valid sname:VkQueryPool handle +* pname:commandBuffer must: be in the recording state +* The sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics or compute operations +* Each of pname:commandBuffer and pname:queryPool must: have been created, allocated or retrieved from the same sname:VkDevice +* The query identified by pname:queryPool and pname:query must: be _unavailable_ +* The command pool's queue family must: support a non-zero value of pname:timestampValidBits +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|Primary + +Secondary|Both|GRAPHICS + +COMPUTE +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateBuffer.txt b/doc/specs/vulkan/validity/protos/vkCreateBuffer.txt new file mode 100644 index 00000000..f79204aa --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateBuffer.txt @@ -0,0 +1,45 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkBufferCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pBuffer must: be a pointer to a sname:VkBuffer handle +* If the pname:flags member of pname:pCreateInfo includes ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT or ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, creating this sname:VkBuffer mustnot: cause the total required sparse memory for all currently valid sparse resources on the device to exceed sname:VkPhysicalDeviceLimits::pname:sparseAddressSpaceSize +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateBufferView.txt b/doc/specs/vulkan/validity/protos/vkCreateBufferView.txt new file mode 100644 index 00000000..65d9bbd8 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateBufferView.txt @@ -0,0 +1,44 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkBufferViewCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pView must: be a pointer to a sname:VkBufferView handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateCommandPool.txt b/doc/specs/vulkan/validity/protos/vkCreateCommandPool.txt new file mode 100644 index 00000000..eae44bcf --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateCommandPool.txt @@ -0,0 +1,44 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkCommandPoolCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pCommandPool must: be a pointer to a sname:VkCommandPool handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateComputePipelines.txt b/doc/specs/vulkan/validity/protos/vkCreateComputePipelines.txt new file mode 100644 index 00000000..6863df8d --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateComputePipelines.txt @@ -0,0 +1,49 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:pipelineCache is not sname:VK_NULL_HANDLE, pname:pipelineCache must: be a valid sname:VkPipelineCache handle +* pname:pCreateInfos must: be a pointer to an array of pname:createInfoCount valid sname:VkComputePipelineCreateInfo structures +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pPipelines must: be a pointer to an array of pname:createInfoCount sname:VkPipeline handles +* The value of pname:createInfoCount must: be greater than `0` +* If pname:pipelineCache is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:pipelineCache that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* If the value of the pname:flags member of any given element of pname:pCreateInfos contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the pname:basePipelineIndex member of that same element is not `-1`, the value of pname:basePipelineIndex must: be less than the index into pname:pCreateInfos that corresponds to that element +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateDescriptorPool.txt b/doc/specs/vulkan/validity/protos/vkCreateDescriptorPool.txt new file mode 100644 index 00000000..5eb58a35 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateDescriptorPool.txt @@ -0,0 +1,44 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkDescriptorPoolCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pDescriptorPool must: be a pointer to a sname:VkDescriptorPool handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateDescriptorSetLayout.txt b/doc/specs/vulkan/validity/protos/vkCreateDescriptorSetLayout.txt new file mode 100644 index 00000000..29f4060b --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateDescriptorSetLayout.txt @@ -0,0 +1,44 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkDescriptorSetLayoutCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pSetLayout must: be a pointer to a sname:VkDescriptorSetLayout handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateDevice.txt b/doc/specs/vulkan/validity/protos/vkCreateDevice.txt new file mode 100644 index 00000000..0dc2633d --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateDevice.txt @@ -0,0 +1,50 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:physicalDevice must: be a valid sname:VkPhysicalDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkDeviceCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pDevice must: be a pointer to a sname:VkDevice handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +* ename:VK_ERROR_INITIALIZATION_FAILED +* ename:VK_ERROR_LAYER_NOT_PRESENT +* ename:VK_ERROR_EXTENSION_NOT_PRESENT +* ename:VK_ERROR_FEATURE_NOT_PRESENT +* ename:VK_ERROR_TOO_MANY_OBJECTS +* ename:VK_ERROR_DEVICE_LOST +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateEvent.txt b/doc/specs/vulkan/validity/protos/vkCreateEvent.txt new file mode 100644 index 00000000..82df5e08 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateEvent.txt @@ -0,0 +1,44 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkEventCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pEvent must: be a pointer to a sname:VkEvent handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateFence.txt b/doc/specs/vulkan/validity/protos/vkCreateFence.txt new file mode 100644 index 00000000..402675fc --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateFence.txt @@ -0,0 +1,44 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkFenceCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pFence must: be a pointer to a sname:VkFence handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateFramebuffer.txt b/doc/specs/vulkan/validity/protos/vkCreateFramebuffer.txt new file mode 100644 index 00000000..91823df2 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateFramebuffer.txt @@ -0,0 +1,44 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkFramebufferCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pFramebuffer must: be a pointer to a sname:VkFramebuffer handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateGraphicsPipelines.txt b/doc/specs/vulkan/validity/protos/vkCreateGraphicsPipelines.txt new file mode 100644 index 00000000..5e3b777a --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateGraphicsPipelines.txt @@ -0,0 +1,49 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:pipelineCache is not sname:VK_NULL_HANDLE, pname:pipelineCache must: be a valid sname:VkPipelineCache handle +* pname:pCreateInfos must: be a pointer to an array of pname:createInfoCount valid sname:VkGraphicsPipelineCreateInfo structures +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pPipelines must: be a pointer to an array of pname:createInfoCount sname:VkPipeline handles +* The value of pname:createInfoCount must: be greater than `0` +* If pname:pipelineCache is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:pipelineCache that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* If the value of the pname:flags member of any given element of pname:pCreateInfos contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the pname:basePipelineIndex member of that same element is not `-1`, the value of pname:basePipelineIndex must: be less than the index into pname:pCreateInfos that corresponds to that element +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateImage.txt b/doc/specs/vulkan/validity/protos/vkCreateImage.txt new file mode 100644 index 00000000..db21320a --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateImage.txt @@ -0,0 +1,45 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkImageCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pImage must: be a pointer to a sname:VkImage handle +* If the pname:flags member of pname:pCreateInfo includes ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT or ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, creating this sname:VkImage mustnot: cause the total required sparse memory for all currently valid sparse resources on the device to exceed sname:VkPhysicalDeviceLimits::pname:sparseAddressSpaceSize +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateImageView.txt b/doc/specs/vulkan/validity/protos/vkCreateImageView.txt new file mode 100644 index 00000000..06044415 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateImageView.txt @@ -0,0 +1,44 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkImageViewCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pView must: be a pointer to a sname:VkImageView handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateInstance.txt b/doc/specs/vulkan/validity/protos/vkCreateInstance.txt new file mode 100644 index 00000000..0626dd2e --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateInstance.txt @@ -0,0 +1,47 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:pCreateInfo must: be a pointer to a valid sname:VkInstanceCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pInstance must: be a pointer to a sname:VkInstance handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +* ename:VK_ERROR_INITIALIZATION_FAILED +* ename:VK_ERROR_LAYER_NOT_PRESENT +* ename:VK_ERROR_EXTENSION_NOT_PRESENT +* ename:VK_ERROR_INCOMPATIBLE_DRIVER +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreatePipelineCache.txt b/doc/specs/vulkan/validity/protos/vkCreatePipelineCache.txt new file mode 100644 index 00000000..09865a3e --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreatePipelineCache.txt @@ -0,0 +1,44 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkPipelineCacheCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pPipelineCache must: be a pointer to a sname:VkPipelineCache handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreatePipelineLayout.txt b/doc/specs/vulkan/validity/protos/vkCreatePipelineLayout.txt new file mode 100644 index 00000000..092f8bd7 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreatePipelineLayout.txt @@ -0,0 +1,44 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkPipelineLayoutCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pPipelineLayout must: be a pointer to a sname:VkPipelineLayout handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateQueryPool.txt b/doc/specs/vulkan/validity/protos/vkCreateQueryPool.txt new file mode 100644 index 00000000..30ce2ddd --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateQueryPool.txt @@ -0,0 +1,44 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkQueryPoolCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pQueryPool must: be a pointer to a sname:VkQueryPool handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateRenderPass.txt b/doc/specs/vulkan/validity/protos/vkCreateRenderPass.txt new file mode 100644 index 00000000..7c7ad911 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateRenderPass.txt @@ -0,0 +1,44 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkRenderPassCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pRenderPass must: be a pointer to a sname:VkRenderPass handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateSampler.txt b/doc/specs/vulkan/validity/protos/vkCreateSampler.txt new file mode 100644 index 00000000..f5088fee --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateSampler.txt @@ -0,0 +1,45 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkSamplerCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pSampler must: be a pointer to a sname:VkSampler handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +* ename:VK_ERROR_TOO_MANY_OBJECTS +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateSemaphore.txt b/doc/specs/vulkan/validity/protos/vkCreateSemaphore.txt new file mode 100644 index 00000000..cd239689 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateSemaphore.txt @@ -0,0 +1,44 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkSemaphoreCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pSemaphore must: be a pointer to a sname:VkSemaphore handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkCreateShaderModule.txt b/doc/specs/vulkan/validity/protos/vkCreateShaderModule.txt new file mode 100644 index 00000000..bd81ae60 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkCreateShaderModule.txt @@ -0,0 +1,44 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pCreateInfo must: be a pointer to a valid sname:VkShaderModuleCreateInfo structure +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* pname:pShaderModule must: be a pointer to a sname:VkShaderModule handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyBuffer.txt b/doc/specs/vulkan/validity/protos/vkDestroyBuffer.txt new file mode 100644 index 00000000..510a6672 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyBuffer.txt @@ -0,0 +1,34 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:buffer is not sname:VK_NULL_HANDLE, pname:buffer must: be a valid sname:VkBuffer handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:buffer is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:buffer that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* All submitted commands that refer to pname:buffer, either directly or via a sname:VkBufferView, must: have completed execution +* If sname:VkAllocationCallbacks were provided when pname:buffer was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:buffer was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:buffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyBufferView.txt b/doc/specs/vulkan/validity/protos/vkDestroyBufferView.txt new file mode 100644 index 00000000..d7835c9d --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyBufferView.txt @@ -0,0 +1,34 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:bufferView is not sname:VK_NULL_HANDLE, pname:bufferView must: be a valid sname:VkBufferView handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:bufferView is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:bufferView that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* All submitted commands that refer to pname:bufferView must: have completed execution +* If sname:VkAllocationCallbacks were provided when pname:bufferView was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:bufferView was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:bufferView must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyCommandPool.txt b/doc/specs/vulkan/validity/protos/vkDestroyCommandPool.txt new file mode 100644 index 00000000..e8347a66 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyCommandPool.txt @@ -0,0 +1,34 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:commandPool is not sname:VK_NULL_HANDLE, pname:commandPool must: be a valid sname:VkCommandPool handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:commandPool is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:commandPool that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* All sname:VkCommandBuffer objects allocated from pname:commandPool mustnot: be pending execution +* If sname:VkAllocationCallbacks were provided when pname:commandPool was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:commandPool was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandPool must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyDescriptorPool.txt b/doc/specs/vulkan/validity/protos/vkDestroyDescriptorPool.txt new file mode 100644 index 00000000..b269d766 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyDescriptorPool.txt @@ -0,0 +1,34 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:descriptorPool is not sname:VK_NULL_HANDLE, pname:descriptorPool must: be a valid sname:VkDescriptorPool handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:descriptorPool is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:descriptorPool that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* All submitted commands that refer to pname:descriptorPool (via any allocated descriptor sets) must: have completed execution +* If sname:VkAllocationCallbacks were provided when pname:descriptorPool was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:descriptorPool was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:descriptorPool must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyDescriptorSetLayout.txt b/doc/specs/vulkan/validity/protos/vkDestroyDescriptorSetLayout.txt new file mode 100644 index 00000000..3428dee3 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyDescriptorSetLayout.txt @@ -0,0 +1,33 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:descriptorSetLayout is not sname:VK_NULL_HANDLE, pname:descriptorSetLayout must: be a valid sname:VkDescriptorSetLayout handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:descriptorSetLayout is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:descriptorSetLayout that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* If sname:VkAllocationCallbacks were provided when pname:descriptorSetLayout was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:descriptorSetLayout was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:descriptorSetLayout must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyDevice.txt b/doc/specs/vulkan/validity/protos/vkDestroyDevice.txt new file mode 100644 index 00000000..3301bb86 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyDevice.txt @@ -0,0 +1,31 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* If pname:device is not `NULL`, pname:device must: be a valid sname:VkDevice handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* All child objects created on pname:device must: have been destroyed prior to destroying pname:device +* If sname:VkAllocationCallbacks were provided when pname:device was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:device was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:device must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyEvent.txt b/doc/specs/vulkan/validity/protos/vkDestroyEvent.txt new file mode 100644 index 00000000..1a1ca54b --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyEvent.txt @@ -0,0 +1,34 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:event is not sname:VK_NULL_HANDLE, pname:event must: be a valid sname:VkEvent handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:event is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:event that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* All submitted commands that refer to pname:event must: have completed execution +* If sname:VkAllocationCallbacks were provided when pname:event was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:event was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:event must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyFence.txt b/doc/specs/vulkan/validity/protos/vkDestroyFence.txt new file mode 100644 index 00000000..64016326 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyFence.txt @@ -0,0 +1,34 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:fence is not sname:VK_NULL_HANDLE, pname:fence must: be a valid sname:VkFence handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:fence is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:fence that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* pname:fence mustnot: be associated with any queue command that has not yet completed execution on that queue +* If sname:VkAllocationCallbacks were provided when pname:fence was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:fence was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:fence must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyFramebuffer.txt b/doc/specs/vulkan/validity/protos/vkDestroyFramebuffer.txt new file mode 100644 index 00000000..3f454d54 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyFramebuffer.txt @@ -0,0 +1,34 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:framebuffer is not sname:VK_NULL_HANDLE, pname:framebuffer must: be a valid sname:VkFramebuffer handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:framebuffer is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:framebuffer that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* All submitted commands that refer to pname:framebuffer must: have completed execution +* If sname:VkAllocationCallbacks were provided when pname:framebuffer was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:framebuffer was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:framebuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyImage.txt b/doc/specs/vulkan/validity/protos/vkDestroyImage.txt new file mode 100644 index 00000000..7f1b2811 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyImage.txt @@ -0,0 +1,34 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:image is not sname:VK_NULL_HANDLE, pname:image must: be a valid sname:VkImage handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:image is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:image that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* All submitted commands that refer to pname:image, either directly or via a sname:VkImageView, must: have completed execution +* If sname:VkAllocationCallbacks were provided when pname:image was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:image was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:image must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyImageView.txt b/doc/specs/vulkan/validity/protos/vkDestroyImageView.txt new file mode 100644 index 00000000..075918bd --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyImageView.txt @@ -0,0 +1,34 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:imageView is not sname:VK_NULL_HANDLE, pname:imageView must: be a valid sname:VkImageView handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:imageView is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:imageView that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* All submitted commands that refer to pname:imageView must: have completed execution +* If sname:VkAllocationCallbacks were provided when pname:imageView was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:imageView was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:imageView must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyInstance.txt b/doc/specs/vulkan/validity/protos/vkDestroyInstance.txt new file mode 100644 index 00000000..2dfb5874 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyInstance.txt @@ -0,0 +1,31 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* If pname:instance is not `NULL`, pname:instance must: be a valid sname:VkInstance handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* All child objects created using pname:instance must: have been destroyed prior to destroying pname:instance +* If sname:VkAllocationCallbacks were provided when pname:instance was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:instance was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:instance must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyPipeline.txt b/doc/specs/vulkan/validity/protos/vkDestroyPipeline.txt new file mode 100644 index 00000000..4cff02fc --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyPipeline.txt @@ -0,0 +1,34 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:pipeline is not sname:VK_NULL_HANDLE, pname:pipeline must: be a valid sname:VkPipeline handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:pipeline is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:pipeline that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* All submitted commands that refer to pname:pipeline must: have completed execution +* If sname:VkAllocationCallbacks were provided when pname:pipeline was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:pipeline was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:pipeline must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyPipelineCache.txt b/doc/specs/vulkan/validity/protos/vkDestroyPipelineCache.txt new file mode 100644 index 00000000..ce3fad43 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyPipelineCache.txt @@ -0,0 +1,33 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:pipelineCache is not sname:VK_NULL_HANDLE, pname:pipelineCache must: be a valid sname:VkPipelineCache handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:pipelineCache is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:pipelineCache that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* If sname:VkAllocationCallbacks were provided when pname:pipelineCache was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:pipelineCache was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:pipelineCache must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyPipelineLayout.txt b/doc/specs/vulkan/validity/protos/vkDestroyPipelineLayout.txt new file mode 100644 index 00000000..16b4bce9 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyPipelineLayout.txt @@ -0,0 +1,33 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:pipelineLayout is not sname:VK_NULL_HANDLE, pname:pipelineLayout must: be a valid sname:VkPipelineLayout handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:pipelineLayout is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:pipelineLayout that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* If sname:VkAllocationCallbacks were provided when pname:pipelineLayout was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:pipelineLayout was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:pipelineLayout must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyQueryPool.txt b/doc/specs/vulkan/validity/protos/vkDestroyQueryPool.txt new file mode 100644 index 00000000..5b4a0197 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyQueryPool.txt @@ -0,0 +1,34 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:queryPool is not sname:VK_NULL_HANDLE, pname:queryPool must: be a valid sname:VkQueryPool handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:queryPool is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:queryPool that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* All submitted commands that refer to pname:queryPool must: have completed execution +* If sname:VkAllocationCallbacks were provided when pname:queryPool was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:queryPool was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:queryPool must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyRenderPass.txt b/doc/specs/vulkan/validity/protos/vkDestroyRenderPass.txt new file mode 100644 index 00000000..1cc21228 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyRenderPass.txt @@ -0,0 +1,34 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:renderPass is not sname:VK_NULL_HANDLE, pname:renderPass must: be a valid sname:VkRenderPass handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:renderPass is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:renderPass that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* All submitted commands that refer to pname:renderPass must: have completed execution +* If sname:VkAllocationCallbacks were provided when pname:renderPass was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:renderPass was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:renderPass must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroySampler.txt b/doc/specs/vulkan/validity/protos/vkDestroySampler.txt new file mode 100644 index 00000000..3e6225b2 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroySampler.txt @@ -0,0 +1,34 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:sampler is not sname:VK_NULL_HANDLE, pname:sampler must: be a valid sname:VkSampler handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:sampler is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:sampler that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* All submitted commands that refer to pname:sampler must: have completed execution +* If sname:VkAllocationCallbacks were provided when pname:sampler was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:sampler was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:sampler must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroySemaphore.txt b/doc/specs/vulkan/validity/protos/vkDestroySemaphore.txt new file mode 100644 index 00000000..35ba6157 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroySemaphore.txt @@ -0,0 +1,34 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:semaphore is not sname:VK_NULL_HANDLE, pname:semaphore must: be a valid sname:VkSemaphore handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:semaphore is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:semaphore that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* pname:semaphore mustnot: be associated with any queue command that has not yet completed execution on that queue +* If sname:VkAllocationCallbacks were provided when pname:semaphore was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:semaphore was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:semaphore must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDestroyShaderModule.txt b/doc/specs/vulkan/validity/protos/vkDestroyShaderModule.txt new file mode 100644 index 00000000..039c5bd1 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDestroyShaderModule.txt @@ -0,0 +1,33 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:shaderModule is not sname:VK_NULL_HANDLE, pname:shaderModule must: be a valid sname:VkShaderModule handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:shaderModule is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:shaderModule that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* If sname:VkAllocationCallbacks were provided when pname:shaderModule was created, a compatible set of callbacks must: be provided here +* If no sname:VkAllocationCallbacks were provided when pname:shaderModule was created, pname:pAllocator must: be `NULL` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:shaderModule must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkDeviceWaitIdle.txt b/doc/specs/vulkan/validity/protos/vkDeviceWaitIdle.txt new file mode 100644 index 00000000..96d5a791 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkDeviceWaitIdle.txt @@ -0,0 +1,55 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to all sname:VkQueue objects created from pname:device must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +* ename:VK_ERROR_DEVICE_LOST +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkEndCommandBuffer.txt b/doc/specs/vulkan/validity/protos/vkEndCommandBuffer.txt new file mode 100644 index 00000000..277cc0d9 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkEndCommandBuffer.txt @@ -0,0 +1,57 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:commandBuffer must: be in the recording state +* fname:vkEndCommandBuffer mustnot: be called inside a render pass instance +* All queries made <> during the recording of pname:commandBuffer must: have been made inactive +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkEnumerateDeviceExtensionProperties.txt b/doc/specs/vulkan/validity/protos/vkEnumerateDeviceExtensionProperties.txt new file mode 100644 index 00000000..9d605e35 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkEnumerateDeviceExtensionProperties.txt @@ -0,0 +1,46 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:physicalDevice must: be a valid sname:VkPhysicalDevice handle +* If pname:pLayerName is not `NULL`, pname:pLayerName must: be a null-terminated string +* pname:pPropertyCount must: be a pointer to a basetype:uint32_t value +* If the value referenced by pname:pPropertyCount is not `0`, and pname:pProperties is not `NULL`, pname:pProperties must: be a pointer to an array of pname:pPropertyCount sname:VkExtensionProperties structures +* If pname:pLayerName is not `NULL`, it must: be the name of a layer available on the system +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +* ename:VK_INCOMPLETE +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkEnumerateDeviceLayerProperties.txt b/doc/specs/vulkan/validity/protos/vkEnumerateDeviceLayerProperties.txt new file mode 100644 index 00000000..512c63d5 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkEnumerateDeviceLayerProperties.txt @@ -0,0 +1,45 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:physicalDevice must: be a valid sname:VkPhysicalDevice handle +* pname:pPropertyCount must: be a pointer to a basetype:uint32_t value +* If pname:pProperties is not `NULL`, pname:pProperties must: be a pointer to an array of pname:pPropertyCount sname:VkLayerProperties structures +* If pname:pProperties is not `NULL`, the value referenced by pname:pPropertyCount must: be greater than `0` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +* ename:VK_INCOMPLETE +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkEnumerateInstanceExtensionProperties.txt b/doc/specs/vulkan/validity/protos/vkEnumerateInstanceExtensionProperties.txt new file mode 100644 index 00000000..359ead8c --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkEnumerateInstanceExtensionProperties.txt @@ -0,0 +1,45 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* If pname:pLayerName is not `NULL`, pname:pLayerName must: be a null-terminated string +* pname:pPropertyCount must: be a pointer to a basetype:uint32_t value +* If the value referenced by pname:pPropertyCount is not `0`, and pname:pProperties is not `NULL`, pname:pProperties must: be a pointer to an array of pname:pPropertyCount sname:VkExtensionProperties structures +* If pname:pLayerName is not `NULL`, it must: be the name of a layer available on the system +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +* ename:VK_INCOMPLETE +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkEnumerateInstanceLayerProperties.txt b/doc/specs/vulkan/validity/protos/vkEnumerateInstanceLayerProperties.txt new file mode 100644 index 00000000..c2b8efc1 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkEnumerateInstanceLayerProperties.txt @@ -0,0 +1,43 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:pPropertyCount must: be a pointer to a basetype:uint32_t value +* If the value referenced by pname:pPropertyCount is not `0`, and pname:pProperties is not `NULL`, pname:pProperties must: be a pointer to an array of pname:pPropertyCount sname:VkLayerProperties structures +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +* ename:VK_INCOMPLETE +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkEnumeratePhysicalDevices.txt b/doc/specs/vulkan/validity/protos/vkEnumeratePhysicalDevices.txt new file mode 100644 index 00000000..daf92f26 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkEnumeratePhysicalDevices.txt @@ -0,0 +1,44 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:instance must: be a valid sname:VkInstance handle +* pname:pPhysicalDeviceCount must: be a pointer to a basetype:uint32_t value +* If the value referenced by pname:pPhysicalDeviceCount is not `0`, and pname:pPhysicalDevices is not `NULL`, pname:pPhysicalDevices must: be a pointer to an array of pname:pPhysicalDeviceCount sname:VkPhysicalDevice handles +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +* ename:VK_ERROR_INITIALIZATION_FAILED +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkFlushMappedMemoryRanges.txt b/doc/specs/vulkan/validity/protos/vkFlushMappedMemoryRanges.txt new file mode 100644 index 00000000..6bb11e95 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkFlushMappedMemoryRanges.txt @@ -0,0 +1,44 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pMemoryRanges must: be a pointer to an array of pname:memoryRangeCount valid sname:VkMappedMemoryRange structures +* The value of pname:memoryRangeCount must: be greater than `0` +* The memory ranges specified by pname:pMemoryRanges must: all currently be mapped +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkFreeCommandBuffers.txt b/doc/specs/vulkan/validity/protos/vkFreeCommandBuffers.txt new file mode 100644 index 00000000..e8568114 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkFreeCommandBuffers.txt @@ -0,0 +1,35 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:commandPool must: be a valid sname:VkCommandPool handle +* The value of pname:commandBufferCount must: be greater than `0` +* pname:commandPool must: have been created, allocated or retrieved from pname:device +* Each element of pname:pCommandBuffers that is a valid handle must: have been created, allocated or retrieved from pname:commandPool +* Each of pname:device, pname:commandPool and the elements of pname:pCommandBuffers that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* All elements of pname:pCommandBuffers mustnot: be pending execution +* pname:pCommandBuffers must: be a pointer to an array of pname:commandBufferCount sname:VkCommandBuffer handles, each element of which must: either be a valid handle or sname:VK_NULL_HANDLE +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandPool must: be externally synchronized +* Host access to each member of pname:pCommandBuffers must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkFreeDescriptorSets.txt b/doc/specs/vulkan/validity/protos/vkFreeDescriptorSets.txt new file mode 100644 index 00000000..ce0ce248 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkFreeDescriptorSets.txt @@ -0,0 +1,63 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:descriptorPool must: be a valid sname:VkDescriptorPool handle +* The value of pname:descriptorSetCount must: be greater than `0` +* pname:descriptorPool must: have been created, allocated or retrieved from pname:device +* Each element of pname:pDescriptorSets that is a valid handle must: have been created, allocated or retrieved from pname:descriptorPool +* Each of pname:device, pname:descriptorPool and the elements of pname:pDescriptorSets that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* All submitted commands that refer to any element of pname:pDesciptorSets must: have completed execution +* pname:pDescriptorSets must: be a pointer to an array of pname:descriptorSetCount sname:VkDescriptorSet handles, each element of which must: either be a valid handle or sname:VK_NULL_HANDLE +* pname:descriptorPool must: have been created with the ename:VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT flag +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:descriptorPool must: be externally synchronized +* Host access to each member of pname:pDescriptorSets must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkFreeMemory.txt b/doc/specs/vulkan/validity/protos/vkFreeMemory.txt new file mode 100644 index 00000000..ff53f525 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkFreeMemory.txt @@ -0,0 +1,32 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:memory is not sname:VK_NULL_HANDLE, pname:memory must: be a valid sname:VkDeviceMemory handle +* If pname:pAllocator is not `NULL`, pname:pAllocator must: be a pointer to a valid sname:VkAllocationCallbacks structure +* If pname:memory is a valid handle, it must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:memory that are valid handles must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* All submitted commands that refer to pname:memory (via images or buffers) must: have completed execution +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:memory must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetBufferMemoryRequirements.txt b/doc/specs/vulkan/validity/protos/vkGetBufferMemoryRequirements.txt new file mode 100644 index 00000000..886026ea --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetBufferMemoryRequirements.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:buffer must: be a valid sname:VkBuffer handle +* pname:pMemoryRequirements must: be a pointer to a sname:VkMemoryRequirements structure +* pname:buffer must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:buffer must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetDeviceMemoryCommitment.txt b/doc/specs/vulkan/validity/protos/vkGetDeviceMemoryCommitment.txt new file mode 100644 index 00000000..42aea297 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetDeviceMemoryCommitment.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:memory must: be a valid sname:VkDeviceMemory handle +* pname:pCommittedMemoryInBytes must: be a pointer to a basetype:VkDeviceSize value +* pname:memory must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:memory must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* pname:memory must: have been created with a memory type that reports ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetDeviceProcAddr.txt b/doc/specs/vulkan/validity/protos/vkGetDeviceProcAddr.txt new file mode 100644 index 00000000..497e2081 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetDeviceProcAddr.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pName must: be a null-terminated string +* pname:pName must: be the name of a supported command that has a first parameter of type sname:VkDevice, sname:VkQueue or sname:VkCommandBuffer, either in the core API or an enabled extension +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetDeviceQueue.txt b/doc/specs/vulkan/validity/protos/vkGetDeviceQueue.txt new file mode 100644 index 00000000..61022584 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetDeviceQueue.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pQueue must: be a pointer to a sname:VkQueue handle +* pname:queueFamilyIndex must: be one of the queue family indexes specified when pname:device was created, via the sname:VkDeviceQueueCreateInfo structure +* pname:queueIndex must: be less than the number of queues created for the specified queue family index when pname:device was created, via the pname:queueCount member of the sname:VkDeviceQueueCreateInfo structure +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetEventStatus.txt b/doc/specs/vulkan/validity/protos/vkGetEventStatus.txt new file mode 100644 index 00000000..f464c9b4 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetEventStatus.txt @@ -0,0 +1,46 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:event must: be a valid sname:VkEvent handle +* pname:event must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:event must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_EVENT_SET +* ename:VK_EVENT_RESET +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +* ename:VK_ERROR_DEVICE_LOST +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetFenceStatus.txt b/doc/specs/vulkan/validity/protos/vkGetFenceStatus.txt new file mode 100644 index 00000000..be8d1d2c --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetFenceStatus.txt @@ -0,0 +1,46 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:fence must: be a valid sname:VkFence handle +* pname:fence must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:fence must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +* ename:VK_NOT_READY +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +* ename:VK_ERROR_DEVICE_LOST +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetImageMemoryRequirements.txt b/doc/specs/vulkan/validity/protos/vkGetImageMemoryRequirements.txt new file mode 100644 index 00000000..fed02ff5 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetImageMemoryRequirements.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:image must: be a valid sname:VkImage handle +* pname:pMemoryRequirements must: be a pointer to a sname:VkMemoryRequirements structure +* pname:image must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:image must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetImageSparseMemoryRequirements.txt b/doc/specs/vulkan/validity/protos/vkGetImageSparseMemoryRequirements.txt new file mode 100644 index 00000000..ed0430ad --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetImageSparseMemoryRequirements.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:image must: be a valid sname:VkImage handle +* pname:pSparseMemoryRequirementCount must: be a pointer to a basetype:uint32_t value +* If pname:pSparseMemoryRequirements is not `NULL`, pname:pSparseMemoryRequirements must: be a pointer to an array of pname:pSparseMemoryRequirementCount sname:VkSparseImageMemoryRequirements structures +* If pname:pSparseMemoryRequirements is not `NULL`, the value referenced by pname:pSparseMemoryRequirementCount must: be greater than `0` +* pname:image must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:image must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* pname:image must: have been created with the ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetImageSubresourceLayout.txt b/doc/specs/vulkan/validity/protos/vkGetImageSubresourceLayout.txt new file mode 100644 index 00000000..48415402 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetImageSubresourceLayout.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:image must: be a valid sname:VkImage handle +* pname:pSubresource must: be a pointer to a valid sname:VkImageSubresource structure +* pname:pLayout must: be a pointer to a sname:VkSubresourceLayout structure +* pname:image must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:image must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* pname:image must: have been created with pname:tiling equal to ename:VK_IMAGE_TILING_LINEAR +* The pname:aspectMask member of pname:pSubresource must: only have a single bit set +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetInstanceProcAddr.txt b/doc/specs/vulkan/validity/protos/vkGetInstanceProcAddr.txt new file mode 100644 index 00000000..807df7d4 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetInstanceProcAddr.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* If pname:instance is not `NULL`, pname:instance must: be a valid sname:VkInstance handle +* pname:pName must: be a null-terminated string +* If pname:instance is `NULL`, pname:pName must: be one of: fname:vkEnumerateInstanceExtensionProperties, fname:vkEnumerateInstanceLayerProperties or fname:vkCreateInstance +* If pname:instance is not `NULL`, pname:pName must: be the name of a core command or a command from an enabled extension, other than: fname:vkEnumerateInstanceExtensionProperties, fname:vkEnumerateInstanceLayerProperties or fname:vkCreateInstance +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceFeatures.txt b/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceFeatures.txt new file mode 100644 index 00000000..ef7b3612 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceFeatures.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:physicalDevice must: be a valid sname:VkPhysicalDevice handle +* pname:pFeatures must: be a pointer to a sname:VkPhysicalDeviceFeatures structure +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceFormatProperties.txt b/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceFormatProperties.txt new file mode 100644 index 00000000..f6c05274 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceFormatProperties.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:physicalDevice must: be a valid sname:VkPhysicalDevice handle +* pname:format must: be a valid elink:VkFormat value +* pname:pFormatProperties must: be a pointer to a sname:VkFormatProperties structure +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceImageFormatProperties.txt b/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceImageFormatProperties.txt new file mode 100644 index 00000000..3ed21ba7 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceImageFormatProperties.txt @@ -0,0 +1,49 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:physicalDevice must: be a valid sname:VkPhysicalDevice handle +* pname:format must: be a valid elink:VkFormat value +* pname:type must: be a valid elink:VkImageType value +* pname:tiling must: be a valid elink:VkImageTiling value +* pname:usage must: be a valid combination of elink:VkImageUsageFlagBits values +* pname:usage mustnot: be `0` +* pname:flags must: be a valid combination of elink:VkImageCreateFlagBits values +* pname:pImageFormatProperties must: be a pointer to a sname:VkImageFormatProperties structure +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +* ename:VK_ERROR_FORMAT_NOT_SUPPORTED +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceMemoryProperties.txt b/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceMemoryProperties.txt new file mode 100644 index 00000000..221316c7 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceMemoryProperties.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:physicalDevice must: be a valid sname:VkPhysicalDevice handle +* pname:pMemoryProperties must: be a pointer to a sname:VkPhysicalDeviceMemoryProperties structure +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceProperties.txt b/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceProperties.txt new file mode 100644 index 00000000..ee6a7f86 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceProperties.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:physicalDevice must: be a valid sname:VkPhysicalDevice handle +* pname:pProperties must: be a pointer to a sname:VkPhysicalDeviceProperties structure +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceQueueFamilyProperties.txt b/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceQueueFamilyProperties.txt new file mode 100644 index 00000000..f8615dda --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceQueueFamilyProperties.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:physicalDevice must: be a valid sname:VkPhysicalDevice handle +* pname:pQueueFamilyPropertyCount must: be a pointer to a basetype:uint32_t value +* If the value referenced by pname:pQueueFamilyPropertyCount is not `0`, and pname:pQueueFamilyProperties is not `NULL`, pname:pQueueFamilyProperties must: be a pointer to an array of pname:pQueueFamilyPropertyCount sname:VkQueueFamilyProperties structures +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceSparseImageFormatProperties.txt b/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceSparseImageFormatProperties.txt new file mode 100644 index 00000000..d146439e --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetPhysicalDeviceSparseImageFormatProperties.txt @@ -0,0 +1,27 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:physicalDevice must: be a valid sname:VkPhysicalDevice handle +* pname:format must: be a valid elink:VkFormat value +* pname:type must: be a valid elink:VkImageType value +* pname:samples must: be a valid elink:VkSampleCountFlagBits value +* pname:usage must: be a valid combination of elink:VkImageUsageFlagBits values +* pname:usage mustnot: be `0` +* pname:tiling must: be a valid elink:VkImageTiling value +* pname:pPropertyCount must: be a pointer to a basetype:uint32_t value +* If the value referenced by pname:pPropertyCount is not `0`, and pname:pProperties is not `NULL`, pname:pProperties must: be a pointer to an array of pname:pPropertyCount sname:VkSparseImageFormatProperties structures +* If pname:format is an integer format, samples must: be one of the bit flag values specified in the value of sname:VkPhysicalDeviceLimits::pname:sampledImageIntegerSampleCounts +* If pname:format is a non-integer color format, samples must: be one of the bit flag values specified in the value of sname:VkPhysicalDeviceLimits::pname:sampledImageColorSampleCounts +* If pname:format is a depth format, samples must: be one of the bit flag values specified in the value of sname:VkPhysicalDeviceLimits::pname:sampledImageDepthSampleCounts +* If pname:format is a stencil format, samples must: be one of the bit flag values specified in the value of sname:VkPhysicalDeviceLimits::pname:sampledImageStencilSampleCounts +* If pname:usage includes ename:VK_IMAGE_USAGE_STORAGE_BIT, samples must: be one of the bit flag values specified in the value of sname:VkPhysicalDeviceLimits::pname:storageImageSampleCounts +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetPipelineCacheData.txt b/doc/specs/vulkan/validity/protos/vkGetPipelineCacheData.txt new file mode 100644 index 00000000..de0963af --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetPipelineCacheData.txt @@ -0,0 +1,46 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pipelineCache must: be a valid sname:VkPipelineCache handle +* pname:pDataSize must: be a pointer to a basetype:size_t value +* If the value referenced by pname:pDataSize is not `0`, and pname:pData is not `NULL`, pname:pData must: be a pointer to an array of pname:pDataSize bytes +* pname:pipelineCache must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:pipelineCache must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetQueryPoolResults.txt b/doc/specs/vulkan/validity/protos/vkGetQueryPoolResults.txt new file mode 100644 index 00000000..746a25bf --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetQueryPoolResults.txt @@ -0,0 +1,55 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:queryPool must: be a valid sname:VkQueryPool handle +* pname:pData must: be a pointer to an array of pname:dataSize bytes +* pname:flags must: be a valid combination of elink:VkQueryResultFlagBits values +* The value of pname:dataSize must: be greater than `0` +* pname:queryPool must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:queryPool must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* pname:firstQuery must: be less than the number of queries in pname:queryPool +* If ename:VK_QUERY_RESULT_64_BIT is not set in pname:flags then pname:pData and pname:stride must be multiples of `4` +* If ename:VK_QUERY_RESULT_64_BIT is set in pname:flags then pname:pData and pname:stride must be multiples of `8` +* The sum of pname:firstQuery and pname:queryCount must: be less than or equal to the number of queries in pname:queryPool +* pname:dataSize must: be large enough to contain the result of each query, as described <> +* If the pname:queryType used to create pname:queryPool was ename:VK_QUERY_TYPE_TIMESTAMP, pname:flags mustnot: contain ename:VK_QUERY_RESULT_PARTIAL_BIT +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +* ename:VK_NOT_READY +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +* ename:VK_ERROR_DEVICE_LOST +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkGetRenderAreaGranularity.txt b/doc/specs/vulkan/validity/protos/vkGetRenderAreaGranularity.txt new file mode 100644 index 00000000..3eec9e39 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkGetRenderAreaGranularity.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:renderPass must: be a valid sname:VkRenderPass handle +* pname:pGranularity must: be a pointer to a sname:VkExtent2D structure +* pname:renderPass must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:renderPass must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkInvalidateMappedMemoryRanges.txt b/doc/specs/vulkan/validity/protos/vkInvalidateMappedMemoryRanges.txt new file mode 100644 index 00000000..6bb11e95 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkInvalidateMappedMemoryRanges.txt @@ -0,0 +1,44 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pMemoryRanges must: be a pointer to an array of pname:memoryRangeCount valid sname:VkMappedMemoryRange structures +* The value of pname:memoryRangeCount must: be greater than `0` +* The memory ranges specified by pname:pMemoryRanges must: all currently be mapped +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkMapMemory.txt b/doc/specs/vulkan/validity/protos/vkMapMemory.txt new file mode 100644 index 00000000..974e4304 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkMapMemory.txt @@ -0,0 +1,64 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:memory must: be a valid sname:VkDeviceMemory handle +* pname:flags must: be `0` +* pname:ppData must: be a pointer to a pointer +* pname:memory must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:memory must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* pname:memory mustnot: currently be mapped +* pname:offset must: be less than the size of pname:memory +* If pname:size is not equal to ename:VK_WHOLE_SIZE, the sum of pname:offset and pname:size must: be less than or equal to the pname:size of the pname:memory +* pname:memory must: have been created with a memory type that reports ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:memory must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +* ename:VK_ERROR_MEMORY_MAP_FAILED +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkMergePipelineCaches.txt b/doc/specs/vulkan/validity/protos/vkMergePipelineCaches.txt new file mode 100644 index 00000000..a5408321 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkMergePipelineCaches.txt @@ -0,0 +1,61 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:dstCache must: be a valid sname:VkPipelineCache handle +* pname:pSrcCaches must: be a pointer to an array of pname:srcCacheCount valid sname:VkPipelineCache handles +* The value of pname:srcCacheCount must: be greater than `0` +* pname:dstCache must: have been created, allocated or retrieved from pname:device +* Each element of pname:pSrcCaches must: have been created, allocated or retrieved from pname:device +* Each of pname:device, pname:dstCache and the elements of pname:pSrcCaches must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* pname:dstCache mustnot: appear in the list of source caches +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:dstCache must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkQueueBindSparse.txt b/doc/specs/vulkan/validity/protos/vkQueueBindSparse.txt new file mode 100644 index 00000000..6f820ecf --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkQueueBindSparse.txt @@ -0,0 +1,83 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:queue must: be a valid sname:VkQueue handle +* If pname:bindInfoCount is not `0`, pname:pBindInfo must: be a pointer to an array of pname:bindInfoCount valid sname:VkBindSparseInfo structures +* If pname:fence is not sname:VK_NULL_HANDLE, pname:fence must: be a valid sname:VkFence handle +* The pname:queue must: support sparse binding operations +* Each of pname:queue and pname:fence that are valid handles must: have been created, allocated or retrieved from the same sname:VkDevice +* pname:fence must: be unsignalled +* pname:fence mustnot: be associated with any other queue command that has not yet completed execution on that queue +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:queue must: be externally synchronized +* Host access to pname:pBindInfo[].pWaitSemaphores[] must: be externally synchronized +* Host access to pname:pBindInfo[].pSignalSemaphores[] must: be externally synchronized +* Host access to pname:pBindInfo[].pBufferBinds[].buffer must: be externally synchronized +* Host access to pname:pBindInfo[].pImageOpaqueBinds[].image must: be externally synchronized +* Host access to pname:pBindInfo[].pImageBinds[].image must: be externally synchronized +* Host access to pname:fence must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|-|-|SPARSE_BINDING +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkQueueSubmit.txt b/doc/specs/vulkan/validity/protos/vkQueueSubmit.txt new file mode 100644 index 00000000..cae39038 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkQueueSubmit.txt @@ -0,0 +1,80 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:queue must: be a valid sname:VkQueue handle +* If pname:submitCount is not `0`, pname:pSubmits must: be a pointer to an array of pname:submitCount valid sname:VkSubmitInfo structures +* If pname:fence is not sname:VK_NULL_HANDLE, pname:fence must: be a valid sname:VkFence handle +* Each of pname:queue and pname:fence that are valid handles must: have been created, allocated or retrieved from the same sname:VkDevice +* pname:fence must: be unsignalled +* pname:fence mustnot: be associated with any other queue command that has not yet completed execution on that queue +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:queue must: be externally synchronized +* Host access to pname:pSubmits[].pWaitSemaphores[] must: be externally synchronized +* Host access to pname:pSubmits[].pSignalSemaphores[] must: be externally synchronized +* Host access to pname:fence must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|-|-|Any +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +* ename:VK_ERROR_DEVICE_LOST +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkQueueWaitIdle.txt b/doc/specs/vulkan/validity/protos/vkQueueWaitIdle.txt new file mode 100644 index 00000000..5d0d5452 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkQueueWaitIdle.txt @@ -0,0 +1,59 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:queue must: be a valid sname:VkQueue handle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Command Properties +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Command Properties +------------------ +endif::doctype-manpage[] +[options="header", width="100%"] +|===================== +|Command Buffer Levels|Render Pass Scope|Supported Queue Types +|-|-|Any +|===================== +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +* ename:VK_ERROR_DEVICE_LOST +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkResetCommandBuffer.txt b/doc/specs/vulkan/validity/protos/vkResetCommandBuffer.txt new file mode 100644 index 00000000..b1757338 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkResetCommandBuffer.txt @@ -0,0 +1,57 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:commandBuffer must: be a valid sname:VkCommandBuffer handle +* pname:flags must: be a valid combination of elink:VkCommandBufferResetFlagBits values +* pname:commandBuffer mustnot: currently be pending execution +* pname:commandBuffer must: have been allocated from a pool that was created with the ename:VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandBuffer must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkResetCommandPool.txt b/doc/specs/vulkan/validity/protos/vkResetCommandPool.txt new file mode 100644 index 00000000..e24fea06 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkResetCommandPool.txt @@ -0,0 +1,59 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:commandPool must: be a valid sname:VkCommandPool handle +* pname:flags must: be a valid combination of elink:VkCommandPoolResetFlagBits values +* pname:commandPool must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:commandPool must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* All sname:VkCommandBuffer objects allocated from pname:commandPool mustnot: currently be pending execution +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:commandPool must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkResetDescriptorPool.txt b/doc/specs/vulkan/validity/protos/vkResetDescriptorPool.txt new file mode 100644 index 00000000..2a153ee6 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkResetDescriptorPool.txt @@ -0,0 +1,60 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:descriptorPool must: be a valid sname:VkDescriptorPool handle +* pname:flags must: be `0` +* pname:descriptorPool must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:descriptorPool must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* All uses of pname:descriptorPool (via any allocated descriptor sets) must: have completed execution +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:descriptorPool must: be externally synchronized +* Host access to any sname:VkDescriptorSet objects allocated from pname:descriptorPool must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkResetEvent.txt b/doc/specs/vulkan/validity/protos/vkResetEvent.txt new file mode 100644 index 00000000..856449b4 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkResetEvent.txt @@ -0,0 +1,57 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:event must: be a valid sname:VkEvent handle +* pname:event must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:event must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:event must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkResetFences.txt b/doc/specs/vulkan/validity/protos/vkResetFences.txt new file mode 100644 index 00000000..fd8e9547 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkResetFences.txt @@ -0,0 +1,59 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pFences must: be a pointer to an array of pname:fenceCount valid sname:VkFence handles +* The value of pname:fenceCount must: be greater than `0` +* Each element of pname:pFences must: have been created, allocated or retrieved from pname:device +* Each of pname:device and the elements of pname:pFences must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* Any given element of pname:pFences mustnot: currently be associated with any queue command that has not yet completed execution on that queue +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to each member of pname:pFences must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkSetEvent.txt b/doc/specs/vulkan/validity/protos/vkSetEvent.txt new file mode 100644 index 00000000..856449b4 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkSetEvent.txt @@ -0,0 +1,57 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:event must: be a valid sname:VkEvent handle +* pname:event must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:event must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:event must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkUnmapMemory.txt b/doc/specs/vulkan/validity/protos/vkUnmapMemory.txt new file mode 100644 index 00000000..eb154c5b --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkUnmapMemory.txt @@ -0,0 +1,31 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:memory must: be a valid sname:VkDeviceMemory handle +* pname:memory must: have been created, allocated or retrieved from pname:device +* Each of pname:device and pname:memory must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +* pname:memory must: currently be mapped +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:memory must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkUpdateDescriptorSets.txt b/doc/specs/vulkan/validity/protos/vkUpdateDescriptorSets.txt new file mode 100644 index 00000000..59a5f3e0 --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkUpdateDescriptorSets.txt @@ -0,0 +1,30 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* If pname:descriptorWriteCount is not `0`, pname:pDescriptorWrites must: be a pointer to an array of pname:descriptorWriteCount valid sname:VkWriteDescriptorSet structures +* If pname:descriptorCopyCount is not `0`, pname:pDescriptorCopies must: be a pointer to an array of pname:descriptorCopyCount valid sname:VkCopyDescriptorSet structures +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Host Synchronization +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Host Synchronization +-------------------- +endif::doctype-manpage[] +* Host access to pname:pDescriptorWrites[].dstSet must: be externally synchronized +* Host access to pname:pDescriptorCopies[].dstSet must: be externally synchronized +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/protos/vkWaitForFences.txt b/doc/specs/vulkan/validity/protos/vkWaitForFences.txt new file mode 100644 index 00000000..03e9ddaa --- /dev/null +++ b/doc/specs/vulkan/validity/protos/vkWaitForFences.txt @@ -0,0 +1,47 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:device must: be a valid sname:VkDevice handle +* pname:pFences must: be a pointer to an array of pname:fenceCount valid sname:VkFence handles +* The value of pname:fenceCount must: be greater than `0` +* Each element of pname:pFences must: have been created, allocated or retrieved from pname:device +* Each of pname:device and the elements of pname:pFences must: have been created, allocated or retrieved from the same sname:VkPhysicalDevice +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + +ifndef::doctype-manpage[] +.Return Codes +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Return Codes +------------ +endif::doctype-manpage[] +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On success, this command returns:: +endif::doctype-manpage[] +* ename:VK_SUCCESS +* ename:VK_TIMEOUT +ifndef::doctype-manpage[] +<>:: +endif::doctype-manpage[] +ifdef::doctype-manpage[] +On failure, this command returns:: +endif::doctype-manpage[] +* ename:VK_ERROR_OUT_OF_HOST_MEMORY +* ename:VK_ERROR_OUT_OF_DEVICE_MEMORY +* ename:VK_ERROR_DEVICE_LOST +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkAllocationCallbacks.txt b/doc/specs/vulkan/validity/structs/VkAllocationCallbacks.txt new file mode 100644 index 00000000..7e093294 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkAllocationCallbacks.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:pfnAllocation must: be a pointer to a valid user-defined PFN_vkAllocationFunction +* pname:pfnReallocation must: be a pointer to a valid user-defined PFN_vkReallocationFunction +* pname:pfnFree must: be a pointer to a valid user-defined PFN_vkFreeFunction +* If either of pname:pfnInternalAllocatione or pname:pfnInternalFree is not `NULL`, both must: be valid callbacks +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkApplicationInfo.txt b/doc/specs/vulkan/validity/structs/VkApplicationInfo.txt new file mode 100644 index 00000000..d43b2ffb --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkApplicationInfo.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_APPLICATION_INFO +* pname:pNext must: be `NULL` +* If pname:pApplicationName is not `NULL`, pname:pApplicationName must: be a null-terminated string +* If pname:pEngineName is not `NULL`, pname:pEngineName must: be a null-terminated string +* pname:apiVersion must: be zero, or otherwise it must: be a version that the implementation supports, or supports an effective substitute for +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkAttachmentDescription.txt b/doc/specs/vulkan/validity/structs/VkAttachmentDescription.txt new file mode 100644 index 00000000..2e41a238 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkAttachmentDescription.txt @@ -0,0 +1,22 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:flags must: be a valid combination of elink:VkAttachmentDescriptionFlagBits values +* pname:format must: be a valid elink:VkFormat value +* pname:samples must: be a valid elink:VkSampleCountFlagBits value +* pname:loadOp must: be a valid elink:VkAttachmentLoadOp value +* pname:storeOp must: be a valid elink:VkAttachmentStoreOp value +* pname:stencilLoadOp must: be a valid elink:VkAttachmentLoadOp value +* pname:stencilStoreOp must: be a valid elink:VkAttachmentStoreOp value +* pname:initialLayout must: be a valid elink:VkImageLayout value +* pname:finalLayout must: be a valid elink:VkImageLayout value +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkAttachmentReference.txt b/doc/specs/vulkan/validity/structs/VkAttachmentReference.txt new file mode 100644 index 00000000..d88a249c --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkAttachmentReference.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:layout must: be a valid elink:VkImageLayout value +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkBindSparseInfo.txt b/doc/specs/vulkan/validity/structs/VkBindSparseInfo.txt new file mode 100644 index 00000000..d04e2bca --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkBindSparseInfo.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_BIND_SPARSE_INFO +* pname:pNext must: be `NULL` +* If pname:waitSemaphoreCount is not `0`, pname:pWaitSemaphores must: be a pointer to an array of pname:waitSemaphoreCount valid sname:VkSemaphore handles +* If pname:bufferBindCount is not `0`, pname:pBufferBinds must: be a pointer to an array of pname:bufferBindCount valid sname:VkSparseBufferMemoryBindInfo structures +* If pname:imageOpaqueBindCount is not `0`, pname:pImageOpaqueBinds must: be a pointer to an array of pname:imageOpaqueBindCount valid sname:VkSparseImageOpaqueMemoryBindInfo structures +* If pname:imageBindCount is not `0`, pname:pImageBinds must: be a pointer to an array of pname:imageBindCount valid sname:VkSparseImageMemoryBindInfo structures +* If pname:signalSemaphoreCount is not `0`, pname:pSignalSemaphores must: be a pointer to an array of pname:signalSemaphoreCount valid sname:VkSemaphore handles +* Each of the elements of pname:pWaitSemaphores and the elements of pname:pSignalSemaphores that are valid handles must: have been created, allocated or retrieved from the same sname:VkDevice +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkBufferCopy.txt b/doc/specs/vulkan/validity/structs/VkBufferCopy.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkBufferCopy.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkBufferCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkBufferCreateInfo.txt new file mode 100644 index 00000000..191ac1fc --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkBufferCreateInfo.txt @@ -0,0 +1,26 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be a valid combination of elink:VkBufferCreateFlagBits values +* pname:usage must: be a valid combination of elink:VkBufferUsageFlagBits values +* pname:usage mustnot: be `0` +* pname:sharingMode must: be a valid elink:VkSharingMode value +* The value of pname:size must: be greater than `0` +* If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, pname:pQueueFamilyIndices must: be a pointer to an array of pname:queueFamilyIndexCount basetype:uint32_t values +* If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, pname:queueFamilyIndexCount must: be greater than `1` +* If the <> feature is not enabled, pname:flags mustnot: contain ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT +* If the <> feature is not enabled, pname:flags mustnot: contain ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT +* If the <> feature is not enabled, pname:flags mustnot: contain ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT +* If pname:flags contains ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT, it must: also contain at least one of ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT or ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkBufferImageCopy.txt b/doc/specs/vulkan/validity/structs/VkBufferImageCopy.txt new file mode 100644 index 00000000..7c63a096 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkBufferImageCopy.txt @@ -0,0 +1,31 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:imageSubresource must: be a valid sname:VkImageSubresourceLayers structure +* pname:bufferOffset must: be a multiple of the calling command's sname:VkImage parameter's texel size +* pname:bufferOffset must: be a multiple of `4` +* pname:bufferRowLength must: be `0`, or greater than or equal to the pname:width member of pname:imageExtent +* pname:bufferImageHeight must: be `0`, or greater than or equal to the pname:height member of pname:imageExtent +* pname:imageOffset.x and (pname:imageExtent.width + pname:imageOffset.x) must: both be greater than or equal to `0` and less than or equal to the image subresource width +* pname:imageOffset.y and (imageExtent.height + pname:imageOffset.y) must: both be greater than or equal to `0` and less than or equal to the image subresource height +* pname:imageOffset.z and (imageExtent.depth + pname:imageOffset.z) must: both be greater than or equal to `0` and less than or equal to the image subresource depth +* If the calling command's sname:VkImage parameter is a compressed format image: +* pname:bufferRowLength, pname:bufferImageHeight and all members of pname:imageOffset must: be a multiple of the block size in the relevant dimensions +* pname:bufferOffset must: be a multiple of the block size in bytes +* pname:imageExtent.width must: be a multiple of the block width or (pname:imageExtent.width + pname:imageOffset.x) must: equal the image subresource width +* pname:imageExtent.height must: be a multiple of the block height or (pname:imageExtent.height + pname:imageOffset.y) must: equal the image subresource height +* pname:imageExtent.depth must: be a multiple of the block depth or (pname:imageExtent.depth + pname:imageOffset.z) must: equal the image subresource depth +* pname:bufferOffset, pname:bufferRowLength, pname:bufferImageHeight and all members of pname:imageOffset and pname:imageExtent must: respect the image transfer granularity requirements of the queue family that it will be submitted against, as described in <> +* The pname:aspectMask member of pname:srcSubresource must: specify aspects present in the calling command's sname:VkImage parameter +* The pname:aspectMask member of pname:pSubresource must: only have a single bit set +* If the calling command's sname:VkImage parameter is of elink:VkImageType ename:VK_IMAGE_TYPE_3D, the pname:baseArrayLayer and pname:layerCount members of both pname:srcSubresource and pname:dstSubresource must: be `0` and `1`, respectively +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkBufferMemoryBarrier.txt b/doc/specs/vulkan/validity/structs/VkBufferMemoryBarrier.txt new file mode 100644 index 00000000..6cb292ad --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkBufferMemoryBarrier.txt @@ -0,0 +1,23 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER +* pname:pNext must: be `NULL` +* pname:srcAccessMask must: be a valid combination of elink:VkAccessFlagBits values +* pname:dstAccessMask must: be a valid combination of elink:VkAccessFlagBits values +* pname:buffer must: be a valid sname:VkBuffer handle +* The value of pname:offset must: be less than the size of pname:buffer +* The sum of pname:offset and pname:size must: be less than or equal to than the size of pname:buffer +* If pname:buffer was created with a sharing mode of ename:VK_SHARING_MODE_CONCURRENT, pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex must: both be VK_QUEUE_FAMILY_IGNORED +* If pname:buffer was created with a sharing mode of ename:VK_SHARING_MODE_EXCLUSIVE, pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex must: either both be VK_QUEUE_FAMILY_IGNORED, or both be a valid queue family (see <>) +* If pname:buffer was created with a sharing mode of ename:VK_SHARING_MODE_EXCLUSIVE, and pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex are valid queue families, at least one of them must: be the same as the family of the queue that will execute this barrier +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkBufferViewCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkBufferViewCreateInfo.txt new file mode 100644 index 00000000..999a36de --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkBufferViewCreateInfo.txt @@ -0,0 +1,26 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* pname:buffer must: be a valid sname:VkBuffer handle +* pname:format must: be a valid elink:VkFormat value +* The value of pname:offset must: be a multiple of sname:VkPhysicalDeviceLimits::pname:minTexelBufferOffsetAlignment +* The value of pname:range must: be greater than `0` +* If pname:range is not equal to ename:VK_WHOLE_SIZE, the sum of pname:offset and pname:range must: be less than or equal to the size of pname:buffer +* If pname:range is not equal to ename:VK_WHOLE_SIZE, the value of pname:range must: be a multiple of the element size of pname:format +* The value of pname:range, divided by the size of an element of pname:format, must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxTexelBufferElements +* pname:buffer must: have been created with a pname:usage value containing at least one of ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT +* If pname:buffer was created with pname:usage containing ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, pname:format must: be supported for uniform texel buffers, as specified by the ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT flag in sname:VkFormatProperties::pname:bufferFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +* If pname:buffer was created with pname:usage containing ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, pname:format must: be supported for storage texel buffers, as specified by the ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT flag in sname:VkFormatProperties::pname:bufferFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkClearAttachment.txt b/doc/specs/vulkan/validity/structs/VkClearAttachment.txt new file mode 100644 index 00000000..c9f422a3 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkClearAttachment.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:aspectMask must: be a valid combination of elink:VkImageAspectFlagBits values +* pname:aspectMask mustnot: be `0` +* If pname:aspectMask includes ename:VK_IMAGE_ASPECT_COLOR_BIT, it mustnot: include ename:VK_IMAGE_ASPECT_DEPTH_BIT or ename:VK_IMAGE_ASPECT_STENCIL_BIT +* pname:aspectMask mustnot: include ename:VK_IMAGE_ASPECT_METADATA_BIT +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkClearColorValue.txt b/doc/specs/vulkan/validity/structs/VkClearColorValue.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkClearColorValue.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkClearDepthStencilValue.txt b/doc/specs/vulkan/validity/structs/VkClearDepthStencilValue.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkClearDepthStencilValue.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkClearRect.txt b/doc/specs/vulkan/validity/structs/VkClearRect.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkClearRect.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkClearValue.txt b/doc/specs/vulkan/validity/structs/VkClearValue.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkClearValue.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkCommandBufferAllocateInfo.txt b/doc/specs/vulkan/validity/structs/VkCommandBufferAllocateInfo.txt new file mode 100644 index 00000000..52e9338d --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkCommandBufferAllocateInfo.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO +* pname:pNext must: be `NULL` +* pname:commandPool must: be a valid sname:VkCommandPool handle +* pname:level must: be a valid elink:VkCommandBufferLevel value +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkCommandBufferBeginInfo.txt b/doc/specs/vulkan/validity/structs/VkCommandBufferBeginInfo.txt new file mode 100644 index 00000000..57a074d5 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkCommandBufferBeginInfo.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be a valid combination of elink:VkCommandBufferUsageFlagBits values +* If pname:flags contains ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the pname:renderPass member of pname:pInheritanceInfo must: be a valid sname:VkRenderPass +* If pname:flags contains ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the pname:subpass member of pname:pInheritanceInfo must: be a valid subpass index within the pname:renderPass member of pname:pInheritanceInfo +* If pname:flags contains ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the pname:framebuffer member of pname:pInheritanceInfo must: be either sname:VK_NULL_HANDLE, or a valid sname:VkFramebuffer that is compatible with the pname:renderPass member of pname:pInheritanceInfo +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkCommandBufferInheritanceInfo.txt b/doc/specs/vulkan/validity/structs/VkCommandBufferInheritanceInfo.txt new file mode 100644 index 00000000..3c70da6a --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkCommandBufferInheritanceInfo.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO +* pname:pNext must: be `NULL` +* Each of pname:renderPass and pname:framebuffer that are valid handles must: have been created, allocated or retrieved from the same sname:VkDevice +* If the <> feature is not enabled, pname:occlusionQueryEnable must: be ename:VK_FALSE +* If the <> feature is enabled, pname:queryFlags must: be a valid combination of elink:VkQueryControlFlagBits values +* If the <> feature is not enabled, pname:pipelineStatistics must: be code:0 +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkCommandPoolCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkCommandPoolCreateInfo.txt new file mode 100644 index 00000000..597982dd --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkCommandPoolCreateInfo.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be a valid combination of elink:VkCommandPoolCreateFlagBits values +* pname:queueFamilyIndex must: be the index of a queue family available in the calling command's pname:device parameter +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkComponentMapping.txt b/doc/specs/vulkan/validity/structs/VkComponentMapping.txt new file mode 100644 index 00000000..be86560f --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkComponentMapping.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:r must: be a valid elink:VkComponentSwizzle value +* pname:g must: be a valid elink:VkComponentSwizzle value +* pname:b must: be a valid elink:VkComponentSwizzle value +* pname:a must: be a valid elink:VkComponentSwizzle value +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkComputePipelineCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkComputePipelineCreateInfo.txt new file mode 100644 index 00000000..285d8962 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkComputePipelineCreateInfo.txt @@ -0,0 +1,27 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be a valid combination of elink:VkPipelineCreateFlagBits values +* pname:stage must: be a valid sname:VkPipelineShaderStageCreateInfo structure +* pname:layout must: be a valid sname:VkPipelineLayout handle +* Each of pname:layout and pname:basePipelineHandle that are valid handles must: have been created, allocated or retrieved from the same sname:VkDevice +* If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineIndex is not `-1`, pname:basePipelineHandle must: be sname:VK_NULL_HANDLE +* If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineIndex is not `-1`, it must: be a valid index into the calling command's pname:pCreateInfos parameter +* If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, pname:basePipelineIndex must: be `-1` +* If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, pname:basePipelineHandle must: be a valid sname:VkPipeline handle +* If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, it must: be a valid handle to a compute sname:VkPipeline +* The pname:stage member of pname:stage must: be ename:VK_SHADER_STAGE_COMPUTE_BIT +* The shader code for the entry point identified by pname:stage and the rest of the state identified by this structure must: adhere to the pipeline linking rules described in the <> chapter +* pname:layout must: be <> with all shaders specified in pname:pStages +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkCopyDescriptorSet.txt b/doc/specs/vulkan/validity/structs/VkCopyDescriptorSet.txt new file mode 100644 index 00000000..986bb0a0 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkCopyDescriptorSet.txt @@ -0,0 +1,22 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET +* pname:pNext must: be `NULL` +* pname:srcSet must: be a valid sname:VkDescriptorSet handle +* pname:dstSet must: be a valid sname:VkDescriptorSet handle +* Each of pname:srcSet and pname:dstSet must: have been created, allocated or retrieved from the same sname:VkDevice +* pname:srcBinding must: be a valid binding within pname:srcSet +* The sum of pname:srcArrayElement and pname:descriptorCount must: be less than or equal to the number of array elements in the descriptor set binding specified by pname:srcBinding, and all applicable consecutive bindings, as described by <> +* pname:dstBinding must: be a valid binding within pname:dstSet +* The sum of pname:dstArrayElement and pname:descriptorCount must: be less than or equal to the number of array elements in the descriptor set binding specified by pname:dstBinding, and all applicable consecutive bindings, as described by <> +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkDescriptorBufferInfo.txt b/doc/specs/vulkan/validity/structs/VkDescriptorBufferInfo.txt new file mode 100644 index 00000000..e2c37da1 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkDescriptorBufferInfo.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:buffer must: be a valid sname:VkBuffer handle +* If pname:range is not equal to ename:VK_WHOLE_SIZE, the sum of pname:offset and pname:range must: be less than or equal to the size of pname:buffer +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkDescriptorImageInfo.txt b/doc/specs/vulkan/validity/structs/VkDescriptorImageInfo.txt new file mode 100644 index 00000000..1127f330 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkDescriptorImageInfo.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* Each of pname:sampler and pname:imageView that are valid handles must: have been created, allocated or retrieved from the same sname:VkDevice +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkDescriptorPoolCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkDescriptorPoolCreateInfo.txt new file mode 100644 index 00000000..a5582c85 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkDescriptorPoolCreateInfo.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be a valid combination of elink:VkDescriptorPoolCreateFlagBits values +* pname:pPoolSizes must: be a pointer to an array of pname:poolSizeCount valid sname:VkDescriptorPoolSize structures +* The value of pname:poolSizeCount must: be greater than `0` +* The value of pname:maxSets must: be greater than `0` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkDescriptorPoolSize.txt b/doc/specs/vulkan/validity/structs/VkDescriptorPoolSize.txt new file mode 100644 index 00000000..df195298 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkDescriptorPoolSize.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:type must: be a valid elink:VkDescriptorType value +* The value of pname:descriptorCount must: be greater than `0` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkDescriptorSetAllocateInfo.txt b/doc/specs/vulkan/validity/structs/VkDescriptorSetAllocateInfo.txt new file mode 100644 index 00000000..eb5ab663 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkDescriptorSetAllocateInfo.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO +* pname:pNext must: be `NULL` +* pname:descriptorPool must: be a valid sname:VkDescriptorPool handle +* pname:pSetLayouts must: be a pointer to an array of pname:descriptorSetCount valid sname:VkDescriptorSetLayout handles +* The value of pname:descriptorSetCount must: be greater than `0` +* Each of pname:descriptorPool and the elements of pname:pSetLayouts must: have been created, allocated or retrieved from the same sname:VkDevice +* The value of pname:descriptorSetCount mustnot: be greater than the number of sets that are currently available for allocation in pname:descriptorPool +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkDescriptorSetLayoutBinding.txt b/doc/specs/vulkan/validity/structs/VkDescriptorSetLayoutBinding.txt new file mode 100644 index 00000000..0dbf46cb --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkDescriptorSetLayoutBinding.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:descriptorType must: be a valid elink:VkDescriptorType value +* If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLER or ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and pname:descriptorCount is not `0` and pname:pImmutableSamplers is not `NULL`, pname:pImmutableSamplers must: be a pointer to an array of pname:descriptorCount valid sname:VkSampler handles +* If pname:descriptorCount is not `0`, pname:stageFlags must: be a valid combination of elink:VkShaderStageFlagBits values +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkDescriptorSetLayoutCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkDescriptorSetLayoutCreateInfo.txt new file mode 100644 index 00000000..721e9fe9 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkDescriptorSetLayoutCreateInfo.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* If pname:bindingCount is not `0`, pname:pBindings must: be a pointer to an array of pname:bindingCount valid sname:VkDescriptorSetLayoutBinding structures +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkDeviceCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkDeviceCreateInfo.txt new file mode 100644 index 00000000..a3951dd1 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkDeviceCreateInfo.txt @@ -0,0 +1,25 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* pname:pQueueCreateInfos must: be a pointer to an array of pname:queueCreateInfoCount valid sname:VkDeviceQueueCreateInfo structures +* If pname:enabledLayerCount is not `0`, and pname:ppEnabledLayerNames is not `NULL`, pname:ppEnabledLayerNames must: be a pointer to an array of pname:enabledLayerCount null-terminated strings +* If pname:enabledExtensionCount is not `0`, and pname:ppEnabledExtensionNames is not `NULL`, pname:ppEnabledExtensionNames must: be a pointer to an array of pname:enabledExtensionCount null-terminated strings +* pname:pEnabledFeatures must: be a pointer to a valid sname:VkPhysicalDeviceFeatures structure +* The value of pname:queueCreateInfoCount must: be greater than `0` +* Any given element of pname:ppEnabledLayerNames must: be the name of a layer present on the system, exactly matching a string returned in the sname:VkLayerProperties structure by fname:vkEnumerateDeviceLayerProperties +* Any given element of pname:ppEnabledExtensionNames must: be the name of an extension present on the system, exactly matching a string returned in the sname:VkExtensionProperties structure by fname:vkEnumerateDeviceExtensionProperties +* If an extension listed in pname:ppEnabledExtensionNames is provided as part of a layer, then both the layer and extension must: be enabled to enable that extension +* The pname:queueFamilyIndex member of any given element of pname:pQueueCreateInfos must: be unique within pname:pQueueCreateInfos +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkDeviceQueueCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkDeviceQueueCreateInfo.txt new file mode 100644 index 00000000..391abb50 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkDeviceQueueCreateInfo.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* pname:pQueuePriorities must: be a pointer to an array of pname:queueCount basetype:float values +* The value of pname:queueCount must: be greater than `0` +* pname:queueFamilyIndex must: be less than the value of pname:pQueueFamilyPropertyCount returned by fname:vkGetPhysicalDeviceQueueFamilyProperties +* pname:queueCount must: be less than or equal to the value of the pname:queueCount member of the sname:VkQueueFamilyProperties structure, as returned by fname:vkGetPhysicalDeviceQueueFamilyProperties in the pname:pQueueFamilyProperties[pname:queueFamilyIndex] +* The value of any given element of pname:pQueuePriorities must: be between `0.0` and `1.0` inclusive +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkDispatchIndirectCommand.txt b/doc/specs/vulkan/validity/structs/VkDispatchIndirectCommand.txt new file mode 100644 index 00000000..f9eb1522 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkDispatchIndirectCommand.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:x must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[0] +* pname:y must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[1] +* pname:z must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[2] +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkDrawIndexedIndirectCommand.txt b/doc/specs/vulkan/validity/structs/VkDrawIndexedIndirectCommand.txt new file mode 100644 index 00000000..967a9ee4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkDrawIndexedIndirectCommand.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* For a given vertex buffer binding, any attribute data fetched must: be entirely contained within the corresponding vertex buffer binding, as described in <> +* The total value of (pname:indexSize * (pname:firstIndex + pname:indexCount) + pname:offset) must: be less than or equal to the size of the currently bound index buffer, with indexSize being based on the type specified by pname:indexType, where the index buffer, pname:indexType, and pname:offset are specified via fname:vkCmdBindIndexBuffer +* If the <> feature is not enabled, pname:firstInstance must: be code:0 +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkDrawIndirectCommand.txt b/doc/specs/vulkan/validity/structs/VkDrawIndirectCommand.txt new file mode 100644 index 00000000..39302589 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkDrawIndirectCommand.txt @@ -0,0 +1,15 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* For a given vertex buffer binding, any attribute data fetched must: be entirely contained within the corresponding vertex buffer binding, as described in <> +* If the <> feature is not enabled, pname:firstInstance must: be code:0 +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkEventCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkEventCreateInfo.txt new file mode 100644 index 00000000..0884aed3 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkEventCreateInfo.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_EVENT_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkExtensionProperties.txt b/doc/specs/vulkan/validity/structs/VkExtensionProperties.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkExtensionProperties.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkExtent2D.txt b/doc/specs/vulkan/validity/structs/VkExtent2D.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkExtent2D.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkExtent3D.txt b/doc/specs/vulkan/validity/structs/VkExtent3D.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkExtent3D.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkFenceCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkFenceCreateInfo.txt new file mode 100644 index 00000000..c5291eb8 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkFenceCreateInfo.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_FENCE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be a valid combination of elink:VkFenceCreateFlagBits values +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkFormatProperties.txt b/doc/specs/vulkan/validity/structs/VkFormatProperties.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkFormatProperties.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkFramebufferCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkFramebufferCreateInfo.txt new file mode 100644 index 00000000..0a1ce09d --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkFramebufferCreateInfo.txt @@ -0,0 +1,31 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* pname:renderPass must: be a valid sname:VkRenderPass handle +* If pname:attachmentCount is not `0`, pname:pAttachments must: be a pointer to an array of pname:attachmentCount valid sname:VkImageView handles +* Each of pname:renderPass and the elements of pname:pAttachments that are valid handles must: have been created, allocated or retrieved from the same sname:VkDevice +* The value of pname:attachmentCount must: be equal to the attachment count specified in pname:renderPass +* Any given element of pname:pAttachments that is used as a color attachment or resolve attachment by pname:renderPass must: have been created with a pname:usage value including ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT +* Any given element of pname:pAttachments that is used as a depth/stencil attachment by pname:renderPass must: have been created with a pname:usage value including ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT +* Any given element of pname:pAttachments that is used as an input attachment by pname:renderPass must: have been created with a pname:usage value including ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT +* Any given element of pname:pAttachments must: have been created with an elink:VkFormat value that matches the elink:VkFormat specified by the corresponding sname:VkAttachmentDescription in pname:renderPass +* Any given element of pname:pAttachments must: have been created with a pname:samples value that matches the pname:samples value specified by the corresponding sname:VkAttachmentDescription in pname:renderPass +* Any given element of pname:pAttachments must: have dimensions at least as large as the corresponding framebuffer dimension +* Any given element of pname:pAttachments must: only specify a single mip-level +* Any given element of pname:pAttachments must: have been created with identity swizzle +* The value of pname:width must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxFramebufferWidth +* The value of pname:height must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxFramebufferHeight +* The value of pname:layers must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxFramebufferLayers +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkGraphicsPipelineCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkGraphicsPipelineCreateInfo.txt new file mode 100644 index 00000000..f1289383 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkGraphicsPipelineCreateInfo.txt @@ -0,0 +1,64 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be a valid combination of elink:VkPipelineCreateFlagBits values +* pname:pStages must: be a pointer to an array of pname:stageCount valid sname:VkPipelineShaderStageCreateInfo structures +* pname:pVertexInputState must: be a pointer to a valid sname:VkPipelineVertexInputStateCreateInfo structure +* pname:pInputAssemblyState must: be a pointer to a valid sname:VkPipelineInputAssemblyStateCreateInfo structure +* pname:pRasterizationState must: be a pointer to a valid sname:VkPipelineRasterizationStateCreateInfo structure +* If pname:pDynamicState is not `NULL`, pname:pDynamicState must: be a pointer to a valid sname:VkPipelineDynamicStateCreateInfo structure +* pname:layout must: be a valid sname:VkPipelineLayout handle +* pname:renderPass must: be a valid sname:VkRenderPass handle +* The value of pname:stageCount must: be greater than `0` +* Each of pname:layout, pname:renderPass and pname:basePipelineHandle that are valid handles must: have been created, allocated or retrieved from the same sname:VkDevice +* If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineIndex is not `-1`, pname:basePipelineHandle must: be sname:VK_NULL_HANDLE +* If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineIndex is not `-1`, it must: be a valid index into the calling command's pname:pCreateInfos parameter +* If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, pname:basePipelineIndex must: be `-1` +* If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, pname:basePipelineHandle must: be a valid sname:VkPipeline handle +* If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, it must: be a valid handle to a graphics sname:VkPipeline +* pname:stageCount must: be greater than or equal to `1` +* The pname:stage member of each element of pname:pStages must: be unique +* The pname:stage member of one element of pname:pStages must: be ename:VK_SHADER_STAGE_VERTEX_BIT +* The pname:stage member of any given element of pname:pStages mustnot: be ename:VK_SHADER_STAGE_COMPUTE_BIT +* If pname:pStages includes a tessellation control shader stage, it must: include a tessellation evaluation shader stage +* If pname:pStages includes a tessellation evaluation shader stage, it must: include a tessellation control shader stage +* If pname:pStages includes a tessellation control shader stage and a tessellation evaluation shader stage, pname:pTessellationState mustnot: be `NULL` +* If pname:pStages includes both a tessellation control shader stage and a tessellation evaluation shader stage, the shader code of at least one must: contain an code:OpExecutionMode instruction that specifies the type of subdivision in the pipeline +* If pname:pStages includes both a tessellation control shader stage and a tessellation evaluation shader stage, and the shader code of both contain an code:OpExecutionMode instruction that specifies the type of subdivision in the pipeline, they must: both specify the same subdivision mode +* If pname:pStages includes both a tessellation control shader stage and a tessellation evaluation shader stage, the shader code of at least one must: contain an code:OpExecutionMode instruction that specifies the output patch size in the pipeline +* If pname:pStages includes both a tessellation control shader stage and a tessellation evaluation shader stage, and the shader code of both contain an code:OpExecutionMode instruction that specifies the out patch size in the pipeline, they must: both specify the same patch size +* If pname:pStages includes tessellation shader stages, the pname:topology member of pname:pInputAssembly must: be ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST +* If pname:pStages includes a geometry shader stage, and doesn't include any tessellation shader stages, its shader code must: contain an code:OpExecutionMode instruction that specifies an input primitive type that is <> with the primitive topology specified in pname:pInputAssembly +* If pname:pStages includes a geometry shader stage, and also includes tessellation shader stages, its shader code must: contain an code:OpExecutionMode instruction that specifies an input primitive type that is <> with the primitive topology that is output by the tessellation stages +* If pname:pStages includes a fragment shader stage and a geometry shader stage, and the fragment shader code reads from an input variable that is decorated with code:PrimitiveID, then the geometry shader code must: write to a matching output variable, decorated with code:PrimitiveID, in all execution paths +* If pname:pStages includes a fragment shader stage, its shader code mustnot: read from any input attachment that is defined as ename:VK_ATTACHMENT_UNUSED in pname:subpass +* The shader code for the entry points identified by pname:pStages, and the rest of the state identified by this structure must: adhere to the pipeline linking rules described in the <> chapter +* If pname:subpass uses a depth/stencil attachment in pname:renderpass that has a layout of ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL in the sname:VkAttachmentReference defined by pname:subpass, and pname:pDepthStencilState is not `NULL`, the pname:depthWriteEnable member of pname:pDepthStencilState must: be ename:VK_FALSE +* If pname:subpass uses a depth/stencil attachment in pname:renderpass that has a layout of ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL in the sname:VkAttachmentReference defined by pname:subpass, and pname:pDepthStencilState is not `NULL`, the value of the pname:failOp, pname:passOp and pname:depthFailOp members of each of the pname:front and pname:back members of pname:pDepthStencilState must: be ename:VK_STENCIL_OP_KEEP +* If pname:pColorBlendState is not `NULL`, the value of the pname:blendEnable member of each element of the pname:pAttachment member of pname:pColorBlendState must: be ename:VK_FALSE if the pname:format of the attachment referred to in pname:subpass of pname:renderPass does not support color blend operations, as specified by the ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures or sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +* If pname:pColorBlendState is not `NULL`, The pname:attachmentCount member of pname:pColorBlendState must: be equal to the value of pname:colorAttachmentCount used to create pname:subpass +* If no element of the pname:pDynamicStates member of pname:pDynamicState is ename:VK_DYNAMIC_STATE_VIEWPORT, the pname:pViewports member of pname:pViewportState must: be a pointer to an array of pname:pViewportState->viewportCount sname:VkViewport structures +* If no element of the pname:pDynamicStates member of pname:pDynamicState is ename:VK_DYNAMIC_STATE_SCISSOR, the pname:pScissors member of pname:pViewportState must: be a pointer to an array of pname:pViewportState->scissorCount sname:VkRect2D structures +* If the wide lines feature is not enabled, and no element of the pname:pDynamicStates member of pname:pDynamicState is ename:VK_DYNAMIC_STATE_LINE_WIDTH, the pname:lineWidth member of pname:pRasterizationState must: be `1.0` +* If the pname:rasterizerDiscardEnable member of pname:pRasterizationState is ename:VK_FALSE, pname:pViewportState must: be a pointer to a valid sname:VkPipelineViewportStateCreateInfo structure +* If the pname:rasterizerDiscardEnable member of pname:pRasterizationState is ename:VK_FALSE, pname:pMultisampleState must: be a pointer to a valid sname:VkPipelineMultisampleStateCreateInfo structure +* If the pname:rasterizerDiscardEnable member of pname:pRasterizationState is ename:VK_FALSE, and pname:subpass uses a depth/stencil attachment, pname:pDepthStencilState must: be a pointer to a valid sname:VkPipelineDepthStencilStateCreateInfo structure +* If the pname:rasterizerDiscardEnable member of pname:pRasterizationState is ename:VK_FALSE, and pname:subpass uses color attachments, pname:pColorBlendState must: be a pointer to a valid sname:VkPipelineColorBlendStateCreateInfo structure +* If the depth bias clamping feature is not enabled, no element of the pname:pDynamicStates member of pname:pDynamicState is ename:VK_DYNAMIC_STATE_DEPTH_BIAS, and the pname:depthBiasEnable member of pname:pDepthStencil is ename:VK_TRUE, the pname:depthBiasClamp member of pname:pDepthStencil must: be `0.0` +* If no element of the pname:pDynamicStates member of pname:pDynamicState is ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS, and the pname:depthBoundsTestEnable member of pname:pDepthStencil is ename:VK_TRUE, the value of the pname:minDepthBounds and pname:maxDepthBounds members of pname:pDepthStencil must: be between `0.0` and `1.0`, inclusive +* pname:layout must: be <> with all shaders specified in pname:pStages +* If pname:subpass uses color and/or depth/stencil attachments, then the pname:rasterizationSamples member of pname:pMultisampleState must: be the same as the sample count for those subpass attachments +* If pname:subpass does not use any color and/or depth/stencil attachments, then the pname:rasterizationSamples member of pname:pMultisampleState must: follow the rules for a <> +* pname:subpass must: be a valid subpass within pname:renderpass +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkImageBlit.txt b/doc/specs/vulkan/validity/structs/VkImageBlit.txt new file mode 100644 index 00000000..71398c97 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkImageBlit.txt @@ -0,0 +1,26 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:srcSubresource must: be a valid sname:VkImageSubresourceLayers structure +* pname:dstSubresource must: be a valid sname:VkImageSubresourceLayers structure +* The pname:aspectMask member of pname:srcSubresource and pname:dstSubresource must: match +* The pname:layerCount member of pname:srcSubresource and pname:dstSubresource must: match +* If either of the calling command's pname:srcImage or pname:dstImage parameters are of elink:VkImageType ename:VK_IMAGE_TYPE_3D, the pname:baseArrayLayer and pname:layerCount members of both pname:srcSubresource and pname:dstSubresource must: be `0` and `1`, respectively +* The pname:aspectMask member of pname:srcSubresource must: specify aspects present in the calling command's pname:srcImage +* The pname:aspectMask member of pname:dstSubresource must: specify aspects present in the calling command's pname:dstImage +* pname:srcOffset[0].x and pname:srcOffset[1].x must: both be greater than or equal to `0` and less than or equal to the source image subresource width +* pname:srcOffset[0].y and pname:srcOffset[1].y must: both be greater than or equal to `0` and less than or equal to the source image subresource height +* pname:srcOffset[0].z and pname:srcOffset[1].z must: both be greater than or equal to `0` and less than or equal to the source image subresource depth +* pname:dstOffset[0].x and pname:dstOffset[1].x must: both be greater than or equal to `0` and less than or equal to the destination image subresource width +* pname:dstOffset[0].y and pname:dstOffset[1].y must: both be greater than or equal to `0` and less than or equal to the destination image subresource height +* pname:dstOffset[0].z and pname:dstOffset[1].z must: both be greater than or equal to `0` and less than or equal to the destination image subresource depth +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkImageCopy.txt b/doc/specs/vulkan/validity/structs/VkImageCopy.txt new file mode 100644 index 00000000..362e483a --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkImageCopy.txt @@ -0,0 +1,37 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:srcSubresource must: be a valid sname:VkImageSubresourceLayers structure +* pname:dstSubresource must: be a valid sname:VkImageSubresourceLayers structure +* The pname:aspectMask member of pname:srcSubresource and pname:dstSubresource must: match +* The pname:layerCount member of pname:srcSubresource and pname:dstSubresource must: match +* If either of the calling command's pname:srcImage or pname:dstImage parameters are of elink:VkImageType ename:VK_IMAGE_TYPE_3D, the pname:baseArrayLayer and pname:layerCount members of both pname:srcSubresource and pname:dstSubresource must: be `0` and `1`, respectively +* The pname:aspectMask member of pname:srcSubresource must: specify aspects present in the calling command's pname:srcImage +* The pname:aspectMask member of pname:dstSubresource must: specify aspects present in the calling command's pname:dstImage +* pname:srcOffset.x and (pname:extent.width + pname:srcOffset.x) must: both be greater than or equal to `0` and less than or equal to the source image subresource width +* pname:srcOffset.y and (pname:extent.height + pname:srcOffset.y) must: both be greater than or equal to `0` and less than or equal to the source image subresource height +* pname:srcOffset.z and (pname:extent.depth + pname:srcOffset.z) must: both be greater than or equal to `0` and less than or equal to the source image subresource depth +* pname:dstOffset.x and (pname:extent.width + pname:dstOffset.x) must: both be greater than or equal to `0` and less than or equal to the destination image subresource width +* pname:dstOffset.y and (pname:extent.height + pname:dstOffset.y) must: both be greater than or equal to `0` and less than or equal to the destination image subresource height +* pname:dstOffset.z and (pname:extent.depth + pname:dstOffset.z) must: both be greater than or equal to `0` and less than or equal to the destination image subresource depth +* If the calling command's pname:srcImage is a compressed format image: +* all members of pname:srcOffset must: be a multiple of the block size in the relevant dimensions +* pname:extent.width must: be a multiple of the block width or (pname:extent.width + pname:srcOffset.x) must: equal the source image subresource width +* pname:extent.height must: be a multiple of the block height or (pname:extent.height + pname:srcOffset.y) must: equal the source image subresource height +* pname:extent.depth must: be a multiple of the block depth or (pname:extent.depth + pname:srcOffset.z) must: equal the source image subresource depth +* If the calling command's pname:dstImage is a compressed format image: +* all members of pname:dstOffset must: be a multiple of the block size in the relevant dimensions +* pname:extent.width must: be a multiple of the block width or (pname:extent.width + pname:dstOffset.x) must: equal the destination image subresource width +* pname:extent.height must: be a multiple of the block height or (pname:extent.height + pname:dstOffset.y) must: equal the destination image subresource height +* pname:extent.depth must: be a multiple of the block depth or (pname:extent.depth + pname:dstOffset.z) must: equal the destination image subresource depth +* pname:srcOffset, pname:dstOffset, and pname:extent must: respect the image transfer granularity requirements of the queue family that it will be submitted against, as described in <> +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkImageCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkImageCreateInfo.txt new file mode 100644 index 00000000..1566ee67 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkImageCreateInfo.txt @@ -0,0 +1,68 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be a valid combination of elink:VkImageCreateFlagBits values +* pname:imageType must: be a valid elink:VkImageType value +* pname:format must: be a valid elink:VkFormat value +* pname:samples must: be a valid elink:VkSampleCountFlagBits value +* pname:tiling must: be a valid elink:VkImageTiling value +* pname:usage must: be a valid combination of elink:VkImageUsageFlagBits values +* pname:usage mustnot: be `0` +* pname:sharingMode must: be a valid elink:VkSharingMode value +* pname:initialLayout must: be a valid elink:VkImageLayout value +* If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, pname:pQueueFamilyIndices must: be a pointer to an array of pname:queueFamilyIndexCount basetype:uint32_t values +* If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, pname:queueFamilyIndexCount must: be greater than `1` +* pname:format mustnot: be ename:VK_FORMAT_UNDEFINED +* The values of the pname:width, pname:height and pname:depth members of pname:extent must: all be greater than `0` +* The value of pname:mipLevels must: be greater than `0` +* The value of pname:arrayLayers must: be greater than `0` +* If pname:imageType is ename:VK_IMAGE_TYPE_1D, the value of pname:extent.width must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxImageDimension1D, or the value of sname:VkImageFormatProperties::pname:maxExtent.width (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure) - whichever is higher +* If pname:imageType is ename:VK_IMAGE_TYPE_2D and pname:flags does not contain ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, the value of pname:extent.width and pname:extent.height must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxImageDimension2D, or the value of sname:VkImageFormatProperties::pname:maxExtent.width/height (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure) - whichever is higher +* If pname:imageType is ename:VK_IMAGE_TYPE_2D and pname:flags contains ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, the value of pname:extent.width and pname:extent.height must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxImageDimensionCube, or the value of sname:VkImageFormatProperties::pname:maxExtent.width/height (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure) - whichever is higher +* If pname:imageType is ename:VK_IMAGE_TYPE_2D and pname:flags contains ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, the value of pname:extent.width and pname:extent.height must: be equal +* If pname:imageType is ename:VK_IMAGE_TYPE_3D, the value of pname:extent.width, pname:extent.height and pname:extent.depth must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxImageDimension3D, or the value of sname:VkImageFormatProperties::pname:maxExtent.width/height/depth (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure) - whichever is higher +* The value of pname:mipLevels must: be less than or equal to or equal to the value of latexmath:[$\lfloor\log_2(\max(\mathit{extent.width}, \mathit{extent.height}, \mathit{extent.depth}))\rfloor + 1$] +* If the values of any of pname:extent.width, pname:extent.height or pname:extent.depth are greater than the values of the equivalently named members of sname:VkPhysicalDeviceLimits::pname:maxImageDimension3D, pname:mipLevels must: be less than or equal to the value of sname:VkImageFormatProperties::pname:maxMipLevels (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure) +* The value of pname:arrayLayers must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxImageArrayLayers, or the value of sname:VkImageFormatProperties::pname:maxArrayLayers (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure) - whichever is higher +* The value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:sampleCounts returned by flink:vkGetPhysicalDeviceProperties, or the value of sname:VkImageFormatProperties::pname:maxExtent.sampleCounts returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure +* If pname:usage includes ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT or ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, the value of pname:extent.width must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxFramebufferWidth +* If pname:usage includes ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT or ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, the value of pname:extent.height must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxFramebufferHeight +* If pname:usage includes ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxFramebufferColorSamples +* If pname:usage includes ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and pname:format includes a depth aspect, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxFramebufferDepthSamples +* If pname:usage includes ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and pname:format includes a stencil aspect, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxFramebufferStencilSamples +* If pname:usage includes ename:VK_IMAGE_USAGE_SAMPLED_BIT, and pname:format includes a color aspect, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxSampledImageColorSamples +* If pname:usage includes ename:VK_IMAGE_USAGE_SAMPLED_BIT, and pname:format includes a depth aspect, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxSampledImageDepthSamples +* If pname:usage includes ename:VK_IMAGE_USAGE_SAMPLED_BIT, and pname:format is an integer format, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxSampledImageIntegerSamples +* If pname:usage includes ename:VK_IMAGE_USAGE_STORAGE_BIT, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxStorageImageSamples +* If the <> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK, ename:VK_FORMAT_EAC_R11_UNORM_BLOCK, ename:VK_FORMAT_EAC_R11_SNORM_BLOCK, ename:VK_FORMAT_EAC_R11G11_UNORM_BLOCK, or ename:VK_FORMAT_EAC_R11G11_SNORM_BLOCK +* If the <> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_ASTC_4x4_UNORM_BLOCK, ename:VK_FORMAT_ASTC_4x4_SRGB_BLOCK, ename:VK_FORMAT_ASTC_5x4_UNORM_BLOCK, ename:VK_FORMAT_ASTC_5x4_SRGB_BLOCK, ename:VK_FORMAT_ASTC_5x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_5x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_6x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_6x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_6x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_6x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x8_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x8_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x8_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x8_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x10_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x10_SRGB_BLOCK, ename:VK_FORMAT_ASTC_12x10_UNORM_BLOCK, ename:VK_FORMAT_ASTC_12x10_SRGB_BLOCK, ename:VK_FORMAT_ASTC_12x12_UNORM_BLOCK, or ename:VK_FORMAT_ASTC_12x12_SRGB_BLOCK +* If the <> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_BC1_RGB_UNORM_BLOCK, ename:VK_FORMAT_BC1_RGB_SRGB_BLOCK, ename:VK_FORMAT_BC1_RGBA_UNORM_BLOCK, ename:VK_FORMAT_BC1_RGBA_SRGB_BLOCK, ename:VK_FORMAT_BC2_UNORM_BLOCK, ename:VK_FORMAT_BC2_SRGB_BLOCK, ename:VK_FORMAT_BC3_UNORM_BLOCK, ename:VK_FORMAT_BC3_SRGB_BLOCK, ename:VK_FORMAT_BC4_UNORM_BLOCK, ename:VK_FORMAT_BC4_SNORM_BLOCK, ename:VK_FORMAT_BC5_UNORM_BLOCK, ename:VK_FORMAT_BC5_SNORM_BLOCK, ename:VK_FORMAT_BC6H_UFLOAT_BLOCK, ename:VK_FORMAT_BC6H_SFLOAT_BLOCK, ename:VK_FORMAT_BC7_UNORM_BLOCK, or ename:VK_FORMAT_BC7_SRGB_BLOCK +* If the <> feature is not enabled, and pname:usage contains ename:VK_IMAGE_USAGE_STORAGE_BIT, pname:samples must: be ename:VK_SAMPLE_COUNT_1_BIT +* If the <> feature is not enabled, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT +* If the <> feature is not enabled, and pname:imageType is VK_IMAGE_TYPE_2D, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT +* If the <> feature is not enabled, and pname:imageType is VK_IMAGE_TYPE_3D, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT +* If the <> feature is not enabled, pname:imageType is VK_IMAGE_TYPE_2D, and pname:samples is ename:VK_SAMPLE_COUNT_2_BIT, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT +* If the <> feature is not enabled, pname:imageType is VK_IMAGE_TYPE_2D, and pname:samples is ename:VK_SAMPLE_COUNT_4_BIT, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT +* If the <> feature is not enabled, pname:imageType is VK_IMAGE_TYPE_2D, and pname:samples is ename:VK_SAMPLE_COUNT_8_BIT, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT +* If the <> feature is not enabled, pname:imageType is VK_IMAGE_TYPE_2D, and pname:samples is ename:VK_SAMPLE_COUNT_16_BIT, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT +* If the value of pname:tiling is ename:VK_IMAGE_TILING_LINEAR, and the value of sname:VkFormatProperties::pname:linearTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_SAMPLED_BIT +* If the value of pname:tiling is ename:VK_IMAGE_TILING_LINEAR, and the value of sname:VkFormatProperties::pname:linearTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_STORAGE_BIT +* If the value of pname:tiling is ename:VK_IMAGE_TILING_LINEAR, and the value of sname:VkFormatProperties::pname:linearTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT +* If the value of pname:tiling is ename:VK_IMAGE_TILING_LINEAR, and the value of sname:VkFormatProperties::pname:linearTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT +* If the value of pname:tiling is ename:VK_IMAGE_TILING_OPTIMAL, and the value of sname:VkFormatProperties::pname:optimalTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_SAMPLED_BIT +* If the value of pname:tiling is ename:VK_IMAGE_TILING_OPTIMAL, and the value of sname:VkFormatProperties::pname:optimalTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_STORAGE_BIT +* If the value of pname:tiling is ename:VK_IMAGE_TILING_OPTIMAL, and the value of sname:VkFormatProperties::pname:optimalTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT +* If the value of pname:tiling is ename:VK_IMAGE_TILING_OPTIMAL, and the value of sname:VkFormatProperties::pname:optimalTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT +* If pname:flags contains ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, it must: also contain at least one of ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT or ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkImageFormatProperties.txt b/doc/specs/vulkan/validity/structs/VkImageFormatProperties.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkImageFormatProperties.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkImageMemoryBarrier.txt b/doc/specs/vulkan/validity/structs/VkImageMemoryBarrier.txt new file mode 100644 index 00000000..27a6b60c --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkImageMemoryBarrier.txt @@ -0,0 +1,34 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER +* pname:pNext must: be `NULL` +* pname:srcAccessMask must: be a valid combination of elink:VkAccessFlagBits values +* pname:dstAccessMask must: be a valid combination of elink:VkAccessFlagBits values +* pname:oldLayout must: be a valid elink:VkImageLayout value +* pname:newLayout must: be a valid elink:VkImageLayout value +* pname:image must: be a valid sname:VkImage handle +* pname:subresourceRange must: be a valid sname:VkImageSubresourceRange structure +* pname:oldLayout must: be ename:VK_IMAGE_LAYOUT_UNDEFINED, ename:VK_IMAGE_LAYOUT_PREINITIALIZED or the current layout of the image region affected by the barrier +* pname:newLayout mustnot: be ename:VK_IMAGE_LAYOUT_UNDEFINED or ename:VK_IMAGE_LAYOUT_PREINITIALIZED +* If pname:image was created with a sharing mode of ename:VK_SHARING_MODE_CONCURRENT, pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex must: both be VK_QUEUE_FAMILY_IGNORED +* If pname:image was created with a sharing mode of ename:VK_SHARING_MODE_EXCLUSIVE, pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex must: either both be VK_QUEUE_FAMILY_IGNORED, or both be a valid queue family (see <>) +* If pname:image was created with a sharing mode of ename:VK_SHARING_MODE_EXCLUSIVE, and pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex are valid queue families, at least one of them must: be the same as the family of the queue that will execute this barrier +* pname:subresourceRange must: be a valid subresource range for the image (see <>) +* If pname:image has a depth/stencil format with both depth and stencil components, then pname:aspectMask member of pname:subresourceRange must: include both ename:VK_IMAGE_ASPECT_DEPTH_BIT and ename:VK_IMAGE_ASPECT_STENCIL_BIT +* If either pname:oldLayout or pname:newLayout is ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL then pname:image must: have been created with ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT set +* If either pname:oldLayout or pname:newLayout is ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL then pname:image must: have been created with ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set +* If either pname:oldLayout or pname:newLayout is ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then pname:image must: have been created with ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set +* If either pname:oldLayout or pname:newLayout is ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL then pname:image must: have been created with ename:VK_IMAGE_USAGE_SAMPLED_BIT or ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT set +* If either pname:oldLayout or pname:newLayout is ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL then pname:image must: have been created with ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT set +* If either pname:oldLayout or pname:newLayout is ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL then pname:image must: have been created with ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT set +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkImageResolve.txt b/doc/specs/vulkan/validity/structs/VkImageResolve.txt new file mode 100644 index 00000000..1255485a --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkImageResolve.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:srcSubresource must: be a valid sname:VkImageSubresourceLayers structure +* pname:dstSubresource must: be a valid sname:VkImageSubresourceLayers structure +* The pname:aspectMask member of pname:srcSubresource and pname:dstSubresource must: only contain ename:VK_IMAGE_ASPECT_COLOR_BIT +* The pname:layerCount member of pname:srcSubresource and pname:dstSubresource must: match +* If either of the calling command's pname:srcImage or pname:dstImage parameters are of elink:VkImageType ename:VK_IMAGE_TYPE_3D, the pname:baseArrayLayer and pname:layerCount members of both pname:srcSubresource and pname:dstSubresource must: be `0` and `1`, respectively +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkImageSubresource.txt b/doc/specs/vulkan/validity/structs/VkImageSubresource.txt new file mode 100644 index 00000000..c6b6d565 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkImageSubresource.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:aspectMask must: be a valid combination of elink:VkImageAspectFlagBits values +* pname:aspectMask mustnot: be `0` +* pname:mipLevel must: be less than the pname:mipLevels specified in slink:VkImageCreateInfo when the image was created +* pname:arrayLayer must: be less than the pname:arrayLayers specified in slink:VkImageCreateInfo when the image was created +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkImageSubresourceLayers.txt b/doc/specs/vulkan/validity/structs/VkImageSubresourceLayers.txt new file mode 100644 index 00000000..c70b6c48 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkImageSubresourceLayers.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:aspectMask must: be a valid combination of elink:VkImageAspectFlagBits values +* pname:aspectMask mustnot: be `0` +* If pname:aspectMask contains ename:VK_IMAGE_ASPECT_COLOR_BIT, it mustnot: contain either of ename:VK_IMAGE_ASPECT_DEPTH_BIT or ename:VK_IMAGE_ASPECT_STENCIL_BIT +* pname:aspectMask mustnot: contain ename:VK_IMAGE_ASPECT_METADATA_BIT +* pname:mipLevel must: be less than the pname:mipLevels specified in slink:VkImageCreateInfo when the image was created +* latexmath:[$(baseArrayLayer + layerCount)$] must: be less than or equal to the pname:arrayLayers specified in slink:VkImageCreateInfo when the image was created +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkImageSubresourceRange.txt b/doc/specs/vulkan/validity/structs/VkImageSubresourceRange.txt new file mode 100644 index 00000000..3afb20ab --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkImageSubresourceRange.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:aspectMask must: be a valid combination of elink:VkImageAspectFlagBits values +* pname:aspectMask mustnot: be `0` +* latexmath:[$(baseMipLevel + levelCount)$] must: be less than or equal to the pname:mipLevels specified in slink:VkImageCreateInfo when the image was created +* latexmath:[$(baseArrayLayer + layerCount)$] must: be less than or equal to the pname:arrayLayers specified in slink:VkImageCreateInfo when the image was created +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkImageViewCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkImageViewCreateInfo.txt new file mode 100644 index 00000000..8e8f3877 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkImageViewCreateInfo.txt @@ -0,0 +1,38 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* pname:image must: be a valid sname:VkImage handle +* pname:viewType must: be a valid elink:VkImageViewType value +* pname:format must: be a valid elink:VkFormat value +* pname:components must: be a valid sname:VkComponentMapping structure +* pname:subresourceRange must: be a valid sname:VkImageSubresourceRange structure +* If pname:image was not created with ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT then pname:viewType mustnot: be ename:VK_IMAGE_VIEW_TYPE_CUBE or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY +* If the <> feature is not enabled, pname:viewType mustnot: be ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY +* If the <> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK, ename:VK_FORMAT_EAC_R11_UNORM_BLOCK, ename:VK_FORMAT_EAC_R11_SNORM_BLOCK, ename:VK_FORMAT_EAC_R11G11_UNORM_BLOCK, or ename:VK_FORMAT_EAC_R11G11_SNORM_BLOCK +* If the <> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_ASTC_4x4_UNORM_BLOCK, ename:VK_FORMAT_ASTC_4x4_SRGB_BLOCK, ename:VK_FORMAT_ASTC_5x4_UNORM_BLOCK, ename:VK_FORMAT_ASTC_5x4_SRGB_BLOCK, ename:VK_FORMAT_ASTC_5x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_5x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_6x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_6x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_6x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_6x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x8_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x8_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x8_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x8_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x10_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x10_SRGB_BLOCK, ename:VK_FORMAT_ASTC_12x10_UNORM_BLOCK, ename:VK_FORMAT_ASTC_12x10_SRGB_BLOCK, ename:VK_FORMAT_ASTC_12x12_UNORM_BLOCK, or ename:VK_FORMAT_ASTC_12x12_SRGB_BLOCK +* If the <> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_BC1_RGB_UNORM_BLOCK, ename:VK_FORMAT_BC1_RGB_SRGB_BLOCK, ename:VK_FORMAT_BC1_RGBA_UNORM_BLOCK, ename:VK_FORMAT_BC1_RGBA_SRGB_BLOCK, ename:VK_FORMAT_BC2_UNORM_BLOCK, ename:VK_FORMAT_BC2_SRGB_BLOCK, ename:VK_FORMAT_BC3_UNORM_BLOCK, ename:VK_FORMAT_BC3_SRGB_BLOCK, ename:VK_FORMAT_BC4_UNORM_BLOCK, ename:VK_FORMAT_BC4_SNORM_BLOCK, ename:VK_FORMAT_BC5_UNORM_BLOCK, ename:VK_FORMAT_BC5_SNORM_BLOCK, ename:VK_FORMAT_BC6H_UFLOAT_BLOCK, ename:VK_FORMAT_BC6H_SFLOAT_BLOCK, ename:VK_FORMAT_BC7_UNORM_BLOCK, or ename:VK_FORMAT_BC7_SRGB_BLOCK +* If pname:image was created with ename:VK_IMAGE_TILING_LINEAR and pname:usage containing ename:VK_IMAGE_USAGE_SAMPLED_BIT, pname:format must: be supported for sampled images, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +* If pname:image was created with ename:VK_IMAGE_TILING_LINEAR and pname:usage containing ename:VK_IMAGE_USAGE_STORAGE_BIT, pname:format must: be supported for storage images, as specified by the ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +* If pname:image was created with ename:VK_IMAGE_TILING_LINEAR and pname:usage containing ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, pname:format must: be supported for color attachments, as specified by the ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +* If pname:image was created with ename:VK_IMAGE_TILING_LINEAR and pname:usage containing ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, pname:format must: be supported for depth/stencil attachments, as specified by the ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +* If pname:image was created with ename:VK_IMAGE_TILING_OPTIMAL and pname:usage containing ename:VK_IMAGE_USAGE_SAMPLED_BIT, pname:format must: be supported for sampled images, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT flag in sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +* If pname:image was created with ename:VK_IMAGE_TILING_OPTIMAL and pname:usage containing ename:VK_IMAGE_USAGE_STORAGE_BIT, pname:format must: be supported for storage images, as specified by the ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT flag in sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +* If pname:image was created with ename:VK_IMAGE_TILING_OPTIMAL and pname:usage containing ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, pname:format must: be supported for color attachments, as specified by the ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +* If pname:image was created with ename:VK_IMAGE_TILING_OPTIMAL and pname:usage containing ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, pname:format must: be supported for depth/stencil attachments, as specified by the ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +* pname:subresourceRange must: be a valid subresource range for pname:image (see <>) +* If pname:image was created with the ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, pname:format must: be compatible with the pname:format used to create pname:image, as defined in <> +* If pname:image was not created with the ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, pname:format must: be identical to the pname:format used to create pname:image +* pname:subResourceRange and pname:viewType must: be compatible with the image, as described in the <> +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkInstanceCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkInstanceCreateInfo.txt new file mode 100644 index 00000000..81f63ff8 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkInstanceCreateInfo.txt @@ -0,0 +1,22 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* If pname:pApplicationInfo is not `NULL`, pname:pApplicationInfo must: be a pointer to a valid sname:VkApplicationInfo structure +* If pname:enabledLayerCount is not `0`, pname:ppEnabledLayerNames must: be a pointer to an array of pname:enabledLayerCount null-terminated strings +* If pname:enabledExtensionCount is not `0`, pname:ppEnabledExtensionNames must: be a pointer to an array of pname:enabledExtensionCount null-terminated strings +* Any given element of pname:ppEnabledLayerNames must: be the name of a layer present on the system, exactly matching a string returned in the sname:VkLayerProperties structure by fname:vkEnumerateInstanceLayerProperties +* Any given element of pname:ppEnabledExtensionNames must: be the name of an extension present on the system, exactly matching a string returned in the sname:VkExtensionProperties structure by fname:vkEnumerateInstanceExtensionProperties +* If an extension listed in pname:ppEnabledExtensionNames is provided as part of a layer, then both the layer and extension must: be enabled to enable that extension +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkLayerProperties.txt b/doc/specs/vulkan/validity/structs/VkLayerProperties.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkLayerProperties.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkMappedMemoryRange.txt b/doc/specs/vulkan/validity/structs/VkMappedMemoryRange.txt new file mode 100644 index 00000000..63362491 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkMappedMemoryRange.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE +* pname:pNext must: be `NULL` +* pname:memory must: be a valid sname:VkDeviceMemory handle +* pname:memory must: currently be mapped +* pname:offset must: be less than the size of the currently mapped range of pname:memory +* If pname:size is not equal to ename:VK_WHOLE_SIZE, the sum of pname:offset and pname:size must: be less than or equal to the size of the currently mapped range of pname:memory +* pname:offset and pname:size must: each be a multiple of sname:VkPhysicalDeviceLimits::pname:nonCoherentAtomSize +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkMemoryAllocateInfo.txt b/doc/specs/vulkan/validity/structs/VkMemoryAllocateInfo.txt new file mode 100644 index 00000000..af66313b --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkMemoryAllocateInfo.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO +* pname:pNext must: be `NULL` +* The value of pname:allocationSize must: be less than or equal to the amount of memory available to the sname:VkMemoryHeap specified by pname:memoryTypeIndex and the calling command's sname:VkDevice +* The value of pname:allocationSize must: be greater than `0` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkMemoryBarrier.txt b/doc/specs/vulkan/validity/structs/VkMemoryBarrier.txt new file mode 100644 index 00000000..d6b42f09 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkMemoryBarrier.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_MEMORY_BARRIER +* pname:pNext must: be `NULL` +* pname:srcAccessMask must: be a valid combination of elink:VkAccessFlagBits values +* pname:dstAccessMask must: be a valid combination of elink:VkAccessFlagBits values +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkMemoryHeap.txt b/doc/specs/vulkan/validity/structs/VkMemoryHeap.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkMemoryHeap.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkMemoryRequirements.txt b/doc/specs/vulkan/validity/structs/VkMemoryRequirements.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkMemoryRequirements.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkMemoryType.txt b/doc/specs/vulkan/validity/structs/VkMemoryType.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkMemoryType.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkOffset2D.txt b/doc/specs/vulkan/validity/structs/VkOffset2D.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkOffset2D.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkOffset3D.txt b/doc/specs/vulkan/validity/structs/VkOffset3D.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkOffset3D.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkPhysicalDeviceFeatures.txt b/doc/specs/vulkan/validity/structs/VkPhysicalDeviceFeatures.txt new file mode 100644 index 00000000..c818e7e8 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPhysicalDeviceFeatures.txt @@ -0,0 +1,14 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* If the value of any member of this structure is ename:VK_FALSE, as returned by flink:vkGetPhysicalDeviceFeatures, then it must: be ename:VK_FALSE when passed as part of the sname:VkDeviceCreateInfo struct when creating a device +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkPhysicalDeviceLimits.txt b/doc/specs/vulkan/validity/structs/VkPhysicalDeviceLimits.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPhysicalDeviceLimits.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkPhysicalDeviceMemoryProperties.txt b/doc/specs/vulkan/validity/structs/VkPhysicalDeviceMemoryProperties.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPhysicalDeviceMemoryProperties.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkPhysicalDeviceProperties.txt b/doc/specs/vulkan/validity/structs/VkPhysicalDeviceProperties.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPhysicalDeviceProperties.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkPhysicalDeviceSparseProperties.txt b/doc/specs/vulkan/validity/structs/VkPhysicalDeviceSparseProperties.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPhysicalDeviceSparseProperties.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkPipelineCacheCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkPipelineCacheCreateInfo.txt new file mode 100644 index 00000000..114a83b5 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPipelineCacheCreateInfo.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* If pname:initialDataSize is not `0`, pname:pInitialData must: be a pointer to an array of pname:initialDataSize bytes +* If pname:initialDataSize is not `0`, it must: be equal to the size of pname:pInitialData, as returned by fname:vkGetPipelineCacheData when pname:pInitialData was originally retrieved +* If pname:initialDataSize is not `0`, pname:pInitialData must: have been retrieved from a previous call to fname:vkGetPipelineCacheData +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkPipelineColorBlendAttachmentState.txt b/doc/specs/vulkan/validity/structs/VkPipelineColorBlendAttachmentState.txt new file mode 100644 index 00000000..00e47d6c --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPipelineColorBlendAttachmentState.txt @@ -0,0 +1,24 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:srcColorBlendFactor must: be a valid elink:VkBlendFactor value +* pname:dstColorBlendFactor must: be a valid elink:VkBlendFactor value +* pname:colorBlendOp must: be a valid elink:VkBlendOp value +* pname:srcAlphaBlendFactor must: be a valid elink:VkBlendFactor value +* pname:dstAlphaBlendFactor must: be a valid elink:VkBlendFactor value +* pname:alphaBlendOp must: be a valid elink:VkBlendOp value +* pname:colorWriteMask must: be a valid combination of elink:VkColorComponentFlagBits values +* If the <> feature is not enabled, pname:srcColorBlendFactor mustnot: be pname:VK_BLEND_SRC1_COLOR, pname:VK_BLEND_ONE_MINUS_SRC1_COLOR, pname:VK_BLEND_SRC1_ALPHA, or pname:VK_BLEND_ONE_MINUS_SRC1_ALPHA +* If the <> feature is not enabled, pname:dstColorBlendFactor mustnot: be pname:VK_BLEND_SRC1_COLOR, pname:VK_BLEND_ONE_MINUS_SRC1_COLOR, pname:VK_BLEND_SRC1_ALPHA, or pname:VK_BLEND_ONE_MINUS_SRC1_ALPHA +* If the <> feature is not enabled, pname:srcAlphaBlendFactor mustnot: be pname:VK_BLEND_SRC1_COLOR, pname:VK_BLEND_ONE_MINUS_SRC1_COLOR, pname:VK_BLEND_SRC1_ALPHA, or pname:VK_BLEND_ONE_MINUS_SRC1_ALPHA +* If the <> feature is not enabled, pname:dstAlphaBlendFactor mustnot: be pname:VK_BLEND_SRC1_COLOR, pname:VK_BLEND_ONE_MINUS_SRC1_COLOR, pname:VK_BLEND_SRC1_ALPHA, or pname:VK_BLEND_ONE_MINUS_SRC1_ALPHA +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkPipelineColorBlendStateCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkPipelineColorBlendStateCreateInfo.txt new file mode 100644 index 00000000..0671356f --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPipelineColorBlendStateCreateInfo.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* If pname:attachmentCount is not `0`, pname:pAttachments must: be a pointer to an array of pname:attachmentCount valid sname:VkPipelineColorBlendAttachmentState structures +* If the <> feature is not enabled, all elements of pname:pAttachments must: be identical +* If the <> feature is not enabled, pname:logicOpEnable must: be ename:VK_FALSE +* If pname:logicOpEnable is ename:VK_TRUE, pname:logicOp must: be a valid elink:VkLogicOp value +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkPipelineDepthStencilStateCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkPipelineDepthStencilStateCreateInfo.txt new file mode 100644 index 00000000..5eda96c5 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPipelineDepthStencilStateCreateInfo.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* pname:depthCompareOp must: be a valid elink:VkCompareOp value +* pname:front must: be a valid sname:VkStencilOpState structure +* pname:back must: be a valid sname:VkStencilOpState structure +* If the <> feature is not enabled, the value of pname:depthBoundsTestEnable must: be ename:VK_FALSE +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkPipelineDynamicStateCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkPipelineDynamicStateCreateInfo.txt new file mode 100644 index 00000000..e3660aef --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPipelineDynamicStateCreateInfo.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* pname:pDynamicStates must: be a pointer to an array of pname:dynamicStateCount valid elink:VkDynamicState values +* The value of pname:dynamicStateCount must: be greater than `0` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkPipelineInputAssemblyStateCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkPipelineInputAssemblyStateCreateInfo.txt new file mode 100644 index 00000000..af86a23f --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPipelineInputAssemblyStateCreateInfo.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* pname:topology must: be a valid elink:VkPrimitiveTopology value +* If pname:topology is ename:VK_PRIMITIVE_TOPOLOGY_POINT_LIST, ename:VK_PRIMITIVE_TOPOLOGY_LINE_LIST, ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, ename:VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, the value of pname:primitiveRestartEnable must: be ename:VK_FALSE +* If the <> feature is not enabled, pname:topology mustnot: be any of ename:VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, ename:VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY, ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY +* If the <> feature is not enabled, pname:topology mustnot: be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkPipelineLayoutCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkPipelineLayoutCreateInfo.txt new file mode 100644 index 00000000..75393ef7 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPipelineLayoutCreateInfo.txt @@ -0,0 +1,24 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* If pname:setLayoutCount is not `0`, pname:pSetLayouts must: be a pointer to an array of pname:setLayoutCount valid sname:VkDescriptorSetLayout handles +* If pname:pushConstantRangeCount is not `0`, pname:pPushConstantRanges must: be a pointer to an array of pname:pushConstantRangeCount valid sname:VkPushConstantRange structures +* pname:setLayoutCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxBoundDescriptorSets +* The total number of descriptors of the type ename:VK_DESCRIPTOR_TYPE_SAMPLER and ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER accessible to any given shader stage across all elements of pname:pSetLayouts must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorSamplers +* The total number of descriptors of the type ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER and ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible to any given shader stage across all elements of pname:pSetLayouts must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorUniformBuffers +* The total number of descriptors of the type ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER and ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible to any given shader stage across all elements of pname:pSetLayouts must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorStorageBuffers +* The total number of descriptors of the type ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER accessible to any given shader stage across all elements of pname:pSetLayouts must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorSampledImages +* The total number of descriptors of the type ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER accessible to any given shader stage across all elements of pname:pSetLayouts must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorStorageImages +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkPipelineMultisampleStateCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkPipelineMultisampleStateCreateInfo.txt new file mode 100644 index 00000000..a0e8eeb9 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPipelineMultisampleStateCreateInfo.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* pname:rasterizationSamples must: be a valid elink:VkSampleCountFlagBits value +* If pname:pSampleMask is not `NULL`, pname:pSampleMask must: be a pointer to an array of latexmath:[$\lceil{\mathit{rasterizationSamples} \over 32}\rceil$] basetype:VkSampleMask values +* If the <> feature is not enabled, pname:sampleShadingEnable must: be ename:VK_FALSE +* If the <> feature is not enabled, pname:alphaToOneEnable must: be ename:VK_FALSE +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkPipelineRasterizationStateCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkPipelineRasterizationStateCreateInfo.txt new file mode 100644 index 00000000..f3a58b77 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPipelineRasterizationStateCreateInfo.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* pname:polygonMode must: be a valid elink:VkPolygonMode value +* pname:cullMode must: be a valid combination of elink:VkCullModeFlagBits values +* pname:frontFace must: be a valid elink:VkFrontFace value +* If the <> feature is not enabled, the value of pname:depthClampEnable must: be ename:VK_FALSE +* If the <> feature is not enabled, the value of pname:fillMode must: be ename:VK_POLYGON_MODE_FILL +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkPipelineShaderStageCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkPipelineShaderStageCreateInfo.txt new file mode 100644 index 00000000..e8cdb99b --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPipelineShaderStageCreateInfo.txt @@ -0,0 +1,36 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* pname:stage must: be a valid elink:VkShaderStageFlagBits value +* pname:module must: be a valid sname:VkShaderModule handle +* pname:pName must: be a null-terminated string +* If pname:pSpecializationInfo is not `NULL`, pname:pSpecializationInfo must: be a pointer to a valid sname:VkSpecializationInfo structure +* If the <> feature is not enabled, pname:stage mustnot: be pname:VK_SHADER_STAGE_GEOMETRY_BIT +* If the <> feature is not enabled, pname:stage mustnot: be pname:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or pname:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT +* pname:stage mustnot: be ename:VK_SHADER_STAGE_ALL_GRAPHICS, or ename:VK_SHADER_STAGE_ALL +* pname:pName must: be the name of an code:OpEntryPoint in pname:module with an execution model that matches pname:stage +* If the identified entry point includes any variable in its interface that is declared with the code:ClipDistance code:BuiltIn decoration, that variable mustnot: have an array size greater than sname:VkPhysicalDeviceLimits::pname:maxClipDistances +* If the identified entry point includes any variable in its interface that is declared with the code:CullDistance code:BuiltIn decoration, that variable mustnot: have an array size greater than sname:VkPhysicalDeviceLimits::pname:maxCullDistances +* If the identified entry point includes any variables in its interface that are declared with the code:ClipDistance or code:CullDistance code:BuiltIn decoration, those variables mustnot: have array sizes which sum to more than sname:VkPhysicalDeviceLimits::pname:maxCombinedClipAndCullDistances +* If the identified entry point includes any variable in its interface that is declared with the code:SampleMask code:BuiltIn decoration, that variable mustnot: have an array size greater than sname:VkPhysicalDeviceLimits::pname:maxSampleMaskWords +* If pname:stage is ename:VK_SHADER_STAGE_VERTEX_BIT, the identified entry point mustnot: include any input variable in its interface that is decorated with code:CullDistance +* If pname:stage is ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, and the identified entry point has an code:OpExecutionMode instruction that specifies a patch size with code:OutputVertices, the patch size must: be greater than `0` and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxTessellationPatchSize +* If pname:stage is ename:VK_SHADER_STAGE_GEOMETRY_BIT, the identified entry point must: have an code:OpExecutionMode instruction that specifies a maximum output vertex count that is greater than `0` and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxGeometryOutputVertices +* If pname:stage is ename:VK_SHADER_STAGE_GEOMETRY_BIT, the identified entry point must: have an code:OpExecutionMode instruction that specifies an invocation count that is greater than `0` and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxGeometryShaderInvocations +* If pname:stage is ename:VK_SHADER_STAGE_GEOMETRY_BIT, and the identified entry point writes to code:Layer for any primitive, it must: write the same value to code:Layer for all vertices of a given primitive +* If pname:stage is ename:VK_SHADER_STAGE_GEOMETRY_BIT, and the identified entry point writes to code:ViewportIndex for any primitive, it must: write the same value to code:ViewportIndex for all vertices of a given primitive +* If pname:stage is ename:VK_SHADER_STAGE_FRAGMENT_BIT, the identified entry point mustnot: include any output variables in its interface decorated with code:CullDistance +* If pname:stage is ename:VK_SHADER_STAGE_FRAGMENT_BIT, and the identified entry point writes to code:FragDepth in any execution path, it must: write to code:FragDepth in all execution paths +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkPipelineTessellationStateCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkPipelineTessellationStateCreateInfo.txt new file mode 100644 index 00000000..f0f7eb54 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPipelineTessellationStateCreateInfo.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* pname:patchControlPoints must: be greater than zero and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxTessellationPatchSize +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkPipelineVertexInputStateCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkPipelineVertexInputStateCreateInfo.txt new file mode 100644 index 00000000..25f034f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPipelineVertexInputStateCreateInfo.txt @@ -0,0 +1,23 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* If pname:vertexBindingDescriptionCount is not `0`, pname:pVertexBindingDescriptions must: be a pointer to an array of pname:vertexBindingDescriptionCount valid sname:VkVertexInputBindingDescription structures +* If pname:vertexAttributeDescriptionCount is not `0`, pname:pVertexAttributeDescriptions must: be a pointer to an array of pname:vertexAttributeDescriptionCount valid sname:VkVertexInputAttributeDescription structures +* pname:vertexBindingDescriptionCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindings +* pname:vertexAttributeDescriptionCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputAttributes +* For every value of pname:binding specified by any given element of pname:pVertexAttributeDescriptions, a sname:VkVertexInputBindingDescription must: exist in pname:pVertexBindingDescriptions with the same value of pname:binding +* All elements of pname:pVertexBindingDescriptions must: describe distinct binding numbers +* All elements of pname:pVertexAttributeDescriptions must: describe distinct attribute locations +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkPipelineViewportStateCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkPipelineViewportStateCreateInfo.txt new file mode 100644 index 00000000..445cc2aa --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPipelineViewportStateCreateInfo.txt @@ -0,0 +1,23 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* The value of pname:viewportCount must: be greater than `0` +* The value of pname:scissorCount must: be greater than `0` +* If the <> feature is not enabled, pname:viewportCount must: be `1` +* If the <> feature is not enabled, pname:scissorCount must: be `1` +* pname:viewportCount must: be between `1` and sname:VkPhysicalDeviceLimits::pname:maxViewports, inclusive +* pname:scissorCount must: be between `1` and sname:VkPhysicalDeviceLimits::pname:maxViewports, inclusive +* The values of pname:scissorCount and pname:viewportCount must: be identical +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkPushConstantRange.txt b/doc/specs/vulkan/validity/structs/VkPushConstantRange.txt new file mode 100644 index 00000000..ec896f35 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkPushConstantRange.txt @@ -0,0 +1,18 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:stageFlags must: be a valid combination of elink:VkShaderStageFlagBits values +* pname:stageFlags mustnot: be `0` +* The sum of pname:offset and pname:size must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPushConstantsSize +* The value of pname:size must: be greater than `0` +* The value of pname:size must: be a multiple of `4` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkQueryPoolCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkQueryPoolCreateInfo.txt new file mode 100644 index 00000000..4910df3a --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkQueryPoolCreateInfo.txt @@ -0,0 +1,19 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* pname:queryType must: be a valid elink:VkQueryType value +* If the <> feature is not enabled, pname:queryType mustnot: be ename:VK_QUERY_TYPE_PIPELINE_STATISTICS +* If pname:queryType is ename:VK_QUERY_TYPE_PIPELINE_STATISTICS, pname:pipelineStatistics must: be a valid combination of elink:VkQueryPipelineStatisticFlagBits values +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkQueueFamilyProperties.txt b/doc/specs/vulkan/validity/structs/VkQueueFamilyProperties.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkQueueFamilyProperties.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkRect2D.txt b/doc/specs/vulkan/validity/structs/VkRect2D.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkRect2D.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkRenderPassBeginInfo.txt b/doc/specs/vulkan/validity/structs/VkRenderPassBeginInfo.txt new file mode 100644 index 00000000..cb120fa2 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkRenderPassBeginInfo.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO +* pname:pNext must: be `NULL` +* pname:renderPass must: be a valid sname:VkRenderPass handle +* pname:framebuffer must: be a valid sname:VkFramebuffer handle +* If pname:clearValueCount is not `0`, pname:pClearValues must: be a pointer to an array of pname:clearValueCount sname:VkClearValue unions +* Each of pname:renderPass and pname:framebuffer must: have been created, allocated or retrieved from the same sname:VkDevice +* The value of pname:clearValueCount must: be greater than or equal to the number of attachments in pname:renderPass that specify a pname:loadOp of ename:VK_ATTACHMENT_LOAD_OP_CLEAR +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkRenderPassCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkRenderPassCreateInfo.txt new file mode 100644 index 00000000..28498ebd --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkRenderPassCreateInfo.txt @@ -0,0 +1,24 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* If pname:attachmentCount is not `0`, pname:pAttachments must: be a pointer to an array of pname:attachmentCount valid sname:VkAttachmentDescription structures +* pname:pSubpasses must: be a pointer to an array of pname:subpassCount valid sname:VkSubpassDescription structures +* If pname:dependencyCount is not `0`, pname:pDependencies must: be a pointer to an array of pname:dependencyCount valid sname:VkSubpassDependency structures +* The value of pname:subpassCount must: be greater than `0` +* If any two subpasses operate on attachments with overlapping ranges of the same sname:VkDeviceMemory object, and at least one subpass writes to that area of sname:VkDeviceMemory, a subpass dependency must: be included (either directly or via some intermediate subpasses) between them +* If the pname:attachment member of any element of pname:pInputAttachments, pname:pColorAttachments, pname:pResolveAttachments or pname:pDepthStencilAttachment, or the attachment indexed by any element of pname:pPreserveAttachments in any given element of pname:pSubpasses is bound to a range of a sname:VkDeviceMemory object that overlaps with any other attachment in any subpass (including the same subpass), the sname:VkAttachmentDescription structures describing them must: include ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT in pname:flags +* If the pname:attachment member of any element of pname:pInputAttachments, pname:pColorAttachments, pname:pResolveAttachments or pname:pDepthStencilAttachment, or the value of any element of pname:pPreserveAttachments in any given element of pname:pSubpasses is not ename:VK_ATTACHMENT_UNUSED, it must: be less than the value of pname:attachmentCount +* The value of any element of the pname:pPreserveAttachments member in any given element of pname:pSubpasses mustnot: be ename:VK_ATTACHMENT_UNUSED +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkSamplerCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkSamplerCreateInfo.txt new file mode 100644 index 00000000..2ef815e7 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkSamplerCreateInfo.txt @@ -0,0 +1,33 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* pname:magFilter must: be a valid elink:VkFilter value +* pname:minFilter must: be a valid elink:VkFilter value +* pname:mipmapMode must: be a valid elink:VkSamplerMipmapMode value +* pname:addressModeU must: be a valid elink:VkSamplerAddressMode value +* pname:addressModeV must: be a valid elink:VkSamplerAddressMode value +* pname:addressModeW must: be a valid elink:VkSamplerAddressMode value +* The absolute value of pname:mipLodBias must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxSamplerLodBias +* If the <> feature is not enabled, pname:anisotropyEnable must: be ename:VK_FALSE +* If pname:anisotropyEnable is ename:VK_TRUE, the value of pname:maxAnisotropy must: be between `1.0` and sname:VkPhysicalDeviceLimits::pname:maxSamplerAnisotropy, inclusive +* If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:minFilter and pname:magFilter must: be equal +* If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:mipmapMode must: be ename:VK_SAMPLER_MIPMAP_MODE_NEAREST +* If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:minLod and pname:maxLod must: be zero +* If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:addressModeU and pname:addressModeV must: each be either ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE or ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER +* If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:anisotropyEnable must: be ename:VK_FALSE +* If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:compareEnable must: be ename:VK_FALSE +* If any of pname:addressModeU, pname:addressModeV or pname:addressModeW are ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER, pname:borderColor must: be a valid elink:VkBorderColor value +* If pname:compareEnable is ename:VK_TRUE, pname:compareOp must: be a valid elink:VkCompareOp value +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkSemaphoreCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkSemaphoreCreateInfo.txt new file mode 100644 index 00000000..ce95e64d --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkSemaphoreCreateInfo.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkShaderModuleCreateInfo.txt b/doc/specs/vulkan/validity/structs/VkShaderModuleCreateInfo.txt new file mode 100644 index 00000000..6d343886 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkShaderModuleCreateInfo.txt @@ -0,0 +1,24 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO +* pname:pNext must: be `NULL` +* pname:flags must: be `0` +* pname:pCode must: be a pointer to an array of pname:codeSize/4 basetype:uint32_t values +* pname:codeSize must: be greater than 0 +* pname:codeSize must: be a multiple of 4 +* pname:pCode must: point to valid SPIR-V code, formatted and packed as described by https://www.khronos.org/registry/spir-v/specs/1.0/SPIRV.html[the SPIR-V Specification v1.0] +* pname:pCode must: adhere to the validation rules described by the <> section of the <> appendix +* pname:pCode must: declare the code:Shader capability +* pname:pCode mustnot: declare any capability that is not supported by the API, as described by the <> section of the <> appendix +* If pname:pCode declares any of the capabilities that are listed as not required by the implementation, the relevant feature must: be enabled, as listed in the <> appendix +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkSparseBufferMemoryBindInfo.txt b/doc/specs/vulkan/validity/structs/VkSparseBufferMemoryBindInfo.txt new file mode 100644 index 00000000..e211ea04 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkSparseBufferMemoryBindInfo.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:buffer must: be a valid sname:VkBuffer handle +* pname:pBinds must: be a pointer to an array of pname:bindCount valid sname:VkSparseMemoryBind structures +* The value of pname:bindCount must: be greater than `0` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkSparseImageFormatProperties.txt b/doc/specs/vulkan/validity/structs/VkSparseImageFormatProperties.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkSparseImageFormatProperties.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkSparseImageMemoryBind.txt b/doc/specs/vulkan/validity/structs/VkSparseImageMemoryBind.txt new file mode 100644 index 00000000..22c55735 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkSparseImageMemoryBind.txt @@ -0,0 +1,25 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:subresource must: be a valid sname:VkImageSubresource structure +* If pname:memory is not sname:VK_NULL_HANDLE, pname:memory must: be a valid sname:VkDeviceMemory handle +* pname:flags must: be a valid combination of elink:VkSparseMemoryBindFlagBits values +* If the <> feature is not enabled, and if any other resources are bound to ranges of pname:memory, the range of pname:memory being bound mustnot: overlap with those bound ranges +* pname:memory and pname:memoryOffset must: match the memory requirements of the calling command's pname:image, as described in section <> +* pname:subresource must: be a valid subresource for pname:image (see <>) +* pname:offset.x must: be a multiple of the block width (sname:VkSparseImageFormatProperties::pname:imageGranularity.width) of the image +* pname:extent.width must: either be a multiple of the block width of the image, or else pname:extent.width + pname:offset.x must: equal the width of the image subresource +* pname:offset.y must: be a multiple of the block height (sname:VkSparseImageFormatProperties::pname:imageGranularity.height) of the image +* pname:extent.height must: either be a multiple of the block height of the image, or else pname:extent.height + pname:offset.y must: equal the height of the image subresource +* pname:offset.z must: be a multiple of the block depth (sname:VkSparseImageFormatProperties::pname:imageGranularity.depth) of the image +* pname:extent.depth must: either be a multiple of the block depth of the image, or else pname:extent.depth + pname:offset.z must: equal the depth of the image subresource +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkSparseImageMemoryBindInfo.txt b/doc/specs/vulkan/validity/structs/VkSparseImageMemoryBindInfo.txt new file mode 100644 index 00000000..6a9d2a8b --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkSparseImageMemoryBindInfo.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:image must: be a valid sname:VkImage handle +* pname:pBinds must: be a pointer to an array of pname:bindCount valid sname:VkSparseImageMemoryBind structures +* The value of pname:bindCount must: be greater than `0` +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkSparseImageMemoryRequirements.txt b/doc/specs/vulkan/validity/structs/VkSparseImageMemoryRequirements.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkSparseImageMemoryRequirements.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkSparseImageOpaqueMemoryBindInfo.txt b/doc/specs/vulkan/validity/structs/VkSparseImageOpaqueMemoryBindInfo.txt new file mode 100644 index 00000000..febd57c6 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkSparseImageOpaqueMemoryBindInfo.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:image must: be a valid sname:VkImage handle +* pname:pBinds must: be a pointer to an array of pname:bindCount valid sname:VkSparseMemoryBind structures +* The value of pname:bindCount must: be greater than `0` +* For any given element of pname:pBinds, if the pname:flags member of that element contains ename:VK_SPARSE_MEMORY_BIND_METADATA_BIT, the binding range defined must: be within the mip tail region of the metadata aspect of pname:image +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkSparseMemoryBind.txt b/doc/specs/vulkan/validity/structs/VkSparseMemoryBind.txt new file mode 100644 index 00000000..1325b89d --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkSparseMemoryBind.txt @@ -0,0 +1,21 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* If pname:memory is not sname:VK_NULL_HANDLE, pname:memory must: be a valid sname:VkDeviceMemory handle +* pname:flags must: be a valid combination of elink:VkSparseMemoryBindFlagBits values +* If pname:memory is not sname:VK_NULL_HANDLE, pname:memory and pname:memoryOffset must: match the memory requirements of the resource, as described in section <> +* If pname:memory is not sname:VK_NULL_HANDLE, pname:memory mustnot: have been created with a memory type that reports ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set +* pname:resourceOffset must: be less than the size of the resource +* The sum of pname:resourceOffset and pname:size must: be less than or equal to the size of the resource +* pname:memoryOffset must: be less than the size of pname:memory +* The sum of pname:memoryOffset and pname:size must: be less than or equal to the size of pname:memory +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkSpecializationInfo.txt b/doc/specs/vulkan/validity/structs/VkSpecializationInfo.txt new file mode 100644 index 00000000..c6e845e6 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkSpecializationInfo.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* If pname:mapEntryCount is not `0`, pname:pMapEntries must: be a pointer to an array of pname:mapEntryCount sname:VkSpecializationMapEntry structures +* If pname:dataSize is not `0`, pname:pData must: be a pointer to an array of pname:dataSize bytes +* The pname:offset member of any given element of pname:pMapEntries must: be less than pname:dataSize +* The sum of the pname:offset and pname:size members of any given element of pname:pMapEntries must: be less than or equal to pname:dataSize +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkSpecializationMapEntry.txt b/doc/specs/vulkan/validity/structs/VkSpecializationMapEntry.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkSpecializationMapEntry.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkStencilOpState.txt b/doc/specs/vulkan/validity/structs/VkStencilOpState.txt new file mode 100644 index 00000000..f96c52e4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkStencilOpState.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:failOp must: be a valid elink:VkStencilOp value +* pname:passOp must: be a valid elink:VkStencilOp value +* pname:depthFailOp must: be a valid elink:VkStencilOp value +* pname:compareOp must: be a valid elink:VkCompareOp value +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkSubmitInfo.txt b/doc/specs/vulkan/validity/structs/VkSubmitInfo.txt new file mode 100644 index 00000000..8889c672 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkSubmitInfo.txt @@ -0,0 +1,32 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_SUBMIT_INFO +* pname:pNext must: be `NULL` +* If pname:waitSemaphoreCount is not `0`, pname:pWaitSemaphores must: be a pointer to an array of pname:waitSemaphoreCount valid sname:VkSemaphore handles +* If pname:waitSemaphoreCount is not `0`, pname:pWaitDstStageMask must: be a pointer to an array of pname:waitSemaphoreCount valid combinations of elink:VkPipelineStageFlagBits values +* Each element of pname:pWaitDstStageMask mustnot: be `0` +* If pname:commandBufferCount is not `0`, pname:pCommandBuffers must: be a pointer to an array of pname:commandBufferCount valid sname:VkCommandBuffer handles +* If pname:signalSemaphoreCount is not `0`, pname:pSignalSemaphores must: be a pointer to an array of pname:signalSemaphoreCount valid sname:VkSemaphore handles +* Each of the elements of pname:pWaitSemaphores, the elements of pname:pCommandBuffers and the elements of pname:pSignalSemaphores that are valid handles must: have been created, allocated or retrieved from the same sname:VkDevice +* Any given element of pname:pSignalSemaphores must: currently be unsignalled +* Any given element of pname:pCommandBuffers must: either have been recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, or not currently be executing on the device +* Any given element of pname:pCommandBuffers must: be in the executable state +* If any given element of pname:pCommandBuffers contains commands that execute secondary command buffers, those secondary command buffers must: have been recorded with the ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, or not currently be executing on the device +* If any given element of pname:pCommandBuffers was created with ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, it mustnot: have been previously submitted without re-recording that command buffer +* Any given element of pname:pCommandBuffers mustnot: contain commands that execute a secondary command buffer, if that secondary command buffer has been recorded in another primary command buffer after it was recorded into this sname:VkCommandBuffer +* Any given element of pname:pCommandBuffers must: have been created on a sname:VkCommandPool that was created for the same queue family that the calling command's pname:queue belongs to +* Any given element of pname:pCommandBuffers mustnot: have been created with ename:VK_COMMAND_BUFFER_LEVEL_SECONDARY +* Any given element of sname:VkSemaphore in pname:pWaitSemaphores must: refer to a prior signal of that sname:VkSemaphore that won't be consumed by any other wait on that semaphore +* If the <> feature is not enabled, any given element of pname:pWaitDstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT +* If the <> feature is not enabled, any given element of pname:pWaitDstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkSubpassDependency.txt b/doc/specs/vulkan/validity/structs/VkSubpassDependency.txt new file mode 100644 index 00000000..2fdd00ed --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkSubpassDependency.txt @@ -0,0 +1,26 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:srcStageMask must: be a valid combination of elink:VkPipelineStageFlagBits values +* pname:srcStageMask mustnot: be `0` +* pname:dstStageMask must: be a valid combination of elink:VkPipelineStageFlagBits values +* pname:dstStageMask mustnot: be `0` +* pname:srcAccessMask must: be a valid combination of elink:VkAccessFlagBits values +* pname:dstAccessMask must: be a valid combination of elink:VkAccessFlagBits values +* pname:dependencyFlags must: be a valid combination of elink:VkDependencyFlagBits values +* If the <> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT +* If the <> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT +* If the <> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT +* If the <> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT +* The value of pname:srcSubpass must: be less than or equal to pname:dstSubpass, unless one of them is ename:VK_SUBPASS_EXTERNAL, to avoid cyclic dependencies and ensure a valid execution order +* The values of pname:srcSubpass and pname:dstSubpass mustnot: both be equal to ename:VK_SUBPASS_EXTERNAL +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkSubpassDescription.txt b/doc/specs/vulkan/validity/structs/VkSubpassDescription.txt new file mode 100644 index 00000000..88b047b6 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkSubpassDescription.txt @@ -0,0 +1,32 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:flags must: be `0` +* pname:pipelineBindPoint must: be a valid elink:VkPipelineBindPoint value +* If pname:inputAttachmentCount is not `0`, pname:pInputAttachments must: be a pointer to an array of pname:inputAttachmentCount valid sname:VkAttachmentReference structures +* If pname:colorAttachmentCount is not `0`, pname:pColorAttachments must: be a pointer to an array of pname:colorAttachmentCount valid sname:VkAttachmentReference structures +* If pname:colorAttachmentCount is not `0`, and pname:pResolveAttachments is not `NULL`, pname:pResolveAttachments must: be a pointer to an array of pname:colorAttachmentCount valid sname:VkAttachmentReference structures +* If pname:pDepthStencilAttachment is not `NULL`, pname:pDepthStencilAttachment must: be a pointer to a valid sname:VkAttachmentReference structure +* If pname:preserveAttachmentCount is not `0`, pname:pPreserveAttachments must: be a pointer to an array of pname:preserveAttachmentCount basetype:uint32_t values +* pname:pipelineBindPoint must: be ename:VK_PIPELINE_BIND_POINT_GRAPHICS +* The value of pname:colorCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxColorAttachments +* If the first use of an attachment in this render pass is as an input attachment, and the attachment is not also used as a color or depth/stencil attachment in the same subpass, then pname:loadOp mustnot: be ename:VK_ATTACHMENT_LOAD_OP_CLEAR +* If pname:pResolveAttachments is not `NULL`, for each resolve attachment that does not have the value ename:VK_ATTACHMENT_UNUSED, the corresponding color attachment mustnot: have the value ename:VK_ATTACHMENT_UNUSED +* If pname:pResolveAttachments is not `NULL`, the sample count of each element of pname:pColorAttachments must: be anything other than ename:VK_SAMPLE_COUNT_1_BIT +* Any given element of pname:pResolveAttachments must: have a sample count of ename:VK_SAMPLE_COUNT_1_BIT +* Any given element of pname:pResolveAttachments must: have the same elink:VkFormat as its corresponding color attachment +* All attachments in pname:pColorAttachments and pname:pDepthStencilAttachment that are not ename:VK_ATTACHMENT_UNUSED must: have the same sample count +* If any input attachments are ename:VK_ATTACHMENT_UNUSED, then any pipelines bound during the subpass mustnot: accesss those input attachments from the fragment shader +* The pname:attachment member of any element of pname:pPreserveAttachments mustnot: be ename:VK_ATTACHMENT_UNUSED +* Any given element of pname:pPreserveAttachments mustnot: also be an element of any other member of the subpass description +* If any attachment is used as both an input attachment and a color or depth/stencil attachment, then each use must use the same pname:layout +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkSubresourceLayout.txt b/doc/specs/vulkan/validity/structs/VkSubresourceLayout.txt new file mode 100644 index 00000000..8dd799f4 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkSubresourceLayout.txt @@ -0,0 +1 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry diff --git a/doc/specs/vulkan/validity/structs/VkVertexInputAttributeDescription.txt b/doc/specs/vulkan/validity/structs/VkVertexInputAttributeDescription.txt new file mode 100644 index 00000000..d0424de6 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkVertexInputAttributeDescription.txt @@ -0,0 +1,17 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:format must: be a valid elink:VkFormat value +* pname:binding must: be less than sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindings +* pname:offset must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputAttributeOffset +* pname:format must: be allowed as a vertex buffer format, as specified by the ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT flag in sname:VkFormatProperties::pname:bufferFeatures returned by fname:vkGetPhysicalDeviceFormatProperties +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkVertexInputBindingDescription.txt b/doc/specs/vulkan/validity/structs/VkVertexInputBindingDescription.txt new file mode 100644 index 00000000..ba6ae5cf --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkVertexInputBindingDescription.txt @@ -0,0 +1,16 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:inputRate must: be a valid elink:VkVertexInputRate value +* pname:binding must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindings +* pname:stride must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindingStride +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkViewport.txt b/doc/specs/vulkan/validity/structs/VkViewport.txt new file mode 100644 index 00000000..0225626f --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkViewport.txt @@ -0,0 +1,20 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:width must: be greater than `0.0` and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxViewportDimensions[0] +* pname:height must: be greater than `0.0` and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxViewportDimensions[1] +* pname:x and pname:y must: each be between pname:viewportBoundsRange[0] and pname:viewportBoundsRange[1], inclusive +* pname:x + pname:width must: be less than or equal to pname:viewportBoundsRange[1] +* pname:y + pname:height must: be less than or equal to pname:viewportBoundsRange[1] +* pname:minDepth must: be between `0.0` and `1.0`, inclusive +* pname:maxDepth must: be between `0.0` and `1.0`, inclusive +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/validity/structs/VkWriteDescriptorSet.txt b/doc/specs/vulkan/validity/structs/VkWriteDescriptorSet.txt new file mode 100644 index 00000000..585438b5 --- /dev/null +++ b/doc/specs/vulkan/validity/structs/VkWriteDescriptorSet.txt @@ -0,0 +1,36 @@ +// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry +ifndef::doctype-manpage[] +.Valid Usage +******************************************************************************** +endif::doctype-manpage[] +ifdef::doctype-manpage[] +Valid Usage +----------- +endif::doctype-manpage[] +* pname:sType must: be ename:VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET +* pname:pNext must: be `NULL` +* pname:dstSet must: be a valid sname:VkDescriptorSet handle +* pname:descriptorType must: be a valid elink:VkDescriptorType value +* The value of pname:descriptorCount must: be greater than `0` +* Each of pname:dstSet and the elements of pname:pTexelBufferView that are valid handles must: have been created, allocated or retrieved from the same sname:VkDevice +* pname:dstBinding must: be a valid binding point within pname:dstSet +* pname:descriptorType must: match the type of pname:dstBinding within pname:dstSet +* The sum of pname:dstArrayElement and pname:descriptorCount must: be less than or equal to the number of array elements in the descriptor set binding specified by pname:dstBinding, and all applicable consecutive bindings, as described by <> +* If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLER, ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE or ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, pname:pImageInfo must: be a pointer to an array of pname:descriptorCount valid sname:VkDescriptorImageInfo structures +* If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, pname:pTexelBufferView must: be a pointer to an array of pname:descriptorCount valid sname:VkBufferView handles +* If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, pname:pBufferInfo must: be a pointer to an array of pname:descriptorCount valid sname:VkDescriptorBufferInfo structures +* If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLER or ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and pname:dstSet was not created with a layout that included immutable samplers for pname:dstBinding with pname:descriptorType, the pname:sampler member of any given element of pname:pImageInfo must: be a valid sname:VkSampler object +* If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE or ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the pname:imageView and pname:imageLayout members of any given element of pname:pImageInfo must: be a valid sname:VkImageView and elink:VkImageLayout, respectively +* If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the pname:offset member of any given element of pname:pBufferInfo must: be a multiple of the value of sname:VkPhysicalDeviceLimits::pname:minUniformBufferOffsetAlignment +* If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the pname:offset member of any given element of pname:pBufferInfo must: be a multiple of the value of sname:VkPhysicalDeviceLimits::pname:minStorageBufferOffsetAlignment +* If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the pname:buffer member of any given element of pname:pBufferInfo must: have been created with ename:VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT set +* If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the pname:buffer member of any given element of pname:pBufferInfo must: have been created with ename:VK_BUFFER_USAGE_STORAGE_BUFFER_BIT set +* If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the pname:range member of any given element of pname:pBufferInfo must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxUniformBufferRange +* If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the pname:range member of any given element of pname:pBufferInfo must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxStorageBufferRange +* If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, the sname:VkBuffer that pname:pTexelBufferView was created from must: have been created with ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT set +* If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, the sname:VkBuffer that pname:pTexelBufferView was created from must: have been created with ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT set +* If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE or ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the pname:imageView must: have been created with identity swizzle +ifndef::doctype-manpage[] +******************************************************************************** +endif::doctype-manpage[] + diff --git a/doc/specs/vulkan/vkapi.py b/doc/specs/vulkan/vkapi.py new file mode 100644 index 00000000..8fe3f7e9 --- /dev/null +++ b/doc/specs/vulkan/vkapi.py @@ -0,0 +1,1027 @@ +flags = {} +enums = {} +structs = {} +consts = {} +enums = {} +consts = {} +protos = {} +funcpointers = {} +# Unprocessed type: vk_platform category: include +structs['VK_MAKE_VERSION'] = None +structs['VK_API_VERSION'] = None +structs['VK_VERSION_MAJOR'] = None +structs['VK_VERSION_MINOR'] = None +structs['VK_VERSION_PATCH'] = None +structs['VK_NULL_HANDLE'] = None +consts['VK_PIPELINE_CACHE_HEADER_VERSION_ONE'] = 'VkPipelineCacheHeaderVersion' +enums['VkPipelineCacheHeaderVersion'] = ['VK_PIPELINE_CACHE_HEADER_VERSION_ONE'] +consts['VK_LOD_CLAMP_NONE'] = None +consts['VK_REMAINING_MIP_LEVELS'] = None +consts['VK_REMAINING_ARRAY_LAYERS'] = None +consts['VK_WHOLE_SIZE'] = None +consts['VK_ATTACHMENT_UNUSED'] = None +consts['VK_TRUE'] = None +consts['VK_FALSE'] = None +consts['VK_QUEUE_FAMILY_IGNORED'] = None +consts['VK_SUBPASS_EXTERNAL'] = None +consts['VK_SUCCESS'] = 'VkResult' +consts['VK_NOT_READY'] = 'VkResult' +consts['VK_TIMEOUT'] = 'VkResult' +consts['VK_EVENT_SET'] = 'VkResult' +consts['VK_EVENT_RESET'] = 'VkResult' +consts['VK_INCOMPLETE'] = 'VkResult' +consts['VK_ERROR_OUT_OF_HOST_MEMORY'] = 'VkResult' +consts['VK_ERROR_OUT_OF_DEVICE_MEMORY'] = 'VkResult' +consts['VK_ERROR_INITIALIZATION_FAILED'] = 'VkResult' +consts['VK_ERROR_DEVICE_LOST'] = 'VkResult' +consts['VK_ERROR_MEMORY_MAP_FAILED'] = 'VkResult' +consts['VK_ERROR_LAYER_NOT_PRESENT'] = 'VkResult' +consts['VK_ERROR_EXTENSION_NOT_PRESENT'] = 'VkResult' +consts['VK_ERROR_FEATURE_NOT_PRESENT'] = 'VkResult' +consts['VK_ERROR_INCOMPATIBLE_DRIVER'] = 'VkResult' +consts['VK_ERROR_TOO_MANY_OBJECTS'] = 'VkResult' +consts['VK_ERROR_FORMAT_NOT_SUPPORTED'] = 'VkResult' +consts['VK_ERROR_SURFACE_LOST_KHR'] = 'VkResult' +consts['VK_ERROR_NATIVE_WINDOW_IN_USE_KHR'] = 'VkResult' +consts['VK_SUBOPTIMAL_KHR'] = 'VkResult' +consts['VK_ERROR_OUT_OF_DATE_KHR'] = 'VkResult' +consts['VK_ERROR_INCOMPATIBLE_DISPLAY_KHR'] = 'VkResult' +consts['VK_ERROR_VALIDATION_FAILED_EXT'] = 'VkResult' +consts['VK_NV_EXTENSION_0_ERROR'] = 'VkResult' +consts['VK_NV_EXTENSION_1_ERROR'] = 'VkResult' +enums['VkResult'] = ['VK_SUCCESS', 'VK_NOT_READY', 'VK_TIMEOUT', 'VK_EVENT_SET', 'VK_EVENT_RESET', 'VK_INCOMPLETE', 'VK_ERROR_OUT_OF_HOST_MEMORY', 'VK_ERROR_OUT_OF_DEVICE_MEMORY', 'VK_ERROR_INITIALIZATION_FAILED', 'VK_ERROR_DEVICE_LOST', 'VK_ERROR_MEMORY_MAP_FAILED', 'VK_ERROR_LAYER_NOT_PRESENT', 'VK_ERROR_EXTENSION_NOT_PRESENT', 'VK_ERROR_FEATURE_NOT_PRESENT', 'VK_ERROR_INCOMPATIBLE_DRIVER', 'VK_ERROR_TOO_MANY_OBJECTS', 'VK_ERROR_FORMAT_NOT_SUPPORTED', 'VK_ERROR_SURFACE_LOST_KHR', 'VK_ERROR_NATIVE_WINDOW_IN_USE_KHR', 'VK_SUBOPTIMAL_KHR', 'VK_ERROR_OUT_OF_DATE_KHR', 'VK_ERROR_INCOMPATIBLE_DISPLAY_KHR', 'VK_ERROR_VALIDATION_FAILED_EXT', 'VK_NV_EXTENSION_0_ERROR', 'VK_NV_EXTENSION_1_ERROR'] +consts['VK_STRUCTURE_TYPE_APPLICATION_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_SUBMIT_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_BIND_SPARSE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_FENCE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_EVENT_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_MEMORY_BARRIER'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_PRESENT_INFO_KHR'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR'] = 'VkStructureType' +consts['VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT'] = 'VkStructureType' +enums['VkStructureType'] = ['VK_STRUCTURE_TYPE_APPLICATION_INFO', 'VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO', 'VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO', 'VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO', 'VK_STRUCTURE_TYPE_SUBMIT_INFO', 'VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO', 'VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE', 'VK_STRUCTURE_TYPE_BIND_SPARSE_INFO', 'VK_STRUCTURE_TYPE_FENCE_CREATE_INFO', 'VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO', 'VK_STRUCTURE_TYPE_EVENT_CREATE_INFO', 'VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO', 'VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO', 'VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO', 'VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO', 'VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO', 'VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO', 'VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO', 'VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO', 'VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO', 'VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO', 'VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO', 'VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO', 'VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO', 'VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET', 'VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET', 'VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO', 'VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO', 'VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO', 'VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO', 'VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO', 'VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO', 'VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO', 'VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER', 'VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER', 'VK_STRUCTURE_TYPE_MEMORY_BARRIER', 'VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO', 'VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO', 'VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_PRESENT_INFO_KHR', 'VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR', 'VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR', 'VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT'] +# Unprocessed type: void +# Unprocessed type: uint32_t +# Unprocessed type: VkFlags category: basetype +flags['VkInstanceCreateFlags'] = None +# Unprocessed type: char +structs['VkApplicationInfo'] = ['sType', 'pNext', 'pApplicationName', 'applicationVersion', 'pEngineName', 'engineVersion', 'apiVersion'] +structs['VkInstanceCreateInfo'] = ['sType', 'pNext', 'flags', 'pApplicationInfo', 'enabledLayerCount', 'ppEnabledLayerNames', 'enabledExtensionCount', 'ppEnabledExtensionNames'] +# Unprocessed type: size_t +consts['VK_SYSTEM_ALLOCATION_SCOPE_COMMAND'] = 'VkSystemAllocationScope' +consts['VK_SYSTEM_ALLOCATION_SCOPE_OBJECT'] = 'VkSystemAllocationScope' +consts['VK_SYSTEM_ALLOCATION_SCOPE_CACHE'] = 'VkSystemAllocationScope' +consts['VK_SYSTEM_ALLOCATION_SCOPE_DEVICE'] = 'VkSystemAllocationScope' +consts['VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE'] = 'VkSystemAllocationScope' +enums['VkSystemAllocationScope'] = ['VK_SYSTEM_ALLOCATION_SCOPE_COMMAND', 'VK_SYSTEM_ALLOCATION_SCOPE_OBJECT', 'VK_SYSTEM_ALLOCATION_SCOPE_CACHE', 'VK_SYSTEM_ALLOCATION_SCOPE_DEVICE', 'VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE'] +funcpointers['PFN_vkAllocationFunction'] = None +funcpointers['PFN_vkReallocationFunction'] = None +funcpointers['PFN_vkFreeFunction'] = None +consts['VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE'] = 'VkInternalAllocationType' +enums['VkInternalAllocationType'] = ['VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE'] +funcpointers['PFN_vkInternalAllocationNotification'] = None +funcpointers['PFN_vkInternalFreeNotification'] = None +structs['VkAllocationCallbacks'] = ['pUserData', 'pfnAllocation', 'pfnReallocation', 'pfnFree', 'pfnInternalAllocation', 'pfnInternalFree'] +structs['VK_DEFINE_HANDLE'] = None +structs['VkInstance'] = None +protos['vkCreateInstance'] = ['pCreateInfo', 'pAllocator', 'pInstance'] +protos['vkDestroyInstance'] = ['instance', 'pAllocator'] +structs['VkPhysicalDevice'] = None +protos['vkEnumeratePhysicalDevices'] = ['instance', 'pPhysicalDeviceCount', 'pPhysicalDevices'] +# Unprocessed type: VkBool32 category: basetype +structs['VkPhysicalDeviceFeatures'] = ['robustBufferAccess', 'fullDrawIndexUint32', 'imageCubeArray', 'independentBlend', 'geometryShader', 'tessellationShader', 'sampleRateShading', 'dualSrcBlend', 'logicOp', 'multiDrawIndirect', 'drawIndirectFirstInstance', 'depthClamp', 'depthBiasClamp', 'fillModeNonSolid', 'depthBounds', 'wideLines', 'largePoints', 'alphaToOne', 'multiViewport', 'samplerAnisotropy', 'textureCompressionETC2', 'textureCompressionASTC_LDR', 'textureCompressionBC', 'occlusionQueryPrecise', 'pipelineStatisticsQuery', 'vertexPipelineStoresAndAtomics', 'fragmentStoresAndAtomics', 'shaderTessellationAndGeometryPointSize', 'shaderImageGatherExtended', 'shaderStorageImageExtendedFormats', 'shaderStorageImageMultisample', 'shaderStorageImageReadWithoutFormat', 'shaderStorageImageWriteWithoutFormat', 'shaderUniformBufferArrayDynamicIndexing', 'shaderSampledImageArrayDynamicIndexing', 'shaderStorageBufferArrayDynamicIndexing', 'shaderStorageImageArrayDynamicIndexing', 'shaderClipDistance', 'shaderCullDistance', 'shaderFloat64', 'shaderInt64', 'shaderInt16', 'shaderResourceResidency', 'shaderResourceMinLod', 'sparseBinding', 'sparseResidencyBuffer', 'sparseResidencyImage2D', 'sparseResidencyImage3D', 'sparseResidency2Samples', 'sparseResidency4Samples', 'sparseResidency8Samples', 'sparseResidency16Samples', 'sparseResidencyAliased', 'variableMultisampleRate', 'inheritedQueries'] +protos['vkGetPhysicalDeviceFeatures'] = ['physicalDevice', 'pFeatures'] +consts['VK_FORMAT_UNDEFINED'] = 'VkFormat' +consts['VK_FORMAT_R4G4_UNORM_PACK8'] = 'VkFormat' +consts['VK_FORMAT_R4G4B4A4_UNORM_PACK16'] = 'VkFormat' +consts['VK_FORMAT_B4G4R4A4_UNORM_PACK16'] = 'VkFormat' +consts['VK_FORMAT_R5G6B5_UNORM_PACK16'] = 'VkFormat' +consts['VK_FORMAT_B5G6R5_UNORM_PACK16'] = 'VkFormat' +consts['VK_FORMAT_R5G5B5A1_UNORM_PACK16'] = 'VkFormat' +consts['VK_FORMAT_B5G5R5A1_UNORM_PACK16'] = 'VkFormat' +consts['VK_FORMAT_A1R5G5B5_UNORM_PACK16'] = 'VkFormat' +consts['VK_FORMAT_R8_UNORM'] = 'VkFormat' +consts['VK_FORMAT_R8_SNORM'] = 'VkFormat' +consts['VK_FORMAT_R8_USCALED'] = 'VkFormat' +consts['VK_FORMAT_R8_SSCALED'] = 'VkFormat' +consts['VK_FORMAT_R8_UINT'] = 'VkFormat' +consts['VK_FORMAT_R8_SINT'] = 'VkFormat' +consts['VK_FORMAT_R8_SRGB'] = 'VkFormat' +consts['VK_FORMAT_R8G8_UNORM'] = 'VkFormat' +consts['VK_FORMAT_R8G8_SNORM'] = 'VkFormat' +consts['VK_FORMAT_R8G8_USCALED'] = 'VkFormat' +consts['VK_FORMAT_R8G8_SSCALED'] = 'VkFormat' +consts['VK_FORMAT_R8G8_UINT'] = 'VkFormat' +consts['VK_FORMAT_R8G8_SINT'] = 'VkFormat' +consts['VK_FORMAT_R8G8_SRGB'] = 'VkFormat' +consts['VK_FORMAT_R8G8B8_UNORM'] = 'VkFormat' +consts['VK_FORMAT_R8G8B8_SNORM'] = 'VkFormat' +consts['VK_FORMAT_R8G8B8_USCALED'] = 'VkFormat' +consts['VK_FORMAT_R8G8B8_SSCALED'] = 'VkFormat' +consts['VK_FORMAT_R8G8B8_UINT'] = 'VkFormat' +consts['VK_FORMAT_R8G8B8_SINT'] = 'VkFormat' +consts['VK_FORMAT_R8G8B8_SRGB'] = 'VkFormat' +consts['VK_FORMAT_B8G8R8_UNORM'] = 'VkFormat' +consts['VK_FORMAT_B8G8R8_SNORM'] = 'VkFormat' +consts['VK_FORMAT_B8G8R8_USCALED'] = 'VkFormat' +consts['VK_FORMAT_B8G8R8_SSCALED'] = 'VkFormat' +consts['VK_FORMAT_B8G8R8_UINT'] = 'VkFormat' +consts['VK_FORMAT_B8G8R8_SINT'] = 'VkFormat' +consts['VK_FORMAT_B8G8R8_SRGB'] = 'VkFormat' +consts['VK_FORMAT_R8G8B8A8_UNORM'] = 'VkFormat' +consts['VK_FORMAT_R8G8B8A8_SNORM'] = 'VkFormat' +consts['VK_FORMAT_R8G8B8A8_USCALED'] = 'VkFormat' +consts['VK_FORMAT_R8G8B8A8_SSCALED'] = 'VkFormat' +consts['VK_FORMAT_R8G8B8A8_UINT'] = 'VkFormat' +consts['VK_FORMAT_R8G8B8A8_SINT'] = 'VkFormat' +consts['VK_FORMAT_R8G8B8A8_SRGB'] = 'VkFormat' +consts['VK_FORMAT_B8G8R8A8_UNORM'] = 'VkFormat' +consts['VK_FORMAT_B8G8R8A8_SNORM'] = 'VkFormat' +consts['VK_FORMAT_B8G8R8A8_USCALED'] = 'VkFormat' +consts['VK_FORMAT_B8G8R8A8_SSCALED'] = 'VkFormat' +consts['VK_FORMAT_B8G8R8A8_UINT'] = 'VkFormat' +consts['VK_FORMAT_B8G8R8A8_SINT'] = 'VkFormat' +consts['VK_FORMAT_B8G8R8A8_SRGB'] = 'VkFormat' +consts['VK_FORMAT_A8B8G8R8_UNORM_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A8B8G8R8_SNORM_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A8B8G8R8_USCALED_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A8B8G8R8_SSCALED_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A8B8G8R8_UINT_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A8B8G8R8_SINT_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A8B8G8R8_SRGB_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A2R10G10B10_UNORM_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A2R10G10B10_SNORM_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A2R10G10B10_USCALED_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A2R10G10B10_SSCALED_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A2R10G10B10_UINT_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A2R10G10B10_SINT_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A2B10G10R10_UNORM_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A2B10G10R10_SNORM_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A2B10G10R10_USCALED_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A2B10G10R10_SSCALED_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A2B10G10R10_UINT_PACK32'] = 'VkFormat' +consts['VK_FORMAT_A2B10G10R10_SINT_PACK32'] = 'VkFormat' +consts['VK_FORMAT_R16_UNORM'] = 'VkFormat' +consts['VK_FORMAT_R16_SNORM'] = 'VkFormat' +consts['VK_FORMAT_R16_USCALED'] = 'VkFormat' +consts['VK_FORMAT_R16_SSCALED'] = 'VkFormat' +consts['VK_FORMAT_R16_UINT'] = 'VkFormat' +consts['VK_FORMAT_R16_SINT'] = 'VkFormat' +consts['VK_FORMAT_R16_SFLOAT'] = 'VkFormat' +consts['VK_FORMAT_R16G16_UNORM'] = 'VkFormat' +consts['VK_FORMAT_R16G16_SNORM'] = 'VkFormat' +consts['VK_FORMAT_R16G16_USCALED'] = 'VkFormat' +consts['VK_FORMAT_R16G16_SSCALED'] = 'VkFormat' +consts['VK_FORMAT_R16G16_UINT'] = 'VkFormat' +consts['VK_FORMAT_R16G16_SINT'] = 'VkFormat' +consts['VK_FORMAT_R16G16_SFLOAT'] = 'VkFormat' +consts['VK_FORMAT_R16G16B16_UNORM'] = 'VkFormat' +consts['VK_FORMAT_R16G16B16_SNORM'] = 'VkFormat' +consts['VK_FORMAT_R16G16B16_USCALED'] = 'VkFormat' +consts['VK_FORMAT_R16G16B16_SSCALED'] = 'VkFormat' +consts['VK_FORMAT_R16G16B16_UINT'] = 'VkFormat' +consts['VK_FORMAT_R16G16B16_SINT'] = 'VkFormat' +consts['VK_FORMAT_R16G16B16_SFLOAT'] = 'VkFormat' +consts['VK_FORMAT_R16G16B16A16_UNORM'] = 'VkFormat' +consts['VK_FORMAT_R16G16B16A16_SNORM'] = 'VkFormat' +consts['VK_FORMAT_R16G16B16A16_USCALED'] = 'VkFormat' +consts['VK_FORMAT_R16G16B16A16_SSCALED'] = 'VkFormat' +consts['VK_FORMAT_R16G16B16A16_UINT'] = 'VkFormat' +consts['VK_FORMAT_R16G16B16A16_SINT'] = 'VkFormat' +consts['VK_FORMAT_R16G16B16A16_SFLOAT'] = 'VkFormat' +consts['VK_FORMAT_R32_UINT'] = 'VkFormat' +consts['VK_FORMAT_R32_SINT'] = 'VkFormat' +consts['VK_FORMAT_R32_SFLOAT'] = 'VkFormat' +consts['VK_FORMAT_R32G32_UINT'] = 'VkFormat' +consts['VK_FORMAT_R32G32_SINT'] = 'VkFormat' +consts['VK_FORMAT_R32G32_SFLOAT'] = 'VkFormat' +consts['VK_FORMAT_R32G32B32_UINT'] = 'VkFormat' +consts['VK_FORMAT_R32G32B32_SINT'] = 'VkFormat' +consts['VK_FORMAT_R32G32B32_SFLOAT'] = 'VkFormat' +consts['VK_FORMAT_R32G32B32A32_UINT'] = 'VkFormat' +consts['VK_FORMAT_R32G32B32A32_SINT'] = 'VkFormat' +consts['VK_FORMAT_R32G32B32A32_SFLOAT'] = 'VkFormat' +consts['VK_FORMAT_R64_UINT'] = 'VkFormat' +consts['VK_FORMAT_R64_SINT'] = 'VkFormat' +consts['VK_FORMAT_R64_SFLOAT'] = 'VkFormat' +consts['VK_FORMAT_R64G64_UINT'] = 'VkFormat' +consts['VK_FORMAT_R64G64_SINT'] = 'VkFormat' +consts['VK_FORMAT_R64G64_SFLOAT'] = 'VkFormat' +consts['VK_FORMAT_R64G64B64_UINT'] = 'VkFormat' +consts['VK_FORMAT_R64G64B64_SINT'] = 'VkFormat' +consts['VK_FORMAT_R64G64B64_SFLOAT'] = 'VkFormat' +consts['VK_FORMAT_R64G64B64A64_UINT'] = 'VkFormat' +consts['VK_FORMAT_R64G64B64A64_SINT'] = 'VkFormat' +consts['VK_FORMAT_R64G64B64A64_SFLOAT'] = 'VkFormat' +consts['VK_FORMAT_B10G11R11_UFLOAT_PACK32'] = 'VkFormat' +consts['VK_FORMAT_E5B9G9R9_UFLOAT_PACK32'] = 'VkFormat' +consts['VK_FORMAT_D16_UNORM'] = 'VkFormat' +consts['VK_FORMAT_X8_D24_UNORM_PACK32'] = 'VkFormat' +consts['VK_FORMAT_D32_SFLOAT'] = 'VkFormat' +consts['VK_FORMAT_S8_UINT'] = 'VkFormat' +consts['VK_FORMAT_D16_UNORM_S8_UINT'] = 'VkFormat' +consts['VK_FORMAT_D24_UNORM_S8_UINT'] = 'VkFormat' +consts['VK_FORMAT_D32_SFLOAT_S8_UINT'] = 'VkFormat' +consts['VK_FORMAT_BC1_RGB_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_BC1_RGB_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_BC1_RGBA_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_BC1_RGBA_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_BC2_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_BC2_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_BC3_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_BC3_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_BC4_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_BC4_SNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_BC5_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_BC5_SNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_BC6H_UFLOAT_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_BC6H_SFLOAT_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_BC7_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_BC7_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_EAC_R11_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_EAC_R11_SNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_EAC_R11G11_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_EAC_R11G11_SNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_4x4_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_4x4_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_5x4_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_5x4_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_5x5_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_5x5_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_6x5_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_6x5_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_6x6_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_6x6_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_8x5_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_8x5_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_8x6_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_8x6_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_8x8_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_8x8_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_10x5_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_10x5_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_10x6_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_10x6_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_10x8_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_10x8_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_10x10_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_10x10_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_12x10_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_12x10_SRGB_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_12x12_UNORM_BLOCK'] = 'VkFormat' +consts['VK_FORMAT_ASTC_12x12_SRGB_BLOCK'] = 'VkFormat' +enums['VkFormat'] = ['VK_FORMAT_UNDEFINED', 'VK_FORMAT_R4G4_UNORM_PACK8', 'VK_FORMAT_R4G4B4A4_UNORM_PACK16', 'VK_FORMAT_B4G4R4A4_UNORM_PACK16', 'VK_FORMAT_R5G6B5_UNORM_PACK16', 'VK_FORMAT_B5G6R5_UNORM_PACK16', 'VK_FORMAT_R5G5B5A1_UNORM_PACK16', 'VK_FORMAT_B5G5R5A1_UNORM_PACK16', 'VK_FORMAT_A1R5G5B5_UNORM_PACK16', 'VK_FORMAT_R8_UNORM', 'VK_FORMAT_R8_SNORM', 'VK_FORMAT_R8_USCALED', 'VK_FORMAT_R8_SSCALED', 'VK_FORMAT_R8_UINT', 'VK_FORMAT_R8_SINT', 'VK_FORMAT_R8_SRGB', 'VK_FORMAT_R8G8_UNORM', 'VK_FORMAT_R8G8_SNORM', 'VK_FORMAT_R8G8_USCALED', 'VK_FORMAT_R8G8_SSCALED', 'VK_FORMAT_R8G8_UINT', 'VK_FORMAT_R8G8_SINT', 'VK_FORMAT_R8G8_SRGB', 'VK_FORMAT_R8G8B8_UNORM', 'VK_FORMAT_R8G8B8_SNORM', 'VK_FORMAT_R8G8B8_USCALED', 'VK_FORMAT_R8G8B8_SSCALED', 'VK_FORMAT_R8G8B8_UINT', 'VK_FORMAT_R8G8B8_SINT', 'VK_FORMAT_R8G8B8_SRGB', 'VK_FORMAT_B8G8R8_UNORM', 'VK_FORMAT_B8G8R8_SNORM', 'VK_FORMAT_B8G8R8_USCALED', 'VK_FORMAT_B8G8R8_SSCALED', 'VK_FORMAT_B8G8R8_UINT', 'VK_FORMAT_B8G8R8_SINT', 'VK_FORMAT_B8G8R8_SRGB', 'VK_FORMAT_R8G8B8A8_UNORM', 'VK_FORMAT_R8G8B8A8_SNORM', 'VK_FORMAT_R8G8B8A8_USCALED', 'VK_FORMAT_R8G8B8A8_SSCALED', 'VK_FORMAT_R8G8B8A8_UINT', 'VK_FORMAT_R8G8B8A8_SINT', 'VK_FORMAT_R8G8B8A8_SRGB', 'VK_FORMAT_B8G8R8A8_UNORM', 'VK_FORMAT_B8G8R8A8_SNORM', 'VK_FORMAT_B8G8R8A8_USCALED', 'VK_FORMAT_B8G8R8A8_SSCALED', 'VK_FORMAT_B8G8R8A8_UINT', 'VK_FORMAT_B8G8R8A8_SINT', 'VK_FORMAT_B8G8R8A8_SRGB', 'VK_FORMAT_A8B8G8R8_UNORM_PACK32', 'VK_FORMAT_A8B8G8R8_SNORM_PACK32', 'VK_FORMAT_A8B8G8R8_USCALED_PACK32', 'VK_FORMAT_A8B8G8R8_SSCALED_PACK32', 'VK_FORMAT_A8B8G8R8_UINT_PACK32', 'VK_FORMAT_A8B8G8R8_SINT_PACK32', 'VK_FORMAT_A8B8G8R8_SRGB_PACK32', 'VK_FORMAT_A2R10G10B10_UNORM_PACK32', 'VK_FORMAT_A2R10G10B10_SNORM_PACK32', 'VK_FORMAT_A2R10G10B10_USCALED_PACK32', 'VK_FORMAT_A2R10G10B10_SSCALED_PACK32', 'VK_FORMAT_A2R10G10B10_UINT_PACK32', 'VK_FORMAT_A2R10G10B10_SINT_PACK32', 'VK_FORMAT_A2B10G10R10_UNORM_PACK32', 'VK_FORMAT_A2B10G10R10_SNORM_PACK32', 'VK_FORMAT_A2B10G10R10_USCALED_PACK32', 'VK_FORMAT_A2B10G10R10_SSCALED_PACK32', 'VK_FORMAT_A2B10G10R10_UINT_PACK32', 'VK_FORMAT_A2B10G10R10_SINT_PACK32', 'VK_FORMAT_R16_UNORM', 'VK_FORMAT_R16_SNORM', 'VK_FORMAT_R16_USCALED', 'VK_FORMAT_R16_SSCALED', 'VK_FORMAT_R16_UINT', 'VK_FORMAT_R16_SINT', 'VK_FORMAT_R16_SFLOAT', 'VK_FORMAT_R16G16_UNORM', 'VK_FORMAT_R16G16_SNORM', 'VK_FORMAT_R16G16_USCALED', 'VK_FORMAT_R16G16_SSCALED', 'VK_FORMAT_R16G16_UINT', 'VK_FORMAT_R16G16_SINT', 'VK_FORMAT_R16G16_SFLOAT', 'VK_FORMAT_R16G16B16_UNORM', 'VK_FORMAT_R16G16B16_SNORM', 'VK_FORMAT_R16G16B16_USCALED', 'VK_FORMAT_R16G16B16_SSCALED', 'VK_FORMAT_R16G16B16_UINT', 'VK_FORMAT_R16G16B16_SINT', 'VK_FORMAT_R16G16B16_SFLOAT', 'VK_FORMAT_R16G16B16A16_UNORM', 'VK_FORMAT_R16G16B16A16_SNORM', 'VK_FORMAT_R16G16B16A16_USCALED', 'VK_FORMAT_R16G16B16A16_SSCALED', 'VK_FORMAT_R16G16B16A16_UINT', 'VK_FORMAT_R16G16B16A16_SINT', 'VK_FORMAT_R16G16B16A16_SFLOAT', 'VK_FORMAT_R32_UINT', 'VK_FORMAT_R32_SINT', 'VK_FORMAT_R32_SFLOAT', 'VK_FORMAT_R32G32_UINT', 'VK_FORMAT_R32G32_SINT', 'VK_FORMAT_R32G32_SFLOAT', 'VK_FORMAT_R32G32B32_UINT', 'VK_FORMAT_R32G32B32_SINT', 'VK_FORMAT_R32G32B32_SFLOAT', 'VK_FORMAT_R32G32B32A32_UINT', 'VK_FORMAT_R32G32B32A32_SINT', 'VK_FORMAT_R32G32B32A32_SFLOAT', 'VK_FORMAT_R64_UINT', 'VK_FORMAT_R64_SINT', 'VK_FORMAT_R64_SFLOAT', 'VK_FORMAT_R64G64_UINT', 'VK_FORMAT_R64G64_SINT', 'VK_FORMAT_R64G64_SFLOAT', 'VK_FORMAT_R64G64B64_UINT', 'VK_FORMAT_R64G64B64_SINT', 'VK_FORMAT_R64G64B64_SFLOAT', 'VK_FORMAT_R64G64B64A64_UINT', 'VK_FORMAT_R64G64B64A64_SINT', 'VK_FORMAT_R64G64B64A64_SFLOAT', 'VK_FORMAT_B10G11R11_UFLOAT_PACK32', 'VK_FORMAT_E5B9G9R9_UFLOAT_PACK32', 'VK_FORMAT_D16_UNORM', 'VK_FORMAT_X8_D24_UNORM_PACK32', 'VK_FORMAT_D32_SFLOAT', 'VK_FORMAT_S8_UINT', 'VK_FORMAT_D16_UNORM_S8_UINT', 'VK_FORMAT_D24_UNORM_S8_UINT', 'VK_FORMAT_D32_SFLOAT_S8_UINT', 'VK_FORMAT_BC1_RGB_UNORM_BLOCK', 'VK_FORMAT_BC1_RGB_SRGB_BLOCK', 'VK_FORMAT_BC1_RGBA_UNORM_BLOCK', 'VK_FORMAT_BC1_RGBA_SRGB_BLOCK', 'VK_FORMAT_BC2_UNORM_BLOCK', 'VK_FORMAT_BC2_SRGB_BLOCK', 'VK_FORMAT_BC3_UNORM_BLOCK', 'VK_FORMAT_BC3_SRGB_BLOCK', 'VK_FORMAT_BC4_UNORM_BLOCK', 'VK_FORMAT_BC4_SNORM_BLOCK', 'VK_FORMAT_BC5_UNORM_BLOCK', 'VK_FORMAT_BC5_SNORM_BLOCK', 'VK_FORMAT_BC6H_UFLOAT_BLOCK', 'VK_FORMAT_BC6H_SFLOAT_BLOCK', 'VK_FORMAT_BC7_UNORM_BLOCK', 'VK_FORMAT_BC7_SRGB_BLOCK', 'VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK', 'VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK', 'VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK', 'VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK', 'VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK', 'VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK', 'VK_FORMAT_EAC_R11_UNORM_BLOCK', 'VK_FORMAT_EAC_R11_SNORM_BLOCK', 'VK_FORMAT_EAC_R11G11_UNORM_BLOCK', 'VK_FORMAT_EAC_R11G11_SNORM_BLOCK', 'VK_FORMAT_ASTC_4x4_UNORM_BLOCK', 'VK_FORMAT_ASTC_4x4_SRGB_BLOCK', 'VK_FORMAT_ASTC_5x4_UNORM_BLOCK', 'VK_FORMAT_ASTC_5x4_SRGB_BLOCK', 'VK_FORMAT_ASTC_5x5_UNORM_BLOCK', 'VK_FORMAT_ASTC_5x5_SRGB_BLOCK', 'VK_FORMAT_ASTC_6x5_UNORM_BLOCK', 'VK_FORMAT_ASTC_6x5_SRGB_BLOCK', 'VK_FORMAT_ASTC_6x6_UNORM_BLOCK', 'VK_FORMAT_ASTC_6x6_SRGB_BLOCK', 'VK_FORMAT_ASTC_8x5_UNORM_BLOCK', 'VK_FORMAT_ASTC_8x5_SRGB_BLOCK', 'VK_FORMAT_ASTC_8x6_UNORM_BLOCK', 'VK_FORMAT_ASTC_8x6_SRGB_BLOCK', 'VK_FORMAT_ASTC_8x8_UNORM_BLOCK', 'VK_FORMAT_ASTC_8x8_SRGB_BLOCK', 'VK_FORMAT_ASTC_10x5_UNORM_BLOCK', 'VK_FORMAT_ASTC_10x5_SRGB_BLOCK', 'VK_FORMAT_ASTC_10x6_UNORM_BLOCK', 'VK_FORMAT_ASTC_10x6_SRGB_BLOCK', 'VK_FORMAT_ASTC_10x8_UNORM_BLOCK', 'VK_FORMAT_ASTC_10x8_SRGB_BLOCK', 'VK_FORMAT_ASTC_10x10_UNORM_BLOCK', 'VK_FORMAT_ASTC_10x10_SRGB_BLOCK', 'VK_FORMAT_ASTC_12x10_UNORM_BLOCK', 'VK_FORMAT_ASTC_12x10_SRGB_BLOCK', 'VK_FORMAT_ASTC_12x12_UNORM_BLOCK', 'VK_FORMAT_ASTC_12x12_SRGB_BLOCK'] +consts['VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT'] = 'VkFormatFeatureFlagBits' +consts['VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT'] = 'VkFormatFeatureFlagBits' +consts['VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT'] = 'VkFormatFeatureFlagBits' +consts['VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT'] = 'VkFormatFeatureFlagBits' +consts['VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT'] = 'VkFormatFeatureFlagBits' +consts['VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT'] = 'VkFormatFeatureFlagBits' +consts['VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT'] = 'VkFormatFeatureFlagBits' +consts['VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT'] = 'VkFormatFeatureFlagBits' +consts['VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT'] = 'VkFormatFeatureFlagBits' +consts['VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT'] = 'VkFormatFeatureFlagBits' +consts['VK_FORMAT_FEATURE_BLIT_SRC_BIT'] = 'VkFormatFeatureFlagBits' +consts['VK_FORMAT_FEATURE_BLIT_DST_BIT'] = 'VkFormatFeatureFlagBits' +consts['VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'] = 'VkFormatFeatureFlagBits' +enums['VkFormatFeatureFlagBits'] = ['VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT', 'VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT', 'VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT', 'VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT', 'VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT', 'VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT', 'VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT', 'VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT', 'VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT', 'VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT', 'VK_FORMAT_FEATURE_BLIT_SRC_BIT', 'VK_FORMAT_FEATURE_BLIT_DST_BIT', 'VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT'] +flags['VkFormatFeatureFlags'] = 'VkFormatFeatureFlagBits' +structs['VkFormatProperties'] = ['linearTilingFeatures', 'optimalTilingFeatures', 'bufferFeatures'] +protos['vkGetPhysicalDeviceFormatProperties'] = ['physicalDevice', 'format', 'pFormatProperties'] +consts['VK_IMAGE_TYPE_1D'] = 'VkImageType' +consts['VK_IMAGE_TYPE_2D'] = 'VkImageType' +consts['VK_IMAGE_TYPE_3D'] = 'VkImageType' +enums['VkImageType'] = ['VK_IMAGE_TYPE_1D', 'VK_IMAGE_TYPE_2D', 'VK_IMAGE_TYPE_3D'] +consts['VK_IMAGE_TILING_OPTIMAL'] = 'VkImageTiling' +consts['VK_IMAGE_TILING_LINEAR'] = 'VkImageTiling' +enums['VkImageTiling'] = ['VK_IMAGE_TILING_OPTIMAL', 'VK_IMAGE_TILING_LINEAR'] +consts['VK_IMAGE_USAGE_TRANSFER_SRC_BIT'] = 'VkImageUsageFlagBits' +consts['VK_IMAGE_USAGE_TRANSFER_DST_BIT'] = 'VkImageUsageFlagBits' +consts['VK_IMAGE_USAGE_SAMPLED_BIT'] = 'VkImageUsageFlagBits' +consts['VK_IMAGE_USAGE_STORAGE_BIT'] = 'VkImageUsageFlagBits' +consts['VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT'] = 'VkImageUsageFlagBits' +consts['VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT'] = 'VkImageUsageFlagBits' +consts['VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT'] = 'VkImageUsageFlagBits' +consts['VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT'] = 'VkImageUsageFlagBits' +enums['VkImageUsageFlagBits'] = ['VK_IMAGE_USAGE_TRANSFER_SRC_BIT', 'VK_IMAGE_USAGE_TRANSFER_DST_BIT', 'VK_IMAGE_USAGE_SAMPLED_BIT', 'VK_IMAGE_USAGE_STORAGE_BIT', 'VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT', 'VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT', 'VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT', 'VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT'] +flags['VkImageUsageFlags'] = 'VkImageUsageFlagBits' +consts['VK_IMAGE_CREATE_SPARSE_BINDING_BIT'] = 'VkImageCreateFlagBits' +consts['VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT'] = 'VkImageCreateFlagBits' +consts['VK_IMAGE_CREATE_SPARSE_ALIASED_BIT'] = 'VkImageCreateFlagBits' +consts['VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT'] = 'VkImageCreateFlagBits' +consts['VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT'] = 'VkImageCreateFlagBits' +enums['VkImageCreateFlagBits'] = ['VK_IMAGE_CREATE_SPARSE_BINDING_BIT', 'VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT', 'VK_IMAGE_CREATE_SPARSE_ALIASED_BIT', 'VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT', 'VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT'] +flags['VkImageCreateFlags'] = 'VkImageCreateFlagBits' +structs['VkExtent3D'] = ['width', 'height', 'depth'] +consts['VK_SAMPLE_COUNT_1_BIT'] = 'VkSampleCountFlagBits' +consts['VK_SAMPLE_COUNT_2_BIT'] = 'VkSampleCountFlagBits' +consts['VK_SAMPLE_COUNT_4_BIT'] = 'VkSampleCountFlagBits' +consts['VK_SAMPLE_COUNT_8_BIT'] = 'VkSampleCountFlagBits' +consts['VK_SAMPLE_COUNT_16_BIT'] = 'VkSampleCountFlagBits' +consts['VK_SAMPLE_COUNT_32_BIT'] = 'VkSampleCountFlagBits' +consts['VK_SAMPLE_COUNT_64_BIT'] = 'VkSampleCountFlagBits' +enums['VkSampleCountFlagBits'] = ['VK_SAMPLE_COUNT_1_BIT', 'VK_SAMPLE_COUNT_2_BIT', 'VK_SAMPLE_COUNT_4_BIT', 'VK_SAMPLE_COUNT_8_BIT', 'VK_SAMPLE_COUNT_16_BIT', 'VK_SAMPLE_COUNT_32_BIT', 'VK_SAMPLE_COUNT_64_BIT'] +flags['VkSampleCountFlags'] = 'VkSampleCountFlagBits' +# Unprocessed type: uint64_t +# Unprocessed type: VkDeviceSize category: basetype +structs['VkImageFormatProperties'] = ['maxExtent', 'maxMipLevels', 'maxArrayLayers', 'sampleCounts', 'maxResourceSize'] +protos['vkGetPhysicalDeviceImageFormatProperties'] = ['physicalDevice', 'format', 'type', 'tiling', 'usage', 'flags', 'pImageFormatProperties'] +consts['VK_PHYSICAL_DEVICE_TYPE_OTHER'] = 'VkPhysicalDeviceType' +consts['VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU'] = 'VkPhysicalDeviceType' +consts['VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU'] = 'VkPhysicalDeviceType' +consts['VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU'] = 'VkPhysicalDeviceType' +consts['VK_PHYSICAL_DEVICE_TYPE_CPU'] = 'VkPhysicalDeviceType' +enums['VkPhysicalDeviceType'] = ['VK_PHYSICAL_DEVICE_TYPE_OTHER', 'VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU', 'VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU', 'VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU', 'VK_PHYSICAL_DEVICE_TYPE_CPU'] +# Unprocessed type: uint8_t +# Unprocessed type: float +# Unprocessed type: int32_t +structs['VkPhysicalDeviceLimits'] = ['maxImageDimension1D', 'maxImageDimension2D', 'maxImageDimension3D', 'maxImageDimensionCube', 'maxImageArrayLayers', 'maxTexelBufferElements', 'maxUniformBufferRange', 'maxStorageBufferRange', 'maxPushConstantsSize', 'maxMemoryAllocationCount', 'maxSamplerAllocationCount', 'bufferImageGranularity', 'sparseAddressSpaceSize', 'maxBoundDescriptorSets', 'maxPerStageDescriptorSamplers', 'maxPerStageDescriptorUniformBuffers', 'maxPerStageDescriptorStorageBuffers', 'maxPerStageDescriptorSampledImages', 'maxPerStageDescriptorStorageImages', 'maxPerStageDescriptorInputAttachments', 'maxPerStageResources', 'maxDescriptorSetSamplers', 'maxDescriptorSetUniformBuffers', 'maxDescriptorSetUniformBuffersDynamic', 'maxDescriptorSetStorageBuffers', 'maxDescriptorSetStorageBuffersDynamic', 'maxDescriptorSetSampledImages', 'maxDescriptorSetStorageImages', 'maxDescriptorSetInputAttachments', 'maxVertexInputAttributes', 'maxVertexInputBindings', 'maxVertexInputAttributeOffset', 'maxVertexInputBindingStride', 'maxVertexOutputComponents', 'maxTessellationGenerationLevel', 'maxTessellationPatchSize', 'maxTessellationControlPerVertexInputComponents', 'maxTessellationControlPerVertexOutputComponents', 'maxTessellationControlPerPatchOutputComponents', 'maxTessellationControlTotalOutputComponents', 'maxTessellationEvaluationInputComponents', 'maxTessellationEvaluationOutputComponents', 'maxGeometryShaderInvocations', 'maxGeometryInputComponents', 'maxGeometryOutputComponents', 'maxGeometryOutputVertices', 'maxGeometryTotalOutputComponents', 'maxFragmentInputComponents', 'maxFragmentOutputAttachments', 'maxFragmentDualSrcAttachments', 'maxFragmentCombinedOutputResources', 'maxComputeSharedMemorySize', 'maxComputeWorkGroupCount', 'maxComputeWorkGroupInvocations', 'maxComputeWorkGroupSize', 'subPixelPrecisionBits', 'subTexelPrecisionBits', 'mipmapPrecisionBits', 'maxDrawIndexedIndexValue', 'maxDrawIndirectCount', 'maxSamplerLodBias', 'maxSamplerAnisotropy', 'maxViewports', 'maxViewportDimensions', 'viewportBoundsRange', 'viewportSubPixelBits', 'minMemoryMapAlignment', 'minTexelBufferOffsetAlignment', 'minUniformBufferOffsetAlignment', 'minStorageBufferOffsetAlignment', 'minTexelOffset', 'maxTexelOffset', 'minTexelGatherOffset', 'maxTexelGatherOffset', 'minInterpolationOffset', 'maxInterpolationOffset', 'subPixelInterpolationOffsetBits', 'maxFramebufferWidth', 'maxFramebufferHeight', 'maxFramebufferLayers', 'framebufferColorSampleCounts', 'framebufferDepthSampleCounts', 'framebufferStencilSampleCounts', 'framebufferNoAttachmentsSampleCounts', 'maxColorAttachments', 'sampledImageColorSampleCounts', 'sampledImageIntegerSampleCounts', 'sampledImageDepthSampleCounts', 'sampledImageStencilSampleCounts', 'storageImageSampleCounts', 'maxSampleMaskWords', 'timestampComputeAndGraphics', 'timestampPeriod', 'maxClipDistances', 'maxCullDistances', 'maxCombinedClipAndCullDistances', 'discreteQueuePriorities', 'pointSizeRange', 'lineWidthRange', 'pointSizeGranularity', 'lineWidthGranularity', 'strictLines', 'standardSampleLocations', 'optimalBufferCopyOffsetAlignment', 'optimalBufferCopyRowPitchAlignment', 'nonCoherentAtomSize'] +structs['VkPhysicalDeviceSparseProperties'] = ['residencyStandard2DBlockShape', 'residencyStandard2DMultisampleBlockShape', 'residencyStandard3DBlockShape', 'residencyAlignedMipSize', 'residencyNonResidentStrict'] +consts['VK_MAX_PHYSICAL_DEVICE_NAME_SIZE'] = None +consts['VK_UUID_SIZE'] = None +structs['VkPhysicalDeviceProperties'] = ['apiVersion', 'driverVersion', 'vendorID', 'deviceID', 'deviceType', 'deviceName', 'pipelineCacheUUID', 'limits', 'sparseProperties'] +protos['vkGetPhysicalDeviceProperties'] = ['physicalDevice', 'pProperties'] +consts['VK_QUEUE_GRAPHICS_BIT'] = 'VkQueueFlagBits' +consts['VK_QUEUE_COMPUTE_BIT'] = 'VkQueueFlagBits' +consts['VK_QUEUE_TRANSFER_BIT'] = 'VkQueueFlagBits' +consts['VK_QUEUE_SPARSE_BINDING_BIT'] = 'VkQueueFlagBits' +enums['VkQueueFlagBits'] = ['VK_QUEUE_GRAPHICS_BIT', 'VK_QUEUE_COMPUTE_BIT', 'VK_QUEUE_TRANSFER_BIT', 'VK_QUEUE_SPARSE_BINDING_BIT'] +flags['VkQueueFlags'] = 'VkQueueFlagBits' +structs['VkQueueFamilyProperties'] = ['queueFlags', 'queueCount', 'timestampValidBits', 'minImageTransferGranularity'] +protos['vkGetPhysicalDeviceQueueFamilyProperties'] = ['physicalDevice', 'pQueueFamilyPropertyCount', 'pQueueFamilyProperties'] +consts['VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT'] = 'VkMemoryPropertyFlagBits' +consts['VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT'] = 'VkMemoryPropertyFlagBits' +consts['VK_MEMORY_PROPERTY_HOST_COHERENT_BIT'] = 'VkMemoryPropertyFlagBits' +consts['VK_MEMORY_PROPERTY_HOST_CACHED_BIT'] = 'VkMemoryPropertyFlagBits' +consts['VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT'] = 'VkMemoryPropertyFlagBits' +enums['VkMemoryPropertyFlagBits'] = ['VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT', 'VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT', 'VK_MEMORY_PROPERTY_HOST_COHERENT_BIT', 'VK_MEMORY_PROPERTY_HOST_CACHED_BIT', 'VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT'] +flags['VkMemoryPropertyFlags'] = 'VkMemoryPropertyFlagBits' +structs['VkMemoryType'] = ['propertyFlags', 'heapIndex'] +consts['VK_MEMORY_HEAP_DEVICE_LOCAL_BIT'] = 'VkMemoryHeapFlagBits' +enums['VkMemoryHeapFlagBits'] = ['VK_MEMORY_HEAP_DEVICE_LOCAL_BIT'] +flags['VkMemoryHeapFlags'] = 'VkMemoryHeapFlagBits' +structs['VkMemoryHeap'] = ['size', 'flags'] +consts['VK_MAX_MEMORY_TYPES'] = None +consts['VK_MAX_MEMORY_HEAPS'] = None +structs['VkPhysicalDeviceMemoryProperties'] = ['memoryTypeCount', 'memoryTypes', 'memoryHeapCount', 'memoryHeaps'] +protos['vkGetPhysicalDeviceMemoryProperties'] = ['physicalDevice', 'pMemoryProperties'] +funcpointers['PFN_vkVoidFunction'] = None +protos['vkGetInstanceProcAddr'] = ['instance', 'pName'] +structs['VkDevice'] = None +protos['vkGetDeviceProcAddr'] = ['device', 'pName'] +flags['VkDeviceCreateFlags'] = None +flags['VkDeviceQueueCreateFlags'] = None +structs['VkDeviceQueueCreateInfo'] = ['sType', 'pNext', 'flags', 'queueFamilyIndex', 'queueCount', 'pQueuePriorities'] +structs['VkDeviceCreateInfo'] = ['sType', 'pNext', 'flags', 'queueCreateInfoCount', 'pQueueCreateInfos', 'enabledLayerCount', 'ppEnabledLayerNames', 'enabledExtensionCount', 'ppEnabledExtensionNames', 'pEnabledFeatures'] +protos['vkCreateDevice'] = ['physicalDevice', 'pCreateInfo', 'pAllocator', 'pDevice'] +protos['vkDestroyDevice'] = ['device', 'pAllocator'] +consts['VK_MAX_EXTENSION_NAME_SIZE'] = None +structs['VkExtensionProperties'] = ['extensionName', 'specVersion'] +protos['vkEnumerateInstanceExtensionProperties'] = ['pLayerName', 'pPropertyCount', 'pProperties'] +protos['vkEnumerateDeviceExtensionProperties'] = ['physicalDevice', 'pLayerName', 'pPropertyCount', 'pProperties'] +consts['VK_MAX_DESCRIPTION_SIZE'] = None +structs['VkLayerProperties'] = ['layerName', 'specVersion', 'implementationVersion', 'description'] +protos['vkEnumerateInstanceLayerProperties'] = ['pPropertyCount', 'pProperties'] +protos['vkEnumerateDeviceLayerProperties'] = ['physicalDevice', 'pPropertyCount', 'pProperties'] +structs['VkQueue'] = None +protos['vkGetDeviceQueue'] = ['device', 'queueFamilyIndex', 'queueIndex', 'pQueue'] +structs['VK_DEFINE_NON_DISPATCHABLE_HANDLE'] = None +structs['VkSemaphore'] = None +consts['VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT'] = 'VkPipelineStageFlagBits' +consts['VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT'] = 'VkPipelineStageFlagBits' +consts['VK_PIPELINE_STAGE_VERTEX_INPUT_BIT'] = 'VkPipelineStageFlagBits' +consts['VK_PIPELINE_STAGE_VERTEX_SHADER_BIT'] = 'VkPipelineStageFlagBits' +consts['VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT'] = 'VkPipelineStageFlagBits' +consts['VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT'] = 'VkPipelineStageFlagBits' +consts['VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT'] = 'VkPipelineStageFlagBits' +consts['VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT'] = 'VkPipelineStageFlagBits' +consts['VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT'] = 'VkPipelineStageFlagBits' +consts['VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT'] = 'VkPipelineStageFlagBits' +consts['VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT'] = 'VkPipelineStageFlagBits' +consts['VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT'] = 'VkPipelineStageFlagBits' +consts['VK_PIPELINE_STAGE_TRANSFER_BIT'] = 'VkPipelineStageFlagBits' +consts['VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT'] = 'VkPipelineStageFlagBits' +consts['VK_PIPELINE_STAGE_HOST_BIT'] = 'VkPipelineStageFlagBits' +consts['VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT'] = 'VkPipelineStageFlagBits' +consts['VK_PIPELINE_STAGE_ALL_COMMANDS_BIT'] = 'VkPipelineStageFlagBits' +enums['VkPipelineStageFlagBits'] = ['VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT', 'VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT', 'VK_PIPELINE_STAGE_VERTEX_INPUT_BIT', 'VK_PIPELINE_STAGE_VERTEX_SHADER_BIT', 'VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT', 'VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT', 'VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT', 'VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT', 'VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT', 'VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT', 'VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT', 'VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT', 'VK_PIPELINE_STAGE_TRANSFER_BIT', 'VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT', 'VK_PIPELINE_STAGE_HOST_BIT', 'VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT', 'VK_PIPELINE_STAGE_ALL_COMMANDS_BIT'] +flags['VkPipelineStageFlags'] = 'VkPipelineStageFlagBits' +structs['VkCommandBuffer'] = None +structs['VkSubmitInfo'] = ['sType', 'pNext', 'waitSemaphoreCount', 'pWaitSemaphores', 'pWaitDstStageMask', 'commandBufferCount', 'pCommandBuffers', 'signalSemaphoreCount', 'pSignalSemaphores'] +structs['VkFence'] = None +protos['vkQueueSubmit'] = ['queue', 'submitCount', 'pSubmits', 'fence'] +protos['vkQueueWaitIdle'] = ['queue'] +protos['vkDeviceWaitIdle'] = ['device'] +structs['VkMemoryAllocateInfo'] = ['sType', 'pNext', 'allocationSize', 'memoryTypeIndex'] +structs['VkDeviceMemory'] = None +protos['vkAllocateMemory'] = ['device', 'pAllocateInfo', 'pAllocator', 'pMemory'] +protos['vkFreeMemory'] = ['device', 'memory', 'pAllocator'] +flags['VkMemoryMapFlags'] = None +protos['vkMapMemory'] = ['device', 'memory', 'offset', 'size', 'flags', 'ppData'] +protos['vkUnmapMemory'] = ['device', 'memory'] +structs['VkMappedMemoryRange'] = ['sType', 'pNext', 'memory', 'offset', 'size'] +protos['vkFlushMappedMemoryRanges'] = ['device', 'memoryRangeCount', 'pMemoryRanges'] +protos['vkInvalidateMappedMemoryRanges'] = ['device', 'memoryRangeCount', 'pMemoryRanges'] +protos['vkGetDeviceMemoryCommitment'] = ['device', 'memory', 'pCommittedMemoryInBytes'] +structs['VkBuffer'] = None +protos['vkBindBufferMemory'] = ['device', 'buffer', 'memory', 'memoryOffset'] +structs['VkImage'] = None +protos['vkBindImageMemory'] = ['device', 'image', 'memory', 'memoryOffset'] +structs['VkMemoryRequirements'] = ['size', 'alignment', 'memoryTypeBits'] +protos['vkGetBufferMemoryRequirements'] = ['device', 'buffer', 'pMemoryRequirements'] +protos['vkGetImageMemoryRequirements'] = ['device', 'image', 'pMemoryRequirements'] +consts['VK_IMAGE_ASPECT_COLOR_BIT'] = 'VkImageAspectFlagBits' +consts['VK_IMAGE_ASPECT_DEPTH_BIT'] = 'VkImageAspectFlagBits' +consts['VK_IMAGE_ASPECT_STENCIL_BIT'] = 'VkImageAspectFlagBits' +consts['VK_IMAGE_ASPECT_METADATA_BIT'] = 'VkImageAspectFlagBits' +enums['VkImageAspectFlagBits'] = ['VK_IMAGE_ASPECT_COLOR_BIT', 'VK_IMAGE_ASPECT_DEPTH_BIT', 'VK_IMAGE_ASPECT_STENCIL_BIT', 'VK_IMAGE_ASPECT_METADATA_BIT'] +flags['VkImageAspectFlags'] = 'VkImageAspectFlagBits' +consts['VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT'] = 'VkSparseImageFormatFlagBits' +consts['VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT'] = 'VkSparseImageFormatFlagBits' +consts['VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT'] = 'VkSparseImageFormatFlagBits' +enums['VkSparseImageFormatFlagBits'] = ['VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT', 'VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT', 'VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT'] +flags['VkSparseImageFormatFlags'] = 'VkSparseImageFormatFlagBits' +structs['VkSparseImageFormatProperties'] = ['aspectMask', 'imageGranularity', 'flags'] +structs['VkSparseImageMemoryRequirements'] = ['formatProperties', 'imageMipTailFirstLod', 'imageMipTailSize', 'imageMipTailOffset', 'imageMipTailStride'] +protos['vkGetImageSparseMemoryRequirements'] = ['device', 'image', 'pSparseMemoryRequirementCount', 'pSparseMemoryRequirements'] +protos['vkGetPhysicalDeviceSparseImageFormatProperties'] = ['physicalDevice', 'format', 'type', 'samples', 'usage', 'tiling', 'pPropertyCount', 'pProperties'] +consts['VK_SPARSE_MEMORY_BIND_METADATA_BIT'] = 'VkSparseMemoryBindFlagBits' +enums['VkSparseMemoryBindFlagBits'] = ['VK_SPARSE_MEMORY_BIND_METADATA_BIT'] +flags['VkSparseMemoryBindFlags'] = 'VkSparseMemoryBindFlagBits' +structs['VkSparseMemoryBind'] = ['resourceOffset', 'size', 'memory', 'memoryOffset', 'flags'] +structs['VkSparseBufferMemoryBindInfo'] = ['buffer', 'bindCount', 'pBinds'] +structs['VkSparseImageOpaqueMemoryBindInfo'] = ['image', 'bindCount', 'pBinds'] +structs['VkImageSubresource'] = ['aspectMask', 'mipLevel', 'arrayLayer'] +structs['VkOffset3D'] = ['x', 'y', 'z'] +structs['VkSparseImageMemoryBind'] = ['subresource', 'offset', 'extent', 'memory', 'memoryOffset', 'flags'] +structs['VkSparseImageMemoryBindInfo'] = ['image', 'bindCount', 'pBinds'] +structs['VkBindSparseInfo'] = ['sType', 'pNext', 'waitSemaphoreCount', 'pWaitSemaphores', 'bufferBindCount', 'pBufferBinds', 'imageOpaqueBindCount', 'pImageOpaqueBinds', 'imageBindCount', 'pImageBinds', 'signalSemaphoreCount', 'pSignalSemaphores'] +protos['vkQueueBindSparse'] = ['queue', 'bindInfoCount', 'pBindInfo', 'fence'] +consts['VK_FENCE_CREATE_SIGNALED_BIT'] = 'VkFenceCreateFlagBits' +enums['VkFenceCreateFlagBits'] = ['VK_FENCE_CREATE_SIGNALED_BIT'] +flags['VkFenceCreateFlags'] = 'VkFenceCreateFlagBits' +structs['VkFenceCreateInfo'] = ['sType', 'pNext', 'flags'] +protos['vkCreateFence'] = ['device', 'pCreateInfo', 'pAllocator', 'pFence'] +protos['vkDestroyFence'] = ['device', 'fence', 'pAllocator'] +protos['vkResetFences'] = ['device', 'fenceCount', 'pFences'] +protos['vkGetFenceStatus'] = ['device', 'fence'] +protos['vkWaitForFences'] = ['device', 'fenceCount', 'pFences', 'waitAll', 'timeout'] +flags['VkSemaphoreCreateFlags'] = None +structs['VkSemaphoreCreateInfo'] = ['sType', 'pNext', 'flags'] +protos['vkCreateSemaphore'] = ['device', 'pCreateInfo', 'pAllocator', 'pSemaphore'] +protos['vkDestroySemaphore'] = ['device', 'semaphore', 'pAllocator'] +flags['VkEventCreateFlags'] = None +structs['VkEventCreateInfo'] = ['sType', 'pNext', 'flags'] +structs['VkEvent'] = None +protos['vkCreateEvent'] = ['device', 'pCreateInfo', 'pAllocator', 'pEvent'] +protos['vkDestroyEvent'] = ['device', 'event', 'pAllocator'] +protos['vkGetEventStatus'] = ['device', 'event'] +protos['vkSetEvent'] = ['device', 'event'] +protos['vkResetEvent'] = ['device', 'event'] +flags['VkQueryPoolCreateFlags'] = None +consts['VK_QUERY_TYPE_OCCLUSION'] = 'VkQueryType' +consts['VK_QUERY_TYPE_PIPELINE_STATISTICS'] = 'VkQueryType' +consts['VK_QUERY_TYPE_TIMESTAMP'] = 'VkQueryType' +enums['VkQueryType'] = ['VK_QUERY_TYPE_OCCLUSION', 'VK_QUERY_TYPE_PIPELINE_STATISTICS', 'VK_QUERY_TYPE_TIMESTAMP'] +consts['VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT'] = 'VkQueryPipelineStatisticFlagBits' +consts['VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT'] = 'VkQueryPipelineStatisticFlagBits' +consts['VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT'] = 'VkQueryPipelineStatisticFlagBits' +consts['VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT'] = 'VkQueryPipelineStatisticFlagBits' +consts['VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT'] = 'VkQueryPipelineStatisticFlagBits' +consts['VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT'] = 'VkQueryPipelineStatisticFlagBits' +consts['VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT'] = 'VkQueryPipelineStatisticFlagBits' +consts['VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT'] = 'VkQueryPipelineStatisticFlagBits' +consts['VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT'] = 'VkQueryPipelineStatisticFlagBits' +consts['VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT'] = 'VkQueryPipelineStatisticFlagBits' +consts['VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT'] = 'VkQueryPipelineStatisticFlagBits' +enums['VkQueryPipelineStatisticFlagBits'] = ['VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT', 'VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT', 'VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT', 'VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT', 'VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT', 'VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT', 'VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT', 'VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT', 'VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT', 'VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT', 'VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT'] +flags['VkQueryPipelineStatisticFlags'] = 'VkQueryPipelineStatisticFlagBits' +structs['VkQueryPoolCreateInfo'] = ['sType', 'pNext', 'flags', 'queryType', 'queryCount', 'pipelineStatistics'] +structs['VkQueryPool'] = None +protos['vkCreateQueryPool'] = ['device', 'pCreateInfo', 'pAllocator', 'pQueryPool'] +protos['vkDestroyQueryPool'] = ['device', 'queryPool', 'pAllocator'] +consts['VK_QUERY_RESULT_64_BIT'] = 'VkQueryResultFlagBits' +consts['VK_QUERY_RESULT_WAIT_BIT'] = 'VkQueryResultFlagBits' +consts['VK_QUERY_RESULT_WITH_AVAILABILITY_BIT'] = 'VkQueryResultFlagBits' +consts['VK_QUERY_RESULT_PARTIAL_BIT'] = 'VkQueryResultFlagBits' +enums['VkQueryResultFlagBits'] = ['VK_QUERY_RESULT_64_BIT', 'VK_QUERY_RESULT_WAIT_BIT', 'VK_QUERY_RESULT_WITH_AVAILABILITY_BIT', 'VK_QUERY_RESULT_PARTIAL_BIT'] +flags['VkQueryResultFlags'] = 'VkQueryResultFlagBits' +protos['vkGetQueryPoolResults'] = ['device', 'queryPool', 'firstQuery', 'queryCount', 'dataSize', 'pData', 'stride', 'flags'] +consts['VK_BUFFER_CREATE_SPARSE_BINDING_BIT'] = 'VkBufferCreateFlagBits' +consts['VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT'] = 'VkBufferCreateFlagBits' +consts['VK_BUFFER_CREATE_SPARSE_ALIASED_BIT'] = 'VkBufferCreateFlagBits' +enums['VkBufferCreateFlagBits'] = ['VK_BUFFER_CREATE_SPARSE_BINDING_BIT', 'VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT', 'VK_BUFFER_CREATE_SPARSE_ALIASED_BIT'] +flags['VkBufferCreateFlags'] = 'VkBufferCreateFlagBits' +consts['VK_BUFFER_USAGE_TRANSFER_SRC_BIT'] = 'VkBufferUsageFlagBits' +consts['VK_BUFFER_USAGE_TRANSFER_DST_BIT'] = 'VkBufferUsageFlagBits' +consts['VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT'] = 'VkBufferUsageFlagBits' +consts['VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT'] = 'VkBufferUsageFlagBits' +consts['VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT'] = 'VkBufferUsageFlagBits' +consts['VK_BUFFER_USAGE_STORAGE_BUFFER_BIT'] = 'VkBufferUsageFlagBits' +consts['VK_BUFFER_USAGE_INDEX_BUFFER_BIT'] = 'VkBufferUsageFlagBits' +consts['VK_BUFFER_USAGE_VERTEX_BUFFER_BIT'] = 'VkBufferUsageFlagBits' +consts['VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT'] = 'VkBufferUsageFlagBits' +enums['VkBufferUsageFlagBits'] = ['VK_BUFFER_USAGE_TRANSFER_SRC_BIT', 'VK_BUFFER_USAGE_TRANSFER_DST_BIT', 'VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT', 'VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT', 'VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT', 'VK_BUFFER_USAGE_STORAGE_BUFFER_BIT', 'VK_BUFFER_USAGE_INDEX_BUFFER_BIT', 'VK_BUFFER_USAGE_VERTEX_BUFFER_BIT', 'VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT'] +flags['VkBufferUsageFlags'] = 'VkBufferUsageFlagBits' +consts['VK_SHARING_MODE_EXCLUSIVE'] = 'VkSharingMode' +consts['VK_SHARING_MODE_CONCURRENT'] = 'VkSharingMode' +enums['VkSharingMode'] = ['VK_SHARING_MODE_EXCLUSIVE', 'VK_SHARING_MODE_CONCURRENT'] +structs['VkBufferCreateInfo'] = ['sType', 'pNext', 'flags', 'size', 'usage', 'sharingMode', 'queueFamilyIndexCount', 'pQueueFamilyIndices'] +protos['vkCreateBuffer'] = ['device', 'pCreateInfo', 'pAllocator', 'pBuffer'] +protos['vkDestroyBuffer'] = ['device', 'buffer', 'pAllocator'] +flags['VkBufferViewCreateFlags'] = None +structs['VkBufferViewCreateInfo'] = ['sType', 'pNext', 'flags', 'buffer', 'format', 'offset', 'range'] +structs['VkBufferView'] = None +protos['vkCreateBufferView'] = ['device', 'pCreateInfo', 'pAllocator', 'pView'] +protos['vkDestroyBufferView'] = ['device', 'bufferView', 'pAllocator'] +consts['VK_IMAGE_LAYOUT_UNDEFINED'] = 'VkImageLayout' +consts['VK_IMAGE_LAYOUT_GENERAL'] = 'VkImageLayout' +consts['VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL'] = 'VkImageLayout' +consts['VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL'] = 'VkImageLayout' +consts['VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL'] = 'VkImageLayout' +consts['VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL'] = 'VkImageLayout' +consts['VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL'] = 'VkImageLayout' +consts['VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL'] = 'VkImageLayout' +consts['VK_IMAGE_LAYOUT_PREINITIALIZED'] = 'VkImageLayout' +consts['VK_IMAGE_LAYOUT_PRESENT_SRC_KHR'] = 'VkImageLayout' +enums['VkImageLayout'] = ['VK_IMAGE_LAYOUT_UNDEFINED', 'VK_IMAGE_LAYOUT_GENERAL', 'VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL', 'VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL', 'VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL', 'VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL', 'VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL', 'VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL', 'VK_IMAGE_LAYOUT_PREINITIALIZED', 'VK_IMAGE_LAYOUT_PRESENT_SRC_KHR'] +structs['VkImageCreateInfo'] = ['sType', 'pNext', 'flags', 'imageType', 'format', 'extent', 'mipLevels', 'arrayLayers', 'samples', 'tiling', 'usage', 'sharingMode', 'queueFamilyIndexCount', 'pQueueFamilyIndices', 'initialLayout'] +protos['vkCreateImage'] = ['device', 'pCreateInfo', 'pAllocator', 'pImage'] +protos['vkDestroyImage'] = ['device', 'image', 'pAllocator'] +structs['VkSubresourceLayout'] = ['offset', 'size', 'rowPitch', 'arrayPitch', 'depthPitch'] +protos['vkGetImageSubresourceLayout'] = ['device', 'image', 'pSubresource', 'pLayout'] +flags['VkImageViewCreateFlags'] = None +consts['VK_IMAGE_VIEW_TYPE_1D'] = 'VkImageViewType' +consts['VK_IMAGE_VIEW_TYPE_2D'] = 'VkImageViewType' +consts['VK_IMAGE_VIEW_TYPE_3D'] = 'VkImageViewType' +consts['VK_IMAGE_VIEW_TYPE_CUBE'] = 'VkImageViewType' +consts['VK_IMAGE_VIEW_TYPE_1D_ARRAY'] = 'VkImageViewType' +consts['VK_IMAGE_VIEW_TYPE_2D_ARRAY'] = 'VkImageViewType' +consts['VK_IMAGE_VIEW_TYPE_CUBE_ARRAY'] = 'VkImageViewType' +enums['VkImageViewType'] = ['VK_IMAGE_VIEW_TYPE_1D', 'VK_IMAGE_VIEW_TYPE_2D', 'VK_IMAGE_VIEW_TYPE_3D', 'VK_IMAGE_VIEW_TYPE_CUBE', 'VK_IMAGE_VIEW_TYPE_1D_ARRAY', 'VK_IMAGE_VIEW_TYPE_2D_ARRAY', 'VK_IMAGE_VIEW_TYPE_CUBE_ARRAY'] +consts['VK_COMPONENT_SWIZZLE_IDENTITY'] = 'VkComponentSwizzle' +consts['VK_COMPONENT_SWIZZLE_ZERO'] = 'VkComponentSwizzle' +consts['VK_COMPONENT_SWIZZLE_ONE'] = 'VkComponentSwizzle' +consts['VK_COMPONENT_SWIZZLE_R'] = 'VkComponentSwizzle' +consts['VK_COMPONENT_SWIZZLE_G'] = 'VkComponentSwizzle' +consts['VK_COMPONENT_SWIZZLE_B'] = 'VkComponentSwizzle' +consts['VK_COMPONENT_SWIZZLE_A'] = 'VkComponentSwizzle' +enums['VkComponentSwizzle'] = ['VK_COMPONENT_SWIZZLE_IDENTITY', 'VK_COMPONENT_SWIZZLE_ZERO', 'VK_COMPONENT_SWIZZLE_ONE', 'VK_COMPONENT_SWIZZLE_R', 'VK_COMPONENT_SWIZZLE_G', 'VK_COMPONENT_SWIZZLE_B', 'VK_COMPONENT_SWIZZLE_A'] +structs['VkComponentMapping'] = ['r', 'g', 'b', 'a'] +structs['VkImageSubresourceRange'] = ['aspectMask', 'baseMipLevel', 'levelCount', 'baseArrayLayer', 'layerCount'] +structs['VkImageViewCreateInfo'] = ['sType', 'pNext', 'flags', 'image', 'viewType', 'format', 'components', 'subresourceRange'] +structs['VkImageView'] = None +protos['vkCreateImageView'] = ['device', 'pCreateInfo', 'pAllocator', 'pView'] +protos['vkDestroyImageView'] = ['device', 'imageView', 'pAllocator'] +flags['VkShaderModuleCreateFlags'] = None +structs['VkShaderModuleCreateInfo'] = ['sType', 'pNext', 'flags', 'codeSize', 'pCode'] +structs['VkShaderModule'] = None +protos['vkCreateShaderModule'] = ['device', 'pCreateInfo', 'pAllocator', 'pShaderModule'] +protos['vkDestroyShaderModule'] = ['device', 'shaderModule', 'pAllocator'] +flags['VkPipelineCacheCreateFlags'] = None +structs['VkPipelineCacheCreateInfo'] = ['sType', 'pNext', 'flags', 'initialDataSize', 'pInitialData'] +structs['VkPipelineCache'] = None +protos['vkCreatePipelineCache'] = ['device', 'pCreateInfo', 'pAllocator', 'pPipelineCache'] +protos['vkDestroyPipelineCache'] = ['device', 'pipelineCache', 'pAllocator'] +protos['vkGetPipelineCacheData'] = ['device', 'pipelineCache', 'pDataSize', 'pData'] +protos['vkMergePipelineCaches'] = ['device', 'dstCache', 'srcCacheCount', 'pSrcCaches'] +consts['VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT'] = 'VkPipelineCreateFlagBits' +consts['VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT'] = 'VkPipelineCreateFlagBits' +consts['VK_PIPELINE_CREATE_DERIVATIVE_BIT'] = 'VkPipelineCreateFlagBits' +enums['VkPipelineCreateFlagBits'] = ['VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT', 'VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT', 'VK_PIPELINE_CREATE_DERIVATIVE_BIT'] +flags['VkPipelineCreateFlags'] = 'VkPipelineCreateFlagBits' +flags['VkPipelineShaderStageCreateFlags'] = None +consts['VK_SHADER_STAGE_VERTEX_BIT'] = 'VkShaderStageFlagBits' +consts['VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT'] = 'VkShaderStageFlagBits' +consts['VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT'] = 'VkShaderStageFlagBits' +consts['VK_SHADER_STAGE_GEOMETRY_BIT'] = 'VkShaderStageFlagBits' +consts['VK_SHADER_STAGE_FRAGMENT_BIT'] = 'VkShaderStageFlagBits' +consts['VK_SHADER_STAGE_COMPUTE_BIT'] = 'VkShaderStageFlagBits' +consts['VK_SHADER_STAGE_ALL_GRAPHICS'] = 'VkShaderStageFlagBits' +consts['VK_SHADER_STAGE_ALL'] = 'VkShaderStageFlagBits' +enums['VkShaderStageFlagBits'] = ['VK_SHADER_STAGE_VERTEX_BIT', 'VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT', 'VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT', 'VK_SHADER_STAGE_GEOMETRY_BIT', 'VK_SHADER_STAGE_FRAGMENT_BIT', 'VK_SHADER_STAGE_COMPUTE_BIT', 'VK_SHADER_STAGE_ALL_GRAPHICS', 'VK_SHADER_STAGE_ALL'] +structs['VkSpecializationMapEntry'] = ['constantID', 'offset', 'size'] +structs['VkSpecializationInfo'] = ['mapEntryCount', 'pMapEntries', 'dataSize', 'pData'] +structs['VkPipelineShaderStageCreateInfo'] = ['sType', 'pNext', 'flags', 'stage', 'module', 'pName', 'pSpecializationInfo'] +flags['VkPipelineVertexInputStateCreateFlags'] = None +consts['VK_VERTEX_INPUT_RATE_VERTEX'] = 'VkVertexInputRate' +consts['VK_VERTEX_INPUT_RATE_INSTANCE'] = 'VkVertexInputRate' +enums['VkVertexInputRate'] = ['VK_VERTEX_INPUT_RATE_VERTEX', 'VK_VERTEX_INPUT_RATE_INSTANCE'] +structs['VkVertexInputBindingDescription'] = ['binding', 'stride', 'inputRate'] +structs['VkVertexInputAttributeDescription'] = ['location', 'binding', 'format', 'offset'] +structs['VkPipelineVertexInputStateCreateInfo'] = ['sType', 'pNext', 'flags', 'vertexBindingDescriptionCount', 'pVertexBindingDescriptions', 'vertexAttributeDescriptionCount', 'pVertexAttributeDescriptions'] +flags['VkPipelineInputAssemblyStateCreateFlags'] = None +consts['VK_PRIMITIVE_TOPOLOGY_POINT_LIST'] = 'VkPrimitiveTopology' +consts['VK_PRIMITIVE_TOPOLOGY_LINE_LIST'] = 'VkPrimitiveTopology' +consts['VK_PRIMITIVE_TOPOLOGY_LINE_STRIP'] = 'VkPrimitiveTopology' +consts['VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST'] = 'VkPrimitiveTopology' +consts['VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP'] = 'VkPrimitiveTopology' +consts['VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN'] = 'VkPrimitiveTopology' +consts['VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY'] = 'VkPrimitiveTopology' +consts['VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY'] = 'VkPrimitiveTopology' +consts['VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY'] = 'VkPrimitiveTopology' +consts['VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY'] = 'VkPrimitiveTopology' +consts['VK_PRIMITIVE_TOPOLOGY_PATCH_LIST'] = 'VkPrimitiveTopology' +enums['VkPrimitiveTopology'] = ['VK_PRIMITIVE_TOPOLOGY_POINT_LIST', 'VK_PRIMITIVE_TOPOLOGY_LINE_LIST', 'VK_PRIMITIVE_TOPOLOGY_LINE_STRIP', 'VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST', 'VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP', 'VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN', 'VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY', 'VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY', 'VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY', 'VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY', 'VK_PRIMITIVE_TOPOLOGY_PATCH_LIST'] +structs['VkPipelineInputAssemblyStateCreateInfo'] = ['sType', 'pNext', 'flags', 'topology', 'primitiveRestartEnable'] +flags['VkPipelineTessellationStateCreateFlags'] = None +structs['VkPipelineTessellationStateCreateInfo'] = ['sType', 'pNext', 'flags', 'patchControlPoints'] +flags['VkPipelineViewportStateCreateFlags'] = None +structs['VkViewport'] = ['x', 'y', 'width', 'height', 'minDepth', 'maxDepth'] +structs['VkOffset2D'] = ['x', 'y'] +structs['VkExtent2D'] = ['width', 'height'] +structs['VkRect2D'] = ['offset', 'extent'] +structs['VkPipelineViewportStateCreateInfo'] = ['sType', 'pNext', 'flags', 'viewportCount', 'pViewports', 'scissorCount', 'pScissors'] +flags['VkPipelineRasterizationStateCreateFlags'] = None +consts['VK_POLYGON_MODE_FILL'] = 'VkPolygonMode' +consts['VK_POLYGON_MODE_LINE'] = 'VkPolygonMode' +consts['VK_POLYGON_MODE_POINT'] = 'VkPolygonMode' +enums['VkPolygonMode'] = ['VK_POLYGON_MODE_FILL', 'VK_POLYGON_MODE_LINE', 'VK_POLYGON_MODE_POINT'] +consts['VK_CULL_MODE_NONE'] = 'VkCullModeFlagBits' +consts['VK_CULL_MODE_FRONT_BIT'] = 'VkCullModeFlagBits' +consts['VK_CULL_MODE_BACK_BIT'] = 'VkCullModeFlagBits' +consts['VK_CULL_MODE_FRONT_AND_BACK'] = 'VkCullModeFlagBits' +enums['VkCullModeFlagBits'] = ['VK_CULL_MODE_NONE', 'VK_CULL_MODE_FRONT_BIT', 'VK_CULL_MODE_BACK_BIT', 'VK_CULL_MODE_FRONT_AND_BACK'] +flags['VkCullModeFlags'] = 'VkCullModeFlagBits' +consts['VK_FRONT_FACE_COUNTER_CLOCKWISE'] = 'VkFrontFace' +consts['VK_FRONT_FACE_CLOCKWISE'] = 'VkFrontFace' +enums['VkFrontFace'] = ['VK_FRONT_FACE_COUNTER_CLOCKWISE', 'VK_FRONT_FACE_CLOCKWISE'] +structs['VkPipelineRasterizationStateCreateInfo'] = ['sType', 'pNext', 'flags', 'depthClampEnable', 'rasterizerDiscardEnable', 'polygonMode', 'cullMode', 'frontFace', 'depthBiasEnable', 'depthBiasConstantFactor', 'depthBiasClamp', 'depthBiasSlopeFactor', 'lineWidth'] +flags['VkPipelineMultisampleStateCreateFlags'] = None +# Unprocessed type: VkSampleMask category: basetype +structs['VkPipelineMultisampleStateCreateInfo'] = ['sType', 'pNext', 'flags', 'rasterizationSamples', 'sampleShadingEnable', 'minSampleShading', 'pSampleMask', 'alphaToCoverageEnable', 'alphaToOneEnable'] +flags['VkPipelineDepthStencilStateCreateFlags'] = None +consts['VK_COMPARE_OP_NEVER'] = 'VkCompareOp' +consts['VK_COMPARE_OP_LESS'] = 'VkCompareOp' +consts['VK_COMPARE_OP_EQUAL'] = 'VkCompareOp' +consts['VK_COMPARE_OP_LESS_OR_EQUAL'] = 'VkCompareOp' +consts['VK_COMPARE_OP_GREATER'] = 'VkCompareOp' +consts['VK_COMPARE_OP_NOT_EQUAL'] = 'VkCompareOp' +consts['VK_COMPARE_OP_GREATER_OR_EQUAL'] = 'VkCompareOp' +consts['VK_COMPARE_OP_ALWAYS'] = 'VkCompareOp' +enums['VkCompareOp'] = ['VK_COMPARE_OP_NEVER', 'VK_COMPARE_OP_LESS', 'VK_COMPARE_OP_EQUAL', 'VK_COMPARE_OP_LESS_OR_EQUAL', 'VK_COMPARE_OP_GREATER', 'VK_COMPARE_OP_NOT_EQUAL', 'VK_COMPARE_OP_GREATER_OR_EQUAL', 'VK_COMPARE_OP_ALWAYS'] +consts['VK_STENCIL_OP_KEEP'] = 'VkStencilOp' +consts['VK_STENCIL_OP_ZERO'] = 'VkStencilOp' +consts['VK_STENCIL_OP_REPLACE'] = 'VkStencilOp' +consts['VK_STENCIL_OP_INCREMENT_AND_CLAMP'] = 'VkStencilOp' +consts['VK_STENCIL_OP_DECREMENT_AND_CLAMP'] = 'VkStencilOp' +consts['VK_STENCIL_OP_INVERT'] = 'VkStencilOp' +consts['VK_STENCIL_OP_INCREMENT_AND_WRAP'] = 'VkStencilOp' +consts['VK_STENCIL_OP_DECREMENT_AND_WRAP'] = 'VkStencilOp' +enums['VkStencilOp'] = ['VK_STENCIL_OP_KEEP', 'VK_STENCIL_OP_ZERO', 'VK_STENCIL_OP_REPLACE', 'VK_STENCIL_OP_INCREMENT_AND_CLAMP', 'VK_STENCIL_OP_DECREMENT_AND_CLAMP', 'VK_STENCIL_OP_INVERT', 'VK_STENCIL_OP_INCREMENT_AND_WRAP', 'VK_STENCIL_OP_DECREMENT_AND_WRAP'] +structs['VkStencilOpState'] = ['failOp', 'passOp', 'depthFailOp', 'compareOp', 'compareMask', 'writeMask', 'reference'] +structs['VkPipelineDepthStencilStateCreateInfo'] = ['sType', 'pNext', 'flags', 'depthTestEnable', 'depthWriteEnable', 'depthCompareOp', 'depthBoundsTestEnable', 'stencilTestEnable', 'front', 'back', 'minDepthBounds', 'maxDepthBounds'] +flags['VkPipelineColorBlendStateCreateFlags'] = None +consts['VK_LOGIC_OP_CLEAR'] = 'VkLogicOp' +consts['VK_LOGIC_OP_AND'] = 'VkLogicOp' +consts['VK_LOGIC_OP_AND_REVERSE'] = 'VkLogicOp' +consts['VK_LOGIC_OP_COPY'] = 'VkLogicOp' +consts['VK_LOGIC_OP_AND_INVERTED'] = 'VkLogicOp' +consts['VK_LOGIC_OP_NO_OP'] = 'VkLogicOp' +consts['VK_LOGIC_OP_XOR'] = 'VkLogicOp' +consts['VK_LOGIC_OP_OR'] = 'VkLogicOp' +consts['VK_LOGIC_OP_NOR'] = 'VkLogicOp' +consts['VK_LOGIC_OP_EQUIVALENT'] = 'VkLogicOp' +consts['VK_LOGIC_OP_INVERT'] = 'VkLogicOp' +consts['VK_LOGIC_OP_OR_REVERSE'] = 'VkLogicOp' +consts['VK_LOGIC_OP_COPY_INVERTED'] = 'VkLogicOp' +consts['VK_LOGIC_OP_OR_INVERTED'] = 'VkLogicOp' +consts['VK_LOGIC_OP_NAND'] = 'VkLogicOp' +consts['VK_LOGIC_OP_SET'] = 'VkLogicOp' +enums['VkLogicOp'] = ['VK_LOGIC_OP_CLEAR', 'VK_LOGIC_OP_AND', 'VK_LOGIC_OP_AND_REVERSE', 'VK_LOGIC_OP_COPY', 'VK_LOGIC_OP_AND_INVERTED', 'VK_LOGIC_OP_NO_OP', 'VK_LOGIC_OP_XOR', 'VK_LOGIC_OP_OR', 'VK_LOGIC_OP_NOR', 'VK_LOGIC_OP_EQUIVALENT', 'VK_LOGIC_OP_INVERT', 'VK_LOGIC_OP_OR_REVERSE', 'VK_LOGIC_OP_COPY_INVERTED', 'VK_LOGIC_OP_OR_INVERTED', 'VK_LOGIC_OP_NAND', 'VK_LOGIC_OP_SET'] +consts['VK_BLEND_FACTOR_ZERO'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_ONE'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_SRC_COLOR'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_DST_COLOR'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_SRC_ALPHA'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_DST_ALPHA'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_CONSTANT_COLOR'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_CONSTANT_ALPHA'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_SRC_ALPHA_SATURATE'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_SRC1_COLOR'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_SRC1_ALPHA'] = 'VkBlendFactor' +consts['VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA'] = 'VkBlendFactor' +enums['VkBlendFactor'] = ['VK_BLEND_FACTOR_ZERO', 'VK_BLEND_FACTOR_ONE', 'VK_BLEND_FACTOR_SRC_COLOR', 'VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR', 'VK_BLEND_FACTOR_DST_COLOR', 'VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR', 'VK_BLEND_FACTOR_SRC_ALPHA', 'VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA', 'VK_BLEND_FACTOR_DST_ALPHA', 'VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA', 'VK_BLEND_FACTOR_CONSTANT_COLOR', 'VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR', 'VK_BLEND_FACTOR_CONSTANT_ALPHA', 'VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA', 'VK_BLEND_FACTOR_SRC_ALPHA_SATURATE', 'VK_BLEND_FACTOR_SRC1_COLOR', 'VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR', 'VK_BLEND_FACTOR_SRC1_ALPHA', 'VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA'] +consts['VK_BLEND_OP_ADD'] = 'VkBlendOp' +consts['VK_BLEND_OP_SUBTRACT'] = 'VkBlendOp' +consts['VK_BLEND_OP_REVERSE_SUBTRACT'] = 'VkBlendOp' +consts['VK_BLEND_OP_MIN'] = 'VkBlendOp' +consts['VK_BLEND_OP_MAX'] = 'VkBlendOp' +enums['VkBlendOp'] = ['VK_BLEND_OP_ADD', 'VK_BLEND_OP_SUBTRACT', 'VK_BLEND_OP_REVERSE_SUBTRACT', 'VK_BLEND_OP_MIN', 'VK_BLEND_OP_MAX'] +consts['VK_COLOR_COMPONENT_R_BIT'] = 'VkColorComponentFlagBits' +consts['VK_COLOR_COMPONENT_G_BIT'] = 'VkColorComponentFlagBits' +consts['VK_COLOR_COMPONENT_B_BIT'] = 'VkColorComponentFlagBits' +consts['VK_COLOR_COMPONENT_A_BIT'] = 'VkColorComponentFlagBits' +enums['VkColorComponentFlagBits'] = ['VK_COLOR_COMPONENT_R_BIT', 'VK_COLOR_COMPONENT_G_BIT', 'VK_COLOR_COMPONENT_B_BIT', 'VK_COLOR_COMPONENT_A_BIT'] +flags['VkColorComponentFlags'] = 'VkColorComponentFlagBits' +structs['VkPipelineColorBlendAttachmentState'] = ['blendEnable', 'srcColorBlendFactor', 'dstColorBlendFactor', 'colorBlendOp', 'srcAlphaBlendFactor', 'dstAlphaBlendFactor', 'alphaBlendOp', 'colorWriteMask'] +structs['VkPipelineColorBlendStateCreateInfo'] = ['sType', 'pNext', 'flags', 'logicOpEnable', 'logicOp', 'attachmentCount', 'pAttachments', 'blendConstants'] +flags['VkPipelineDynamicStateCreateFlags'] = None +consts['VK_DYNAMIC_STATE_VIEWPORT'] = 'VkDynamicState' +consts['VK_DYNAMIC_STATE_SCISSOR'] = 'VkDynamicState' +consts['VK_DYNAMIC_STATE_LINE_WIDTH'] = 'VkDynamicState' +consts['VK_DYNAMIC_STATE_DEPTH_BIAS'] = 'VkDynamicState' +consts['VK_DYNAMIC_STATE_BLEND_CONSTANTS'] = 'VkDynamicState' +consts['VK_DYNAMIC_STATE_DEPTH_BOUNDS'] = 'VkDynamicState' +consts['VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK'] = 'VkDynamicState' +consts['VK_DYNAMIC_STATE_STENCIL_WRITE_MASK'] = 'VkDynamicState' +consts['VK_DYNAMIC_STATE_STENCIL_REFERENCE'] = 'VkDynamicState' +enums['VkDynamicState'] = ['VK_DYNAMIC_STATE_VIEWPORT', 'VK_DYNAMIC_STATE_SCISSOR', 'VK_DYNAMIC_STATE_LINE_WIDTH', 'VK_DYNAMIC_STATE_DEPTH_BIAS', 'VK_DYNAMIC_STATE_BLEND_CONSTANTS', 'VK_DYNAMIC_STATE_DEPTH_BOUNDS', 'VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK', 'VK_DYNAMIC_STATE_STENCIL_WRITE_MASK', 'VK_DYNAMIC_STATE_STENCIL_REFERENCE'] +structs['VkPipelineDynamicStateCreateInfo'] = ['sType', 'pNext', 'flags', 'dynamicStateCount', 'pDynamicStates'] +structs['VkPipelineLayout'] = None +structs['VkRenderPass'] = None +structs['VkPipeline'] = None +structs['VkGraphicsPipelineCreateInfo'] = ['sType', 'pNext', 'flags', 'stageCount', 'pStages', 'pVertexInputState', 'pInputAssemblyState', 'pTessellationState', 'pViewportState', 'pRasterizationState', 'pMultisampleState', 'pDepthStencilState', 'pColorBlendState', 'pDynamicState', 'layout', 'renderPass', 'subpass', 'basePipelineHandle', 'basePipelineIndex'] +protos['vkCreateGraphicsPipelines'] = ['device', 'pipelineCache', 'createInfoCount', 'pCreateInfos', 'pAllocator', 'pPipelines'] +structs['VkComputePipelineCreateInfo'] = ['sType', 'pNext', 'flags', 'stage', 'layout', 'basePipelineHandle', 'basePipelineIndex'] +protos['vkCreateComputePipelines'] = ['device', 'pipelineCache', 'createInfoCount', 'pCreateInfos', 'pAllocator', 'pPipelines'] +protos['vkDestroyPipeline'] = ['device', 'pipeline', 'pAllocator'] +flags['VkPipelineLayoutCreateFlags'] = None +structs['VkDescriptorSetLayout'] = None +flags['VkShaderStageFlags'] = 'VkShaderStageFlagBits' +structs['VkPushConstantRange'] = ['stageFlags', 'offset', 'size'] +structs['VkPipelineLayoutCreateInfo'] = ['sType', 'pNext', 'flags', 'setLayoutCount', 'pSetLayouts', 'pushConstantRangeCount', 'pPushConstantRanges'] +protos['vkCreatePipelineLayout'] = ['device', 'pCreateInfo', 'pAllocator', 'pPipelineLayout'] +protos['vkDestroyPipelineLayout'] = ['device', 'pipelineLayout', 'pAllocator'] +flags['VkSamplerCreateFlags'] = None +consts['VK_FILTER_NEAREST'] = 'VkFilter' +consts['VK_FILTER_LINEAR'] = 'VkFilter' +enums['VkFilter'] = ['VK_FILTER_NEAREST', 'VK_FILTER_LINEAR'] +consts['VK_SAMPLER_MIPMAP_MODE_NEAREST'] = 'VkSamplerMipmapMode' +consts['VK_SAMPLER_MIPMAP_MODE_LINEAR'] = 'VkSamplerMipmapMode' +enums['VkSamplerMipmapMode'] = ['VK_SAMPLER_MIPMAP_MODE_NEAREST', 'VK_SAMPLER_MIPMAP_MODE_LINEAR'] +consts['VK_SAMPLER_ADDRESS_MODE_REPEAT'] = 'VkSamplerAddressMode' +consts['VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT'] = 'VkSamplerAddressMode' +consts['VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE'] = 'VkSamplerAddressMode' +consts['VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER'] = 'VkSamplerAddressMode' +consts['VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE'] = 'VkSamplerAddressMode' +enums['VkSamplerAddressMode'] = ['VK_SAMPLER_ADDRESS_MODE_REPEAT', 'VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT', 'VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE', 'VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER', 'VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE'] +consts['VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK'] = 'VkBorderColor' +consts['VK_BORDER_COLOR_INT_TRANSPARENT_BLACK'] = 'VkBorderColor' +consts['VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK'] = 'VkBorderColor' +consts['VK_BORDER_COLOR_INT_OPAQUE_BLACK'] = 'VkBorderColor' +consts['VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE'] = 'VkBorderColor' +consts['VK_BORDER_COLOR_INT_OPAQUE_WHITE'] = 'VkBorderColor' +enums['VkBorderColor'] = ['VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK', 'VK_BORDER_COLOR_INT_TRANSPARENT_BLACK', 'VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK', 'VK_BORDER_COLOR_INT_OPAQUE_BLACK', 'VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE', 'VK_BORDER_COLOR_INT_OPAQUE_WHITE'] +structs['VkSamplerCreateInfo'] = ['sType', 'pNext', 'flags', 'magFilter', 'minFilter', 'mipmapMode', 'addressModeU', 'addressModeV', 'addressModeW', 'mipLodBias', 'anisotropyEnable', 'maxAnisotropy', 'compareEnable', 'compareOp', 'minLod', 'maxLod', 'borderColor', 'unnormalizedCoordinates'] +structs['VkSampler'] = None +protos['vkCreateSampler'] = ['device', 'pCreateInfo', 'pAllocator', 'pSampler'] +protos['vkDestroySampler'] = ['device', 'sampler', 'pAllocator'] +flags['VkDescriptorSetLayoutCreateFlags'] = None +consts['VK_DESCRIPTOR_TYPE_SAMPLER'] = 'VkDescriptorType' +consts['VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER'] = 'VkDescriptorType' +consts['VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE'] = 'VkDescriptorType' +consts['VK_DESCRIPTOR_TYPE_STORAGE_IMAGE'] = 'VkDescriptorType' +consts['VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER'] = 'VkDescriptorType' +consts['VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER'] = 'VkDescriptorType' +consts['VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER'] = 'VkDescriptorType' +consts['VK_DESCRIPTOR_TYPE_STORAGE_BUFFER'] = 'VkDescriptorType' +consts['VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC'] = 'VkDescriptorType' +consts['VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC'] = 'VkDescriptorType' +consts['VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT'] = 'VkDescriptorType' +enums['VkDescriptorType'] = ['VK_DESCRIPTOR_TYPE_SAMPLER', 'VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER', 'VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE', 'VK_DESCRIPTOR_TYPE_STORAGE_IMAGE', 'VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER', 'VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER', 'VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER', 'VK_DESCRIPTOR_TYPE_STORAGE_BUFFER', 'VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC', 'VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC', 'VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT'] +structs['VkDescriptorSetLayoutBinding'] = ['binding', 'descriptorType', 'descriptorCount', 'stageFlags', 'pImmutableSamplers'] +structs['VkDescriptorSetLayoutCreateInfo'] = ['sType', 'pNext', 'flags', 'bindingCount', 'pBindings'] +protos['vkCreateDescriptorSetLayout'] = ['device', 'pCreateInfo', 'pAllocator', 'pSetLayout'] +protos['vkDestroyDescriptorSetLayout'] = ['device', 'descriptorSetLayout', 'pAllocator'] +consts['VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT'] = 'VkDescriptorPoolCreateFlagBits' +enums['VkDescriptorPoolCreateFlagBits'] = ['VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT'] +flags['VkDescriptorPoolCreateFlags'] = 'VkDescriptorPoolCreateFlagBits' +structs['VkDescriptorPoolSize'] = ['type', 'descriptorCount'] +structs['VkDescriptorPoolCreateInfo'] = ['sType', 'pNext', 'flags', 'maxSets', 'poolSizeCount', 'pPoolSizes'] +structs['VkDescriptorPool'] = None +protos['vkCreateDescriptorPool'] = ['device', 'pCreateInfo', 'pAllocator', 'pDescriptorPool'] +protos['vkDestroyDescriptorPool'] = ['device', 'descriptorPool', 'pAllocator'] +flags['VkDescriptorPoolResetFlags'] = None +protos['vkResetDescriptorPool'] = ['device', 'descriptorPool', 'flags'] +structs['VkDescriptorSetAllocateInfo'] = ['sType', 'pNext', 'descriptorPool', 'descriptorSetCount', 'pSetLayouts'] +structs['VkDescriptorSet'] = None +protos['vkAllocateDescriptorSets'] = ['device', 'pAllocateInfo', 'pDescriptorSets'] +protos['vkFreeDescriptorSets'] = ['device', 'descriptorPool', 'descriptorSetCount', 'pDescriptorSets'] +structs['VkDescriptorImageInfo'] = ['sampler', 'imageView', 'imageLayout'] +structs['VkDescriptorBufferInfo'] = ['buffer', 'offset', 'range'] +structs['VkWriteDescriptorSet'] = ['sType', 'pNext', 'dstSet', 'dstBinding', 'dstArrayElement', 'descriptorCount', 'descriptorType', 'pImageInfo', 'pBufferInfo', 'pTexelBufferView'] +structs['VkCopyDescriptorSet'] = ['sType', 'pNext', 'srcSet', 'srcBinding', 'srcArrayElement', 'dstSet', 'dstBinding', 'dstArrayElement', 'descriptorCount'] +protos['vkUpdateDescriptorSets'] = ['device', 'descriptorWriteCount', 'pDescriptorWrites', 'descriptorCopyCount', 'pDescriptorCopies'] +flags['VkFramebufferCreateFlags'] = None +structs['VkFramebufferCreateInfo'] = ['sType', 'pNext', 'flags', 'renderPass', 'attachmentCount', 'pAttachments', 'width', 'height', 'layers'] +structs['VkFramebuffer'] = None +protos['vkCreateFramebuffer'] = ['device', 'pCreateInfo', 'pAllocator', 'pFramebuffer'] +protos['vkDestroyFramebuffer'] = ['device', 'framebuffer', 'pAllocator'] +flags['VkRenderPassCreateFlags'] = None +consts['VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT'] = 'VkAttachmentDescriptionFlagBits' +enums['VkAttachmentDescriptionFlagBits'] = ['VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT'] +flags['VkAttachmentDescriptionFlags'] = 'VkAttachmentDescriptionFlagBits' +consts['VK_ATTACHMENT_LOAD_OP_LOAD'] = 'VkAttachmentLoadOp' +consts['VK_ATTACHMENT_LOAD_OP_CLEAR'] = 'VkAttachmentLoadOp' +consts['VK_ATTACHMENT_LOAD_OP_DONT_CARE'] = 'VkAttachmentLoadOp' +enums['VkAttachmentLoadOp'] = ['VK_ATTACHMENT_LOAD_OP_LOAD', 'VK_ATTACHMENT_LOAD_OP_CLEAR', 'VK_ATTACHMENT_LOAD_OP_DONT_CARE'] +consts['VK_ATTACHMENT_STORE_OP_STORE'] = 'VkAttachmentStoreOp' +consts['VK_ATTACHMENT_STORE_OP_DONT_CARE'] = 'VkAttachmentStoreOp' +enums['VkAttachmentStoreOp'] = ['VK_ATTACHMENT_STORE_OP_STORE', 'VK_ATTACHMENT_STORE_OP_DONT_CARE'] +structs['VkAttachmentDescription'] = ['flags', 'format', 'samples', 'loadOp', 'storeOp', 'stencilLoadOp', 'stencilStoreOp', 'initialLayout', 'finalLayout'] +flags['VkSubpassDescriptionFlags'] = None +consts['VK_PIPELINE_BIND_POINT_GRAPHICS'] = 'VkPipelineBindPoint' +consts['VK_PIPELINE_BIND_POINT_COMPUTE'] = 'VkPipelineBindPoint' +enums['VkPipelineBindPoint'] = ['VK_PIPELINE_BIND_POINT_GRAPHICS', 'VK_PIPELINE_BIND_POINT_COMPUTE'] +structs['VkAttachmentReference'] = ['attachment', 'layout'] +structs['VkSubpassDescription'] = ['flags', 'pipelineBindPoint', 'inputAttachmentCount', 'pInputAttachments', 'colorAttachmentCount', 'pColorAttachments', 'pResolveAttachments', 'pDepthStencilAttachment', 'preserveAttachmentCount', 'pPreserveAttachments'] +consts['VK_ACCESS_INDIRECT_COMMAND_READ_BIT'] = 'VkAccessFlagBits' +consts['VK_ACCESS_INDEX_READ_BIT'] = 'VkAccessFlagBits' +consts['VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT'] = 'VkAccessFlagBits' +consts['VK_ACCESS_UNIFORM_READ_BIT'] = 'VkAccessFlagBits' +consts['VK_ACCESS_INPUT_ATTACHMENT_READ_BIT'] = 'VkAccessFlagBits' +consts['VK_ACCESS_SHADER_READ_BIT'] = 'VkAccessFlagBits' +consts['VK_ACCESS_SHADER_WRITE_BIT'] = 'VkAccessFlagBits' +consts['VK_ACCESS_COLOR_ATTACHMENT_READ_BIT'] = 'VkAccessFlagBits' +consts['VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT'] = 'VkAccessFlagBits' +consts['VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT'] = 'VkAccessFlagBits' +consts['VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT'] = 'VkAccessFlagBits' +consts['VK_ACCESS_TRANSFER_READ_BIT'] = 'VkAccessFlagBits' +consts['VK_ACCESS_TRANSFER_WRITE_BIT'] = 'VkAccessFlagBits' +consts['VK_ACCESS_HOST_READ_BIT'] = 'VkAccessFlagBits' +consts['VK_ACCESS_HOST_WRITE_BIT'] = 'VkAccessFlagBits' +consts['VK_ACCESS_MEMORY_READ_BIT'] = 'VkAccessFlagBits' +consts['VK_ACCESS_MEMORY_WRITE_BIT'] = 'VkAccessFlagBits' +enums['VkAccessFlagBits'] = ['VK_ACCESS_INDIRECT_COMMAND_READ_BIT', 'VK_ACCESS_INDEX_READ_BIT', 'VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT', 'VK_ACCESS_UNIFORM_READ_BIT', 'VK_ACCESS_INPUT_ATTACHMENT_READ_BIT', 'VK_ACCESS_SHADER_READ_BIT', 'VK_ACCESS_SHADER_WRITE_BIT', 'VK_ACCESS_COLOR_ATTACHMENT_READ_BIT', 'VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT', 'VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT', 'VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT', 'VK_ACCESS_TRANSFER_READ_BIT', 'VK_ACCESS_TRANSFER_WRITE_BIT', 'VK_ACCESS_HOST_READ_BIT', 'VK_ACCESS_HOST_WRITE_BIT', 'VK_ACCESS_MEMORY_READ_BIT', 'VK_ACCESS_MEMORY_WRITE_BIT'] +flags['VkAccessFlags'] = 'VkAccessFlagBits' +consts['VK_DEPENDENCY_BY_REGION_BIT'] = 'VkDependencyFlagBits' +enums['VkDependencyFlagBits'] = ['VK_DEPENDENCY_BY_REGION_BIT'] +flags['VkDependencyFlags'] = 'VkDependencyFlagBits' +structs['VkSubpassDependency'] = ['srcSubpass', 'dstSubpass', 'srcStageMask', 'dstStageMask', 'srcAccessMask', 'dstAccessMask', 'dependencyFlags'] +structs['VkRenderPassCreateInfo'] = ['sType', 'pNext', 'flags', 'attachmentCount', 'pAttachments', 'subpassCount', 'pSubpasses', 'dependencyCount', 'pDependencies'] +protos['vkCreateRenderPass'] = ['device', 'pCreateInfo', 'pAllocator', 'pRenderPass'] +protos['vkDestroyRenderPass'] = ['device', 'renderPass', 'pAllocator'] +protos['vkGetRenderAreaGranularity'] = ['device', 'renderPass', 'pGranularity'] +consts['VK_COMMAND_POOL_CREATE_TRANSIENT_BIT'] = 'VkCommandPoolCreateFlagBits' +consts['VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT'] = 'VkCommandPoolCreateFlagBits' +enums['VkCommandPoolCreateFlagBits'] = ['VK_COMMAND_POOL_CREATE_TRANSIENT_BIT', 'VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT'] +flags['VkCommandPoolCreateFlags'] = 'VkCommandPoolCreateFlagBits' +structs['VkCommandPoolCreateInfo'] = ['sType', 'pNext', 'flags', 'queueFamilyIndex'] +structs['VkCommandPool'] = None +protos['vkCreateCommandPool'] = ['device', 'pCreateInfo', 'pAllocator', 'pCommandPool'] +protos['vkDestroyCommandPool'] = ['device', 'commandPool', 'pAllocator'] +consts['VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT'] = 'VkCommandPoolResetFlagBits' +enums['VkCommandPoolResetFlagBits'] = ['VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT'] +flags['VkCommandPoolResetFlags'] = 'VkCommandPoolResetFlagBits' +protos['vkResetCommandPool'] = ['device', 'commandPool', 'flags'] +consts['VK_COMMAND_BUFFER_LEVEL_PRIMARY'] = 'VkCommandBufferLevel' +consts['VK_COMMAND_BUFFER_LEVEL_SECONDARY'] = 'VkCommandBufferLevel' +enums['VkCommandBufferLevel'] = ['VK_COMMAND_BUFFER_LEVEL_PRIMARY', 'VK_COMMAND_BUFFER_LEVEL_SECONDARY'] +structs['VkCommandBufferAllocateInfo'] = ['sType', 'pNext', 'commandPool', 'level', 'commandBufferCount'] +protos['vkAllocateCommandBuffers'] = ['device', 'pAllocateInfo', 'pCommandBuffers'] +protos['vkFreeCommandBuffers'] = ['device', 'commandPool', 'commandBufferCount', 'pCommandBuffers'] +consts['VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT'] = 'VkCommandBufferUsageFlagBits' +consts['VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT'] = 'VkCommandBufferUsageFlagBits' +consts['VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT'] = 'VkCommandBufferUsageFlagBits' +enums['VkCommandBufferUsageFlagBits'] = ['VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT', 'VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT', 'VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT'] +flags['VkCommandBufferUsageFlags'] = 'VkCommandBufferUsageFlagBits' +consts['VK_QUERY_CONTROL_PRECISE_BIT'] = 'VkQueryControlFlagBits' +enums['VkQueryControlFlagBits'] = ['VK_QUERY_CONTROL_PRECISE_BIT'] +flags['VkQueryControlFlags'] = 'VkQueryControlFlagBits' +structs['VkCommandBufferInheritanceInfo'] = ['sType', 'pNext', 'renderPass', 'subpass', 'framebuffer', 'occlusionQueryEnable', 'queryFlags', 'pipelineStatistics'] +structs['VkCommandBufferBeginInfo'] = ['sType', 'pNext', 'flags', 'pInheritanceInfo'] +protos['vkBeginCommandBuffer'] = ['commandBuffer', 'pBeginInfo'] +protos['vkEndCommandBuffer'] = ['commandBuffer'] +consts['VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT'] = 'VkCommandBufferResetFlagBits' +enums['VkCommandBufferResetFlagBits'] = ['VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT'] +flags['VkCommandBufferResetFlags'] = 'VkCommandBufferResetFlagBits' +protos['vkResetCommandBuffer'] = ['commandBuffer', 'flags'] +protos['vkCmdBindPipeline'] = ['commandBuffer', 'pipelineBindPoint', 'pipeline'] +protos['vkCmdSetViewport'] = ['commandBuffer', 'firstViewport', 'viewportCount', 'pViewports'] +protos['vkCmdSetScissor'] = ['commandBuffer', 'firstScissor', 'scissorCount', 'pScissors'] +protos['vkCmdSetLineWidth'] = ['commandBuffer', 'lineWidth'] +protos['vkCmdSetDepthBias'] = ['commandBuffer', 'depthBiasConstantFactor', 'depthBiasClamp', 'depthBiasSlopeFactor'] +protos['vkCmdSetBlendConstants'] = ['commandBuffer', 'blendConstants'] +protos['vkCmdSetDepthBounds'] = ['commandBuffer', 'minDepthBounds', 'maxDepthBounds'] +consts['VK_STENCIL_FACE_FRONT_BIT'] = 'VkStencilFaceFlagBits' +consts['VK_STENCIL_FACE_BACK_BIT'] = 'VkStencilFaceFlagBits' +consts['VK_STENCIL_FRONT_AND_BACK'] = 'VkStencilFaceFlagBits' +enums['VkStencilFaceFlagBits'] = ['VK_STENCIL_FACE_FRONT_BIT', 'VK_STENCIL_FACE_BACK_BIT', 'VK_STENCIL_FRONT_AND_BACK'] +flags['VkStencilFaceFlags'] = 'VkStencilFaceFlagBits' +protos['vkCmdSetStencilCompareMask'] = ['commandBuffer', 'faceMask', 'compareMask'] +protos['vkCmdSetStencilWriteMask'] = ['commandBuffer', 'faceMask', 'writeMask'] +protos['vkCmdSetStencilReference'] = ['commandBuffer', 'faceMask', 'reference'] +protos['vkCmdBindDescriptorSets'] = ['commandBuffer', 'pipelineBindPoint', 'layout', 'firstSet', 'descriptorSetCount', 'pDescriptorSets', 'dynamicOffsetCount', 'pDynamicOffsets'] +consts['VK_INDEX_TYPE_UINT16'] = 'VkIndexType' +consts['VK_INDEX_TYPE_UINT32'] = 'VkIndexType' +enums['VkIndexType'] = ['VK_INDEX_TYPE_UINT16', 'VK_INDEX_TYPE_UINT32'] +protos['vkCmdBindIndexBuffer'] = ['commandBuffer', 'buffer', 'offset', 'indexType'] +protos['vkCmdBindVertexBuffers'] = ['commandBuffer', 'firstBinding', 'bindingCount', 'pBuffers', 'pOffsets'] +protos['vkCmdDraw'] = ['commandBuffer', 'vertexCount', 'instanceCount', 'firstVertex', 'firstInstance'] +protos['vkCmdDrawIndexed'] = ['commandBuffer', 'indexCount', 'instanceCount', 'firstIndex', 'vertexOffset', 'firstInstance'] +protos['vkCmdDrawIndirect'] = ['commandBuffer', 'buffer', 'offset', 'drawCount', 'stride'] +protos['vkCmdDrawIndexedIndirect'] = ['commandBuffer', 'buffer', 'offset', 'drawCount', 'stride'] +protos['vkCmdDispatch'] = ['commandBuffer', 'x', 'y', 'z'] +protos['vkCmdDispatchIndirect'] = ['commandBuffer', 'buffer', 'offset'] +structs['VkBufferCopy'] = ['srcOffset', 'dstOffset', 'size'] +protos['vkCmdCopyBuffer'] = ['commandBuffer', 'srcBuffer', 'dstBuffer', 'regionCount', 'pRegions'] +structs['VkImageSubresourceLayers'] = ['aspectMask', 'mipLevel', 'baseArrayLayer', 'layerCount'] +structs['VkImageCopy'] = ['srcSubresource', 'srcOffset', 'dstSubresource', 'dstOffset', 'extent'] +protos['vkCmdCopyImage'] = ['commandBuffer', 'srcImage', 'srcImageLayout', 'dstImage', 'dstImageLayout', 'regionCount', 'pRegions'] +structs['VkImageBlit'] = ['srcSubresource', 'srcOffsets[2]', 'dstSubresource', 'dstOffsets[2]'] +protos['vkCmdBlitImage'] = ['commandBuffer', 'srcImage', 'srcImageLayout', 'dstImage', 'dstImageLayout', 'regionCount', 'pRegions', 'filter'] +structs['VkBufferImageCopy'] = ['bufferOffset', 'bufferRowLength', 'bufferImageHeight', 'imageSubresource', 'imageOffset', 'imageExtent'] +protos['vkCmdCopyBufferToImage'] = ['commandBuffer', 'srcBuffer', 'dstImage', 'dstImageLayout', 'regionCount', 'pRegions'] +protos['vkCmdCopyImageToBuffer'] = ['commandBuffer', 'srcImage', 'srcImageLayout', 'dstBuffer', 'regionCount', 'pRegions'] +protos['vkCmdUpdateBuffer'] = ['commandBuffer', 'dstBuffer', 'dstOffset', 'dataSize', 'pData'] +protos['vkCmdFillBuffer'] = ['commandBuffer', 'dstBuffer', 'dstOffset', 'size', 'data'] +structs['VkClearColorValue'] = ['float32', 'int32', 'uint32'] +protos['vkCmdClearColorImage'] = ['commandBuffer', 'image', 'imageLayout', 'pColor', 'rangeCount', 'pRanges'] +structs['VkClearDepthStencilValue'] = ['depth', 'stencil'] +protos['vkCmdClearDepthStencilImage'] = ['commandBuffer', 'image', 'imageLayout', 'pDepthStencil', 'rangeCount', 'pRanges'] +structs['VkClearValue'] = ['color', 'depthStencil'] +structs['VkClearAttachment'] = ['aspectMask', 'colorAttachment', 'clearValue'] +structs['VkClearRect'] = ['rect', 'baseArrayLayer', 'layerCount'] +protos['vkCmdClearAttachments'] = ['commandBuffer', 'attachmentCount', 'pAttachments', 'rectCount', 'pRects'] +structs['VkImageResolve'] = ['srcSubresource', 'srcOffset', 'dstSubresource', 'dstOffset', 'extent'] +protos['vkCmdResolveImage'] = ['commandBuffer', 'srcImage', 'srcImageLayout', 'dstImage', 'dstImageLayout', 'regionCount', 'pRegions'] +protos['vkCmdSetEvent'] = ['commandBuffer', 'event', 'stageMask'] +protos['vkCmdResetEvent'] = ['commandBuffer', 'event', 'stageMask'] +structs['VkMemoryBarrier'] = ['sType', 'pNext', 'srcAccessMask', 'dstAccessMask'] +structs['VkBufferMemoryBarrier'] = ['sType', 'pNext', 'srcAccessMask', 'dstAccessMask', 'srcQueueFamilyIndex', 'dstQueueFamilyIndex', 'buffer', 'offset', 'size'] +structs['VkImageMemoryBarrier'] = ['sType', 'pNext', 'srcAccessMask', 'dstAccessMask', 'oldLayout', 'newLayout', 'srcQueueFamilyIndex', 'dstQueueFamilyIndex', 'image', 'subresourceRange'] +protos['vkCmdWaitEvents'] = ['commandBuffer', 'eventCount', 'pEvents', 'srcStageMask', 'dstStageMask', 'memoryBarrierCount', 'pMemoryBarriers', 'bufferMemoryBarrierCount', 'pBufferMemoryBarriers', 'imageMemoryBarrierCount', 'pImageMemoryBarriers'] +protos['vkCmdPipelineBarrier'] = ['commandBuffer', 'srcStageMask', 'dstStageMask', 'dependencyFlags', 'memoryBarrierCount', 'pMemoryBarriers', 'bufferMemoryBarrierCount', 'pBufferMemoryBarriers', 'imageMemoryBarrierCount', 'pImageMemoryBarriers'] +protos['vkCmdBeginQuery'] = ['commandBuffer', 'queryPool', 'query', 'flags'] +protos['vkCmdEndQuery'] = ['commandBuffer', 'queryPool', 'query'] +protos['vkCmdResetQueryPool'] = ['commandBuffer', 'queryPool', 'firstQuery', 'queryCount'] +protos['vkCmdWriteTimestamp'] = ['commandBuffer', 'pipelineStage', 'queryPool', 'query'] +protos['vkCmdCopyQueryPoolResults'] = ['commandBuffer', 'queryPool', 'firstQuery', 'queryCount', 'dstBuffer', 'dstOffset', 'stride', 'flags'] +protos['vkCmdPushConstants'] = ['commandBuffer', 'layout', 'stageFlags', 'offset', 'size', 'pValues'] +structs['VkRenderPassBeginInfo'] = ['sType', 'pNext', 'renderPass', 'framebuffer', 'renderArea', 'clearValueCount', 'pClearValues'] +consts['VK_SUBPASS_CONTENTS_INLINE'] = 'VkSubpassContents' +consts['VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS'] = 'VkSubpassContents' +enums['VkSubpassContents'] = ['VK_SUBPASS_CONTENTS_INLINE', 'VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS'] +protos['vkCmdBeginRenderPass'] = ['commandBuffer', 'pRenderPassBegin', 'contents'] +protos['vkCmdNextSubpass'] = ['commandBuffer', 'contents'] +protos['vkCmdEndRenderPass'] = ['commandBuffer'] +protos['vkCmdExecuteCommands'] = ['commandBuffer', 'commandBufferCount', 'pCommandBuffers'] +structs['VkDispatchIndirectCommand'] = ['x', 'y', 'z'] +structs['VkDrawIndexedIndirectCommand'] = ['indexCount', 'instanceCount', 'firstIndex', 'vertexOffset', 'firstInstance'] +structs['VkDrawIndirectCommand'] = ['vertexCount', 'instanceCount', 'firstVertex', 'firstInstance'] diff --git a/doc/specs/vulkan/vkspec.txt b/doc/specs/vulkan/vkspec.txt new file mode 100644 index 00000000..1562700a --- /dev/null +++ b/doc/specs/vulkan/vkspec.txt @@ -0,0 +1,109 @@ +// Copyright (c) 2014-2016 The Khronos Group Inc. +// Copyright notice at https://www.khronos.org/registry/speccopyright.html + += {apiname} 1.0 - A Specification +The Khronos Vulkan Working Group +include::specversion.txt[] +:icons: +:toc2: +:toc-placement: manual +:max-width: 100 +:numbered: +:doctype: book +:imagewidth: 800 +:fullimagewidth: {svgpdf@pdf:scaledwidth="75%":width="800"} + +:vkkeyword: + +//:editing-notes: + +<<<< + +include::copyright.txt[] + +<<<< + +// toc::[] +// +// include::preface.txt[] + +:leveloffset: 1 +include::chapters/introduction.txt[] + +include::chapters/fundamentals.txt[] + +include::chapters/initialization.txt[] + +include::chapters/devsandqueues.txt[] + +include::chapters/cmdbuffers.txt[] + +include::chapters/synchronization.txt[] + +include::chapters/renderpass.txt[] + +include::chapters/shaders.txt[] + +include::chapters/pipelines.txt[] + +include::chapters/memory.txt[] + +include::chapters/resources.txt[] + +include::chapters/samplers.txt[] + +include::chapters/descriptorsets.txt[] + +include::chapters/interfaces.txt[] + +include::chapters/textures.txt[] + +include::chapters/queries.txt[] + +// Transfer operations +include::chapters/clears.txt[] + +include::chapters/copies.txt[] + +// Graphics Operations +include::chapters/drawing.txt[] + +include::chapters/fxvertex.txt[] + +include::chapters/tessellation.txt[] + +include::chapters/geometry.txt[] + +include::chapters/vertexpostproc.txt[] + +include::chapters/primsrast.txt[] + +include::chapters/fragops.txt[] + +include::chapters/framebuffer.txt[] + +// Compute +include::chapters/dispatch.txt[] + +// Sparse +include::chapters/sparsemem.txt[] + +// Sort of an appendix +include::chapters/extensions.txt[] + +include::chapters/features.txt[] + +// Appendices +:numbered!: + +include::appendices/spirvenv.txt[] + +include::appendices/compressedtex.txt[] + +include::appendices/extensions.txt[] + +include::appendices/invariance.txt[] + +include::appendices/glossary.txt[] + +include::appendices/credits.txt[] diff --git a/out/df/index.html b/out/df/index.html new file mode 100644 index 00000000..2c03ff79 --- /dev/null +++ b/out/df/index.html @@ -0,0 +1,21 @@ + + +Data Format 1.1 Spec Sandbox + + +

Data Format 1.1 Spec Sandbox

+ +

This is the Data Format 1.1 spec sandbox, used to view generated + documents. It is updated by hand periodically by Jon Leech.

+ + + + diff --git a/out/index.html b/out/index.html new file mode 100644 index 00000000..1684a933 --- /dev/null +++ b/out/index.html @@ -0,0 +1,62 @@ + + +Vulkan Spec Sandbox + + +

Vulkan Spec Sandbox

+ +

This is the vulkan spec sandbox, used to view generated Vulkan API and + related documents. It is updated by hand periodically by Jon Leech.

+ + + + diff --git a/src/spec/Makefile b/src/spec/Makefile new file mode 100644 index 00000000..cb86f406 --- /dev/null +++ b/src/spec/Makefile @@ -0,0 +1,145 @@ +# Copyright (c) 2013-2016 The Khronos Group Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and/or associated documentation files (the +# "Materials"), to deal in the Materials without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Materials, and to +# permit persons to whom the Materials are furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Materials. +# +# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +# Generator scripts and options +# GENOPTS can be e.g. '-noprotect' + +PYTHON ?= python3 +PYFILES = genheaders.py reg.py +GENOPTS = +GENHEADERS = genheaders.py $(GENOPTS) + +# Generate all outputs for Vulkan, including headers and (soon) Asciidoc +# frameworks. Targets: +# +# default - regenerate ../vulkan/vulkan.h +# install - install regenerated vulkan.h +# full_install - install regenerated vulkan.h and ref page API include +# files. Normally only Jon should do this when accepting a merge into +# master. +# validate - run XML validator on vk.xml against the schema +# test - check if vulkan.h compiles +# readme.pdf - regnerate schema / HOWTO documentation +# vulkan.h - just regenerate vulkan.h locally (for compile testing) + +HEADERS = ../vulkan/vulkan.h +DOCINCLUDES = vulkan-docs +DOCROOT = ../../doc/specs/vulkan +DOCPYSRC = $(DOCROOT)/vkapi.py +DOCVALIDITY = validity +DOCHOSTSYNCTABLE = hostsynctable +XMLDOC = readme.pdf + +# Could add $(XMLDOC) to default, but that requires a LaTeX install. +# Could regenerate vk.json automatically but the generator script isn't +# creating semantically valid JSON yet, and it's autogenerated, so +# don't. + +default install: $(HEADERS) + +full_install: default $(DOCINCLUDES) $(DOCPYSRC) $(DOCVALIDITY) $(DOCHOSTSYNCTABLE) + +################################################ + +# Python and XML files on which vulkan.h depends +VKH_DEPENDS = vk.xml genvk.py reg.py generator.py + +# Autogenerate installed header from XML API description +../vulkan/vulkan.h: $(VKH_DEPENDS) + $(PYTHON) genvk.py $(GENOPTS) $@ + +# Autogenerate API Asciidoc include files from XML +# The target is generated by genvk.py, but is just +# an empty file used as a proxy for when the many +# files in the docs tree were regenerated. +$(DOCINCLUDES): $(VKH_DEPENDS) + $(PYTHON) genvk.py $(GENOPTS) $@ + +# Generate API Python dictionaries from XML. +# These are used in validating spec / man pages. +$(DOCPYSRC): $(VKH_DEPENDS) + $(PYTHON) genvk.py $(GENOPTS) $@ + +# Generate API Asciidoc validity include files from XML. +$(DOCVALIDITY): $(VKH_DEPENDS) + $(PYTHON) genvk.py $(GENOPTS) $@ + +# Generate API Asciidoc hostsynctable include files from XML. +$(DOCHOSTSYNCTABLE): $(VKH_DEPENDS) + $(PYTHON) genvk.py $(GENOPTS) $@ + +# Verify registry XML file against the schema +validate: + jing -c registry.rnc vk.xml + +# Test that vulkan.h compiles +test: ../vulkan/vulkan.h ../vulkan/vk_platform.h + gcc -Wall -pedantic -std=c99 -c -I.. test.c + g++ -Wall -c -std=c++98 -I.. test.c + g++ -Wall -c -std=c++11 -I.. test.c + rm test.o + +# Convert XML API description to JSON (not used yet) +vk.json: tojson.py vk.xml + $(PYTHON) tojson.py vk.xml > $@ + +################################################ + +# Documentation targets +readme.pdf: readme.tex Makefile + touch readme.ind + pdflatex readme.tex + pdflatex readme.tex + makeindex readme.idx + pdflatex readme.tex + +################################################ + +# Administrative stuff + +# Add entries from function_properties.xls (encoded into a Python +# dictionary) to vk.xml + +addProps: + $(PYTHON) rewrite.py vk.xml | $(PYTHON) realign.py > new.xml + +################################################ + +# Files to clean up +TEXDIRT = readme.aux readme.idx readme.ilg readme.ind readme.log readme.toc readme.out +PYDIRT = diag.txt dumpReg.txt errwarn.txt *.pyc regdump.txt +DIRT = $(TEXDIRT) $(PYDIRT) ERRS \#* + +clean: + -rm -f $(DIRT) + +# Remove not just intermediate and junk files, but generated targets +# (installed header & asciidoc includes) +clobber: clean + -rm -f $(HEADERS) $(DOCINCLUDES) + -rm -f $(DOCROOT)/vkapi.py + -rm -f $(DOCROOT)/structs/*.txt $(DOCROOT)/protos/*.txt + -rm -f $(DOCROOT)/enums/*.txt $(DOCROOT)/flags/*.txt + -rm -f $(DOCVALIDITY) + -rm -f $(DOCROOT)/validity/protos/*.txt + -rm -f $(DOCROOT)/validity/structs/*.txt + -rm -f $(DOCHOSTSYNCTABLE) + -rm -f $(DOCROOT)/hostsynctable/*.txt diff --git a/src/spec/README b/src/spec/README new file mode 100644 index 00000000..f34133b0 --- /dev/null +++ b/src/spec/README @@ -0,0 +1,175 @@ +Table of contents: + INTRODUCTION + FILES + MAKEFILE TARGETS + SOFTWARE DEPENDENCIES + RUNNING ON WINDOWS + CHANGE LOG + +INTRODUCTION +------------ + +This is the Vulkan XML API Registry. It is used to generate the canonical +vulkan.h and the API Asciidoc include files used by the ref pages and +Specification. + +When patches to the header or the includes are needed, follow this workflow: + + - Create a git branch to work in locally + - Edit vk.xml + - make ; make test + (this just generates ../vulkan/vulkan.h) + - make full_install + (this generates all targets) + - Repeat until the header and/or includes are correct + - Commit your changes to your local git branch + - Push the branch to the git server and create a merge request against the + specification branch ("1.0") or other appropriate target. + +See 'readme.pdf' for a detailed description of the schema, and some examples +of how to make simple changes in the API via the XML. + +The generator scripts are written in Python 3, using the very nice +lxml.etree package for processing XML. + + Jon Leech + +FILES +----- + + Makefile - generates header and JSON from XML (see below) + vk.xml - XML API description + genvk.py - Python script to generate vulkan.h and other targets. + readme.tex - Source for detailed description of the XML schema + readme.pdf - Generated document describing the XML schema and giving + some examples of making simple changes to add API features + registry.rnc - RelaxNG compact schema for validating XML against the + schema + reg.py - Python tools to read XML file and convert it into C headers + generator.py - output generator for C. Others are possible, although + vk.xml contains C-isms which would have to be factored out. + ../vulkan/vulkan.h - Generated header + +MAKEFILE TARGETS +---------------- + + install or ../vulkan/vulkan.h (default target) - regenerate vulkan.h in + ../vulkan . + vulkan-docs - regenerate spec/ref page API include .txt files and + install under ../../doc/specs/vulkan/*/ . In general, this should be + left until a branch is merged to master. + full_install - combination of 'install' and 'vulkan-docs' targets. + Again, in general this should be left until a branch is merged to + master. + readme.pdf - detailed description of the XML schema. Normally this need + not be rebuilt unless you're changing the schema and updating + readme.tex. + test - make sure ../vulkan/vulkan.h compiles. Important! + validate - validate vk.xml against the schema. Requires 'jing' tool + installed. + clobber - remove generated and cache files, including the API include + files. Usually done while merging to master via 'make clobber ; make + full_install' + + If you have trouble running the Makefile on your platorm, try using + the command line: + + # Regenerate header from XML + python3 genvk.py ../vulkan/vulkan.h + # Test the resulting header compiles + gcc -Wall -c -I.. test.c + g++ -Wall -c -std=c++98 -I.. test.c + g++ -Wall -c -std=c++11 -I.. test.c + # Then commit/push changes to git + +SOFTWARE DEPENDENCIES +--------------------- + +RUNNING ON LINUX +---------------- + +These are the versions of required tools in a Debian 8 development +environment. Earlier versions *may* work but unless they are verified by +someone else, there's no way to know that: + + - Python 3 (python3, version: 3.4.2) + - Python 3 version of lxml package (python3-lxml, version: 3.4.0-1) + - g++/gcc 4.9 (g++-4.9 / gcc-4.9, version: 4.9.2-10 - gcc 4.8 also + reported to work, just needs to support the -std=c++11 target) + - GNU make (make version: 4.0.8-1; older versions probably OK) + - Jing (jing version: 20131210+dfsg+1-1; needed only for optional XML + validation) + +RUNNING ON WINDOWS +------------------ + +(Instructions from Daniel Johnston, daniel.johnston@intel.com) + +1) Install python (32-bit works great): https://www.python.org/downloads/ + a) Ensure the pip module is installed (should be by default) +2) Download the lxml package from + http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml + a) 32-bit latest is: lxml-3.4.4-cp34-none-win32.whl +3) Install the lxml package: + C:\PathToPython\python.exe pip install c:\PathToDownload\lxml-3.4.4-cp34-none-win32.whl +4) Run the genvk.py script in C:\PathToVulkan\src\specfile : + a) C:\PathToPython\python.exe genvk.py vulkan.h + +CHANGE LOG +---------- + +2015/06/01 + + The header that's generated has been improved relative to the first + version. Function arguments are indented like the hand-generated header, + enumerant BEGIN/END_RANGE enums are named the same, etc. The ordering of + declarations is unlike the hand-generated header, and probably always + will because it results from a type/enum/function dependency analysis. + Some of this can be forced by being more explicit about it, if that's a + big deal. + +2015/06/02 + + Per WG signoff, converted hex constant values to decimal (for + non-bitmasks) and VK_BIT macros to 'bitpos' attributes in the XML and + hex constants in the header. Updated schema to match. + + Changed tag to . + +2015/06/03 + + Moved into new 'vulkan' tree (did not bother preserving history in + previous repo). Added semantic knowledge about structs and unions to + tags instead of just imbedding C struct definitions. Improved + registry.rnc schema a bit. + +2015/06/07 + + Incorporate feedback from F2F including Python 3 and Windows fixes to + the scripts. Add documentation to readme.pdf. Fold in multiple merge + requests resulting from action items agreed at the F2F, to prepare + for everyone moving to XML instead of directly editing the header. + +2015/06/20 + + Add vulkan-docs target and instructions for installing python3 and + python-lxml for Windows. + +2015/08/13 + + Bring documentation up to date with Makefile targets (default is now + ../include/vulkan.h). + +2015/09/02 + + Update README with required (or known working) versions of toolchain + components. + +2015/09/02 + + Move include/vulkan.h to vulkan/vulkan.h so #include "vulkan/vulkan.h" + is the normal usage (Bug 14576). + +2016/02/12 + + Update README and remove old files to stage for public release. diff --git a/src/spec/generator.py b/src/spec/generator.py new file mode 100644 index 00000000..7dd75a7f --- /dev/null +++ b/src/spec/generator.py @@ -0,0 +1,2272 @@ +#!/usr/bin/python3 -i +# +# Copyright (c) 2013-2016 The Khronos Group Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and/or associated documentation files (the +# "Materials"), to deal in the Materials without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Materials, and to +# permit persons to whom the Materials are furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Materials. +# +# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +import os,re,sys + +def write( *args, **kwargs ): + file = kwargs.pop('file',sys.stdout) + end = kwargs.pop( 'end','\n') + file.write( ' '.join([str(arg) for arg in args]) ) + file.write( end ) + +# noneStr - returns string argument, or "" if argument is None. +# Used in converting lxml Elements into text. +# str - string to convert +def noneStr(str): + if (str): + return str + else: + return "" + +# enquote - returns string argument with surrounding quotes, +# for serialization into Python code. +def enquote(str): + if (str): + return "'" + str + "'" + else: + return None + +# Primary sort key for regSortFeatures. +# Sorts by category of the feature name string: +# Core API features (those defined with a tag) +# ARB/KHR/OES (Khronos extensions) +# other (EXT/vendor extensions) +# This will need changing for Vulkan! +def regSortCategoryKey(feature): + if (feature.elem.tag == 'feature'): + return 0 + elif (feature.category == 'ARB' or + feature.category == 'KHR' or + feature.category == 'OES'): + return 1 + else: + return 2 + +# Secondary sort key for regSortFeatures. +# Sorts by extension name. +def regSortNameKey(feature): + return feature.name + +# Second sort key for regSortFeatures. +# Sorts by feature version. elements all have version number "0" +def regSortFeatureVersionKey(feature): + return float(feature.version) + +# Tertiary sort key for regSortFeatures. +# Sorts by extension number. elements all have extension number 0. +def regSortExtensionNumberKey(feature): + return int(feature.number) + +# regSortFeatures - default sort procedure for features. +# Sorts by primary key of feature category ('feature' or 'extension') +# then by version number (for features) +# then by extension number (for extensions) +def regSortFeatures(featureList): + featureList.sort(key = regSortExtensionNumberKey) + featureList.sort(key = regSortFeatureVersionKey) + featureList.sort(key = regSortCategoryKey) + +# GeneratorOptions - base class for options used during header production +# These options are target language independent, and used by +# Registry.apiGen() and by base OutputGenerator objects. +# +# Members +# filename - name of file to generate, or None to write to stdout. +# apiname - string matching 'apiname' attribute, e.g. 'gl'. +# profile - string specifying API profile , e.g. 'core', or None. +# versions - regex matching API versions to process interfaces for. +# Normally '.*' or '[0-9]\.[0-9]' to match all defined versions. +# emitversions - regex matching API versions to actually emit +# interfaces for (though all requested versions are considered +# when deciding which interfaces to generate). For GL 4.3 glext.h, +# this might be '1\.[2-5]|[2-4]\.[0-9]'. +# defaultExtensions - If not None, a string which must in its +# entirety match the pattern in the "supported" attribute of +# the . Defaults to None. Usually the same as apiname. +# addExtensions - regex matching names of additional extensions +# to include. Defaults to None. +# removeExtensions - regex matching names of extensions to +# remove (after defaultExtensions and addExtensions). Defaults +# to None. +# sortProcedure - takes a list of FeatureInfo objects and sorts +# them in place to a preferred order in the generated output. +# Default is core API versions, ARB/KHR/OES extensions, all +# other extensions, alphabetically within each group. +# The regex patterns can be None or empty, in which case they match +# nothing. +class GeneratorOptions: + """Represents options during header production from an API registry""" + def __init__(self, + filename = None, + apiname = None, + profile = None, + versions = '.*', + emitversions = '.*', + defaultExtensions = None, + addExtensions = None, + removeExtensions = None, + sortProcedure = regSortFeatures): + self.filename = filename + self.apiname = apiname + self.profile = profile + self.versions = self.emptyRegex(versions) + self.emitversions = self.emptyRegex(emitversions) + self.defaultExtensions = defaultExtensions + self.addExtensions = self.emptyRegex(addExtensions) + self.removeExtensions = self.emptyRegex(removeExtensions) + self.sortProcedure = sortProcedure + # + # Substitute a regular expression which matches no version + # or extension names for None or the empty string. + def emptyRegex(self,pat): + if (pat == None or pat == ''): + return '_nomatch_^' + else: + return pat + +# CGeneratorOptions - subclass of GeneratorOptions. +# +# Adds options used by COutputGenerator objects during C language header +# generation. +# +# Additional members +# prefixText - list of strings to prefix generated header with +# (usually a copyright statement + calling convention macros). +# protectFile - True if multiple inclusion protection should be +# generated (based on the filename) around the entire header. +# protectFeature - True if #ifndef..#endif protection should be +# generated around a feature interface in the header file. +# genFuncPointers - True if function pointer typedefs should be +# generated +# protectProto - If conditional protection should be generated +# around prototype declarations, set to either '#ifdef' +# to require opt-in (#ifdef protectProtoStr) or '#ifndef' +# to require opt-out (#ifndef protectProtoStr). Otherwise +# set to None. +# protectProtoStr - #ifdef/#ifndef symbol to use around prototype +# declarations, if protectProto is set +# apicall - string to use for the function declaration prefix, +# such as APICALL on Windows. +# apientry - string to use for the calling convention macro, +# in typedefs, such as APIENTRY. +# apientryp - string to use for the calling convention macro +# in function pointer typedefs, such as APIENTRYP. +# indentFuncProto - True if prototype declarations should put each +# parameter on a separate line +# indentFuncPointer - True if typedefed function pointers should put each +# parameter on a separate line +# alignFuncParam - if nonzero and parameters are being put on a +# separate line, align parameter names at the specified column +class CGeneratorOptions(GeneratorOptions): + """Represents options during C interface generation for headers""" + def __init__(self, + filename = None, + apiname = None, + profile = None, + versions = '.*', + emitversions = '.*', + defaultExtensions = None, + addExtensions = None, + removeExtensions = None, + sortProcedure = regSortFeatures, + prefixText = "", + genFuncPointers = True, + protectFile = True, + protectFeature = True, + protectProto = None, + protectProtoStr = None, + apicall = '', + apientry = '', + apientryp = '', + indentFuncProto = True, + indentFuncPointer = False, + alignFuncParam = 0): + GeneratorOptions.__init__(self, filename, apiname, profile, + versions, emitversions, defaultExtensions, + addExtensions, removeExtensions, sortProcedure) + self.prefixText = prefixText + self.genFuncPointers = genFuncPointers + self.protectFile = protectFile + self.protectFeature = protectFeature + self.protectProto = protectProto + self.protectProtoStr = protectProtoStr + self.apicall = apicall + self.apientry = apientry + self.apientryp = apientryp + self.indentFuncProto = indentFuncProto + self.indentFuncPointer = indentFuncPointer + self.alignFuncParam = alignFuncParam + +# DocGeneratorOptions - subclass of GeneratorOptions. +# +# Shares many members with CGeneratorOptions, since +# both are writing C-style declarations: +# +# prefixText - list of strings to prefix generated header with +# (usually a copyright statement + calling convention macros). +# apicall - string to use for the function declaration prefix, +# such as APICALL on Windows. +# apientry - string to use for the calling convention macro, +# in typedefs, such as APIENTRY. +# apientryp - string to use for the calling convention macro +# in function pointer typedefs, such as APIENTRYP. +# genDirectory - directory into which to generate include files +# indentFuncProto - True if prototype declarations should put each +# parameter on a separate line +# indentFuncPointer - True if typedefed function pointers should put each +# parameter on a separate line +# alignFuncParam - if nonzero and parameters are being put on a +# separate line, align parameter names at the specified column +# +# Additional members: +# +class DocGeneratorOptions(GeneratorOptions): + """Represents options during C interface generation for Asciidoc""" + def __init__(self, + filename = None, + apiname = None, + profile = None, + versions = '.*', + emitversions = '.*', + defaultExtensions = None, + addExtensions = None, + removeExtensions = None, + sortProcedure = regSortFeatures, + prefixText = "", + apicall = '', + apientry = '', + apientryp = '', + genDirectory = 'gen', + indentFuncProto = True, + indentFuncPointer = False, + alignFuncParam = 0, + expandEnumerants = True): + GeneratorOptions.__init__(self, filename, apiname, profile, + versions, emitversions, defaultExtensions, + addExtensions, removeExtensions, sortProcedure) + self.prefixText = prefixText + self.apicall = apicall + self.apientry = apientry + self.apientryp = apientryp + self.genDirectory = genDirectory + self.indentFuncProto = indentFuncProto + self.indentFuncPointer = indentFuncPointer + self.alignFuncParam = alignFuncParam + self.expandEnumerants = expandEnumerants + +# OutputGenerator - base class for generating API interfaces. +# Manages basic logic, logging, and output file control +# Derived classes actually generate formatted output. +# +# ---- methods ---- +# OutputGenerator(errFile, warnFile, diagFile) +# errFile, warnFile, diagFile - file handles to write errors, +# warnings, diagnostics to. May be None to not write. +# logMsg(level, *args) - log messages of different categories +# level - 'error', 'warn', or 'diag'. 'error' will also +# raise a UserWarning exception +# *args - print()-style arguments +# setExtMap(map) - specify a dictionary map from extension names to +# numbers, used in creating values for extension enumerants. +# beginFile(genOpts) - start a new interface file +# genOpts - GeneratorOptions controlling what's generated and how +# endFile() - finish an interface file, closing it when done +# beginFeature(interface, emit) - write interface for a feature +# and tag generated features as having been done. +# interface - element for the / to generate +# emit - actually write to the header only when True +# endFeature() - finish an interface. +# genType(typeinfo,name) - generate interface for a type +# typeinfo - TypeInfo for a type +# genStruct(typeinfo,name) - generate interface for a C "struct" type. +# typeinfo - TypeInfo for a type interpreted as a struct +# genGroup(groupinfo,name) - generate interface for a group of enums (C "enum") +# groupinfo - GroupInfo for a group +# genEnum(enuminfo, name) - generate interface for an enum (constant) +# enuminfo - EnumInfo for an enum +# name - enum name +# genCmd(cmdinfo) - generate interface for a command +# cmdinfo - CmdInfo for a command +# makeCDecls(cmd) - return C prototype and function pointer typedef for a +# Element, as a list of two strings +# cmd - Element for the +# newline() - print a newline to the output file (utility function) +# +class OutputGenerator: + """Generate specified API interfaces in a specific style, such as a C header""" + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + self.outFile = None + self.errFile = errFile + self.warnFile = warnFile + self.diagFile = diagFile + # Internal state + self.featureName = None + self.genOpts = None + self.registry = None + # Used for extension enum value generation + self.extBase = 1000000000 + self.extBlockSize = 1000 + # + # logMsg - write a message of different categories to different + # destinations. + # level - + # 'diag' (diagnostic, voluminous) + # 'warn' (warning) + # 'error' (fatal error - raises exception after logging) + # *args - print()-style arguments to direct to corresponding log + def logMsg(self, level, *args): + """Log a message at the given level. Can be ignored or log to a file""" + if (level == 'error'): + strfile = io.StringIO() + write('ERROR:', *args, file=strfile) + if (self.errFile != None): + write(strfile.getvalue(), file=self.errFile) + raise UserWarning(strfile.getvalue()) + elif (level == 'warn'): + if (self.warnFile != None): + write('WARNING:', *args, file=self.warnFile) + elif (level == 'diag'): + if (self.diagFile != None): + write('DIAG:', *args, file=self.diagFile) + else: + raise UserWarning( + '*** FATAL ERROR in Generator.logMsg: unknown level:' + level) + # + # enumToValue - parses and converts an tag into a value. + # Returns a list + # first element - integer representation of the value, or None + # if needsNum is False. The value must be a legal number + # if needsNum is True. + # second element - string representation of the value + # There are several possible representations of values. + # A 'value' attribute simply contains the value. + # A 'bitpos' attribute defines a value by specifying the bit + # position which is set in that value. + # A 'offset','extbase','extends' triplet specifies a value + # as an offset to a base value defined by the specified + # 'extbase' extension name, which is then cast to the + # typename specified by 'extends'. This requires probing + # the registry database, and imbeds knowledge of the + # Vulkan extension enum scheme in this function. + def enumToValue(self, elem, needsNum): + name = elem.get('name') + numVal = None + if ('value' in elem.keys()): + value = elem.get('value') + # print('About to translate value =', value, 'type =', type(value)) + if (needsNum): + numVal = int(value, 0) + # If there's a non-integer, numeric 'type' attribute (e.g. 'u' or + # 'ull'), append it to the string value. + # t = enuminfo.elem.get('type') + # if (t != None and t != '' and t != 'i' and t != 's'): + # value += enuminfo.type + self.logMsg('diag', 'Enum', name, '-> value [', numVal, ',', value, ']') + return [numVal, value] + if ('bitpos' in elem.keys()): + value = elem.get('bitpos') + numVal = int(value, 0) + numVal = 1 << numVal + value = '0x%08x' % numVal + self.logMsg('diag', 'Enum', name, '-> bitpos [', numVal, ',', value, ']') + return [numVal, value] + if ('offset' in elem.keys()): + # Obtain values in the mapping from the attributes + enumNegative = False + offset = int(elem.get('offset'),0) + extnumber = int(elem.get('extnumber'),0) + extends = elem.get('extends') + if ('dir' in elem.keys()): + enumNegative = True + self.logMsg('diag', 'Enum', name, 'offset =', offset, + 'extnumber =', extnumber, 'extends =', extends, + 'enumNegative =', enumNegative) + # Now determine the actual enumerant value, as defined + # in the "Layers and Extensions" appendix of the spec. + numVal = self.extBase + (extnumber - 1) * self.extBlockSize + offset + if (enumNegative): + numVal = -numVal + value = '%d' % numVal + # More logic needed! + self.logMsg('diag', 'Enum', name, '-> offset [', numVal, ',', value, ']') + return [numVal, value] + return [None, None] + # + def beginFile(self, genOpts): + self.genOpts = genOpts + # + # Open specified output file. Not done in constructor since a + # Generator can be used without writing to a file. + if (self.genOpts.filename != None): + self.outFile = open(self.genOpts.filename, 'w') + else: + self.outFile = sys.stdout + def endFile(self): + self.errFile and self.errFile.flush() + self.warnFile and self.warnFile.flush() + self.diagFile and self.diagFile.flush() + self.outFile.flush() + if (self.outFile != sys.stdout and self.outFile != sys.stderr): + self.outFile.close() + self.genOpts = None + # + def beginFeature(self, interface, emit): + self.emit = emit + self.featureName = interface.get('name') + # If there's an additional 'protect' attribute in the feature, save it + self.featureExtraProtect = interface.get('protect') + def endFeature(self): + # Derived classes responsible for emitting feature + self.featureName = None + self.featureExtraProtect = None + # Utility method to validate we're generating something only inside a + # tag + def validateFeature(self, featureType, featureName): + if (self.featureName == None): + raise UserWarning('Attempt to generate', featureType, name, + 'when not in feature') + # + # Type generation + def genType(self, typeinfo, name): + self.validateFeature('type', name) + # + # Struct (e.g. C "struct" type) generation + def genStruct(self, typeinfo, name): + self.validateFeature('struct', name) + # + # Group (e.g. C "enum" type) generation + def genGroup(self, groupinfo, name): + self.validateFeature('group', name) + # + # Enumerant (really, constant) generation + def genEnum(self, enuminfo, name): + self.validateFeature('enum', name) + # + # Command generation + def genCmd(self, cmd, name): + self.validateFeature('command', name) + # + # Utility functions - turn a into C-language prototype + # and typedef declarations for that name. + # name - contents of tag + # tail - whatever text follows that tag in the Element + def makeProtoName(self, name, tail): + return self.genOpts.apientry + name + tail + def makeTypedefName(self, name, tail): + return '(' + self.genOpts.apientryp + 'PFN_' + name + tail + ')' + # + # makeCParamDecl - return a string which is an indented, formatted + # declaration for a or block (e.g. function parameter + # or structure/union member). + # param - Element ( or ) to format + # aligncol - if non-zero, attempt to align the nested element + # at this column + def makeCParamDecl(self, param, aligncol): + paramdecl = ' ' + noneStr(param.text) + for elem in param: + text = noneStr(elem.text) + tail = noneStr(elem.tail) + if (elem.tag == 'name' and aligncol > 0): + self.logMsg('diag', 'Aligning parameter', elem.text, 'to column', self.genOpts.alignFuncParam) + # Align at specified column, if possible + paramdecl = paramdecl.rstrip() + oldLen = len(paramdecl) + paramdecl = paramdecl.ljust(aligncol) + newLen = len(paramdecl) + self.logMsg('diag', 'Adjust length of parameter decl from', oldLen, 'to', newLen, ':', paramdecl) + paramdecl += text + tail + return paramdecl + # + # getCParamTypeLength - return the length of the type field is an indented, formatted + # declaration for a or block (e.g. function parameter + # or structure/union member). + # param - Element ( or ) to identify + def getCParamTypeLength(self, param): + paramdecl = ' ' + noneStr(param.text) + for elem in param: + text = noneStr(elem.text) + tail = noneStr(elem.tail) + if (elem.tag == 'name'): + # Align at specified column, if possible + newLen = len(paramdecl.rstrip()) + self.logMsg('diag', 'Identifying length of', elem.text, 'as', newLen) + paramdecl += text + tail + return newLen + # + # makeCDecls - return C prototype and function pointer typedef for a + # command, as a two-element list of strings. + # cmd - Element containing a tag + def makeCDecls(self, cmd): + """Generate C function pointer typedef for Element""" + proto = cmd.find('proto') + params = cmd.findall('param') + # Begin accumulating prototype and typedef strings + pdecl = self.genOpts.apicall + tdecl = 'typedef ' + # + # Insert the function return type/name. + # For prototypes, add APIENTRY macro before the name + # For typedefs, add (APIENTRY *) around the name and + # use the PFN_cmdnameproc naming convention. + # Done by walking the tree for element by element. + # lxml.etree has elem.text followed by (elem[i], elem[i].tail) + # for each child element and any following text + # Leading text + pdecl += noneStr(proto.text) + tdecl += noneStr(proto.text) + # For each child element, if it's a wrap in appropriate + # declaration. Otherwise append its contents and tail contents. + for elem in proto: + text = noneStr(elem.text) + tail = noneStr(elem.tail) + if (elem.tag == 'name'): + pdecl += self.makeProtoName(text, tail) + tdecl += self.makeTypedefName(text, tail) + else: + pdecl += text + tail + tdecl += text + tail + # Now add the parameter declaration list, which is identical + # for prototypes and typedefs. Concatenate all the text from + # a node without the tags. No tree walking required + # since all tags are ignored. + # Uses: self.indentFuncProto + # self.indentFuncPointer + # self.alignFuncParam + # Might be able to doubly-nest the joins, e.g. + # ','.join(('_'.join([l[i] for i in range(0,len(l))]) + n = len(params) + # Indented parameters + if n > 0: + indentdecl = '(\n' + for i in range(0,n): + paramdecl = self.makeCParamDecl(params[i], self.genOpts.alignFuncParam) + if (i < n - 1): + paramdecl += ',\n' + else: + paramdecl += ');' + indentdecl += paramdecl + else: + indentdecl = '(void);' + # Non-indented parameters + paramdecl = '(' + if n > 0: + for i in range(0,n): + paramdecl += ''.join([t for t in params[i].itertext()]) + if (i < n - 1): + paramdecl += ', ' + else: + paramdecl += 'void' + paramdecl += ");"; + return [ pdecl + indentdecl, tdecl + paramdecl ] + # + def newline(self): + write('', file=self.outFile) + + def setRegistry(self, registry): + self.registry = registry + # + +# COutputGenerator - subclass of OutputGenerator. +# Generates C-language API interfaces. +# +# ---- methods ---- +# COutputGenerator(errFile, warnFile, diagFile) - args as for +# OutputGenerator. Defines additional internal state. +# ---- methods overriding base class ---- +# beginFile(genOpts) +# endFile() +# beginFeature(interface, emit) +# endFeature() +# genType(typeinfo,name) +# genStruct(typeinfo,name) +# genGroup(groupinfo,name) +# genEnum(enuminfo, name) +# genCmd(cmdinfo) +class COutputGenerator(OutputGenerator): + """Generate specified API interfaces in a specific style, such as a C header""" + # This is an ordered list of sections in the header file. + TYPE_SECTIONS = ['include', 'define', 'basetype', 'handle', 'enum', + 'group', 'bitmask', 'funcpointer', 'struct'] + ALL_SECTIONS = TYPE_SECTIONS + ['commandPointer', 'command'] + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + OutputGenerator.__init__(self, errFile, warnFile, diagFile) + # Internal state - accumulators for different inner block text + self.sections = dict([(section, []) for section in self.ALL_SECTIONS]) + # + def beginFile(self, genOpts): + OutputGenerator.beginFile(self, genOpts) + # C-specific + # + # Multiple inclusion protection & C++ wrappers. + if (genOpts.protectFile and self.genOpts.filename): + headerSym = '__' + re.sub('\.h', '_h_', os.path.basename(self.genOpts.filename)) + write('#ifndef', headerSym, file=self.outFile) + write('#define', headerSym, '1', file=self.outFile) + self.newline() + write('#ifdef __cplusplus', file=self.outFile) + write('extern "C" {', file=self.outFile) + write('#endif', file=self.outFile) + self.newline() + # + # User-supplied prefix text, if any (list of strings) + if (genOpts.prefixText): + for s in genOpts.prefixText: + write(s, file=self.outFile) + # + # Some boilerplate describing what was generated - this + # will probably be removed later since the extensions + # pattern may be very long. + # write('/* Generated C header for:', file=self.outFile) + # write(' * API:', genOpts.apiname, file=self.outFile) + # if (genOpts.profile): + # write(' * Profile:', genOpts.profile, file=self.outFile) + # write(' * Versions considered:', genOpts.versions, file=self.outFile) + # write(' * Versions emitted:', genOpts.emitversions, file=self.outFile) + # write(' * Default extensions included:', genOpts.defaultExtensions, file=self.outFile) + # write(' * Additional extensions included:', genOpts.addExtensions, file=self.outFile) + # write(' * Extensions removed:', genOpts.removeExtensions, file=self.outFile) + # write(' */', file=self.outFile) + def endFile(self): + # C-specific + # Finish C++ wrapper and multiple inclusion protection + self.newline() + write('#ifdef __cplusplus', file=self.outFile) + write('}', file=self.outFile) + write('#endif', file=self.outFile) + if (self.genOpts.protectFile and self.genOpts.filename): + self.newline() + write('#endif', file=self.outFile) + # Finish processing in superclass + OutputGenerator.endFile(self) + def beginFeature(self, interface, emit): + # Start processing in superclass + OutputGenerator.beginFeature(self, interface, emit) + # C-specific + # Accumulate includes, defines, types, enums, function pointer typedefs, + # end function prototypes separately for this feature. They're only + # printed in endFeature(). + self.sections = dict([(section, []) for section in self.ALL_SECTIONS]) + def endFeature(self): + # C-specific + # Actually write the interface to the output file. + if (self.emit): + self.newline() + if (self.genOpts.protectFeature): + write('#ifndef', self.featureName, file=self.outFile) + # If type declarations are needed by other features based on + # this one, it may be necessary to suppress the ExtraProtect, + # or move it below the 'for section...' loop. + if (self.featureExtraProtect != None): + write('#ifdef', self.featureExtraProtect, file=self.outFile) + write('#define', self.featureName, '1', file=self.outFile) + for section in self.TYPE_SECTIONS: + contents = self.sections[section] + if contents: + write('\n'.join(contents), file=self.outFile) + self.newline() + if (self.genOpts.genFuncPointers and self.sections['commandPointer']): + write('\n'.join(self.sections['commandPointer']), file=self.outFile) + self.newline() + if (self.sections['command']): + if (self.genOpts.protectProto): + write(self.genOpts.protectProto, + self.genOpts.protectProtoStr, file=self.outFile) + write('\n'.join(self.sections['command']), end='', file=self.outFile) + if (self.genOpts.protectProto): + write('#endif', file=self.outFile) + else: + self.newline() + if (self.featureExtraProtect != None): + write('#endif /*', self.featureExtraProtect, '*/', file=self.outFile) + if (self.genOpts.protectFeature): + write('#endif /*', self.featureName, '*/', file=self.outFile) + # Finish processing in superclass + OutputGenerator.endFeature(self) + # + # Append a definition to the specified section + def appendSection(self, section, text): + # self.sections[section].append('SECTION: ' + section + '\n') + self.sections[section].append(text) + # + # Type generation + def genType(self, typeinfo, name): + OutputGenerator.genType(self, typeinfo, name) + typeElem = typeinfo.elem + # If the type is a struct type, traverse the imbedded tags + # generating a structure. Otherwise, emit the tag text. + category = typeElem.get('category') + if (category == 'struct' or category == 'union'): + self.genStruct(typeinfo, name) + else: + # Replace tags with an APIENTRY-style string + # (from self.genOpts). Copy other text through unchanged. + # If the resulting text is an empty string, don't emit it. + s = noneStr(typeElem.text) + for elem in typeElem: + if (elem.tag == 'apientry'): + s += self.genOpts.apientry + noneStr(elem.tail) + else: + s += noneStr(elem.text) + noneStr(elem.tail) + if s: + # Add extra newline after multi-line entries. + if '\n' in s: + s += '\n' + self.appendSection(category, s) + # + # Struct (e.g. C "struct" type) generation. + # This is a special case of the tag where the contents are + # interpreted as a set of tags instead of freeform C + # C type declarations. The tags are just like + # tags - they are a declaration of a struct or union member. + # Only simple member declarations are supported (no nested + # structs etc.) + def genStruct(self, typeinfo, typeName): + OutputGenerator.genStruct(self, typeinfo, typeName) + body = 'typedef ' + typeinfo.elem.get('category') + ' ' + typeName + ' {\n' + # paramdecl = self.makeCParamDecl(typeinfo.elem, self.genOpts.alignFuncParam) + targetLen = 0; + for member in typeinfo.elem.findall('.//member'): + targetLen = max(targetLen, self.getCParamTypeLength(member)) + for member in typeinfo.elem.findall('.//member'): + body += self.makeCParamDecl(member, targetLen + 4) + body += ';\n' + body += '} ' + typeName + ';\n' + self.appendSection('struct', body) + # + # Group (e.g. C "enum" type) generation. + # These are concatenated together with other types. + def genGroup(self, groupinfo, groupName): + OutputGenerator.genGroup(self, groupinfo, groupName) + groupElem = groupinfo.elem + # See if this group needs min/max/num/padding at end + expand = 'expand' in groupElem.keys() + if (expand): + expandPrefix = groupElem.get('expand') + # Prefix + body = "\ntypedef enum " + groupName + " {\n" + + # Loop over the nested 'enum' tags. Keep track of the minimum and + # maximum numeric values, if they can be determined; but only for + # core API enumerants, not extension enumerants. This is inferred + # by looking for 'extends' attributes. + minName = None + for elem in groupElem.findall('enum'): + # Convert the value to an integer and use that to track min/max. + # Values of form -(number) are accepted but nothing more complex. + # Should catch exceptions here for more complex constructs. Not yet. + (numVal,strVal) = self.enumToValue(elem, True) + name = elem.get('name') + + # Extension enumerants are only included if they are requested + # in addExtensions or match defaultExtensions. + if (elem.get('extname') is None or + re.match(self.genOpts.addExtensions,elem.get('extname')) is not None or + self.genOpts.defaultExtensions == elem.get('supported')): + body += " " + name + " = " + strVal + ",\n" + + if (expand and elem.get('extends') is None): + if (minName == None): + minName = maxName = name + minValue = maxValue = numVal + elif (numVal < minValue): + minName = name + minValue = numVal + elif (numVal > maxValue): + maxName = name + maxValue = numVal + # Generate min/max value tokens and a range-padding enum. Need some + # additional padding to generate correct names... + if (expand): + body += " " + expandPrefix + "_BEGIN_RANGE = " + minName + ",\n" + body += " " + expandPrefix + "_END_RANGE = " + maxName + ",\n" + body += " " + expandPrefix + "_RANGE_SIZE = (" + maxName + " - " + minName + " + 1),\n" + body += " " + expandPrefix + "_MAX_ENUM = 0x7FFFFFFF\n" + # Postfix + body += "} " + groupName + ";" + if groupElem.get('type') == 'bitmask': + section = 'bitmask' + else: + section = 'group' + self.appendSection(section, body) + # Enumerant generation + # tags may specify their values in several ways, but are usually + # just integers. + def genEnum(self, enuminfo, name): + OutputGenerator.genEnum(self, enuminfo, name) + (numVal,strVal) = self.enumToValue(enuminfo.elem, False) + body = '#define ' + name.ljust(33) + ' ' + strVal + self.appendSection('enum', body) + # + # Command generation + def genCmd(self, cmdinfo, name): + OutputGenerator.genCmd(self, cmdinfo, name) + # + decls = self.makeCDecls(cmdinfo.elem) + self.appendSection('command', decls[0] + '\n') + if (self.genOpts.genFuncPointers): + self.appendSection('commandPointer', decls[1]) + +# DocOutputGenerator - subclass of OutputGenerator. +# Generates AsciiDoc includes with C-language API interfaces, for reference +# pages and the Vulkan specification. Similar to COutputGenerator, but +# each interface is written into a different file as determined by the +# options, only actual C types are emitted, and none of the boilerplate +# preprocessor code is emitted. +# +# ---- methods ---- +# DocOutputGenerator(errFile, warnFile, diagFile) - args as for +# OutputGenerator. Defines additional internal state. +# ---- methods overriding base class ---- +# beginFile(genOpts) +# endFile() +# beginFeature(interface, emit) +# endFeature() +# genType(typeinfo,name) +# genStruct(typeinfo,name) +# genGroup(groupinfo,name) +# genEnum(enuminfo, name) +# genCmd(cmdinfo) +class DocOutputGenerator(OutputGenerator): + """Generate specified API interfaces in a specific style, such as a C header""" + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + OutputGenerator.__init__(self, errFile, warnFile, diagFile) + # + def beginFile(self, genOpts): + OutputGenerator.beginFile(self, genOpts) + def endFile(self): + OutputGenerator.endFile(self) + def beginFeature(self, interface, emit): + # Start processing in superclass + OutputGenerator.beginFeature(self, interface, emit) + def endFeature(self): + # Finish processing in superclass + OutputGenerator.endFeature(self) + # + # Generate an include file + # + # directory - subdirectory to put file in + # basename - base name of the file + # contents - contents of the file (Asciidoc boilerplate aside) + def writeInclude(self, directory, basename, contents): + # Create file + filename = self.genOpts.genDirectory + '/' + directory + '/' + basename + '.txt' + self.logMsg('diag', '# Generating include file:', filename) + fp = open(filename, 'w') + # Asciidoc anchor + write('// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry', file=fp) + write('ifndef::doctype-manpage[]', file=fp) + write('[[{0},{0}]]'.format(basename), file=fp) + write('["source","{basebackend@docbook:c++:cpp}",title=""]', file=fp) + write('endif::doctype-manpage[]', file=fp) + write('ifdef::doctype-manpage[]', file=fp) + write('["source","{basebackend@docbook:c++:cpp}"]', file=fp) + write('endif::doctype-manpage[]', file=fp) + write('------------------------------------------------------------------------------', file=fp) + write(contents, file=fp) + write('------------------------------------------------------------------------------', file=fp) + fp.close() + # + # Type generation + def genType(self, typeinfo, name): + OutputGenerator.genType(self, typeinfo, name) + typeElem = typeinfo.elem + # If the type is a struct type, traverse the imbedded tags + # generating a structure. Otherwise, emit the tag text. + category = typeElem.get('category') + if (category == 'struct' or category == 'union'): + self.genStruct(typeinfo, name) + else: + # Replace tags with an APIENTRY-style string + # (from self.genOpts). Copy other text through unchanged. + # If the resulting text is an empty string, don't emit it. + s = noneStr(typeElem.text) + for elem in typeElem: + if (elem.tag == 'apientry'): + s += self.genOpts.apientry + noneStr(elem.tail) + else: + s += noneStr(elem.text) + noneStr(elem.tail) + if (len(s) > 0): + if (category == 'bitmask'): + self.writeInclude('flags', name, s + '\n') + elif (category == 'enum'): + self.writeInclude('enums', name, s + '\n') + elif (category == 'funcpointer'): + self.writeInclude('funcpointers', name, s+ '\n') + else: + self.logMsg('diag', '# NOT writing include file for type:', + name, 'category: ', category) + else: + self.logMsg('diag', '# NOT writing empty include file for type', name) + # + # Struct (e.g. C "struct" type) generation. + # This is a special case of the tag where the contents are + # interpreted as a set of tags instead of freeform C + # C type declarations. The tags are just like + # tags - they are a declaration of a struct or union member. + # Only simple member declarations are supported (no nested + # structs etc.) + def genStruct(self, typeinfo, typeName): + OutputGenerator.genStruct(self, typeinfo, typeName) + s = 'typedef ' + typeinfo.elem.get('category') + ' ' + typeName + ' {\n' + # paramdecl = self.makeCParamDecl(typeinfo.elem, self.genOpts.alignFuncParam) + targetLen = 0; + for member in typeinfo.elem.findall('.//member'): + targetLen = max(targetLen, self.getCParamTypeLength(member)) + for member in typeinfo.elem.findall('.//member'): + s += self.makeCParamDecl(member, targetLen + 4) + s += ';\n' + s += '} ' + typeName + ';' + self.writeInclude('structs', typeName, s) + # + # Group (e.g. C "enum" type) generation. + # These are concatenated together with other types. + def genGroup(self, groupinfo, groupName): + OutputGenerator.genGroup(self, groupinfo, groupName) + groupElem = groupinfo.elem + # See if this group needs min/max/num/padding at end + expand = self.genOpts.expandEnumerants and ('expand' in groupElem.keys()) + if (expand): + expandPrefix = groupElem.get('expand') + # Prefix + s = "typedef enum " + groupName + " {\n" + + # Loop over the nested 'enum' tags. Keep track of the minimum and + # maximum numeric values, if they can be determined. + minName = None + for elem in groupElem.findall('enum'): + # Convert the value to an integer and use that to track min/max. + # Values of form -(number) are accepted but nothing more complex. + # Should catch exceptions here for more complex constructs. Not yet. + (numVal,strVal) = self.enumToValue(elem, True) + name = elem.get('name') + + # Extension enumerants are only included if they are requested + # in addExtensions or match defaultExtensions. + if (elem.get('extname') is None or + re.match(self.genOpts.addExtensions,elem.get('extname')) is not None or + self.genOpts.defaultExtensions == elem.get('supported')): + s += " " + name + " = " + strVal + ",\n" + + if (expand and elem.get('extends') is None): + if (minName == None): + minName = maxName = name + minValue = maxValue = numVal + elif (numVal < minValue): + minName = name + minValue = numVal + elif (numVal > maxValue): + maxName = name + maxValue = numVal + # Generate min/max value tokens and a range-padding enum. Need some + # additional padding to generate correct names... + if (expand): + s += "\n" + s += " " + expandPrefix + "_BEGIN_RANGE = " + minName + ",\n" + s += " " + expandPrefix + "_END_RANGE = " + maxName + ",\n" + s += " " + expandPrefix + "_NUM = (" + maxName + " - " + minName + " + 1),\n" + s += " " + expandPrefix + "_MAX_ENUM = 0x7FFFFFFF\n" + # Postfix + s += "} " + groupName + ";" + self.writeInclude('enums', groupName, s) + # Enumerant generation + # tags may specify their values in several ways, but are usually + # just integers. + def genEnum(self, enuminfo, name): + OutputGenerator.genEnum(self, enuminfo, name) + (numVal,strVal) = self.enumToValue(enuminfo.elem, False) + s = '#define ' + name.ljust(33) + ' ' + strVal + self.logMsg('diag', '# NOT writing compile-time constant', name) + # self.writeInclude('consts', name, s) + # + # Command generation + def genCmd(self, cmdinfo, name): + OutputGenerator.genCmd(self, cmdinfo, name) + # + decls = self.makeCDecls(cmdinfo.elem) + self.writeInclude('protos', name, decls[0]) + +# PyOutputGenerator - subclass of OutputGenerator. +# Generates Python data structures describing API names. +# Similar to DocOutputGenerator, but writes a single +# file. +# +# ---- methods ---- +# PyOutputGenerator(errFile, warnFile, diagFile) - args as for +# OutputGenerator. Defines additional internal state. +# ---- methods overriding base class ---- +# beginFile(genOpts) +# endFile() +# genType(typeinfo,name) +# genStruct(typeinfo,name) +# genGroup(groupinfo,name) +# genEnum(enuminfo, name) +# genCmd(cmdinfo) +class PyOutputGenerator(OutputGenerator): + """Generate specified API interfaces in a specific style, such as a C header""" + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + OutputGenerator.__init__(self, errFile, warnFile, diagFile) + # + def beginFile(self, genOpts): + OutputGenerator.beginFile(self, genOpts) + for dict in [ 'flags', 'enums', 'structs', 'consts', 'enums', + 'consts', 'protos', 'funcpointers' ]: + write(dict, '= {}', file=self.outFile) + def endFile(self): + OutputGenerator.endFile(self) + # + # Add a name from the interface + # + # dict - type of name (see beginFile above) + # name - name to add + # value - A serializable Python value for the name + def addName(self, dict, name, value=None): + write(dict + "['" + name + "'] = ", value, file=self.outFile) + # + # Type generation + # For 'struct' or 'union' types, defer to genStruct() to + # add to the dictionary. + # For 'bitmask' types, add the type name to the 'flags' dictionary, + # with the value being the corresponding 'enums' name defining + # the acceptable flag bits. + # For 'enum' types, add the type name to the 'enums' dictionary, + # with the value being '@STOPHERE@' (because this case seems + # never to happen). + # For 'funcpointer' types, add the type name to the 'funcpointers' + # dictionary. + # For 'handle' and 'define' types, add the handle or #define name + # to the 'struct' dictionary, because that's how the spec sources + # tag these types even though they aren't structs. + def genType(self, typeinfo, name): + OutputGenerator.genType(self, typeinfo, name) + typeElem = typeinfo.elem + # If the type is a struct type, traverse the imbedded tags + # generating a structure. Otherwise, emit the tag text. + category = typeElem.get('category') + if (category == 'struct' or category == 'union'): + self.genStruct(typeinfo, name) + else: + # Extract the type name + # (from self.genOpts). Copy other text through unchanged. + # If the resulting text is an empty string, don't emit it. + count = len(noneStr(typeElem.text)) + for elem in typeElem: + count += len(noneStr(elem.text)) + len(noneStr(elem.tail)) + if (count > 0): + if (category == 'bitmask'): + requiredEnum = typeElem.get('requires') + self.addName('flags', name, enquote(requiredEnum)) + elif (category == 'enum'): + # This case never seems to come up! + # @enums C 'enum' name Dictionary of enumerant names + self.addName('enums', name, enquote('@STOPHERE@')) + elif (category == 'funcpointer'): + self.addName('funcpointers', name, None) + elif (category == 'handle' or category == 'define'): + self.addName('structs', name, None) + else: + write('# Unprocessed type:', name, 'category:', category, file=self.outFile) + else: + write('# Unprocessed type:', name, file=self.outFile) + # + # Struct (e.g. C "struct" type) generation. + # + # Add the struct name to the 'structs' dictionary, with the + # value being an ordered list of the struct member names. + def genStruct(self, typeinfo, typeName): + OutputGenerator.genStruct(self, typeinfo, typeName) + + members = [member.text for member in typeinfo.elem.findall('.//member/name')] + self.addName('structs', typeName, members) + # + # Group (e.g. C "enum" type) generation. + # These are concatenated together with other types. + # + # Add the enum type name to the 'enums' dictionary, with + # the value being an ordered list of the enumerant names. + # Add each enumerant name to the 'consts' dictionary, with + # the value being the enum type the enumerant is part of. + def genGroup(self, groupinfo, groupName): + OutputGenerator.genGroup(self, groupinfo, groupName) + groupElem = groupinfo.elem + + # @enums C 'enum' name Dictionary of enumerant names + # @consts C enumerant/const name Name of corresponding 'enums' key + + # Loop over the nested 'enum' tags. Keep track of the minimum and + # maximum numeric values, if they can be determined. + enumerants = [elem.get('name') for elem in groupElem.findall('enum')] + for name in enumerants: + self.addName('consts', name, enquote(groupName)) + self.addName('enums', groupName, enumerants) + # Enumerant generation (compile-time constants) + # + # Add the constant name to the 'consts' dictionary, with the + # value being None to indicate that the constant isn't + # an enumeration value. + def genEnum(self, enuminfo, name): + OutputGenerator.genEnum(self, enuminfo, name) + + # @consts C enumerant/const name Name of corresponding 'enums' key + + self.addName('consts', name, None) + # + # Command generation + # + # Add the command name to the 'protos' dictionary, with the + # value being an ordered list of the parameter names. + def genCmd(self, cmdinfo, name): + OutputGenerator.genCmd(self, cmdinfo, name) + + params = [param.text for param in cmdinfo.elem.findall('param/name')] + self.addName('protos', name, params) + +# ValidityOutputGenerator - subclass of OutputGenerator. +# Generates AsciiDoc includes of valid usage information, for reference +# pages and the Vulkan specification. Similar to DocOutputGenerator. +# +# ---- methods ---- +# ValidityOutputGenerator(errFile, warnFile, diagFile) - args as for +# OutputGenerator. Defines additional internal state. +# ---- methods overriding base class ---- +# beginFile(genOpts) +# endFile() +# beginFeature(interface, emit) +# endFeature() +# genCmd(cmdinfo) +class ValidityOutputGenerator(OutputGenerator): + """Generate specified API interfaces in a specific style, such as a C header""" + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + OutputGenerator.__init__(self, errFile, warnFile, diagFile) + + def beginFile(self, genOpts): + OutputGenerator.beginFile(self, genOpts) + def endFile(self): + OutputGenerator.endFile(self) + def beginFeature(self, interface, emit): + # Start processing in superclass + OutputGenerator.beginFeature(self, interface, emit) + def endFeature(self): + # Finish processing in superclass + OutputGenerator.endFeature(self) + + def makeParameterName(self, name): + return 'pname:' + name + + def makeStructName(self, name): + return 'sname:' + name + + def makeBaseTypeName(self, name): + return 'basetype:' + name + + def makeEnumerationName(self, name): + return 'elink:' + name + + def makeEnumerantName(self, name): + return 'ename:' + name + + def makeFLink(self, name): + return 'flink:' + name + + # + # Generate an include file + # + # directory - subdirectory to put file in + # basename - base name of the file + # contents - contents of the file (Asciidoc boilerplate aside) + def writeInclude(self, directory, basename, validity, threadsafety, commandpropertiesentry, successcodes, errorcodes): + # Create file + filename = self.genOpts.genDirectory + '/' + directory + '/' + basename + '.txt' + self.logMsg('diag', '# Generating include file:', filename) + fp = open(filename, 'w') + # Asciidoc anchor + write('// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry', file=fp) + + # Valid Usage + if validity is not None: + write('ifndef::doctype-manpage[]', file=fp) + write('.Valid Usage', file=fp) + write('*' * 80, file=fp) + write('endif::doctype-manpage[]', file=fp) + write('ifdef::doctype-manpage[]', file=fp) + write('Valid Usage', file=fp) + write('-----------', file=fp) + write('endif::doctype-manpage[]', file=fp) + write(validity, file=fp, end='') + write('ifndef::doctype-manpage[]', file=fp) + write('*' * 80, file=fp) + write('endif::doctype-manpage[]', file=fp) + write('', file=fp) + + # Host Synchronization + if threadsafety is not None: + write('ifndef::doctype-manpage[]', file=fp) + write('.Host Synchronization', file=fp) + write('*' * 80, file=fp) + write('endif::doctype-manpage[]', file=fp) + write('ifdef::doctype-manpage[]', file=fp) + write('Host Synchronization', file=fp) + write('--------------------', file=fp) + write('endif::doctype-manpage[]', file=fp) + write(threadsafety, file=fp, end='') + write('ifndef::doctype-manpage[]', file=fp) + write('*' * 80, file=fp) + write('endif::doctype-manpage[]', file=fp) + write('', file=fp) + + # Command Properties - contained within a block, to avoid table numbering + if commandpropertiesentry is not None: + write('ifndef::doctype-manpage[]', file=fp) + write('.Command Properties', file=fp) + write('*' * 80, file=fp) + write('endif::doctype-manpage[]', file=fp) + write('ifdef::doctype-manpage[]', file=fp) + write('Command Properties', file=fp) + write('------------------', file=fp) + write('endif::doctype-manpage[]', file=fp) + write('[options="header", width="100%"]', file=fp) + write('|=====================', file=fp) + write('|Command Buffer Levels|Render Pass Scope|Supported Queue Types', file=fp) + write(commandpropertiesentry, file=fp) + write('|=====================', file=fp) + write('ifndef::doctype-manpage[]', file=fp) + write('*' * 80, file=fp) + write('endif::doctype-manpage[]', file=fp) + write('', file=fp) + + # Success Codes - contained within a block, to avoid table numbering + if successcodes is not None or errorcodes is not None: + write('ifndef::doctype-manpage[]', file=fp) + write('.Return Codes', file=fp) + write('*' * 80, file=fp) + write('endif::doctype-manpage[]', file=fp) + write('ifdef::doctype-manpage[]', file=fp) + write('Return Codes', file=fp) + write('------------', file=fp) + write('endif::doctype-manpage[]', file=fp) + if successcodes is not None: + write('ifndef::doctype-manpage[]', file=fp) + write('<>::', file=fp) + write('endif::doctype-manpage[]', file=fp) + write('ifdef::doctype-manpage[]', file=fp) + write('On success, this command returns::', file=fp) + write('endif::doctype-manpage[]', file=fp) + write(successcodes, file=fp) + if errorcodes is not None: + write('ifndef::doctype-manpage[]', file=fp) + write('<>::', file=fp) + write('endif::doctype-manpage[]', file=fp) + write('ifdef::doctype-manpage[]', file=fp) + write('On failure, this command returns::', file=fp) + write('endif::doctype-manpage[]', file=fp) + write(errorcodes, file=fp) + write('ifndef::doctype-manpage[]', file=fp) + write('*' * 80, file=fp) + write('endif::doctype-manpage[]', file=fp) + write('', file=fp) + + fp.close() + + # + # Check if the parameter passed in is a pointer + def paramIsPointer(self, param): + ispointer = False + paramtype = param.find('type') + if paramtype.tail is not None and '*' in paramtype.tail: + ispointer = True + + return ispointer + + # + # Check if the parameter passed in is a static array + def paramIsStaticArray(self, param): + if param.find('name').tail is not None: + if param.find('name').tail[0] == '[': + return True + + # + # Get the length of a parameter that's been identified as a static array + def staticArrayLength(self, param): + paramname = param.find('name') + paramenumsize = param.find('enum') + + if paramenumsize is not None: + return paramenumsize.text + else: + return paramname.tail[1:-1] + + # + # Check if the parameter passed in is a pointer to an array + def paramIsArray(self, param): + return param.attrib.get('len') is not None + + # + # Get the parent of a handle object + def getHandleParent(self, typename): + types = self.registry.findall("types/type") + for elem in types: + if (elem.find("name") is not None and elem.find('name').text == typename) or elem.attrib.get('name') == typename: + return elem.attrib.get('parent') + + # + # Check if a parent object is dispatchable or not + def isHandleTypeDispatchable(self, handlename): + handle = self.registry.find("types/type/[name='" + handlename + "'][@category='handle']") + if handle is not None and handle.find('type').text == 'VK_DEFINE_HANDLE': + return True + else: + return False + + def isHandleOptional(self, param, params): + + # See if the handle is optional + isOptional = False + + # Simple, if it's optional, return true + if param.attrib.get('optional') is not None: + return True + + # If no validity is being generated, it usually means that validity is complex and not absolute, so let's say yes. + if param.attrib.get('noautovalidity') is not None: + return True + + # If the parameter is an array and we haven't already returned, find out if any of the len parameters are optional + if self.paramIsArray(param): + lengths = param.attrib.get('len').split(',') + for length in lengths: + if (length) != 'null-terminated' and (length) != '1': + for otherparam in params: + if otherparam.find('name').text == length: + if otherparam.attrib.get('optional') is not None: + return True + + return False + # + # Get the category of a type + def getTypeCategory(self, typename): + types = self.registry.findall("types/type") + for elem in types: + if (elem.find("name") is not None and elem.find('name').text == typename) or elem.attrib.get('name') == typename: + return elem.attrib.get('category') + + # + # Make a chunk of text for the end of a parameter if it is an array + def makeAsciiDocPreChunk(self, param, params): + paramname = param.find('name') + paramtype = param.find('type') + + # General pre-amble. Check optionality and add stuff. + asciidoc = '* ' + + if self.paramIsStaticArray(param): + asciidoc += 'Any given element of ' + + elif self.paramIsArray(param): + lengths = param.attrib.get('len').split(',') + + # Find all the parameters that are called out as optional, so we can document that they might be zero, and the array may be ignored + optionallengths = [] + for length in lengths: + if (length) != 'null-terminated' and (length) != '1': + for otherparam in params: + if otherparam.find('name').text == length: + if otherparam.attrib.get('optional') is not None: + if self.paramIsPointer(otherparam): + optionallengths.append('the value referenced by ' + self.makeParameterName(length)) + else: + optionallengths.append(self.makeParameterName(length)) + + # Document that these arrays may be ignored if any of the length values are 0 + if len(optionallengths) != 0 or param.attrib.get('optional') is not None: + asciidoc += 'If ' + + + if len(optionallengths) != 0: + if len(optionallengths) == 1: + + asciidoc += optionallengths[0] + asciidoc += ' is ' + + else: + asciidoc += ' or '.join(optionallengths) + asciidoc += ' are ' + + asciidoc += 'not `0`, ' + + if len(optionallengths) != 0 and param.attrib.get('optional') is not None: + asciidoc += 'and ' + + if param.attrib.get('optional') is not None: + asciidoc += self.makeParameterName(paramname.text) + asciidoc += ' is not `NULL`, ' + + elif param.attrib.get('optional') is not None: + # Don't generate this stub for bitflags + if self.getTypeCategory(paramtype.text) != 'bitmask': + if param.attrib.get('optional').split(',')[0] == 'true': + asciidoc += 'If ' + asciidoc += self.makeParameterName(paramname.text) + asciidoc += ' is not ' + if self.paramIsArray(param) or self.paramIsPointer(param) or self.isHandleTypeDispatchable(paramtype.text): + asciidoc += '`NULL`' + elif self.getTypeCategory(paramtype.text) == 'handle': + asciidoc += 'sname:VK_NULL_HANDLE' + else: + asciidoc += '`0`' + + asciidoc += ', ' + + return asciidoc + + # + # Make the generic asciidoc line chunk portion used for all parameters. + # May return an empty string if nothing to validate. + def createValidationLineForParameterIntroChunk(self, param, params, typetext): + asciidoc = '' + paramname = param.find('name') + paramtype = param.find('type') + + asciidoc += self.makeAsciiDocPreChunk(param, params) + + asciidoc += self.makeParameterName(paramname.text) + asciidoc += ' must: be ' + + if self.paramIsArray(param): + # Arrays. These are hard to get right, apparently + + lengths = param.attrib.get('len').split(',') + + if (lengths[0]) == 'null-terminated': + asciidoc += 'a null-terminated ' + elif (lengths[0]) == '1': + asciidoc += 'a pointer to ' + else: + asciidoc += 'a pointer to an array of ' + + # Handle equations, which are currently denoted with latex + if 'latexmath:' in lengths[0]: + asciidoc += lengths[0] + else: + asciidoc += self.makeParameterName(lengths[0]) + asciidoc += ' ' + + for length in lengths[1:]: + if (length) == 'null-terminated': # This should always be the last thing. If it ever isn't for some bizarre reason, then this will need some massaging. + asciidoc += 'null-terminated ' + elif (length) == '1': + asciidoc += 'pointers to ' + else: + asciidoc += 'pointers to arrays of ' + # Handle equations, which are currently denoted with latex + if 'latex:' in length: + asciidoc += length + else: + asciidoc += self.makeParameterName(length) + asciidoc += ' ' + + # Void pointers don't actually point at anything - remove the word "to" + if paramtype.text == 'void': + if lengths[-1] == '1': + if len(lengths) > 1: + asciidoc = asciidoc[:-5] # Take care of the extra s added by the post array chunk function. #HACK# + else: + asciidoc = asciidoc[:-4] + else: + # An array of void values is a byte array. + asciidoc += 'byte' + + elif paramtype.text == 'char': + # A null terminated array of chars is a string + if lengths[-1] == 'null-terminated': + asciidoc += 'string' + else: + # Else it's just a bunch of chars + asciidoc += 'char value' + elif param.text is not None: + # If a value is "const" that means it won't get modified, so it must be valid going into the function. + if 'const' in param.text: + typecategory = self.getTypeCategory(paramtype.text) + if (typecategory != 'struct' and typecategory != 'union' and typecategory != 'basetype' and typecategory is not None) or not self.isStructAlwaysValid(paramtype.text): + asciidoc += 'valid ' + + asciidoc += typetext + + # pluralize + if len(lengths) > 1 or (lengths[0] != '1' and lengths[0] != 'null-terminated'): + asciidoc += 's' + + elif self.paramIsPointer(param): + # Handle pointers - which are really special case arrays (i.e. they don't have a length) + pointercount = paramtype.tail.count('*') + + # Could be multi-level pointers (e.g. ppData - pointer to a pointer). Handle that. + for i in range(0, pointercount): + asciidoc += 'a pointer to ' + + if paramtype.text == 'void': + # If there's only one pointer, it's optional, and it doesn't point at anything in particular - we don't need any language. + if pointercount == 1 and param.attrib.get('optional') is not None: + return '' # early return + else: + # Pointer to nothing in particular - delete the " to " portion + asciidoc = asciidoc[:-4] + else: + # Add an article for English semantic win + asciidoc += 'a ' + + # If a value is "const" that means it won't get modified, so it must be valid going into the function. + if param.text is not None and paramtype.text != 'void': + if 'const' in param.text: + asciidoc += 'valid ' + + asciidoc += typetext + + else: + # Non-pointer, non-optional things must be valid + asciidoc += 'a valid ' + asciidoc += typetext + + if asciidoc != '': + asciidoc += '\n' + + # Add additional line for non-optional bitmasks + if self.getTypeCategory(paramtype.text) == 'bitmask': + if param.attrib.get('optional') is None: + asciidoc += '* ' + if self.paramIsArray(param): + asciidoc += 'Each element of ' + asciidoc += 'pname:' + asciidoc += paramname.text + asciidoc += ' mustnot: be `0`' + asciidoc += '\n' + + return asciidoc + + def makeAsciiDocLineForParameter(self, param, params, typetext): + if param.attrib.get('noautovalidity') is not None: + return '' + asciidoc = self.createValidationLineForParameterIntroChunk(param, params, typetext) + + return asciidoc + + # Try to do check if a structure is always considered valid (i.e. there's no rules to its acceptance) + def isStructAlwaysValid(self, structname): + + struct = self.registry.find("types/type[@name='" + structname + "']") + + params = struct.findall('member') + validity = struct.find('validity') + + if validity is not None: + return False + + for param in params: + paramname = param.find('name') + paramtype = param.find('type') + typecategory = self.getTypeCategory(paramtype.text) + + if paramname.text == 'pNext': + return False + + if paramname.text == 'sType': + return False + + if paramtype.text == 'void' or paramtype.text == 'char' or self.paramIsArray(param) or self.paramIsPointer(param): + if self.makeAsciiDocLineForParameter(param, params, '') != '': + return False + elif typecategory == 'handle' or typecategory == 'enum' or typecategory == 'bitmask' or param.attrib.get('returnedonly') == 'true': + return False + elif typecategory == 'struct' or typecategory == 'union': + if self.isStructAlwaysValid(paramtype.text) is False: + return False + + return True + + # + # Make an entire asciidoc line for a given parameter + def createValidationLineForParameter(self, param, params, typecategory): + asciidoc = '' + paramname = param.find('name') + paramtype = param.find('type') + + if paramtype.text == 'void' or paramtype.text == 'char': + # Chars and void are special cases - needs care inside the generator functions + # A null-terminated char array is a string, else it's chars. + # An array of void values is a byte array, a void pointer is just a pointer to nothing in particular + asciidoc += self.makeAsciiDocLineForParameter(param, params, '') + elif typecategory == 'bitmask': + bitsname = paramtype.text.replace('Flags', 'FlagBits') + if self.registry.find("enums[@name='" + bitsname + "']") is None: + asciidoc += '* ' + asciidoc += self.makeParameterName(paramname.text) + asciidoc += ' must: be `0`' + asciidoc += '\n' + else: + if self.paramIsArray(param): + asciidoc += self.makeAsciiDocLineForParameter(param, params, 'combinations of ' + self.makeEnumerationName(bitsname) + ' value') + else: + asciidoc += self.makeAsciiDocLineForParameter(param, params, 'combination of ' + self.makeEnumerationName(bitsname) + ' values') + elif typecategory == 'handle': + asciidoc += self.makeAsciiDocLineForParameter(param, params, self.makeStructName(paramtype.text) + ' handle') + elif typecategory == 'enum': + asciidoc += self.makeAsciiDocLineForParameter(param, params, self.makeEnumerationName(paramtype.text) + ' value') + elif typecategory == 'struct': + if (self.paramIsArray(param) or self.paramIsPointer(param)) or not self.isStructAlwaysValid(paramtype.text): + asciidoc += self.makeAsciiDocLineForParameter(param, params, self.makeStructName(paramtype.text) + ' structure') + elif typecategory == 'union': + if (self.paramIsArray(param) or self.paramIsPointer(param)) or not self.isStructAlwaysValid(paramtype.text): + asciidoc += self.makeAsciiDocLineForParameter(param, params, self.makeStructName(paramtype.text) + ' union') + elif self.paramIsArray(param) or self.paramIsPointer(param): + asciidoc += self.makeAsciiDocLineForParameter(param, params, self.makeBaseTypeName(paramtype.text) + ' value') + + return asciidoc + + # + # Make an asciidoc validity entry for a handle's parent object + def makeAsciiDocHandleParent(self, param, params): + asciidoc = '' + paramname = param.find('name') + paramtype = param.find('type') + + # Deal with handle parents + handleparent = self.getHandleParent(paramtype.text) + if handleparent is not None: + parentreference = None + for otherparam in params: + if otherparam.find('type').text == handleparent: + parentreference = otherparam.find('name').text + if parentreference is not None: + asciidoc += '* ' + + if self.isHandleOptional(param, params): + if self.paramIsArray(param): + asciidoc += 'Each element of ' + asciidoc += self.makeParameterName(paramname.text) + asciidoc += ' that is a valid handle' + else: + asciidoc += 'If ' + asciidoc += self.makeParameterName(paramname.text) + asciidoc += ' is a valid handle, it' + else: + if self.paramIsArray(param): + asciidoc += 'Each element of ' + asciidoc += self.makeParameterName(paramname.text) + asciidoc += ' must: have been created, allocated or retrieved from ' + asciidoc += self.makeParameterName(parentreference) + + asciidoc += '\n' + return asciidoc + + # + # Generate an asciidoc validity line for the sType value of a struct + def makeStructureType(self, blockname, param): + asciidoc = '* ' + paramname = param.find('name') + paramtype = param.find('type') + + asciidoc += self.makeParameterName(paramname.text) + asciidoc += ' must: be ' + + structuretype = '' + for elem in re.findall(r'(([A-Z][a-z]+)|([A-Z][A-Z]+))', blockname): + if elem[0] == 'Vk': + structuretype += 'VK_STRUCTURE_TYPE_' + else: + structuretype += elem[0].upper() + structuretype += '_' + + asciidoc += self.makeEnumerantName(structuretype[:-1]) + asciidoc += '\n' + + return asciidoc + + # + # Generate an asciidoc validity line for the pNext value of a struct + def makeStructureExtensionPointer(self, param): + asciidoc = '* ' + paramname = param.find('name') + paramtype = param.find('type') + + asciidoc += self.makeParameterName(paramname.text) + + validextensionstructs = param.attrib.get('validextensionstructs') + if validextensionstructs is None: + asciidoc += ' must: be `NULL`' + else: + extensionstructs = validextensionstructs.split(',') + asciidoc += ' must: point to one of ' + extensionstructs[:-1].join(', ') + ' or ' + extensionstructs[-1] + 'if the extension that introduced them is enabled ' + + asciidoc += '\n' + + return asciidoc + + # + # Generate all the valid usage information for a given struct or command + def makeValidUsageStatements(self, cmd, blockname, params, usages): + # Start the asciidoc block for this + asciidoc = '' + + handles = [] + anyparentedhandlesoptional = False + parentdictionary = {} + arraylengths = set() + for param in params: + paramname = param.find('name') + paramtype = param.find('type') + + # Get the type's category + typecategory = self.getTypeCategory(paramtype.text) + + # Generate language to independently validate a parameter + if paramtype.text == 'VkStructureType' and paramname.text == 'sType': + asciidoc += self.makeStructureType(blockname, param) + elif paramtype.text == 'void' and paramname.text == 'pNext': + asciidoc += self.makeStructureExtensionPointer(param) + else: + asciidoc += self.createValidationLineForParameter(param, params, typecategory) + + # Ensure that any parenting is properly validated, and list that a handle was found + if typecategory == 'handle': + # Don't detect a parent for return values! + if not self.paramIsPointer(param) or (param.text is not None and 'const' in param.text): + parent = self.getHandleParent(paramtype.text) + if parent is not None: + handles.append(param) + + # If any param is optional, it affects the output + if self.isHandleOptional(param, params): + anyparentedhandlesoptional = True + + # Find the first dispatchable parent + ancestor = parent + while ancestor is not None and not self.isHandleTypeDispatchable(ancestor): + ancestor = self.getHandleParent(ancestor) + + # If one was found, add this parameter to the parent dictionary + if ancestor is not None: + if ancestor not in parentdictionary: + parentdictionary[ancestor] = [] + + if self.paramIsArray(param): + parentdictionary[ancestor].append('the elements of ' + self.makeParameterName(paramname.text)) + else: + parentdictionary[ancestor].append(self.makeParameterName(paramname.text)) + + # Get the array length for this parameter + arraylength = param.attrib.get('len') + if arraylength is not None: + for onelength in arraylength.split(','): + arraylengths.add(onelength) + + # For any vkQueue* functions, there might be queue type data + if 'vkQueue' in blockname: + # The queue type must be valid + queuetypes = cmd.attrib.get('queues') + if queuetypes is not None: + queuebits = [] + for queuetype in re.findall(r'([^,]+)', queuetypes): + queuebits.append(queuetype.replace('_',' ')) + + asciidoc += '* ' + asciidoc += 'The pname:queue must: support ' + if len(queuebits) == 1: + asciidoc += queuebits[0] + else: + asciidoc += (', ').join(queuebits[:-1]) + asciidoc += ' or ' + asciidoc += queuebits[-1] + asciidoc += ' operations' + asciidoc += '\n' + + if 'vkCmd' in blockname: + # The commandBuffer parameter must be being recorded + asciidoc += '* ' + asciidoc += 'pname:commandBuffer must: be in the recording state' + asciidoc += '\n' + + # The queue type must be valid + queuetypes = cmd.attrib.get('queues') + queuebits = [] + for queuetype in re.findall(r'([^,]+)', queuetypes): + queuebits.append(queuetype.replace('_',' ')) + + asciidoc += '* ' + asciidoc += 'The sname:VkCommandPool that pname:commandBuffer was allocated from must: support ' + if len(queuebits) == 1: + asciidoc += queuebits[0] + else: + asciidoc += (', ').join(queuebits[:-1]) + asciidoc += ' or ' + asciidoc += queuebits[-1] + asciidoc += ' operations' + asciidoc += '\n' + + # Must be called inside/outside a renderpass appropriately + renderpass = cmd.attrib.get('renderpass') + + if renderpass != 'both': + asciidoc += '* This command must: only be called ' + asciidoc += renderpass + asciidoc += ' of a render pass instance' + asciidoc += '\n' + + # Must be in the right level command buffer + cmdbufferlevel = cmd.attrib.get('cmdbufferlevel') + + if cmdbufferlevel != 'primary,secondary': + asciidoc += '* pname:commandBuffer must: be a ' + asciidoc += cmdbufferlevel + asciidoc += ' sname:VkCommandBuffer' + asciidoc += '\n' + + # Any non-optional arraylengths should specify they must be greater than 0 + for param in params: + paramname = param.find('name') + + for arraylength in arraylengths: + if paramname.text == arraylength and param.attrib.get('optional') is None: + # Get all the array dependencies + arrays = cmd.findall("param/[@len='" + arraylength + "'][@optional='true']") + + # Get all the optional array dependencies, including those not generating validity for some reason + optionalarrays = cmd.findall("param/[@len='" + arraylength + "'][@optional='true']") + optionalarrays.extend(cmd.findall("param/[@len='" + arraylength + "'][@noautovalidity='true']")) + + asciidoc += '* ' + + # Allow lengths to be arbitrary if all their dependents are optional + if len(optionalarrays) == len(arrays) and len(optionalarrays) != 0: + asciidoc += 'If ' + if len(optionalarrays) > 1: + asciidoc += 'any of ' + + for array in optionalarrays[:-1]: + asciidoc += self.makeParameterName(optionalarrays.find('name').text) + asciidoc += ', ' + + if len(optionalarrays) > 1: + asciidoc += 'and ' + asciidoc += self.makeParameterName(optionalarrays[-1].find('name').text) + asciidoc += ' are ' + else: + asciidoc += self.makeParameterName(optionalarrays[-1].find('name').text) + asciidoc += ' is ' + + asciidoc += 'not `NULL`, ' + + if self.paramIsPointer(param): + asciidoc += 'the value referenced by ' + else: + asciidoc += 'the value of ' + + elif self.paramIsPointer(param): + asciidoc += 'The value referenced by ' + else: + asciidoc += 'The value of ' + + asciidoc += self.makeParameterName(arraylength) + asciidoc += ' must: be greater than `0`' + asciidoc += '\n' + + # Find the parents of all objects referenced in this command + for param in handles: + asciidoc += self.makeAsciiDocHandleParent(param, params) + + # Find the common ancestors of objects + noancestorscount = 0 + while noancestorscount < len(parentdictionary): + noancestorscount = 0 + oldparentdictionary = parentdictionary.copy() + for parent in oldparentdictionary.items(): + ancestor = self.getHandleParent(parent[0]) + + while ancestor is not None and ancestor not in parentdictionary: + ancestor = self.getHandleParent(ancestor) + + if ancestor is not None: + parentdictionary[ancestor] += parentdictionary.pop(parent[0]) + else: + # No ancestors possible - so count it up + noancestorscount += 1 + + # Add validation language about common ancestors + for parent in parentdictionary.items(): + if len(parent[1]) > 1: + parentlanguage = '* ' + + parentlanguage += 'Each of ' + parentlanguage += ", ".join(parent[1][:-1]) + parentlanguage += ' and ' + parentlanguage += parent[1][-1] + if anyparentedhandlesoptional is True: + parentlanguage += ' that are valid handles' + parentlanguage += ' must: have been created, allocated or retrieved from the same ' + parentlanguage += self.makeStructName(parent[0]) + parentlanguage += '\n' + + # Capitalize and add to the main language + asciidoc += parentlanguage + + # Add in any plain-text validation language that's in the xml + for usage in usages: + asciidoc += '* ' + asciidoc += usage.text + asciidoc += '\n' + + # In case there's nothing to report, return None + if asciidoc == '': + return None + # Delimit the asciidoc block + return asciidoc + + def makeThreadSafetyBlock(self, cmd, paramtext): + """Generate C function pointer typedef for Element""" + paramdecl = '' + + # For any vkCmd* functions, the commandBuffer parameter must be being recorded + if cmd.find('proto/name') is not None and 'vkCmd' in cmd.find('proto/name'): + paramdecl += '* ' + paramdecl += 'The sname:VkCommandPool that pname:commandBuffer was created from' + paramdecl += '\n' + + # Find and add any parameters that are thread unsafe + explicitexternsyncparams = cmd.findall(paramtext + "[@externsync]") + if (explicitexternsyncparams is not None): + for param in explicitexternsyncparams: + externsyncattribs = param.attrib.get('externsync') + paramname = param.find('name') + for externsyncattrib in externsyncattribs.split(','): + paramdecl += '* ' + paramdecl += 'Host access to ' + if externsyncattrib == 'true': + if self.paramIsArray(param): + paramdecl += 'each member of ' + self.makeParameterName(paramname.text) + elif self.paramIsPointer(param): + paramdecl += 'the object referenced by ' + self.makeParameterName(paramname.text) + else: + paramdecl += self.makeParameterName(paramname.text) + else: + paramdecl += 'pname:' + paramdecl += externsyncattrib + paramdecl += ' must: be externally synchronized\n' + + # Find and add any "implicit" parameters that are thread unsafe + implicitexternsyncparams = cmd.find('implicitexternsyncparams') + if (implicitexternsyncparams is not None): + for elem in implicitexternsyncparams: + paramdecl += '* ' + paramdecl += 'Host access to ' + paramdecl += elem.text + paramdecl += ' must: be externally synchronized\n' + + if (paramdecl == ''): + return None + else: + return paramdecl + + def makeCommandPropertiesTableEntry(self, cmd, name): + + if 'vkCmd' in name: + # Must be called inside/outside a renderpass appropriately + cmdbufferlevel = cmd.attrib.get('cmdbufferlevel') + cmdbufferlevel = (' + \n').join(cmdbufferlevel.title().split(',')) + + renderpass = cmd.attrib.get('renderpass') + renderpass = renderpass.capitalize() + + queues = cmd.attrib.get('queues') + queues = (' + \n').join(queues.upper().split(',')) + + return '|' + cmdbufferlevel + '|' + renderpass + '|' + queues + elif 'vkQueue' in name: + # Must be called inside/outside a renderpass appropriately + + queues = cmd.attrib.get('queues') + if queues is None: + queues = 'Any' + else: + queues = (' + \n').join(queues.upper().split(',')) + + return '|-|-|' + queues + + return None + + def makeSuccessCodes(self, cmd, name): + + successcodes = cmd.attrib.get('successcodes') + if successcodes is not None: + + successcodeentry = '' + successcodes = successcodes.split(',') + return '* ename:' + '\n* ename:'.join(successcodes) + + return None + + def makeErrorCodes(self, cmd, name): + + errorcodes = cmd.attrib.get('errorcodes') + if errorcodes is not None: + + errorcodeentry = '' + errorcodes = errorcodes.split(',') + return '* ename:' + '\n* ename:'.join(errorcodes) + + return None + + # + # Command generation + def genCmd(self, cmdinfo, name): + OutputGenerator.genCmd(self, cmdinfo, name) + # + # Get all thh parameters + params = cmdinfo.elem.findall('param') + usages = cmdinfo.elem.findall('validity/usage') + + validity = self.makeValidUsageStatements(cmdinfo.elem, name, params, usages) + threadsafety = self.makeThreadSafetyBlock(cmdinfo.elem, 'param') + commandpropertiesentry = self.makeCommandPropertiesTableEntry(cmdinfo.elem, name) + successcodes = self.makeSuccessCodes(cmdinfo.elem, name) + errorcodes = self.makeErrorCodes(cmdinfo.elem, name) + + self.writeInclude('validity/protos', name, validity, threadsafety, commandpropertiesentry, successcodes, errorcodes) + + # + # Struct Generation + def genStruct(self, typeinfo, typename): + OutputGenerator.genStruct(self, typeinfo, typename) + + # Anything that's only ever returned can't be set by the user, so shouldn't have any validity information. + if typeinfo.elem.attrib.get('returnedonly') is None: + params = typeinfo.elem.findall('member') + usages = typeinfo.elem.findall('validity/usage') + + validity = self.makeValidUsageStatements(typeinfo.elem, typename, params, usages) + threadsafety = self.makeThreadSafetyBlock(typeinfo.elem, 'member') + + self.writeInclude('validity/structs', typename, validity, threadsafety, None, None, None) + else: + # Still generate files for return only structs, in case this state changes later + self.writeInclude('validity/structs', typename, None, None, None, None, None) + + # + # Type Generation + def genType(self, typeinfo, typename): + OutputGenerator.genType(self, typeinfo, typename) + + category = typeinfo.elem.get('category') + if (category == 'struct' or category == 'union'): + self.genStruct(typeinfo, typename) + +# HostSynchronizationOutputGenerator - subclass of OutputGenerator. +# Generates AsciiDoc includes of the externsync parameter table for the +# fundamentals chapter of the Vulkan specification. Similar to +# DocOutputGenerator. +# +# ---- methods ---- +# HostSynchronizationOutputGenerator(errFile, warnFile, diagFile) - args as for +# OutputGenerator. Defines additional internal state. +# ---- methods overriding base class ---- +# genCmd(cmdinfo) +class HostSynchronizationOutputGenerator(OutputGenerator): + # Generate Host Synchronized Parameters in a table at the top of the spec + def __init__(self, + errFile = sys.stderr, + warnFile = sys.stderr, + diagFile = sys.stdout): + OutputGenerator.__init__(self, errFile, warnFile, diagFile) + + threadsafety = {'parameters': '', 'parameterlists': '', 'implicit': ''} + + def makeParameterName(self, name): + return 'pname:' + name + + def makeFLink(self, name): + return 'flink:' + name + + # + # Generate an include file + # + # directory - subdirectory to put file in + # basename - base name of the file + # contents - contents of the file (Asciidoc boilerplate aside) + def writeInclude(self): + + if self.threadsafety['parameters'] is not None: + # Create file + filename = self.genOpts.genDirectory + '/' + self.genOpts.filename + '/parameters.txt' + self.logMsg('diag', '# Generating include file:', filename) + fp = open(filename, 'w') + + # Host Synchronization + write('// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry', file=fp) + write('.Externally Synchronized Parameters', file=fp) + write('*' * 80, file=fp) + write(self.threadsafety['parameters'], file=fp, end='') + write('*' * 80, file=fp) + write('', file=fp) + + if self.threadsafety['parameterlists'] is not None: + # Create file + filename = self.genOpts.genDirectory + '/' + self.genOpts.filename + '/parameterlists.txt' + self.logMsg('diag', '# Generating include file:', filename) + fp = open(filename, 'w') + + # Host Synchronization + write('// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry', file=fp) + write('.Externally Synchronized Parameter Lists', file=fp) + write('*' * 80, file=fp) + write(self.threadsafety['parameterlists'], file=fp, end='') + write('*' * 80, file=fp) + write('', file=fp) + + if self.threadsafety['implicit'] is not None: + # Create file + filename = self.genOpts.genDirectory + '/' + self.genOpts.filename + '/implicit.txt' + self.logMsg('diag', '# Generating include file:', filename) + fp = open(filename, 'w') + + # Host Synchronization + write('// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry', file=fp) + write('.Implicit Externally Synchronized Parameters', file=fp) + write('*' * 80, file=fp) + write(self.threadsafety['implicit'], file=fp, end='') + write('*' * 80, file=fp) + write('', file=fp) + + fp.close() + + # + # Check if the parameter passed in is a pointer to an array + def paramIsArray(self, param): + return param.attrib.get('len') is not None + + # Check if the parameter passed in is a pointer + def paramIsPointer(self, param): + ispointer = False + paramtype = param.find('type') + if paramtype.tail is not None and '*' in paramtype.tail: + ispointer = True + + return ispointer + + # Turn the "name[].member[]" notation into plain English. + def makeThreadDereferenceHumanReadable(self, dereference): + matches = re.findall(r"[\w]+[^\w]*",dereference) + stringval = '' + for match in reversed(matches): + if '->' in match or '.' in match: + stringval += 'member of ' + if '[]' in match: + stringval += 'each element of ' + + stringval += 'the ' + stringval += self.makeParameterName(re.findall(r"[\w]+",match)[0]) + stringval += ' ' + + stringval += 'parameter' + + return stringval[0].upper() + stringval[1:] + + def makeThreadSafetyBlocks(self, cmd, paramtext): + protoname = cmd.find('proto/name').text + + # Find and add any parameters that are thread unsafe + explicitexternsyncparams = cmd.findall(paramtext + "[@externsync]") + if (explicitexternsyncparams is not None): + for param in explicitexternsyncparams: + externsyncattribs = param.attrib.get('externsync') + paramname = param.find('name') + for externsyncattrib in externsyncattribs.split(','): + + tempstring = '* ' + if externsyncattrib == 'true': + if self.paramIsArray(param): + tempstring += 'Each element of the ' + elif self.paramIsPointer(param): + tempstring += 'The object referenced by the ' + else: + tempstring += 'The ' + + tempstring += self.makeParameterName(paramname.text) + tempstring += ' parameter' + + else: + tempstring += self.makeThreadDereferenceHumanReadable(externsyncattrib) + + tempstring += ' in ' + tempstring += self.makeFLink(protoname) + tempstring += '\n' + + + if ' element of ' in tempstring: + self.threadsafety['parameterlists'] += tempstring + else: + self.threadsafety['parameters'] += tempstring + + + # Find and add any "implicit" parameters that are thread unsafe + implicitexternsyncparams = cmd.find('implicitexternsyncparams') + if (implicitexternsyncparams is not None): + for elem in implicitexternsyncparams: + self.threadsafety['implicit'] += '* ' + self.threadsafety['implicit'] += elem.text[0].upper() + self.threadsafety['implicit'] += elem.text[1:] + self.threadsafety['implicit'] += ' in ' + self.threadsafety['implicit'] += self.makeFLink(protoname) + self.threadsafety['implicit'] += '\n' + + + # For any vkCmd* functions, the commandBuffer parameter must be being recorded + if protoname is not None and 'vkCmd' in protoname: + self.threadsafety['implicit'] += '* ' + self.threadsafety['implicit'] += 'The sname:VkCommandPool that pname:commandBuffer was allocated from, in ' + self.threadsafety['implicit'] += self.makeFLink(protoname) + + self.threadsafety['implicit'] += '\n' + + # + # Command generation + def genCmd(self, cmdinfo, name): + OutputGenerator.genCmd(self, cmdinfo, name) + # + # Get all thh parameters + params = cmdinfo.elem.findall('param') + usages = cmdinfo.elem.findall('validity/usage') + + self.makeThreadSafetyBlocks(cmdinfo.elem, 'param') + + self.writeInclude() diff --git a/src/spec/genvk.py b/src/spec/genvk.py new file mode 100755 index 00000000..f2207538 --- /dev/null +++ b/src/spec/genvk.py @@ -0,0 +1,312 @@ +#!/usr/bin/env python +# +# Copyright (c) 2013-2016 The Khronos Group Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and/or associated documentation files (the +# "Materials"), to deal in the Materials without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Materials, and to +# permit persons to whom the Materials are furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Materials. +# +# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +import sys, time, pdb, string, cProfile +from reg import * +from generator import write, CGeneratorOptions, COutputGenerator, DocGeneratorOptions, DocOutputGenerator, PyOutputGenerator, ValidityOutputGenerator, HostSynchronizationOutputGenerator + +# debug - start header generation in debugger +# dump - dump registry after loading +# profile - enable Python profiling +# protect - whether to use #ifndef protections +# registry - use specified XML registry instead of gl.xml +# target - string name of target header, or all targets if None +# timeit - time length of registry loading & header generation +# validate - validate return & parameter group tags against +debug = False +dump = False +profile = False +protect = True +target = None +timeit = False +validate= False +# Default input / log files +errFilename = None +diagFilename = 'diag.txt' +regFilename = 'vk.xml' + +if __name__ == '__main__': + i = 1 + while (i < len(sys.argv)): + arg = sys.argv[i] + i = i + 1 + if (arg == '-debug'): + write('Enabling debug (-debug)', file=sys.stderr) + debug = True + elif (arg == '-dump'): + write('Enabling dump (-dump)', file=sys.stderr) + dump = True + elif (arg == '-noprotect'): + write('Disabling inclusion protection in output headers', file=sys.stderr) + protect = False + elif (arg == '-profile'): + write('Enabling profiling (-profile)', file=sys.stderr) + profile = True + elif (arg == '-registry'): + regFilename = sys.argv[i] + i = i+1 + write('Using registry ', regFilename, file=sys.stderr) + elif (arg == '-time'): + write('Enabling timing (-time)', file=sys.stderr) + timeit = True + elif (arg == '-validate'): + write('Enabling group validation (-validate)', file=sys.stderr) + validate = True + elif (arg[0:1] == '-'): + write('Unrecognized argument:', arg, file=sys.stderr) + exit(1) + else: + target = arg + write('Using target', target, file=sys.stderr) + +# Simple timer functions +startTime = None +def startTimer(): + global startTime + startTime = time.clock() +def endTimer(msg): + global startTime + endTime = time.clock() + if (timeit): + write(msg, endTime - startTime) + startTime = None + +# Load & parse registry +reg = Registry() + +startTimer() +tree = etree.parse(regFilename) +endTimer('Time to make ElementTree =') + +startTimer() +reg.loadElementTree(tree) +endTimer('Time to parse ElementTree =') + +if (validate): + reg.validateGroups() + +if (dump): + write('***************************************') + write('Performing Registry dump to regdump.txt') + write('***************************************') + reg.dumpReg(filehandle = open('regdump.txt','w')) + +# Turn a list of strings into a regexp string matching exactly those strings +def makeREstring(list): + return '^(' + '|'.join(list) + ')$' + +# Descriptive names for various regexp patterns used to select +# versions and extensions +allVersions = allExtensions = '.*' +noVersions = noExtensions = None + +# Copyright text prefixing all headers (list of strings). +prefixStrings = [ + '/*', + '** Copyright (c) 2015-2016 The Khronos Group Inc.', + '**', + '** Permission is hereby granted, free of charge, to any person obtaining a', + '** copy of this software and/or associated documentation files (the', + '** "Materials"), to deal in the Materials without restriction, including', + '** without limitation the rights to use, copy, modify, merge, publish,', + '** distribute, sublicense, and/or sell copies of the Materials, and to', + '** permit persons to whom the Materials are furnished to do so, subject to', + '** the following conditions:', + '**', + '** The above copyright notice and this permission notice shall be included', + '** in all copies or substantial portions of the Materials.', + '**', + '** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,', + '** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF', + '** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.', + '** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY', + '** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,', + '** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE', + '** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.', + '*/', + '' +] + +# Text specific to Vulkan headers +vkPrefixStrings = [ + '/*', + '** This header is generated from the Khronos Vulkan XML API Registry.', + '**', + '*/', + '' +] + +# Defaults for generating re-inclusion protection wrappers (or not) +protectFile = protect +protectFeature = protect +protectProto = protect + +buildList = [ + # Vulkan 1.0 - header for core API + extensions. + # To generate just the core API, + # change to 'defaultExtensions = None' below. + [ COutputGenerator, + CGeneratorOptions( + filename = '../vulkan/vulkan.h', + apiname = 'vulkan', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = 'vulkan', + addExtensions = None, + removeExtensions = None, + prefixText = prefixStrings + vkPrefixStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = False, + protectProto = '#ifndef', + protectProtoStr = 'VK_NO_PROTOTYPES', + apicall = 'VKAPI_ATTR ', + apientry = 'VKAPI_CALL ', + apientryp = 'VKAPI_PTR *', + alignFuncParam = 48) + ], + # Vulkan 1.0 draft - API include files for spec and ref pages + # Overwrites include subdirectories in spec source tree + # The generated include files do not include the calling convention + # macros (apientry etc.), unlike the header files. + # Because the 1.0 core branch includes ref pages for extensions, + # all the extension interfaces need to be generated, even though + # none are used by the core spec itself. + [ DocOutputGenerator, + DocGeneratorOptions( + filename = 'vulkan-docs', + apiname = 'vulkan', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = None, + addExtensions = + makeREstring([ + ]), + removeExtensions = + makeREstring([ + ]), + prefixText = prefixStrings + vkPrefixStrings, + apicall = '', + apientry = '', + apientryp = '*', + genDirectory = '../../doc/specs/vulkan', + alignFuncParam = 48, + expandEnumerants = False) + ], + # Vulkan 1.0 draft - API names to validate man/api spec includes & links + [ PyOutputGenerator, + DocGeneratorOptions( + filename = '../../doc/specs/vulkan/vkapi.py', + apiname = 'vulkan', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = None, + addExtensions = + makeREstring([ + ]), + removeExtensions = + makeREstring([ + ])) + ], + # Vulkan 1.0 draft - core API validity files for spec + # Overwrites validity subdirectories in spec source tree + [ ValidityOutputGenerator, + DocGeneratorOptions( + filename = 'validity', + apiname = 'vulkan', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = None, + addExtensions = + makeREstring([ + ]), + removeExtensions = + makeREstring([ + ]), + genDirectory = '../../doc/specs/vulkan') + ], + # Vulkan 1.0 draft - core API host sync table files for spec + # Overwrites subdirectory in spec source tree + [ HostSynchronizationOutputGenerator, + DocGeneratorOptions( + filename = 'hostsynctable', + apiname = 'vulkan', + profile = None, + versions = allVersions, + emitversions = allVersions, + defaultExtensions = None, + addExtensions = + makeREstring([ + ]), + removeExtensions = + makeREstring([ + ]), + genDirectory = '../../doc/specs/vulkan') + ], + None +] + +# create error/warning & diagnostic files +if (errFilename): + errWarn = open(errFilename,'w') +else: + errWarn = sys.stderr +diag = open(diagFilename, 'w') + +def genHeaders(): + # Loop over targets, building each + generated = 0 + for item in buildList: + if (item == None): + break + createGenerator = item[0] + genOpts = item[1] + if (target and target != genOpts.filename): + # write('*** Skipping', genOpts.filename) + continue + write('*** Building', genOpts.filename) + generated = generated + 1 + startTimer() + gen = createGenerator(errFile=errWarn, + warnFile=errWarn, + diagFile=diag) + reg.setGenerator(gen) + reg.apiGen(genOpts) + write('** Generated', genOpts.filename) + endTimer('Time to generate ' + genOpts.filename + ' =') + if (target and generated == 0): + write('Failed to generate target:', target) + +if (debug): + pdb.run('genHeaders()') +elif (profile): + import cProfile, pstats + cProfile.run('genHeaders()', 'profile.txt') + p = pstats.Stats('profile.txt') + p.strip_dirs().sort_stats('time').print_stats(50) +else: + genHeaders() diff --git a/src/spec/readme.pdf b/src/spec/readme.pdf new file mode 100644 index 00000000..11bcf70a Binary files /dev/null and b/src/spec/readme.pdf differ diff --git a/src/spec/readme.tex b/src/spec/readme.tex new file mode 100644 index 00000000..9c02d09b --- /dev/null +++ b/src/spec/readme.tex @@ -0,0 +1,1798 @@ +% Copyright (c) 2013-2016 The Khronos Group Inc. +% +% Permission is hereby granted, free of charge, to any person obtaining a +% copy of this software and/or associated documentation files (the +% "Materials"), to deal in the Materials without restriction, including +% without limitation the rights to use, copy, modify, merge, publish, +% distribute, sublicense, and/or sell copies of the Materials, and to +% permit persons to whom the Materials are furnished to do so, subject to +% the following conditions: +% +% The above copyright notice and this permission notice shall be included +% in all copies or substantial portions of the Materials. +% +% THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +% MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +% IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +% CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +% TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +% MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +\documentclass{article} + +% Various packages of possible use. {index} creates problems for some reason. +% \usepackage{index} +\def\specpdftitle{The Khronos Vulkan API Registry} +\usepackage[pdftex,bookmarksnumbered=true,linktocpage,plainpages=false,pdftitle={\specpdftitle},colorlinks=true]{hyperref} +\usepackage{amsmath,enumerate,epsfig,framed,mdframed,multicol,longtable,times,url} +\usepackage[normalem]{ulem} +% underscore allows use of _ instead of \_ in text. [strings] allows _ in file names +\usepackage[strings]{underscore} +\usepackage[breakwords,fit]{truncate} + +% Index everything down through \paragraph +\setcounter{tocdepth}{5} + +\makeatletter +\makeatother +\makeindex + +% Some commonly used abbreviations + +\def\code#1{{\tt #1}} +\def\tag#1{{\tt <#1>\index{<#1>}}} +% Because I keep mistyping \tag +\def\arg#1\tag{#1} +\def\attr#1{{\tt #1\index{#1}}} + +\begin{document} + +\title{The Khronos Vulkan API Registry for Vulkan} +\author{Jon Leech} +\date{Last updated 2016/02/07} +\maketitle + +\begin{abstract} + +This document describes the Khronos Vulkan API Registry schema, and provides +some additional information about using the registry and scripts to generate +a variety of outputs including C header files and several types of asciidoc +include files used in the Vulkan API specification and reference pages. The +underlying XML files and scripts are located on the Khronos Gitlab server, +currently in the {\em master} branch at URL + +\begin{center} +{\bf \href{https://gitlab.khronos.org/vulkan/vulkan/tree/master/src/spec/} + {https://gitlab.khronos.org/vulkan/vulkan/tree/master/src/spec/}} +\end{center} + +\end{abstract} + +\tableofcontents + +\section{Introduction} + +The registry uses an XML representation of the Vulkan API and a set of +Python scripts to manipulate the XML, based on the lxml Python bindings. It +includes an XML schema and validator. + +The registry schema is based on, but not identical to the schema used for +the previously published OpenGL, OpenGL ES and EGL API registries. The +schema was extended to represent additional types and concepts not needed +for those APIS, such as structure and enumerant types. + +The processed C header file corresponding to the registry is checked in +under src/vulkan/vulkan.h . + + +\section{Getting Started} +\label{starting} + +You will need some tools installed. +For Linux systems, you will need the following packages installed (Debian +package names are noted, Ubuntu package names are probably the same). + +\begin{itemize} +\item Python 3.x (\code{python3}) +\item The lxml Python package (\code{python3-lxml}) +\item Libxml (\code{libxml2}) +\item A make tool, such as GNU make +\end{itemize} + +The toolchain has also been run successfully on Microsoft Windows in the +Cygwin environment, and the individual Python-based components of the +toolchain can be run directly from the Windows command line. More details on +this are under src/spec/README in Git. + +Once you have the right tools installed, perform the following steps: + +\begin{itemize} +\item Check out the ``vulkan'' repository linked above from Khronos Gitlab + (there are instructions at the link) +\item Go to \code{vulkan/src/spec} in your checked-out repo +\item Invoke \code{make clobber ; make install} +\end{itemize} + +This should regenerate \code{vulkan.h} and install it in +\code{../vulkan/vulkan.h}. The result should be identical to the +version you just pulled from Gitlab (use \code{git diff +../vulkan/vulkan.h} to check). + +Other Makefile targets include: + +\begin{itemize} +\item \code{vulkan-docs} - regenerate the API specification and reference + page asciidoc include files in \code{../doc/specs/vulkan/} under the + subdirectories \code{enums}, \code{flags}, \code{protos}, and + \code{structs}. These files are pulled in by the ref pages and API + spec to put function prototypes and struct and enum declarations in + documentation. + + You should probably {\bf not} update these files if you are proposing + an API change - just the \code{vulkan.h} header. When a git merge is + accepted including your change, the docs will be updated at that time. + Including the dozens of include files in your merge makes it hard to + read and adds no information beyond the header updates. Sometimes it + is useful to include just one or two of the include files for context + of a global change, however. + + However, you are strongly encouraged to updated the {\bf + non-}autogenerated docs under \code{../doc/specs/vulkan/man/*.txt} to + reflect API changes. +\item \code{full_install} - equivalent to \code{install} followed by + \code{vulkan-docs}. +\item \code{validate} - validate \code{vk.xml} against the XML schema. + Recommended if you're making nontrivial changes. +%% \item \code{vk.json} - generate JSON version of \code{vk.xml}. Currently the +%% converter is generating syntactically but not semantically legal JSON, +%% and it's difficult to map the XML schemaanso don't use this target yet. +\item \code{readme.pdf} - regenerate this document from the LaTeX source. + Most people will never need to do this. If you do, you must have + pdflatex installed, preferably from the TeTeX distribution. +\end{itemize} + +If you just want to modify the API, changing \code{vk.xml} and running +``make'' should be all that's needed. See appendix~\ref{examples} for some +examples of modifying the XML. + +If you want to repurpose the registry for reasons other than header file +and ref page include generation, or to generate headers for languages +other than C, start with the Makefile rules and inspect the files +\code{vk.xml}, \code{genvk.py}, \code{reg.py}, and \code{generator.py}. + +If you're using other platforms, merge requests with additional +documentation on using the tools on those platforms would be very helpful. + +\subsection{Header Generation Script - \code{genvk.py}} + +When generating header files using the \code{genvk.py} script, an API name +and profile name are required, as shown in the Makefile examples. +Additionally, specific API versions and extensions can be required or +excluded. Based on this information, the generator script extracts the +relevant interfaces and creates a C-language header file for them. +\code{genvk.py} contains predefined generator options for the current +development version of Vulkan 1.0. + +The generator script is intended to be generalizable to other languages by +writing new generator classes. Such generators would have to rewrite the C +types and definitions in the XML to something appropriate to their language. + +\subsection{Registry Processing Script - \code{reg.py}} + +XML processing is done in \code{reg.py}, which contains several objects and +methods for loading registries and extracting interfaces and extensions for +use in header generation. There is some internal documentation in the form +of comments, although nothing more extensive exists yet. + +\subsection{Output Generator Script - \code{generator.py}} + +Once the registry is loaded, the \code{COutputGenerator} class defined in +\code{generator.py} is used to create a header file. The +\code{DocOutputGenerator} class is used to create the asciidoc include +files. Output generators for other purposes can be added as needed. + + +\section{Vulkan Registry Schema} +\label{schema} + +The format of the Vulkan registry is a top level \tag{registry} tag +containing \tag{types}, \tag{enums}, \tag{commands}, \tag{feature}, and +\tag{extension} tags describing the different elements of an API, as +explained below. This description corresponds to a formal Relax NG schema +file, \code{registry.rnc}, against which the XML registry files can be +validated. + +At present the only registry in this schema is the core Vulkan API registry, +\code{vk.xml}. + + +\subsection{Profiles} +\label{schema:profile} + +Types and enumerants can have different definitions depending on the API +profile requested. This capability is not used in the current Vulkan API but +may be in the future. Features and extensions can include some elements +conditionally depending on the API profile requested. + + +\subsection{API Names} +\label{schema:apiname} + +The schema supports, but does not currently use an \attr{api} attribute on +several tags. This is an arbitrary string, specified at header generation +time, for labelling properties of a specific API or API profile. The string +can be, but is not necessarily, an actual API name. Names starting with ``vk'' +are suggested if and when we start defining profiles of Vulkan. + + +\section{Registry Root (\tag{registry} tag)} +\label{schema:root} + +A \tag{registry} contains the entire definition of one or more related +APIs. + +\subsection{Attributes of \tag{registry} tags} + +None. + +\subsection{Contents of \tag{registry} tags} + +Zero or more of each of the following tags, normally in this order +(although order shouldn't be important): + +\begin{itemize} +\item \tag{comment} - Contains arbitrary text, such as a copyright + statement. +\item \tag{vendorids} (see section~\ref{tag:vendorids}) - defines Khronos + vendor IDs, described in detail in the ``Layers and Extensions'' + appendix of the Vulkan Specification. +\item \tag{tags} (see section~\ref{tag:tags}) - defines author prefixes used + for extensions and layers. Prefixes are described in detail in the + ``Layers and Extensions'' appendix of the Vulkan Specification. +\item \tag{types} (see section~\ref{tag:types}) - defines API types. + Usually only one tag is used. +\item \tag{enums} (see section~\ref{tag:enums}) - defines API token names + and values. Usually multiple tags are used. Related groups may be + tagged as an enumerated type corresponding to a \tag{type} tag, and + resulting in a C \code{enum} declaration. This ability is heavily used + in the Vulkan API. +\item \tag{commands} (see section~\ref{tag:commands}) - defines API + commands (functions). Usually only one tag is used. +\item \tag{feature} (see section~\ref{tag:feature}) - defines API + feature interfaces (API versions, more or less). One tag per + feature set. +\item \tag{extensions} (see section~\ref{tag:extensions}) - defines API + extension interfaces. Usually only one tag is used, wrapping many + extensions. +\end{itemize} + + +\section{Vendor IDs (\tag{vendorids} tag)} +\label{tag:vendorids} + +The \tag{vendorids} tag contains individual \tag{vendorid} tags defining +vendor IDs for physical devices which do not have PCI vendor IDs. + +Each \tag{vendorid} tag contains information defining a single vendor ID. + +\subsection{Attributes of \tag{vendorid} tags} + +\begin{itemize} +\item \attr{name} - required. The author prefix, as registered with Khronos. + This must match an author prefix in the \attr{name} field of a + \tag{tag} tag. +\item \attr{id} - required. The reserved vendor ID, as a hexadecimal number. +\item \attr{comment} - optional. Arbitrary string (unused). +\end{itemize} + + +\section{Author Prefixes (\tag{tags} tag)} +\label{tag:tags} + +The \tag{tags} tag contains individual \tag{tag} tags defining each of the +reserved author prefixes used by extension and layer authors. + +Each \tag{tag} tag contains information defining a single author prefix. + +\subsection{Attributes of \tag{tag} tags} + +\begin{itemize} +\item \attr{name} - required. The author prefix, as registered with Khronos. + A short, upper-case string, usually an abbreviation of an author, + project or company name. +\item \attr{author} - required. The author name, such as a full company + or project name. +\item \attr{contact} - required. The contact who registered or is currently + responsible for extensions and layers using the prefix, including + sufficient contact information to reach the contact such as individual + name together with email address, Github username, or other contact + information. +\end{itemize} + + +\section{API types (\tag{types} tag)} +\label{tag:types} + +The \tag{types} tag contains individual \tag{type} tags describing each +of the derived types used in the API. + +Each \tag{type} tag contains information which can be used to generate C +code corresponding to the type. In many cases, this is simply legal C code +with attributes or embedded tags denoting the type name and other types used +in defining this type. In some cases, additional attribute and embedded type +information is used to generate more complicated C types. + + +\subsection{Attributes of \tag{type} tags} + +\begin{itemize} +\item \attr{requires} - optional. Another type name this type requires to + complete its definition. +\item \attr{name} - optional. Name of this type (if not defined in the tag + body). +\item \attr{api} - optional. An API name (see \tag{feature} below) which + specializes this definition of the named type, so that the same API + types may have different definitions for e.g. GL ES and GL. This is + unlikely to be used in Vulkan, where a single API supports desktop and + mobile devices, but the functionality is retained. +\item \attr{category} - optional. A string which indicates that this type + contains a more complex structured definition. At present the only + accepted categories are \code{basetype} \code{bitmask}, \code{define}, + \code{enum}, \code{funcpointer}, \code{group}, \code{handle}, + \code{include}, \code{struct}, and \code{union}, as described below. +\item \attr{comment} - optional. Arbitrary string (unused). +\item \attr{parent} only applicable if category is \code{handle}. Notes another type with + the \code{handle} category that acts as a parent object for this type. +\item \attr{returnedonly} only applicable if category is \code{struct} or \code{union}. + Notes that this struct/union is going to be filled in by the API, rather than an + application filling it out and passing it to the API. +\end{itemize} + +\subsection{Contents of \tag{type} tags} + +The valid contents depend on the \attr{category} attribute. + +\subsubsection{Enumerated types - \attr{category} "enum"} + +If the \attr{category} tag has the value \code{enum}, the type is a C +enumeration. The body of the tag is ignored in this case. The value of the +\attr{name} attribute must be provided and must match the \attr{name} +attribute of a \tag{enums} tag (see section~\ref{tag:enums}). The enumerant +values defined within the \tag{enums} tag are used to generate a C +\code{enum} type declaration. + +\subsubsection{Structure types - \attr{category} "struct" or "union"} + +If the \attr{category} tag has the values \code{struct} or \code{union}, the +type is a C structure or union, respectively. In this case, the \attr{name} +attribute must be provided, and the contents of the \tag{type} tag are a +series of \tag{member} tags defining the members of the aggregate type, in +order, followed by an optional \tag{validity} tag including asciidoc +validation language for the structure contents. + + +\paragraph{Structure member (\tag{member}) tags} +\par\vskip 11pt + +The \tag{member} tag defines the type and name of a structure or union +member. + +\paragraph{Attributes of \tag{member} tags} + +\begin{itemize} +\item \attr{len} - if the member is an array, len may be one or more of the following + things, separated by commas (one for each array indirection): another + member of that struct, ``null-terminated'' for a string, ``1'' to indicate it's + just a pointer (used for nested pointers), or a latex equation (prefixed with + ``latex:'') +\item \attr{externsync} - denotes that the member should be externally synchronized + when accessed by Vulkan +\item \attr{optional} - whether this value can be omitted by providing \code{NULL} (for + pointers), \code{VK_NULL_HANDLE} (for handles) or 0 (for bitmasks/values) +\item \attr{noautovalidity} - prevents automatic validity language being generated + for the tagged item. Only suppresses item-specific validity - parenting issues + etc. are still captured. +\end{itemize} + +\paragraph{Contents of \tag{member} tags} +\par\vskip 11pt + +The text elements of a \tag{member} tag, with all other tags removed, +is a legal C declaration of a struct or union member. In addition it may +contain two semantic tags: + +\begin{itemize} +\item The \tag{type} tag is optional. It contains text which is a valid type + name found in another \tag{type} tag, and indicates that this type + must be previously defined for the definition of the command to + succeed. Builtin C types should not be wrapper in \tag{type} tags. +\item The \tag{name} tag is required, and contains the struct/union member + name being described. +\end{itemize} + +\paragraph{Validation (\tag{validity}) tags} +\par\vskip 11pt + +The \tag{validity} tag, if present defines valid use cases and values for +structure members. + +\paragraph{Contents of \tag{validity} tags} +\par\vskip 11pt + +Each \tag{validity} tag contains zero or more \tag{usage} tags. Each +\tag{usage} tag is intended to represent a specific validation requirement +for the structure and include arbitrary asciidoc text describing that +requirement. + + +\subsubsection{All other types} + +If the \attr{category} attribute is one of \code{basetype}, \code{bitfield}, +\code{define}, \code{funcpointer}, \code{group}, \code{handle} or +\code{include}, or is not specified, \tag{type} contains text which is legal +C code for a type declaration. It may also contain embedded tags: + +\begin{itemize} +\item \tag{type} - nested type tags contain other type names which are + required by the definition of this type. +\item \tag{apientry/} - insert a platform calling convention macro here + during header generation, used mostly for function pointer types. +\item \tag{name} - contains the name of this type (if not defined in the + tag attributes). +\end{itemize} + +There is no restriction on which sorts of definitions may be made in a given +category, although the contents of tags with \attr{category} \code{enum}, +\code{struct} or \code{union} are interpreted specially as described above. + +However, when generating the header, types within each category are grouped +together, and categories are generated in the order given by the following +list. Therefore, types in a category should correspond to the intended +purpose given for that category. If this recommendation is not followed, it +is possible that the resulting header file will not compile due to +out-of-order type dependencies. + +\begin{itemize} + \item \code{include} ({\tt \#include} directives) + \item \code{define} (macro {\tt \#define} directives) + \item \code{basetype} (scalar typedefs, such as the definition of + {\tt VkFlags}) + \item \code{handle} (invocations of macros defining scalar types such as + {\tt VkInstance}) + \item \code{enum} (enumeration types and {\tt \#define} for constant values) + \item \code{group} (currently unused) + \item \code{bitmask} (enumeration types whose members are bitmasks) + \item \code{funcpointer} (function pointer typedefs) + \item \code{struct} and \code{union} together (struct and union types) +\end{itemize} + + +\subsection{Example of a \tag{types} tag} +\label{tag:types:example} + +\begin{verbatim} + + #include <stddef.h> + typedef ptrdiff_t VKlongint; + + + VkEnum srcEnum + VkEnum dstEnum + + + + + + + +\end{verbatim} + +The {\tt VkStruct} type is defined to require the types {\tt VkEnum} and +{\tt VKlongint} as well. If {\tt VkStruct} is in turn required by a command +or another type during header generation, it will result in the following +declarations: + +\begin{verbatim} +#include +typedef ptrdiff_t VKlongint. + +typedef enum { + VK_ENUM_ZERO = 0, + VK_ENUM_FORTY_TWO = 42 +} VkEnum; + +typedef struct { + VkEnum dstEnum; + VkLongint dstVal; +} VkStruct; +\end{verbatim} + +Note that the angle brackets around \code{stddef.h} are represented as XML +entities in the registry. This could also be done using a CDATA block but +unless there are many characters requiring special representation in XML, +using entities is preferred. + + +\section{Enumerant Blocks (\tag{enums} tag)} +\label{tag:enums} + +The \tag{enums} tags contain individual \tag{enum} tags describing each of +the token names used in the API. In some cases these correspond to a C +\code{enum}, and in some cases they are simply compile-time constants (e.g. +\code{\#define}). + +\subsection{Attributes of \tag{enums} tags} + +\begin{itemize} +\item \attr{name} - optional. String naming the C \code{enum} type whose + members are defined by this enum group. If present, this attribute + should match the \attr{name} attribute of a corresponding \tag{type} + tag. +\item \attr{type} - optional. String describing the data type of the values + of this group of enums. At present the only accepted categories are + \code{enum} and \code{bitmask}, as described below. +\item \attr{start}, \attr{end} - optional. Integers defining the start and + end of a reserved range of enumerants for a particular vendor or + purpose. \attr{start} must be $\leq$ \attr{end}. These fields define + formal enumerant allocations, and are made by the Khronos Registrar on + request from implementers following the enum allocation policy. +\item \attr{vendor} - optional. String describing the vendor or purpose to + whom a reserved range of enumerants is allocated. +\item \attr{comment} - optional. Arbitrary string (unused). +\end{itemize} + +\subsection{Contents of \tag{enums} tags} + +Each \tag{enums} block contains zero or more \tag{enum} and \tag{unused} +tags, in arbitrary order (although they are typically ordered by sorting +on enumerant values, to improve human readability). + +\subsection{Example of \tag{enums} tags} + +An example showing a tag with attribute \attr{type}="\code{enum}" is given +above in section~\ref{tag:types:example}. The following example is for +non-enumerated tokens. + +\begin{verbatim} + + + + +\end{verbatim} + +When processed into a C header, and assuming all these tokens were +required, this results in + +\begin{verbatim} +#define VK_MAX_EXTENSION_NAME 256 +#define VK_LOD_CLAMP_NONE MAX_FLOAT +\end{verbatim} + + +\section{Enumerants (\tag{enum} tag)} +\label{tag:enum} + +Each \tag{enum} tag defines a single Vulkan (or other API) token. + +\subsection{Attributes of \tag{enum} tags} + +\begin{itemize} +\item \attr{value} or \attr{bitpos} - exactly one of these is allowed and + required. \attr{value} is an enumerant value in the form of a legal C + constant (usually a literal decimal or hexadecimal integer, though + arbitrary strings are allowed). \attr{bitpos} is a literal integer bit + position in a bitmask. +\item \attr{name} - required. Enumerant name, a legal C preprocessor token + name. +\item \attr{api} - optional. An API name which specializes this definition of + the named enum, so that different APIs may have different values for + the same token. May be used to address a subtle incompatibilities. +\item \attr{type} - optional. Used only when \attr{value} is specified. C + suffix for the value to force it to a specific type. Currently only + \code{u} and \code{ull} are used, for \code{unsigned} 32- and 64-bit + integer values, respectively. Separated from \attr{value} since this + eases parsing and sorting of values, and rarely used. +\item \attr{alias} - optional. Name of another enumerant this is an alias + of, used where token names have been changed as a result of profile + changes or for consistency purposes. An enumerant alias is simply a + different \attr{name} for the exact same \attr{value} or + \attr{bitpos}. +\end{itemize} + +\subsection{Contents of \tag{enum} tags} + +\tag{enum} tags have no allowed contents. All information is contained +in the attributes. + + +\section{Unused Enumerants (\tag{unused} tag)} +\label{tag:unused} + +Each \tag{unused} tag defines a range of enumerants which is allocated, but +not yet assigned to specific enums. This just tracks the unused values for +the Registrar's use, and is not used for header generation. + +\subsection{Attributes of \tag{unused} tags} + +\begin{itemize} +\item \attr{start} - required, \attr{end} - optional. Integers defining the + start and end of an unused range of enumerants. \attr{start} must be + $\leq$ \attr{end}. If \attr{end} is not present, then \attr{start} + defines a single unused enumerant. This range should not exceed the + range reserved by the surrounding \tag{enums} tag. +\item \attr{vendor} - optional. String describing the vendor or purposes to + whom a reserved range of enumerants is allocated. Usually identical to + the \attr{vendor} attribute of the surrounding \attr{enums} block. +\item \attr{comment} - optional. Arbitrary string (unused). +\end{itemize} + +\subsection{Contents of \tag{unused} tags} + +None. + + +\section{Command Blocks (\tag{commands} tag)} +\label{tag:commands} + +The \tag{commands} tag contains definitions of each of the functions +(commands) used in the API. + +\subsection{Attributes of \tag{commands} tags} + +None. + +\subsection{Contents of \tag{commands} tags} + +Each \tag{commands} block contains zero or more \tag{command} tags, in +arbitrary order (although they are typically ordered by sorting on the +command name, to improve human readability). + + +\section{Commands (\tag{command} tag)} +\label{tag:command} + +The \tag{command} tag contains a structured definition of a single API +command (function). + +\subsection{Attributes of \tag{command} tags} + +\begin{itemize} +\item \attr{queues} - optional. A string identifying the command queues + this command can be placed on. The format of the string is one or + more of the terms \code{"compute"}, \code{"dma"}, and + \code{"graphics"}, with multiple terms separated by commas + (\code{","}). +\item \attr{renderpass} - optional. A string identifying whether the + command can be issued only inside a render pass (\code{"inside"}), + only outside a render pass (\code{"outside"}), or both + (\code{"both"}). +\item \attr{cmdbufferlevel} - optional. A string identifying the command buffer + levels that this command can be called by. The format of the string is + one or more of the terms \code{"primary"} and \code{"secondary"}, with + multiple terms separated by commas (\code{","}). +\item \attr{comment} - optional. Arbitrary string (unused). +\end{itemize} + +\subsection{Contents of \tag{command} tags} + +\begin{itemize} +\item \tag{proto} is required and must be the first element. It is a tag + defining the C function prototype of a command as described below, up + to the function name and return type but not including function + parameters. +\item \tag{param} elements for each command parameter follow, defining + its name and type, as described below. If a command takes no + arguments, it has no \tag{param} tags. +\item An optional \tag{validity} tag including asciidoc validation language + for the command parameters. +\end{itemize} + +Following these elements, the remaining elements in a \tag{command} +tag are optional and may be in any order: + +\begin{itemize} +\item \tag{alias} - optional. Has no attributes and contains a string which + is the name of another command this command is an alias of, used when + promoting a function from vendor to Khronos extension or Khronos + extension to core API status. A command alias describes the case where + there are two function names which resolve to the {\bf same} entry + point in the underlying layer stack. +\item \tag{description} - optional. Unused text. +\item \tag{implicitexternsyncparams} - optional. Contains a list of + \tag{param} tags, each containing Asciidoc source text describing an + object which is not a parameter of the command, but is related to one, + and which also requires external synchronization as described in + section~\ref{tag:command:param:attr}. The text is intended to be + incorporated into the API specification. +\end{itemize} + + +\subsection{Command prototype (\tag{proto} tags)} +\label{tag:command:proto} + +The \tag{proto} tag defines the return type and name of a command. + +\subsubsection{Attributes of \tag{proto} tags} + +None. + +% \begin{itemize} +% \item \attr{group} - group name, an arbitrary string. +% \end{itemize} +% +% If the group name is defined, it may be interpreted as described in +% section~\ref{tag:group:meaning}. + +\subsubsection{Contents of \tag{proto} tags} + +The text elements of a \tag{proto} tag, with all other tags removed, is +legal C code describing the return type and name of a command. In addition +to text, it may contain two semantic tags: + +\begin{itemize} +\item The \tag{type} tag is optional, and contains text which is a valid + type name found in a \tag{type} tag. It indicates that this type must + be previously defined for the definition of the command to succeed. + Builtin C types, and any derived types which are expected to be found + in other header files, should not be wrapped in \tag{type} tags. +\item The \tag{name} tag is required, and contains the command name + being described. +\end{itemize} + +\subsection{Command parameter (\tag{param} tags)} +\label{tag:command:param} + +The \tag{param} tag defines the type and name of a parameter. Its contents +are very similar to the \tag{member} tag used to define struct and union +members. + +\subsubsection{Attributes of \tag{param} tags} +\label{tag:command:param:attr} + +\begin{itemize} +\item \attr{len} - if the param is an array, len may be one or more of the following + things, separated by commas (one for each array indirection): another + param of that command, ``null-terminated'' for a string, ``1'' to indicate it's + just a pointer (used for nested pointers), or a latex equation (prefixed with + ``latex:'') +\item \attr{optional} - whether this value can be omitted by providing \code{NULL} (for + pointers), \code{VK_NULL_HANDLE} (for handles) or 0 (for bitmasks/values) +\item \attr{noautovalidity} - prevents automatic validity language being generated + for the tagged item. Only suppresses item-specific validity - parenting issues + etc. are still captured. +\item \attr{externsync} - optional. A boolean string, which must have the + value \code{"true"} if present, indicating that this parameter (e.g. + the object a handle refers to, or the contents of an array a pointer + refers to) is modified by the command, and is not protected against + modification in multiple app threads. Parameters which do not have + this attribute are assumed to not require external synchronization. +\end{itemize} + +\subsubsection{Contents of \tag{param} tags} + +The text elements of a \tag{param} tag, with all other tags removed, is +legal C code describing the type and name of a function parameter. In +addition it may contain two semantic tags: + +\begin{itemize} +\item The \tag{type} tag is optional, and contains text which is a + valid type name found in \tag{type} tag, and indicates that this + type must be previously defined for the definition of the command + to succeed. Builtin C types, and any derived types which are + expected to be found in other header files, should not be wrapped + in \tag{type} tags. +\item The \tag{name} tag is required, and contains the parameter name being + described. +\end{itemize} + +\subsection{Example of a \tag{commands} tag} + +\begin{verbatim} + + + VkResult vkCreateInstance + const VkInstanceCreateInfo* pCreateInfo + VkInstance* pInstance + + +\end{verbatim} + +When processed into a C header, this results in + +\begin{verbatim} +VkResult vkCreateInstance( + const VkInstanceCreateInfo* pCreateInfo, + VkInstance* pInstance); +\end{verbatim} + +\subsection{Parameter validation (\tag{validity}) tags} +\label{tag:command:validity} + +The \tag{validity} tag, if present defines valid use cases and values for +command parameters + +\paragraph{Contents of \tag{validity} tags} +\par\vskip 11pt + +Each \tag{validity} tag contains zero or more \tag{usage} tags. Each +\tag{usage} tag is intended to represent a specific validation requirement +for the command, and contains arbitrary asciidoc text describing that +requirement. + + +\section{API Features / Versions (\tag{feature} tag)} +\label{tag:feature} + +API features are described in individual \tag{feature} tags. A feature is +the set of interfaces (enumerants and commands) defined by a particular API +and version, such as Vulkan 1.0, and includes all profiles of that API and +version. + +\subsection{Attributes of \tag{feature} tags} + +\begin{itemize} +\item \attr{api} - required. API name this feature is for (see + section~\ref{schema:apiname}), such as \code{vk}. +\item \attr{name} - required. Version name, used as the C preprocessor token + under which the version's interfaces are protected against multiple + inclusion. Example: \code{VK\_VERSION\_1\_0}. +\item \attr{number} - required. Feature version number, usually a string + interpreted as $majorNumber.minorNumber$. Example: \code{4.2}. +\item \attr{protect} - optional. An additional preprocessor token used to + protect a feature definition. Usually another feature or extension + \attr{name}. Rarely used, for odd circumstances where the definition + of a feature or extension requires another to be defined first. +\item \attr{comment} - optional. Arbitrary string (unused). +\end{itemize} + +\subsection{Contents of \tag{feature} tags} + +Zero or more \tag{require} and \tag{remove} tags (see +section~\ref{tag:required}), in arbitrary order. Each tag describes a +set of interfaces that is respectively required for, or removed from, +this feature, as described below. + +\subsection{Example of a \tag{feature} tag} + +\begin{verbatim} + + + + + + + + + + + + +\end{verbatim} + +When processed into a C header for Vulkan, this results in: + +\begin{verbatim} +#ifndef VK_VERSION_1_0 +#define VK_VERSION_1_0 1 +#define VK_MAX_EXTENSION_NAME 256 +#define VK_LOD_CLAMP_NONE MAX_FLOAT +typedef VkResult (VKAPI_PTR *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, VkInstance* pInstance); +#ifdef VK_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance( + const VkInstanceCreateInfo* pCreateInfo, + VkInstance* pInstance); +#endif +#endif /* VK_VERSION_1_0 */ +\end{verbatim} + + +\section{Extension Blocks (\tag{extensions} tag)} +\label{tag:extensions} + +The \tag{extensions} tag contains definitions of each of the extenions +which are defined for the API. + +\subsection{Attributes of \tag{extensions} tags} + +None. + +\subsection{Contents of \tag{extensions} tags} + +Each \tag{extensions} block contains zero or more \tag{extension} tags, +each describing an API extension, in arbitrary order (although they are +typically ordered by sorting on the extension name, to improve human +readability). + + +\section{API Extensions (\tag{extension} tag)} +\label{tag:extension} + +API extensions are described in individual \tag{extension} tags. An +extension is the set of interfaces defined by a particular API extension +specification, such as \code{ARB\_multitexture}. \tag{extension} is +similar to \tag{feature}, but instead of having \attr{version} and +\attr{profile} attributes, instead has a \attr{supported} attribute, +which describes the set of API names which the extension can potentially +be implemented against. + +\subsection{Attributes of \tag{extension} tags} + +\begin{itemize} +\item \attr{name} - required. Extension name, following the conventions + in the Vulkan Specification. + Example: \code{name="VK\_VERSION\_1\_0"}. +\item \attr{number} - required. A decimal number which is the registered, + unique extension number for \attr{name}. +\item \attr{supported} - required. A regular expression, with an implicit + \code{\^{}} and \code{\$} bracketing it, which should match the + \attr{api} tag of a set of \tag{feature} tags. +\item \attr{protect} - optional. An additional preprocessor token used to + protect an extension definition. Usually another feature or extension + \attr{name}. Rarely used, for odd circumstances where the definition + of an extension requires another extension or a header file to be + defined first. +\item \attr{author} - optional. The author name, such as a full company + name. If not present, this can be taken from the corresponding + \tag{tag} attribute. However, \code{EXT} and other multi-vendor + extensions may not have a well-defined author or contact in the tag. +\item \attr{contact} - optional. The contact who registered or is currently + responsible for extensions and layers using the tag, including + sufficient contact information to reach the contact such as individual + name together with email address, Github username, or other contact + information. If not present, this can be taken from the corresponding + \tag{tag} attribute just like \attr{author}. +\item \attr{comment} - optional. Arbitrary string (unused). +\end{itemize} + +\subsection{Contents of \tag{extension} tags} + +Zero or more \tag{require} and \tag{remove} tags (see +section~\ref{tag:required}), in arbitrary order. Each tag describes a +set of interfaces that is respectively required for, or removed from, +this extension, as described below. + +\subsection{Example of an \tag{extensions} tag} + +\begin{verbatim} + + + + + + + + + +\end{verbatim} + +The \attr{supported} attribute says that the extension is defined for the +default profile (\code{vulkan}). When processed into a C header for the +\code{vulkan} profile, this results in header contents something like +(assuming corresponding definitions of the specified \tag{type} and +\tag{command} elsewhere in the XML): + +\begin{verbatim} +#define VK_KHR_display_swapchain 1 +#define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION 9 +#define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NUMBER 4 +#define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME "VK_KHR_display_swapchain" + +typedef struct VkDisplayPresentInfoKHR { + VkStructureType sType; + const void* pNext; + VkRect2D srcRect; + VkRect2D dstRect; + VkBool32 persistent; +} VkDisplayPresentInfoKHR; + +typedef VkResult (VKAPI_PTR *PFN_vkCreateSharedSwapchainsKHR)( + VkDevice device, uint32_t swapchainCount, + const VkSwapchainCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, + VkSwapchainKHR* pSwapchains); + +#ifdef VK_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateSharedSwapchainsKHR( + VkDevice device, + uint32_t swapchainCount, + const VkSwapchainCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, + VkSwapchainKHR* pSwapchains); +#endif +\end{verbatim} + + +\section{Required and Removed Interfaces (\tag{require} and \tag{remove} tags)} +\label{tag:required} + +A \tag{require} block defines a set of interfaces (types, enumerants and +commands) {\em required} by a \tag{feature} or \tag{extension}. A +\tag{remove} block defines a set of interfaces {\em removed} by a +\tag{feature} (this is primarily useful for future profiles of an API which +may choose to deprecated and/or remove some interfaces - extensions should +never remove interfaces, although this usage is allowed by the schema). +Except for the tag name and behavior, the contents of \tag{require} and +\tag{remove} tags are identical. + +\subsection{Attributes of \tag{require} and \tag{remove} tags} + +\begin{itemize} +\item \attr{profile} - optional. String name of an API profile. Interfaces + in the tag are only required (or removed) if the specified profile is + being generated. If not specified, interfaces are required (or + removed) for all API profiles. +\item \attr{comment} - optional. Arbitrary string (unused). +\item \attr{api} - optional. An API name (see section~\ref{schema:apiname}). + Interfaces in the tag are only required (or removed) if the specified + API is being generated. If not specified, interfaces are required (or + removed) for all APIs. + + {\bf The \attr{api} attribute is only supported inside + \tag{extension} tags,} since \tag{feature} tags already define a + specific API. +\end{itemize} + +\subsection{Contents of \tag{require} and \tag{remove} tags} + +Zero or more of the following tags, in any order: + +\begin{itemize} +\item \tag{command} specifies an required (or removed) command defined + in a \tag{commands} block. The tag has no content, but contains + attributes: + + \begin{itemize} + \item \attr{name} - required. Name of the command. + \item \attr{comment} - optional. Arbitrary string (unused). + \end{itemize} +\item \tag{enum} specifies an required (or removed) enumerant defined in a + \tag{enums} block. All forms of this tag support the following + attributes: + + \begin{itemize} + \item \attr{name} - required. Name of the enumerant. + \item \attr{comment} - optional. Arbitrary string (unused). + \end{itemize} + + There are two forms of \tag{enum} tags: + + {\bf Reference enums} simply pull in the definition of an enumerant + given in a separate \tag{enums} block. Reference enums are the most + common usage, and no attributes other than \attr{name} and + \attr{comment} are supported for them. + + {\bf Extension enums} define the value of an enumerant inline in an + \tag{extensions} block. There are several variants, depending on which + additional tags are defined: + + \begin{itemize} + \item Attributes \attr{value} and (optionally) \attr{type} define a + constant value in the same fashion as an \tag{enum} tag in an + \tag{enums} block (see section~\ref{tag:enum}). + \item Attribute \attr{bitpos} defines a constant bitmask value in the + same fashion as an \tag{enum} tag in an \tag{enums} block (see + section~\ref{tag:enum}). + \item Attribute \attr{extends} allows an extension enumerant to be + added to a separately defined enumerated type whose name is + specified by the contents of the \attr{extends} attribute (e.g. + a \tag{type} tag with \attr{category} "enum", pulling in an + \tag{enums} block). + + There are two ways to extend an enumerated type: + + \begin{itemize} + \item If \attr{bitpos} is also specified, the tag defines a + bitmask value, but adds its definition to the enumeranted + type specified by \attr{extends} instead of as a + compile-time constant. + \item If \attr{offset} is also specified, the tag adds a new + enumerant value to the enumerated type specified by + \attr{extends}. The actual value defined depends on the + extension number (the \attr{number} attribute of the + \tag{extensions} tag) and the offset, as defined in the + ``Layers and Extensions'' appendix of the Vulkan + Specification. The \attr{dir} attribute may also be + specified as {\tt dir="-"} if the calculated value should + be negative instead of positive. Negative enumerant values + are normally used only for Vulkan error codes. + \end{itemize} + \end{itemize} + + Examples of various types of extension enumerants are given below in + section~\ref{tag:required:examples}. +\item \tag{type} specifies a required (or removed) type defined in a + \tag{types} block. Most types are picked up implicitly by using the + \tag{type} tags of commands, but in a few cases, additional types need + to be specified explicitly. It is unlikely that a type would ever be + removed, although this usage is allowed by the schema. The tag has no + content, but contains elements: + + \begin{itemize} + \item \attr{name} - required. Name of the type. + \item \attr{comment} - optional. Arbitrary string (unused). + \end{itemize} +\end{itemize} + + +\subsection{Examples of Extension Enumerants} +\label{tag:required:examples} + +Examples of each of the supported extension enumerant \tag{enum} tags are +given below. Note that extension enumerants are supported only inside +\tag{extension} blocks - not in \tag{feature} blocks\footnote{ + However, we will have to define additional XML tags and/or syntax for + future core versions of Vulkan, to properly tag and group core + enumerants for Vulkan 1.0, 1.1, etc.}. + +\begin{verbatim} + + + + + + + + + + + +\end{verbatim} + +The corresponding header file will include definitions like this: + +\begin{verbatim} +typedef enum VkResult { + + +\end{verbatim} + +Inside the \tag{feature} tag are nested multiple \tag{require} tags. These +are just being used as a logical grouping mechanism for related parts of +Vulkan 1.0 at present, though they may have more meaningful roles in the +future if different API profiles are defined. + + +\subsubsection{API Feature Walkthrough} + +This section walks through the first few required API features in the +\code{vk.xml} \tag{feature} tag, showing how each requirement pulls in type, +token, and command definitions and turns those into definitions in the C +header file \code{vulkan.h} . + +Consider the first few lines of the \tag{feature}: + +\begin{verbatim} + + + + + + + ... + + + + ... +\end{verbatim} + +The first \tag{require} block says to require a type named +\code{vk_platform}. If you look at the beginning of the \tag{types} section, +there's a corresponding definition: + + +\begin{verbatim} +#include "vk_platform.h" +#define VK_MAKE_VERSION(major, minor, patch) \ + ((major << 22) | (minor << 12) | patch) + ... +\end{verbatim} + +\noindent section which is invoked by the requirement and emits a bunch of +boilerplate C code. The explicit dependency isn't strictly required since +\code{vk_platform} will be required by many other types, but placing it +first causes this to appear first in the output file. + +Note that \code{vk_platform} does not correspond to an actual C type, but +instead to a collection of freeform preprocessor includes and macros and +comments. Most other \tag{type} tags do define a specific type and are much +simpler, but this approach can be used to inject arbitrary C into +\code{vulkan.h} {\bf when there's no other way}. In general inserting +arbitrary C is strongly discouraged outside of specific special cases like +this. + +The next \tag{require} block pulls in some compile-time constants. These +correspond to the definitions found in the first \tag{enums} section of +\code{vk.xml}: + +\begin{verbatim} + + + + + + + ... +\end{verbatim} + +The third \tag{require} block starts pulling in some Vulkan commands. The +first command corresponds to the following definition found in the +\tag{commands} section of \code{vk.xml}: + +\begin{verbatim} + + + VkResult vkCreateInstance + const VkInstanceCreateInfo* pCreateInfo + VkInstance* pInstance + + ... +\end{verbatim} + +In turn, the \tag{command} tag requires the \tag{type}s \code{VkResult}, +\code{VkInstanceCreateInfo}, and \code{VkInstance} as part of its +definition. The definitions of these types are determined as follows: + +For \code{VkResult}, the corresponding required \tag{type} is: + +\begin{verbatim} + +\end{verbatim} + +\noindent Since this is an enumeration type, it simply links to an +\tag{enums} tag with the same name: + +\begin{verbatim} + + + + + + ... +\end{verbatim} + +For \tag{VkInstanceCreateInfo}, the required \tag{type} is: + +\begin{verbatim} + + VkStructureType sType + const void* pNext + const VkApplicationInfo* pAppInfo + const VkAllocCallbacks* pAllocCb + uint32_t extensionCount + const char*const* ppEnabledExtensionNames + +\end{verbatim} + +\noindent This is a structure type, defining a C \code{struct} with all the +members defined in each \tag{member} tag in order. In addition, it requires +some other types, whose definitions are located by name in exactly the same +fashion. + +For the final direct dependency of the command, \code{VkInstance}, the +required \tag{type} is: + +\begin{verbatim} + +VK_DEFINE_BASE_HANDLE(VkObject) +VK_DEFINE_DISP_SUBCLASS_HANDLE(VkInstance, VkObject) +\end{verbatim} + +\noindent In this case, the type \code{VkInstance} is defined by a special +compile-time macro which defines it as a derived class of \code{VkObject} +(for C++) or a less typesafe definition for (for C). This macro isn't part +of the type dependency analysis, just the boilerplate used in the header. + +If these are the only \tag{feature} dependencies in \code{vk.xml}, the +resulting \code{vulkan.h} header will look like this: + +\begin{verbatim} + +#ifndef __vulkan_h_ +#define __vulkan_h_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2015-2016 The Khronos Group Inc. + ... +*/ + +/* +** This header is generated from the Khronos Vulkan XML API Registry. +** +** Generated on date 20160208 +*/ + + +#define VK_VERSION_1_0 1 +#include "vk_platform.h" +#define VK_MAKE_VERSION(major, minor, patch) \ + ((major << 22) | (minor << 12) | patch) + +// Vulkan API version supported by this file +#define VK_API_VERSION VK_MAKE_VERSION(0, 104, 0) + +#if defined (__cplusplus) && (VK_UINTPTRLEAST64_MAX == UINTPTR_MAX) + #define VK_TYPE_SAFE_COMPATIBLE_HANDLES 1 +#endif + +#if defined(VK_TYPE_SAFE_COMPATIBLE_HANDLES) && !defined(VK_DISABLE_TYPE_SAFE_HANDLES) + #define VK_DEFINE_PTR_HANDLE(_obj) struct _obj##_T { char _dummy; }; typedef _obj##_T* _obj; + #define VK_DEFINE_PTR_SUBCLASS_HANDLE(_obj, _base) struct _obj##_T : public _base##_T {}; typedef _obj##_T* _obj; + + #define VK_DEFINE_BASE_HANDLE(_obj) VK_DEFINE_PTR_HANDLE(_obj) + #define VK_DEFINE_DISP_SUBCLASS_HANDLE(_obj, _base) VK_DEFINE_PTR_SUBCLASS_HANDLE(_obj, _base) + #define VK_DEFINE_NONDISP_SUBCLASS_HANDLE(_obj, _base) VK_DEFINE_PTR_SUBCLASS_HANDLE(_obj, _base) +#else + #define VK_DEFINE_BASE_HANDLE(_obj) typedef VkUintPtrLeast64 _obj; + #define VK_DEFINE_DISP_SUBCLASS_HANDLE(_obj, _base) typedef uintptr_t _obj; + #define VK_DEFINE_NONDISP_SUBCLASS_HANDLE(_obj, _base) typedef VkUintPtrLeast64 _obj; +#endif + +typedef enum { + VK_SUCCESS = 0, + VK_UNSUPPORTED = 1, + VK_NOT_READY = 2, + ... +} VkResult; +typedef enum { + VK_STRUCTURE_TYPE_APPLICATION_INFO = 0, + ... +} VKStructureType; +typedef struct { + VkStructureType sType; + const void* pNext; + const char* pAppName; + uint32_t appVersion; + const char* pEngineName; + uint32_t engineVersion; + uint32_t apiVersion; +} VkApplicationInfo; +typedef enum { + VK_SYSTEM_ALLOC_TYPE_API_OBJECT = 0, + ... +} VkSystemAllocType; +typedef void* (VKAPI_PTR *PFN_vkAllocFunction)( + void* pUserData, + size_t size, + size_t alignment, + VkSystemAllocType allocType); +typedef void (VKAPI_PTR *PFN_vkFreeFunction)( + void* pUserData, + void* pMem); +typedef struct { + void* pUserData; + PFN_vkAllocFunction pfnAlloc; + PFN_vkFreeFunction pfnFree; +} VkAllocCallbacks; +typedef struct { + VkStructureType sType; + const void* pNext; + const VkApplicationInfo* pAppInfo; + const VkAllocCallbacks* pAllocCb; + uint32_t extensionCount; + const char*const* ppEnabledExtensionNames; +} VkInstanceCreateInfo; +VK_DEFINE_BASE_HANDLE(VkObject) +VK_DEFINE_DISP_SUBCLASS_HANDLE(VkInstance, VkObject) +#define VK_MAX_PHYSICAL_DEVICE_NAME 256 +#define VK_MAX_EXTENSION_NAME 256 +typedef VkResult (VKAPI_PTR *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, VkInstance* pInstance); +#ifdef VK_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance( + const VkInstanceCreateInfo* pCreateInfo, + VkInstance* pInstance); +#endif + +#ifdef __cplusplus +} +#endif + +#endif +\end{verbatim} + +Note that several additional types are pulled in by the type dependency +analysis, but only those types, commands, and tokens required by the +specified features are generated. + + +\subsection{How To Add A Compile-Time Constant} + +Go to the \tag{feature} tag and search for the nested block labelled + +\begin{verbatim} + +\end{verbatim} + +In this block, add an (appropriately indented) tag like + +\begin{verbatim} + +\end{verbatim} + +Then go to the \tag{enums} block labelled + +\begin{verbatim} + +\end{verbatim} + +In this block, add a tag whose \attr{name} attribute matches the \attr{name} +you defined above and whose \attr{value} attribute is the value to give the +constant: + +\begin{verbatim} + +\end{verbatim} + + +\subsection{How To Add A Struct or Union Type} + +For this example, assume we want to define a type +corresponding to a C \code{struct} defined as follows: + +\begin{verbatim} +typedef struct { + VkStructureType sType; + const void* pNext; + const VkApplicationInfo* pAppInfo; + const VkAllocCallbacks* pAllocCb; + uint32_t extensionCount; + const char*const* ppEnabledExtensionNames; +} VkInstanceCreateInfo; +\end{verbatim} + +If \code{VkInstanceCreateInfo} is the type of a parameter of a command in +the API, make sure that command's definition (see below for how to add a +command) puts \code{VkInstanceCreateInfo} in nested \tag{type} tags where +it's used. + +Otherwise, if the struct type is not used directly by a command in the API, +nor required by a chain of type dependencies for other commands, an explicit +\tag{type} dependency should be added to the \tag{feature} tag. Go to the +\tag{types} tag and search for the nested block labelled + +\begin{verbatim} + + ... +\end{verbatim} + +In this block, add a tag whose \attr{name} attribute matches the \attr{name} +of the struct type being defined: + +\begin{verbatim} + + + ... +\end{verbatim} + +Then go to the \tag{types} tag and add a new \tag{type} tag defining +the struct names and members, somewhere below +the corresponding comment, like this: + +\begin{verbatim} + + ... + + + VkStructureType + sType + const void* + pNext + const VkApplicationInfo* + pAppInfo + const VkAllocCallbacks* + pAllocCb + uint32_t + extensionCount + const char*const* + ppEnabledExtensionNames + + ... +\end{verbatim} + +If any of the member types are types also defined in the header, make sure +to enclose those type names in nested \tag{type} tags, as shown above. Basic +C types should not be tagged. + +If the type is a C \code{union}, rather than a \code{struct}, then set the +value of the \attr{category} attribute to \code{"union"} instead of +\code{"struct"}. + + +\subsection{How To Add An Enumerated Type} + +For this example, assume we want to define a type corresponding to a C +\code{enum} defined as follows: + +\begin{verbatim} +typedef enum { + VK_DEVICE_CREATE_VALIDATION_BIT = 0x00000001, + VK_DEVICE_CREATE_MULTI_DEVICE_IQ_MATCH_BIT = 0x00000002; +} VkDeviceCreateFlagBits. +\end{verbatim} + +If \code{VkDeviceCreateFlagBits} is the type of a parameter to a command in +the API, or of a member in a structure or union, make sure that command +parameter or struct member's definition puts \code{VkDeviceCreateFlagBits} +in nested \tag{type} tags where it's used. + +Otherwise, if the enumerated type is not used directly by a command in the +API, nor required by a chain of type dependencies for commands and structs, +an explicit \tag{type} dependency should be added to the \tag{feature} tag +in exactly the same fashion as described above for \code{struct} types. + +Next, go to the line labelled + +\begin{verbatim} + +\end{verbatim} + +Below this line, add an \tag{enums} tag whose \attr{name} attribute matches +the \tag{type} name \code{VkDeviceCreateFlagBits}, and whose contents +correspond to the individual fields of the enumerated type: + +\begin{verbatim} + + + + +\end{verbatim} + +Several other attributes of the \tag{enums} tag can be set. In this case, +the \attr{type} attribute is set to \code{"bitmask"}, indicating that the +individual enumerants represent elements of a bitmask. + +The individual \tag{enum} tags define the enumerants, just like the +definition for compile-time constants described above. In this case, because +the enumerants are bitfields, their values are specified using the +\attr{bitpos} attribute. The value of this attribute must be an integer in +the range $[0,31]$ specifying a single bit number, and the resulting value +is printed as a hexadecimal constant corresponding to that bit. + +It is also possible to specify enumerant values using the \attr{value} +attribute, in which case the specified numeric value is passed through to +the C header unchanged. + + +\subsection{How to Add A Command} + +For this example, assume we want to define the command: + +\begin{verbatim} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance( + const VkInstanceCreateInfo* pCreateInfo, + VkInstance* pInstance); +\end{verbatim} + +Commands must always be explicitly required in the \tag{feature} tag. In +that tag, you can use an existing \tag{require} block including API features +which the new command should be grouped with, or define a new block. For +this example, add a new block, and require the command by using the +\tag{command} tag inside that block: + +\begin{verbatim} + + + ... + + + + ... + +\end{verbatim} + +The \tag{require} block may include a \attr{comment} attribute whose value +is a descriptive comment of the contents required within that block. The +comment is not currently used in header generation, but might be in the +future, so use comments which are polite and meaningful to users of +\code{vulkan.h}. + +Then go to the \tag{commands} tag and add a new \tag{command} tag defining +the command, preferably sorted into alphabetic order with other commands for +ease of reading, as follows: + +\begin{verbatim} + + + ... + + VkResult + vkCreateInstance + const VkInstanceCreateInfo* + pCreateInfo + VkInstance* + pInstance + + ... + +\end{verbatim} + +The \tag{proto} tag defines the return type and function name of the +command. The \tag{param} tags define the command's parameters in the order +in which they're passed, including the parameter type and name. The contents +are laid out in the same way as the structure \tag{member} tags described +previously. + + +\subsection{More Complicated API Representations} + +The registry schema can represent a good deal of additional information, for +example by creating multiple \tag{feature} tags defining different API +versions and extensions. This capability is not yet relevant to Vulkan. +Those capabilities will be documented as they are needed. + + +\subsection{More Complicated Output Formats And Other Languages} + +The registry schema is oriented towards C-language APIs. Types and commands +are defined using syntax which is a subset of C, especially for structure +members and command parameters. It would be possible to use a +language-independent syntax for representing such information, but since we +are writing a C API, any such representation would have to be converted into +C anyway at some stage. + +The \code{vulkan.h} header is written using an {\bf output generator} object +in the Python scripts. This output generator is specialized for C, but the +design of the scripts is intended to support writing output generators for +other languages as well as purposes such as documentation (e.g. generating +Asciidoc fragments corresponding to types and commands for use in the API +specification and reference pages). When targeting other languages, the +amount of parsing required to convert type declarations into other languages +is small. However, it will probably be necessary to modify some of the +boilerplate C text, or specialize the tags by language, to support such +generators. + + +\subsection{Additional Semantic Tagging} + +The schema is being extended to support semantic tags describing +various properties of API features, such as: + +\begin{itemize} +\item constraints on allowed scalar values to function parameters (non-NULL, + normalized floating-point, etc.) +\item length of arrays corresponding to function pointer parameters +\item miscellaneous properties of commands such as whether the application + or system is responsible for threadsafe use; which queues they may be + issued on; whether they are aliases or otherwise related to other + commands; etc. +\end{itemize} + +These tags will be used by other tools for purposes such as helping create +validation layers, generating serialization code, and so on. We'd like to +eventually represent everything about the API that is amenable to automatic +processing within the registry schema. Please make suggestions on the Gitlab +issue tracker. + + +\subsection{Stability of the XML Database and Schema} +\label{general:stability} + +The Vulkan XML schema is evolving in response to corresponding +changes in the Vulkan API and ecosystem. Most such change will probably be +confined to adding attributes to existing tags and properly expressing the +relationships to them, and making API changes corresponding to accepted +feature requests. Changes to the schema should be described in the change +log of this document (see section~\ref{changelog}). Changes to the +\code{.xml} files and Python scripts are logged in Gitlab history. + + +\section{Change Log} +\label{changelog} + +\begin{itemize} +\item 2016/02/07 - Add \attr{vendorids} tags for Khronos vendor IDs. +\item 2015/12/10 - Add \attr{author} and \attr{contact} attributes for + \tag{extension} tags. +\item 2015/12/07 - Move \code{vulkan/vulkan.h} to a subdirectory. +\item 2015/12/01 - Add \tag{tags} tags for author tags. +\item 2015/11/18 - Bring documentation and schema up to date for extension + enumerants. +\item 2015/11/02 - Bring documentation and schema up to date with several + recent merges, including \tag{validity} tags. Still out of date WRT + extension enumerants, but that will change soon. +\item 2015/09/08 - Rename {\tt threadsafe} attribute to \attr{externsync}, + and {\tt implicitunsafeparams} tag to \attr{implicitexternsync}. +\item 2015/09/07 - Update \tag{command} tag description to remove the + \attr{threadsafe} attribute and replace it with a combination of + \attr{threadunsafe} attributes on individual parameters, and + \tag{implicitunsafeparams} tags describing additional unsafe objects + for the command. +\item 2015/08/04 - Add \code{basetype} and \code{funcpointer} + \attr{category} values for type tags, and explain the intended use and + order in which types in each category are emitted. +\item 2015/07/02 - Update description of Makefile targets. Add + descriptions of \attr{threadsafe}, \attr{queues}, and + \attr{renderpass} attributes of \tag{command} tags in + section~\ref{tag:command}, and of \attr{modified} attributes of + \tag{param} tags in section~\ref{tag:command:param} +\item 2015/06/17 - add descriptions of allowed \attr{category} attribute + values of \tag{type} tags, used to group and sort related categories + of declarations together in the generated header. +\item 2015/06/04 - Add examples of making changes and additions to the + registry in appendix~\ref{examples}. +\item 2015/06/03 - Move location to new ``vulkan'' Git repository. Add + definition of \tag{type} tags for C struct/unions. Start adding + examples of making changes in appendix~\ref{examples}. +\item 2015/06/02 - Branch from OpenGL specfile documentation and bring up to + date with current Vulkan schema. +\end{itemize} + +% \input{readme.ind} + +% \printindex + +\end{document} diff --git a/src/spec/realign.py b/src/spec/realign.py new file mode 100755 index 00000000..c37527e4 --- /dev/null +++ b/src/spec/realign.py @@ -0,0 +1,65 @@ +#!/usr/bin/python3 +# +# Copyright (c) 2013-2016 The Khronos Group Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and/or associated documentation files (the +# "Materials"), to deal in the Materials without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Materials, and to +# permit persons to whom the Materials are furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Materials. +# +# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +# Usage: realign [infile] > outfile +# Used to realign XML tags in the Vulkan registry after it's operated on by +# some other filter, since whitespace inside a tag isn't part of the +# internal representation. + +import copy, sys, string, re + +def realignXML(fp): + patterns = [ + [ '(^ *\ with no attribute will match +# will match +# will not match +# Possible match conditions: +# Requested Element +# Profile Profile +# --------- -------- +# None None Always matches +# 'string' None Always matches +# None 'string' Does not match. Can't generate multiple APIs +# or profiles, so if an API/profile constraint +# is present, it must be asked for explicitly. +# 'string' 'string' Strings must match +# +# ** In the future, we will allow regexes for the attributes, +# not just strings, so that api="^(gl|gles2)" will match. Even +# this isn't really quite enough, we might prefer something +# like "gl(core)|gles1(common-lite)". +def matchAPIProfile(api, profile, elem): + """Match a requested API & profile name to a api & profile attributes of an Element""" + match = True + # Match 'api', if present + if ('api' in elem.attrib): + if (api == None): + raise UserWarning("No API requested, but 'api' attribute is present with value '" + + elem.get('api') + "'") + elif (api != elem.get('api')): + # Requested API doesn't match attribute + return False + if ('profile' in elem.attrib): + if (profile == None): + raise UserWarning("No profile requested, but 'profile' attribute is present with value '" + + elem.get('profile') + "'") + elif (profile != elem.get('profile')): + # Requested profile doesn't match attribute + return False + return True + +# BaseInfo - base class for information about a registry feature +# (type/group/enum/command/API/extension). +# required - should this feature be defined during header generation +# (has it been removed by a profile or version)? +# declared - has this feature been defined already? +# elem - lxml.etree Element for this feature +# resetState() - reset required/declared to initial values. Used +# prior to generating a new API interface. +class BaseInfo: + """Represents the state of a registry feature, used during API generation""" + def __init__(self, elem): + self.required = False + self.declared = False + self.elem = elem + def resetState(self): + self.required = False + self.declared = False + +# TypeInfo - registry information about a type. No additional state +# beyond BaseInfo is required. +class TypeInfo(BaseInfo): + """Represents the state of a registry type""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + +# GroupInfo - registry information about a group of related enums +# in an block, generally corresponding to a C "enum" type. +class GroupInfo(BaseInfo): + """Represents the state of a registry group""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + +# EnumInfo - registry information about an enum +# type - numeric type of the value of the tag +# ( '' for GLint, 'u' for GLuint, 'ull' for GLuint64 ) +class EnumInfo(BaseInfo): + """Represents the state of a registry enum""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + self.type = elem.get('type') + if (self.type == None): + self.type = '' + +# CmdInfo - registry information about a command +class CmdInfo(BaseInfo): + """Represents the state of a registry command""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + +# FeatureInfo - registry information about an API +# or +# name - feature name string (e.g. 'VK_KHR_surface') +# version - feature version number (e.g. 1.2). +# features are unversioned and assigned version number 0. +# ** This is confusingly taken from the 'number' attribute of . +# Needs fixing. +# number - extension number, used for ordering and for +# assigning enumerant offsets. features do +# not have extension numbers and are assigned number 0. +# category - category, e.g. VERSION or khr/vendor tag +# emit - has this feature been defined already? +class FeatureInfo(BaseInfo): + """Represents the state of an API feature (version/extension)""" + def __init__(self, elem): + BaseInfo.__init__(self, elem) + self.name = elem.get('name') + # Determine element category (vendor). Only works + # for elements. + if (elem.tag == 'feature'): + self.category = 'VERSION' + self.version = elem.get('number') + self.number = "0" + self.supported = None + else: + self.category = self.name.split('_', 2)[1] + self.version = "0" + self.number = elem.get('number') + self.supported = elem.get('supported') + self.emit = False + +from generator import write, GeneratorOptions, OutputGenerator + +# Registry - object representing an API registry, loaded from an XML file +# Members +# tree - ElementTree containing the root +# typedict - dictionary of TypeInfo objects keyed by type name +# groupdict - dictionary of GroupInfo objects keyed by group name +# enumdict - dictionary of EnumInfo objects keyed by enum name +# cmddict - dictionary of CmdInfo objects keyed by command name +# apidict - dictionary of Elements keyed by API name +# extensions - list of Elements +# extdict - dictionary of Elements keyed by extension name +# gen - OutputGenerator object used to write headers / messages +# genOpts - GeneratorOptions object used to control which +# fetures to write and how to format them +# emitFeatures - True to actually emit features for a version / extension, +# or False to just treat them as emitted +# Public methods +# loadElementTree(etree) - load registry from specified ElementTree +# loadFile(filename) - load registry from XML file +# setGenerator(gen) - OutputGenerator to use +# parseTree() - parse the registry once loaded & create dictionaries +# dumpReg(maxlen, filehandle) - diagnostic to dump the dictionaries +# to specified file handle (default stdout). Truncates type / +# enum / command elements to maxlen characters (default 80) +# generator(g) - specify the output generator object +# apiGen(apiname, genOpts) - generate API headers for the API type +# and profile specified in genOpts, but only for the versions and +# extensions specified there. +# apiReset() - call between calls to apiGen() to reset internal state +# Private methods +# addElementInfo(elem,info,infoName,dictionary) - add feature info to dict +# lookupElementInfo(fname,dictionary) - lookup feature info in dict +class Registry: + """Represents an API registry loaded from XML""" + def __init__(self): + self.tree = None + self.typedict = {} + self.groupdict = {} + self.enumdict = {} + self.cmddict = {} + self.apidict = {} + self.extensions = [] + self.extdict = {} + # A default output generator, so commands prior to apiGen can report + # errors via the generator object. + self.gen = OutputGenerator() + self.genOpts = None + self.emitFeatures = False + def loadElementTree(self, tree): + """Load ElementTree into a Registry object and parse it""" + self.tree = tree + self.parseTree() + def loadFile(self, file): + """Load an API registry XML file into a Registry object and parse it""" + self.tree = etree.parse(file) + self.parseTree() + def setGenerator(self, gen): + """Specify output generator object. None restores the default generator""" + self.gen = gen + self.gen.setRegistry(self.tree) + + # addElementInfo - add information about an element to the + # corresponding dictionary + # elem - ///// Element + # info - corresponding {Type|Group|Enum|Cmd|Feature}Info object + # infoName - 'type' / 'group' / 'enum' / 'command' / 'feature' / 'extension' + # dictionary - self.{type|group|enum|cmd|api|ext}dict + # If the Element has an 'api' attribute, the dictionary key is the + # tuple (name,api). If not, the key is the name. 'name' is an + # attribute of the Element + def addElementInfo(self, elem, info, infoName, dictionary): + if ('api' in elem.attrib): + key = (elem.get('name'),elem.get('api')) + else: + key = elem.get('name') + if key in dictionary: + self.gen.logMsg('warn', '*** Attempt to redefine', + infoName, 'with key:', key) + else: + dictionary[key] = info + # + # lookupElementInfo - find a {Type|Enum|Cmd}Info object by name. + # If an object qualified by API name exists, use that. + # fname - name of type / enum / command + # dictionary - self.{type|enum|cmd}dict + def lookupElementInfo(self, fname, dictionary): + key = (fname, self.genOpts.apiname) + if (key in dictionary): + # self.gen.logMsg('diag', 'Found API-specific element for feature', fname) + return dictionary[key] + elif (fname in dictionary): + # self.gen.logMsg('diag', 'Found generic element for feature', fname) + return dictionary[fname] + else: + return None + def parseTree(self): + """Parse the registry Element, once created""" + # This must be the Element for the root + self.reg = self.tree.getroot() + # + # Create dictionary of registry types from toplevel tags + # and add 'name' attribute to each tag (where missing) + # based on its element. + # + # There's usually one block; more are OK + # Required attributes: 'name' or nested tag contents + self.typedict = {} + for type in self.reg.findall('types/type'): + # If the doesn't already have a 'name' attribute, set + # it from contents of its tag. + if (type.get('name') == None): + type.attrib['name'] = type.find('name').text + self.addElementInfo(type, TypeInfo(type), 'type', self.typedict) + # + # Create dictionary of registry enum groups from tags. + # + # Required attributes: 'name'. If no name is given, one is + # generated, but that group can't be identified and turned into an + # enum type definition - it's just a container for tags. + self.groupdict = {} + for group in self.reg.findall('enums'): + self.addElementInfo(group, GroupInfo(group), 'group', self.groupdict) + # + # Create dictionary of registry enums from tags + # + # tags usually define different namespaces for the values + # defined in those tags, but the actual names all share the + # same dictionary. + # Required attributes: 'name', 'value' + # For containing which have type="enum" or type="bitmask", + # tag all contained s are required. This is a stopgap until + # a better scheme for tagging core and extension enums is created. + self.enumdict = {} + for enums in self.reg.findall('enums'): + required = (enums.get('type') != None) + for enum in enums.findall('enum'): + enumInfo = EnumInfo(enum) + enumInfo.required = required + self.addElementInfo(enum, enumInfo, 'enum', self.enumdict) + # + # Create dictionary of registry commands from tags + # and add 'name' attribute to each tag (where missing) + # based on its element. + # + # There's usually only one block; more are OK. + # Required attributes: 'name' or tag contents + self.cmddict = {} + for cmd in self.reg.findall('commands/command'): + # If the doesn't already have a 'name' attribute, set + # it from contents of its tag. + if (cmd.get('name') == None): + cmd.attrib['name'] = cmd.find('proto/name').text + ci = CmdInfo(cmd) + self.addElementInfo(cmd, ci, 'command', self.cmddict) + # + # Create dictionaries of API and extension interfaces + # from toplevel and tags. + # + self.apidict = {} + for feature in self.reg.findall('feature'): + featureInfo = FeatureInfo(feature) + self.addElementInfo(feature, featureInfo, 'feature', self.apidict) + self.extensions = self.reg.findall('extensions/extension') + self.extdict = {} + for feature in self.extensions: + featureInfo = FeatureInfo(feature) + self.addElementInfo(feature, featureInfo, 'extension', self.extdict) + + # Add additional enums defined only in tags + # to the corresponding core type. + # When seen here, a copy, processed to contain the numeric enum + # value, is added to the corresponding element, as well + # as adding to the enum dictionary. Also add a 'extnumber' + # attribute containing the extension number. + # + # For tags which are actually just constants, if there's + # no 'extends' tag but there is a 'value' or 'bitpos' tag, just + # add an EnumInfo record to the dictionary. That works because + # output generation of constants is purely dependency-based, and + # doesn't need to iterate through the XML tags. + # + # Something like this will need to be done for 'feature's up + # above, if we use the same mechanism for adding to the core + # API in 1.1. + for enum in feature.findall('require/enum'): + addEnumInfo = False + groupName = enum.get('extends') + if (groupName != None): + # self.gen.logMsg('diag', '*** Found extension enum', + # enum.get('name')) + # Add extension number attribute to the element + enum.attrib['extnumber'] = featureInfo.number + enum.attrib['extname'] = featureInfo.name + enum.attrib['supported'] = featureInfo.supported + # Look up the GroupInfo with matching groupName + if (groupName in self.groupdict.keys()): + # self.gen.logMsg('diag', '*** Matching group', + # groupName, 'found, adding element...') + gi = self.groupdict[groupName] + gi.elem.append(enum) + else: + self.gen.logMsg('warn', '*** NO matching group', + groupName, 'for enum', enum.get('name'), 'found.') + addEnumInfo = True + elif (enum.get('value') or enum.get('bitpos')): + # self.gen.logMsg('diag', '*** Adding extension constant "enum"', + # enum.get('name')) + addEnumInfo = True + if (addEnumInfo): + enumInfo = EnumInfo(enum) + self.addElementInfo(enum, enumInfo, 'enum', self.enumdict) + def dumpReg(self, maxlen = 40, filehandle = sys.stdout): + """Dump all the dictionaries constructed from the Registry object""" + write('***************************************', file=filehandle) + write(' ** Dumping Registry contents **', file=filehandle) + write('***************************************', file=filehandle) + write('// Types', file=filehandle) + for name in self.typedict: + tobj = self.typedict[name] + write(' Type', name, '->', etree.tostring(tobj.elem)[0:maxlen], file=filehandle) + write('// Groups', file=filehandle) + for name in self.groupdict: + gobj = self.groupdict[name] + write(' Group', name, '->', etree.tostring(gobj.elem)[0:maxlen], file=filehandle) + write('// Enums', file=filehandle) + for name in self.enumdict: + eobj = self.enumdict[name] + write(' Enum', name, '->', etree.tostring(eobj.elem)[0:maxlen], file=filehandle) + write('// Commands', file=filehandle) + for name in self.cmddict: + cobj = self.cmddict[name] + write(' Command', name, '->', etree.tostring(cobj.elem)[0:maxlen], file=filehandle) + write('// APIs', file=filehandle) + for key in self.apidict: + write(' API Version ', key, '->', + etree.tostring(self.apidict[key].elem)[0:maxlen], file=filehandle) + write('// Extensions', file=filehandle) + for key in self.extdict: + write(' Extension', key, '->', + etree.tostring(self.extdict[key].elem)[0:maxlen], file=filehandle) + # write('***************************************', file=filehandle) + # write(' ** Dumping XML ElementTree **', file=filehandle) + # write('***************************************', file=filehandle) + # write(etree.tostring(self.tree.getroot(),pretty_print=True), file=filehandle) + # + # typename - name of type + # required - boolean (to tag features as required or not) + def markTypeRequired(self, typename, required): + """Require (along with its dependencies) or remove (but not its dependencies) a type""" + self.gen.logMsg('diag', '*** tagging type:', typename, '-> required =', required) + # Get TypeInfo object for tag corresponding to typename + type = self.lookupElementInfo(typename, self.typedict) + if (type != None): + if (required): + # Tag type dependencies in 'required' attributes as + # required. This DOES NOT un-tag dependencies in a + # tag. See comments in markRequired() below for the reason. + if ('requires' in type.elem.attrib): + depType = type.elem.get('requires') + self.gen.logMsg('diag', '*** Generating dependent type', + depType, 'for type', typename) + self.markTypeRequired(depType, required) + # Tag types used in defining this type (e.g. in nested + # tags) + # Look for in entire tree, + # not just immediate children + for subtype in type.elem.findall('.//type'): + self.gen.logMsg('diag', '*** markRequired: type requires dependent ', subtype.text) + self.markTypeRequired(subtype.text, required) + # Tag enums used in defining this type, for example in + # member[MEMBER_SIZE] + for subenum in type.elem.findall('.//enum'): + self.gen.logMsg('diag', '*** markRequired: type requires dependent ', subenum.text) + self.markEnumRequired(subenum.text, required) + type.required = required + else: + self.gen.logMsg('warn', '*** type:', typename , 'IS NOT DEFINED') + # + # enumname - name of enum + # required - boolean (to tag features as required or not) + def markEnumRequired(self, enumname, required): + self.gen.logMsg('diag', '*** tagging enum:', enumname, '-> required =', required) + enum = self.lookupElementInfo(enumname, self.enumdict) + if (enum != None): + enum.required = required + else: + self.gen.logMsg('warn', '*** enum:', enumname , 'IS NOT DEFINED') + # + # features - Element for or tag + # required - boolean (to tag features as required or not) + def markRequired(self, features, required): + """Require or remove features specified in the Element""" + self.gen.logMsg('diag', '*** markRequired (features = , required =', required, ')') + # Loop over types, enums, and commands in the tag + # @@ It would be possible to respect 'api' and 'profile' attributes + # in individual features, but that's not done yet. + for typeElem in features.findall('type'): + self.markTypeRequired(typeElem.get('name'), required) + for enumElem in features.findall('enum'): + self.markEnumRequired(enumElem.get('name'), required) + for cmdElem in features.findall('command'): + name = cmdElem.get('name') + self.gen.logMsg('diag', '*** tagging command:', name, '-> required =', required) + cmd = self.lookupElementInfo(name, self.cmddict) + if (cmd != None): + cmd.required = required + # Tag all parameter types of this command as required. + # This DOES NOT remove types of commands in a + # tag, because many other commands may use the same type. + # We could be more clever and reference count types, + # instead of using a boolean. + if (required): + # Look for in entire tree, + # not just immediate children + for type in cmd.elem.findall('.//type'): + self.gen.logMsg('diag', '*** markRequired: command implicitly requires dependent type', type.text) + self.markTypeRequired(type.text, required) + else: + self.gen.logMsg('warn', '*** command:', name, 'IS NOT DEFINED') + # + # interface - Element for or , containing + # and tags + # api - string specifying API name being generated + # profile - string specifying API profile being generated + def requireAndRemoveFeatures(self, interface, api, profile): + """Process and tags for a or """ + # marks things that are required by this version/profile + for feature in interface.findall('require'): + if (matchAPIProfile(api, profile, feature)): + self.markRequired(feature,True) + # marks things that are removed by this version/profile + for feature in interface.findall('remove'): + if (matchAPIProfile(api, profile, feature)): + self.markRequired(feature,False) + # + # generateFeature - generate a single type / enum group / enum / command, + # and all its dependencies as needed. + # fname - name of feature (//) + # ftype - type of feature, 'type' | 'enum' | 'command' + # dictionary - of *Info objects - self.{type|enum|cmd}dict + def generateFeature(self, fname, ftype, dictionary): + f = self.lookupElementInfo(fname, dictionary) + if (f == None): + # No such feature. This is an error, but reported earlier + self.gen.logMsg('diag', '*** No entry found for feature', fname, + 'returning!') + return + # + # If feature isn't required, or has already been declared, return + if (not f.required): + self.gen.logMsg('diag', '*** Skipping', ftype, fname, '(not required)') + return + if (f.declared): + self.gen.logMsg('diag', '*** Skipping', ftype, fname, '(already declared)') + return + # Always mark feature declared, as though actually emitted + f.declared = True + # + # Pull in dependent declaration(s) of the feature. + # For types, there may be one type in the 'required' attribute of + # the element, as well as many in imbedded and tags + # within the element. + # For commands, there may be many in tags within the element. + # For enums, no dependencies are allowed (though perhaps if you + # have a uint64 enum, it should require GLuint64). + genProc = None + if (ftype == 'type'): + genProc = self.gen.genType + if ('requires' in f.elem.attrib): + depname = f.elem.get('requires') + self.gen.logMsg('diag', '*** Generating required dependent type', + depname) + self.generateFeature(depname, 'type', self.typedict) + for subtype in f.elem.findall('.//type'): + self.gen.logMsg('diag', '*** Generating required dependent ', + subtype.text) + self.generateFeature(subtype.text, 'type', self.typedict) + for subtype in f.elem.findall('.//enum'): + self.gen.logMsg('diag', '*** Generating required dependent ', + subtype.text) + self.generateFeature(subtype.text, 'enum', self.enumdict) + # If the type is an enum group, look up the corresponding + # group in the group dictionary and generate that instead. + if (f.elem.get('category') == 'enum'): + self.gen.logMsg('diag', '*** Type', fname, 'is an enum group, so generate that instead') + group = self.lookupElementInfo(fname, self.groupdict) + if (group == None): + # Unless this is tested for, it's probably fatal to call below + genProc = None + self.logMsg('warn', '*** NO MATCHING ENUM GROUP FOUND!!!') + else: + genProc = self.gen.genGroup + f = group + elif (ftype == 'command'): + genProc = self.gen.genCmd + for type in f.elem.findall('.//type'): + depname = type.text + self.gen.logMsg('diag', '*** Generating required parameter type', + depname) + self.generateFeature(depname, 'type', self.typedict) + elif (ftype == 'enum'): + genProc = self.gen.genEnum + # Actually generate the type only if emitting declarations + if self.emitFeatures: + self.gen.logMsg('diag', '*** Emitting', ftype, 'decl for', fname) + genProc(f, fname) + else: + self.gen.logMsg('diag', '*** Skipping', ftype, fname, + '(not emitting this feature)') + # + # generateRequiredInterface - generate all interfaces required + # by an API version or extension + # interface - Element for or + def generateRequiredInterface(self, interface): + """Generate required C interface for specified API version/extension""" + # + # Loop over all features inside all tags. + # tags are ignored (handled in pass 1). + for features in interface.findall('require'): + for t in features.findall('type'): + self.generateFeature(t.get('name'), 'type', self.typedict) + for e in features.findall('enum'): + self.generateFeature(e.get('name'), 'enum', self.enumdict) + for c in features.findall('command'): + self.generateFeature(c.get('name'), 'command', self.cmddict) + # + # apiGen(genOpts) - generate interface for specified versions + # genOpts - GeneratorOptions object with parameters used + # by the Generator object. + def apiGen(self, genOpts): + """Generate interfaces for the specified API type and range of versions""" + # + self.gen.logMsg('diag', '*******************************************') + self.gen.logMsg('diag', ' Registry.apiGen file:', genOpts.filename, + 'api:', genOpts.apiname, + 'profile:', genOpts.profile) + self.gen.logMsg('diag', '*******************************************') + # + self.genOpts = genOpts + # Reset required/declared flags for all features + self.apiReset() + # + # Compile regexps used to select versions & extensions + regVersions = re.compile(self.genOpts.versions) + regEmitVersions = re.compile(self.genOpts.emitversions) + regAddExtensions = re.compile(self.genOpts.addExtensions) + regRemoveExtensions = re.compile(self.genOpts.removeExtensions) + # + # Get all matching API versions & add to list of FeatureInfo + features = [] + apiMatch = False + for key in self.apidict: + fi = self.apidict[key] + api = fi.elem.get('api') + if (api == self.genOpts.apiname): + apiMatch = True + if (regVersions.match(fi.version)): + # Matches API & version #s being generated. Mark for + # emission and add to the features[] list . + # @@ Could use 'declared' instead of 'emit'? + fi.emit = (regEmitVersions.match(fi.version) != None) + features.append(fi) + if (not fi.emit): + self.gen.logMsg('diag', '*** NOT tagging feature api =', api, + 'name =', fi.name, 'version =', fi.version, + 'for emission (does not match emitversions pattern)') + else: + self.gen.logMsg('diag', '*** NOT including feature api =', api, + 'name =', fi.name, 'version =', fi.version, + '(does not match requested versions)') + else: + self.gen.logMsg('diag', '*** NOT including feature api =', api, + 'name =', fi.name, + '(does not match requested API)') + if (not apiMatch): + self.gen.logMsg('warn', '*** No matching API versions found!') + # + # Get all matching extensions, in order by their extension number, + # and add to the list of features. + # Start with extensions tagged with 'api' pattern matching the API + # being generated. Add extensions matching the pattern specified in + # regExtensions, then remove extensions matching the pattern + # specified in regRemoveExtensions + for (extName,ei) in sorted(self.extdict.items(),key = lambda x : x[1].number): + extName = ei.name + include = False + # + # Include extension if defaultExtensions is not None and if the + # 'supported' attribute matches defaultExtensions. The regexp in + # 'supported' must exactly match defaultExtensions, so bracket + # it with ^(pat)$. + pat = '^(' + ei.elem.get('supported') + ')$' + if (self.genOpts.defaultExtensions and + re.match(pat, self.genOpts.defaultExtensions)): + self.gen.logMsg('diag', '*** Including extension', + extName, "(defaultExtensions matches the 'supported' attribute)") + include = True + # + # Include additional extensions if the extension name matches + # the regexp specified in the generator options. This allows + # forcing extensions into an interface even if they're not + # tagged appropriately in the registry. + if (regAddExtensions.match(extName) != None): + self.gen.logMsg('diag', '*** Including extension', + extName, '(matches explicitly requested extensions to add)') + include = True + # Remove extensions if the name matches the regexp specified + # in generator options. This allows forcing removal of + # extensions from an interface even if they're tagged that + # way in the registry. + if (regRemoveExtensions.match(extName) != None): + self.gen.logMsg('diag', '*** Removing extension', + extName, '(matches explicitly requested extensions to remove)') + include = False + # + # If the extension is to be included, add it to the + # extension features list. + if (include): + ei.emit = True + features.append(ei) + else: + self.gen.logMsg('diag', '*** NOT including extension', + extName, '(does not match api attribute or explicitly requested extensions)') + # + # Sort the extension features list, if a sort procedure is defined + if (self.genOpts.sortProcedure): + self.genOpts.sortProcedure(features) + # + # Pass 1: loop over requested API versions and extensions tagging + # types/commands/features as required (in an block) or no + # longer required (in an block). It is possible to remove + # a feature in one version and restore it later by requiring it in + # a later version. + # If a profile other than 'None' is being generated, it must + # match the profile attribute (if any) of the and + # tags. + self.gen.logMsg('diag', '*** PASS 1: TAG FEATURES ********************************************') + for f in features: + self.gen.logMsg('diag', '*** PASS 1: Tagging required and removed features for', + f.name) + self.requireAndRemoveFeatures(f.elem, self.genOpts.apiname, self.genOpts.profile) + # + # Pass 2: loop over specified API versions and extensions printing + # declarations for required things which haven't already been + # generated. + self.gen.logMsg('diag', '*** PASS 2: GENERATE INTERFACES FOR FEATURES ************************') + self.gen.beginFile(self.genOpts) + for f in features: + self.gen.logMsg('diag', '*** PASS 2: Generating interface for', + f.name) + emit = self.emitFeatures = f.emit + if (not emit): + self.gen.logMsg('diag', '*** PASS 2: NOT declaring feature', + f.elem.get('name'), 'because it is not tagged for emission') + # Generate the interface (or just tag its elements as having been + # emitted, if they haven't been). + self.gen.beginFeature(f.elem, emit) + self.generateRequiredInterface(f.elem) + self.gen.endFeature() + self.gen.endFile() + # + # apiReset - use between apiGen() calls to reset internal state + # + def apiReset(self): + """Reset type/enum/command dictionaries before generating another API""" + for type in self.typedict: + self.typedict[type].resetState() + for enum in self.enumdict: + self.enumdict[enum].resetState() + for cmd in self.cmddict: + self.cmddict[cmd].resetState() + for cmd in self.apidict: + self.apidict[cmd].resetState() + # + # validateGroups - check that group= attributes match actual groups + # + def validateGroups(self): + """Validate group= attributes on and tags""" + # Keep track of group names not in tags + badGroup = {} + self.gen.logMsg('diag', '*** VALIDATING GROUP ATTRIBUTES ***') + for cmd in self.reg.findall('commands/command'): + proto = cmd.find('proto') + funcname = cmd.find('proto/name').text + if ('group' in proto.attrib.keys()): + group = proto.get('group') + # self.gen.logMsg('diag', '*** Command ', funcname, ' has return group ', group) + if (group not in self.groupdict.keys()): + # self.gen.logMsg('diag', '*** Command ', funcname, ' has UNKNOWN return group ', group) + if (group not in badGroup.keys()): + badGroup[group] = 1 + else: + badGroup[group] = badGroup[group] + 1 + for param in cmd.findall('param'): + pname = param.find('name') + if (pname != None): + pname = pname.text + else: + pname = type.get('name') + if ('group' in param.attrib.keys()): + group = param.get('group') + if (group not in self.groupdict.keys()): + # self.gen.logMsg('diag', '*** Command ', funcname, ' param ', pname, ' has UNKNOWN group ', group) + if (group not in badGroup.keys()): + badGroup[group] = 1 + else: + badGroup[group] = badGroup[group] + 1 + if (len(badGroup.keys()) > 0): + self.gen.logMsg('diag', '*** SUMMARY OF UNRECOGNIZED GROUPS ***') + for key in sorted(badGroup.keys()): + self.gen.logMsg('diag', ' ', key, ' occurred ', badGroup[key], ' times') diff --git a/src/spec/registry.rnc b/src/spec/registry.rnc new file mode 100644 index 00000000..0eb45024 --- /dev/null +++ b/src/spec/registry.rnc @@ -0,0 +1,425 @@ +# Copyright (c) 2013-2016 The Khronos Group Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and/or associated documentation files (the +# "Materials"), to deal in the Materials without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Materials, and to +# permit persons to whom the Materials are furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Materials. +# +# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +# Relax NG schema for Khronos Vulkan API Registry XML +# +# See https://www.khronos.org/vulkan/ +# +# This definition is subject to change (mostly in the form of additions) + +namespace xsd = "http://www.w3.org/2001/XMLSchema-datatypes" + +# Toplevel is a tag. +# May be led by an optional tag containing e.g. copyrights. +start = element registry { + ( + element comment { text } ? | + Vendorids * | + Tags * | + Types * | + Enums * | + Commands * | + Feature * | + Extensions * + ) * +} + +# defines a group of vendor IDs +Vendorids = element vendorids { + Vendorid * +} + +# defines a single vendor ID. +# name - author ID of the vendor +# id - Khronos vendor ID +# comment - unused +Tag = element tag { + attribute name { text } , + attribute author { text } , + Comment ? +} + +# defines a group of author tags +Tags = element tags { + Tag * +} + +# defines a single author tag. +# name - name of the tag +# author - name of the author (usually a company or project name) +# contact - contact responsible for the tag (name and contact information) +Tag = element tag { + attribute name { text } , + attribute author { text } , + attribute contact { text } +} + +# defines a group of types +Types = element types { + Type * +} + +# defines a single type. It is usually a C typedef but +# may contain arbitrary C code. +# name - name of this type, if not present in the tag +# api - matches a api attribute, if present +# requires - name of another type definition required by this one +# category - if present, "enum" indicates a matching +# block to generate an enumerated type for, and "struct" +# causes special interpretation of the contents of the type +# tag including ... TBD ... +# Other allowed values are "include", "define", "handle" and "bitfield" +# which don't change syntactic interpretation but allow organization in +# the generated header. +# comment - unused +# parent - only applicable if category is "handle". Notes another type with +# the "handle" category that acts as a parent object for this type. +# returnedonly - only applicable if category is "struct". Notes that this +# struct is going to be filled in by the API, rather than an application +# filling it out and passing it to the API. +# For types without a category, contents include +# - substitutes for an APIENTRY-style macro on output +# - contains name of the type being defined +# - contains name of types used to define this type. There +# may be multiple imbedded tags +# For types with category "enum", contents should be empty +# For types with category "struct", contents should be one or more +# - like for a struct or union member +# len - if the member is an array, len may be one or more of the following +# things, separated by commas (one for each array indirection): another +# member of that struct, 'null-terminated' for a string, '1' to indicate it's +# just a pointer (used for nested pointers), or a latex equation (prefixed with +# 'latex:') +# externsync - denotes that the member should be externally synchronized +# when accessed by Vulkan +# optional - whether this value can be omitted by providing NULL (for +# pointers), VK_NULL_HANDLE (for handles) or 0 (for bitmasks/values) +# noautovalidity - tag stating that no automatic validity language should be generated +# +# *** There's a problem here: I'm not sure how to represent the +# syntax where it may contain arbitrarily interleaved text, , and +# child tags. This allows only the syntax +# text name text name text +# where and are both optional and occur in the specified +# order, which might eventually be a problem. +Type = element type { + attribute api { text } ? , + attribute requires { text } ? , + attribute name { TypeName } ? , + attribute category { text } ? , + attribute parent { TypeName } ? , + attribute returnedonly { text } ? , + Comment ? , + ( + ( + ( text , + element type { text } * + ) * , + element apientry { text } ? , + ( text , + element type { text } * + ) * , + element name { TypeName } ? , + ( text , + element type { text } * + ) * + ) | + ( + element member { + attribute len { text } ? , + attribute externsync { text } ? , + attribute optional { text } ? , + attribute noautovalidity { text } ? , + mixed { + element type { TypeName } ? , + element name { text }, + element enum { EnumName } ? + } + } * , + Validity ? + ) + ) +} + +# defines a group of enumerants +# name - identifies a type name associated with this group. Should +# match a name to trigger generation of the type. +# start, end - beginning and end of a numeric range +# vendor - owner of the numeric range +# expand - if present, add boilerplate (prefixed by the attribute value) +# expanding enum type to int32 and defining start/end elements based +# on contained tags +# type - "enum" or "bitmask", if present +# comment - unused +Enums = element enums { + attribute name { text } ? , + attribute type { text } ? , + attribute start { Integer } ? , + attribute end { Integer } ? , + attribute expand { text } ? , + Vendor ? , + Comment ? , + (Enum | Unused) * +} + +# defines or references a single enumerant. There are two places it +# can be used: in an block, providing a global definition which +# may later be required by a feature or extension; or in a feature or +# extension, defining an enumerant specific to that feature. The second +# form has more possible attributes. Some combinations of attributes are +# nonsensical in on or the other place, but these are not detected by the +# validator. +# +# Ways to specify the enumerant value: +# value - integer (including hex) value of the enumerant +# bitpos - integer bit position of the enumerant in a bitmask +# offset, [dir] - integer offset and direction ("-" for negative, +# or positive if not specified) from a base value +# +# value and bitpos allow, and offset/dir require, the attribute: +# extends - type name of the enumerant being extended +# +# Other attributes: +# api - matches a api attribute, if present +# type - "u" (unsigned), "ull" (uint64), or integer if not present +# name - enumerant name +# alias - another enumerant this is semantically identical to +# comment - unused +Enum = element enum { + ( + ( + ( + attribute value { Integer } & + attribute extends { TypeName } ? + ) | + ( + attribute bitpos { Integer } & + attribute extends { TypeName } ? + ) | + ( + attribute offset { Integer } & + attribute dir { text } ? & + attribute extends { TypeName } + ) + ) ? & + attribute api { text } ? & + attribute type { TypeSuffix } ? & + attribute name { text } & + attribute alias { text } ? & + Comment ? + ) +} + +# defines a range of enumerants not currently being used +# start, end - beginning and end of an unused numeric range +# vendor - unused +# comment - unused +Unused = element unused { + attribute start { Integer } , + attribute end { Integer } ? , + Vendor ? , + Comment ? +} +# defines a group of commands +Commands = element commands { + Command * +} + +# defines a single command +# is the C function prototype, including the return type +# are function parameters, in order +# len - if the member is an array, len may be one or more of the following +# things, separated by commas (one for each array indirection): another +# member of that struct, 'null-terminated' for a string, '1' to indicate it's +# just a pointer (used for nested pointers), or a latex equation (prefixed with +# 'latex:') +# externsync - denotes that the member should be externally synchronized +# when accessed by Vulkan +# optional - whether this value can be omitted by providing NULL (for +# pointers), VK_NULL_HANDLE (for handles) or 0 (for bitmasks/values) +# noautovalidity - tag stating that no automatic validity language should be generated +# is a name, if present +# is the function / parameter name +# The textual contents of and should be legal C +# for those parts of a function declaration. +# - denotes function aliasing, if present +# name - name of aliased function +# - unused text +# are spec-language descriptions of +# objects that are not parameters of the command, but +# are related to them and also require external synchronization. +Command = element command { + attribute queues { text } ? , + attribute renderpass { text } ? , + attribute cmdbufferlevel { text } ? , + Comment ? , + element proto { + mixed { + element type { TypeName } ? , + element name { text } + } + } , + element param { + attribute len { text } ? , + attribute externsync { text } ? , + attribute optional { text } ? , + attribute noautovalidity { text } ? , + mixed { + element type { TypeName } ? , + element name { text } + } + } * , + ( + element alias { + Name + } ? & + element description { + text + } ? & + element implicitexternsyncparams { + element param { text } * + } ? & + Validity ? + ) +} + +# Each defines the interface of an API version (e.g. OpenGL 1.2) +# api - API tag (e.g. 'gl', 'gles2', etc. - used internally, not +# neccessarily an actual API name +# name - version name (C preprocessor name, e.g. GL_VERSION_4_2) +# number - version number, e.g. 4.2 +# protect - additional #ifdef symbol to place around the feature +# / contains features to require or remove in +# this version +# profile - only require/remove when generated profile matches +# comment - unused +Feature = element feature { + attribute api { text } , + Name , + attribute number { xsd:float } , + attribute protect { text } ?, + Comment ? , + ( + element require { + ProfileName ? , + Comment ? , + InterfaceElement * + } | + element remove { + ProfileName ? , + Comment ? , + InterfaceElement * + } + ) * +} +Extensions = element extensions { + Extension * +} + +# Defines the interface of an API . Like a +# tag, but with slightly different attributes: +# api - regexp pattern matching one or more API tags, indicating +# which APIs the extension is known to work with. The only +# syntax supported is {|}* and each name must +# exactly match an API being generated (implicit ^$ surrounding). +# name - extension name string +# number - extension number (positive integer, should be unique) +# protect - C preprocessor symbol to conditionally define the interface +# supported - profile name(s) supporting this extension, e.g. "vulkan" +# or "disabled" to never generate output. +# author - name of the author (usually a company or project name) +# contact - contact responsible for the tag (name and contact information) +# In addition, / tags also support an +# api attribute: +# api - only require/remove these features for the matching API. +# Not a regular expression. +Extension = element extension { + Name , + attribute number { Integer } ?, + attribute protect { text } ?, + attribute supported { StringGroup } ? , + attribute author { text } ? , + attribute contact { text } ? , + Comment ? , + ( + element require { + attribute api { text } ? , + ProfileName ? , + Comment ? , + InterfaceElement * + } | + element remove { + attribute api { text } ? , + ProfileName ? , + Comment ? , + InterfaceElement * + } + ) * +} + +# Contents of a / tag, defining a group +# of features to require or remove. +# / / all have attributes +# name - feature name which must match +InterfaceElement = + element type { + Name , + Comment ? + } | + Enum | + element command { + Name , + Comment ? + } + +# Defines validation text for the Vulkan spec and reference pages. +# Consists of multiple tags, each containing arbitrary +# asciidoc text. +Validity = element validity { + element usage { text } * +} + +# Integers are allowed to be either decimal or C-hex (0x[0-9A-F]+), but +# XML Schema types don't seem to support hex notation, so we use this +# as a placeholder. +Integer = text + +# EnumName is an compile-time constant name +EnumName = text + +# ExtensionName is the name string of an API extension +ExtensionName = text + +# TypeName is an argument/return value C type name +TypeName = text + +# TypeSuffix is a C numeric type suffix, e.g. 'u' or 'ull' +TypeSuffix = text + +# StringGroup is a regular expression with an implicit +# '^(' and ')$' bracketing it. +StringGroup = text + +# Repeatedly used attributes +ProfileName = attribute profile { text } +Vendor = attribute vendor { text } +Comment = attribute comment { text } +Name = attribute name { text } diff --git a/src/spec/test.c b/src/spec/test.c new file mode 100644 index 00000000..a72a20f8 --- /dev/null +++ b/src/spec/test.c @@ -0,0 +1,31 @@ +/*% gcc -Wall -I.. -c test.c + * Tiny test to make sure regenerated vulkan.h compiles. + * If this code is actually run, it just prints out some enum + * values and possibly complains about some type conversions. + * + * This relies on the model that all extensions go into vulkan.h, + * so their presence can be tested. + */ +#include +#include "vulkan/vulkan.h" + +int main(int ac, const char **av) { + VkStructureType sType; + VkResult result; + + // Supress warnings about unused variables + (void)sType; (void)result; + + sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR; + result = VK_SUBOPTIMAL_KHR; + result = VK_ERROR_OUT_OF_DATE_KHR; + + printf("VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 0x%08x\n", + (unsigned int)VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR); + printf("VK_SUBOPTIMAL_KHR = 0x%08x\n", + (unsigned int)VK_SUBOPTIMAL_KHR); + printf("VK_ERROR_OUT_OF_DATE_KHR = 0x%08x\n", + (unsigned int)VK_ERROR_OUT_OF_DATE_KHR); + + return 0; +} diff --git a/src/spec/vk.xml b/src/spec/vk.xml new file mode 100644 index 00000000..dfbeb35a --- /dev/null +++ b/src/spec/vk.xml @@ -0,0 +1,5099 @@ + + + +Copyright (c) 2015-2016 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +------------------------------------------------------------------------ + +This file, vk.xml, is the Vulkan API Registry. It is a critically important +and normative part of the Vulkan Specification, including a canonical +machine-readable definition of the API, parameter and member validation +language incorporated into the Specification and reference pages, and other +material which is registered by Khronos, such as tags used by extension and +layer authors. The only authoritative version of vk.xml is the one +maintained in the master branch of the Khronos Vulkan Github project. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #include "vk_platform.h" + + #include "vulkan.h" + #include <X11/Xlib.h> + #include <android/native_window.h> + #include <mir_toolkit/client_types.h> + #include <wayland-client.h> + #include <windows.h> + #include <xcb/xcb.h> + + + + + + + + + + + + + + + + #define VK_MAKE_VERSION(major, minor, patch) \ + (((major) << 22) | ((minor) << 12) | (patch)) + #define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22) + #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff) + #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff) + + // Vulkan API version supported by this file +#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 3) + + + +#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; + + +#if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) + #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object; +#else + #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object; +#endif + + + +#define VK_NULL_HANDLE 0 + + + typedef uint32_t VkSampleMask; + typedef uint32_t VkBool32; + typedef uint32_t VkFlags; + typedef uint64_t VkDeviceSize; + + + + + + + + + + + typedef VkFlags VkFramebufferCreateFlags; + typedef VkFlags VkQueryPoolCreateFlags; + typedef VkFlags VkRenderPassCreateFlags; + typedef VkFlags VkSamplerCreateFlags; + typedef VkFlags VkPipelineLayoutCreateFlags; + typedef VkFlags VkPipelineCacheCreateFlags; + typedef VkFlags VkPipelineDepthStencilStateCreateFlags; + typedef VkFlags VkPipelineDynamicStateCreateFlags; + typedef VkFlags VkPipelineColorBlendStateCreateFlags; + typedef VkFlags VkPipelineMultisampleStateCreateFlags; + typedef VkFlags VkPipelineRasterizationStateCreateFlags; + typedef VkFlags VkPipelineViewportStateCreateFlags; + typedef VkFlags VkPipelineTessellationStateCreateFlags; + typedef VkFlags VkPipelineInputAssemblyStateCreateFlags; + typedef VkFlags VkPipelineVertexInputStateCreateFlags; + typedef VkFlags VkPipelineShaderStageCreateFlags; + typedef VkFlags VkDescriptorSetLayoutCreateFlags; + typedef VkFlags VkBufferViewCreateFlags; + typedef VkFlags VkInstanceCreateFlags; + typedef VkFlags VkDeviceCreateFlags; + typedef VkFlags VkDeviceQueueCreateFlags; + typedef VkFlags VkQueueFlags; + typedef VkFlags VkMemoryPropertyFlags; + typedef VkFlags VkMemoryHeapFlags; + typedef VkFlags VkAccessFlags; + typedef VkFlags VkBufferUsageFlags; + typedef VkFlags VkBufferCreateFlags; + typedef VkFlags VkShaderStageFlags; + typedef VkFlags VkImageUsageFlags; + typedef VkFlags VkImageCreateFlags; + typedef VkFlags VkImageViewCreateFlags; + typedef VkFlags VkPipelineCreateFlags; + typedef VkFlags VkColorComponentFlags; + typedef VkFlags VkFenceCreateFlags; + typedef VkFlags VkSemaphoreCreateFlags; + typedef VkFlags VkFormatFeatureFlags; + typedef VkFlags VkQueryControlFlags; + typedef VkFlags VkQueryResultFlags; + typedef VkFlags VkShaderModuleCreateFlags; + typedef VkFlags VkEventCreateFlags; + typedef VkFlags VkCommandPoolCreateFlags; + typedef VkFlags VkCommandPoolResetFlags; + typedef VkFlags VkCommandBufferResetFlags; + typedef VkFlags VkCommandBufferUsageFlags; + typedef VkFlags VkQueryPipelineStatisticFlags; + typedef VkFlags VkMemoryMapFlags; + typedef VkFlags VkImageAspectFlags; + typedef VkFlags VkSparseMemoryBindFlags; + typedef VkFlags VkSparseImageFormatFlags; + typedef VkFlags VkSubpassDescriptionFlags; + typedef VkFlags VkPipelineStageFlags; + typedef VkFlags VkSampleCountFlags; + typedef VkFlags VkAttachmentDescriptionFlags; + typedef VkFlags VkStencilFaceFlags; + typedef VkFlags VkCullModeFlags; + typedef VkFlags VkDescriptorPoolCreateFlags; + typedef VkFlags VkDescriptorPoolResetFlags; + typedef VkFlags VkDependencyFlags; + + typedef VkFlags VkCompositeAlphaFlagsKHR; + typedef VkFlags VkDisplayPlaneAlphaFlagsKHR; + typedef VkFlags VkSurfaceTransformFlagsKHR; + typedef VkFlags VkSwapchainCreateFlagsKHR; + typedef VkFlags VkDisplayModeCreateFlagsKHR; + typedef VkFlags VkDisplaySurfaceCreateFlagsKHR; + typedef VkFlags VkAndroidSurfaceCreateFlagsKHR; + typedef VkFlags VkMirSurfaceCreateFlagsKHR; + typedef VkFlags VkWaylandSurfaceCreateFlagsKHR; + typedef VkFlags VkWin32SurfaceCreateFlagsKHR; + typedef VkFlags VkXlibSurfaceCreateFlagsKHR; + typedef VkFlags VkXcbSurfaceCreateFlagsKHR; + + typedef VkFlags VkDebugReportFlagsEXT; + + + VK_DEFINE_HANDLE(VkInstance) + VK_DEFINE_HANDLE(VkPhysicalDevice) + VK_DEFINE_HANDLE(VkDevice) + VK_DEFINE_HANDLE(VkQueue) + VK_DEFINE_HANDLE(VkCommandBuffer) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache) + + + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayKHR) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayModeKHR) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)( + void* pUserData, + size_t size, + VkInternalAllocationType allocationType, + VkSystemAllocationScope allocationScope); + typedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)( + void* pUserData, + size_t size, + VkInternalAllocationType allocationType, + VkSystemAllocationScope allocationScope); + typedef void* (VKAPI_PTR *PFN_vkReallocationFunction)( + void* pUserData, + void* pOriginal, + size_t size, + size_t alignment, + VkSystemAllocationScope allocationScope); + typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)( + void* pUserData, + size_t size, + size_t alignment, + VkSystemAllocationScope allocationScope); + typedef void (VKAPI_PTR *PFN_vkFreeFunction)( + void* pUserData, + void* pMemory); + + + typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void); + + + typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)( + VkDebugReportFlagsEXT flags, + VkDebugReportObjectTypeEXT objectType, + uint64_t object, + size_t location, + int32_t messageCode, + const char* pLayerPrefix, + const char* pMessage, + void* pUserData); + + + + int32_t x + int32_t y + + + int32_t x + int32_t y + int32_t z + + + uint32_t width + uint32_t height + + + uint32_t width + uint32_t height + uint32_t depth + + + float x + float y + float width + float height + float minDepth + float maxDepth + + pname:width must: be greater than `0.0` and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxViewportDimensions[0] + pname:height must: be greater than `0.0` and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxViewportDimensions[1] + pname:x and pname:y must: each be between pname:viewportBoundsRange[0] and pname:viewportBoundsRange[1], inclusive + pname:x + pname:width must: be less than or equal to pname:viewportBoundsRange[1] + pname:y + pname:height must: be less than or equal to pname:viewportBoundsRange[1] + pname:minDepth must: be between `0.0` and `1.0`, inclusive + pname:maxDepth must: be between `0.0` and `1.0`, inclusive + + + + VkOffset2D offset + VkExtent2D extent + + + VkOffset3D offset + VkExtent3D extent + + + VkRect2D rect + uint32_t baseArrayLayer + uint32_t layerCount + + + VkComponentSwizzle r + VkComponentSwizzle g + VkComponentSwizzle b + VkComponentSwizzle a + + + uint32_t apiVersion + uint32_t driverVersion + uint32_t vendorID + uint32_t deviceID + VkPhysicalDeviceType deviceType + char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] + uint8_t pipelineCacheUUID[VK_UUID_SIZE] + VkPhysicalDeviceLimits limits + VkPhysicalDeviceSparseProperties sparseProperties + + + char extensionName[VK_MAX_EXTENSION_NAME_SIZE] + uint32_t specVersion + + + char layerName[VK_MAX_EXTENSION_NAME_SIZE] + uint32_t specVersion + uint32_t implementationVersion + char description[VK_MAX_DESCRIPTION_SIZE] + + + VkStructureType sType + const void* pNext + const char* pApplicationName + uint32_t applicationVersion + const char* pEngineName + uint32_t engineVersion + uint32_t apiVersion + + pname:apiVersion must: be zero, or otherwise it must: be a version that the implementation supports, or supports an effective substitute for + + + + void* pUserData + PFN_vkAllocationFunction pfnAllocation + PFN_vkReallocationFunction pfnReallocation + PFN_vkFreeFunction pfnFree + PFN_vkInternalAllocationNotification pfnInternalAllocation + PFN_vkInternalFreeNotification pfnInternalFree + + pname:pfnAllocation must: be a pointer to a valid user-defined PFN_vkAllocationFunction + pname:pfnReallocation must: be a pointer to a valid user-defined PFN_vkReallocationFunction + pname:pfnFree must: be a pointer to a valid user-defined PFN_vkFreeFunction + If either of pname:pfnInternalAllocatione or pname:pfnInternalFree is not `NULL`, both must: be valid callbacks + + + + VkStructureType sType + const void* pNext + VkDeviceQueueCreateFlags flags + uint32_t queueFamilyIndex + uint32_t queueCount + const float* pQueuePriorities + + pname:queueFamilyIndex must: be less than the value of pname:pQueueFamilyPropertyCount returned by fname:vkGetPhysicalDeviceQueueFamilyProperties + pname:queueCount must: be less than or equal to the value of the pname:queueCount member of the sname:VkQueueFamilyProperties structure, as returned by fname:vkGetPhysicalDeviceQueueFamilyProperties in the pname:pQueueFamilyProperties[pname:queueFamilyIndex] + The value of any given element of pname:pQueuePriorities must: be between `0.0` and `1.0` inclusive + + + + VkStructureType sType + const void* pNext + VkDeviceCreateFlags flags + uint32_t queueCreateInfoCount + const VkDeviceQueueCreateInfo* pQueueCreateInfos + uint32_t enabledLayerCount + const char* const* ppEnabledLayerNames + uint32_t enabledExtensionCount + const char* const* ppEnabledExtensionNames + const VkPhysicalDeviceFeatures* pEnabledFeatures + + Any given element of pname:ppEnabledLayerNames must: be the name of a layer present on the system, exactly matching a string returned in the sname:VkLayerProperties structure by fname:vkEnumerateDeviceLayerProperties + Any given element of pname:ppEnabledExtensionNames must: be the name of an extension present on the system, exactly matching a string returned in the sname:VkExtensionProperties structure by fname:vkEnumerateDeviceExtensionProperties + If an extension listed in pname:ppEnabledExtensionNames is provided as part of a layer, then both the layer and extension must: be enabled to enable that extension + The pname:queueFamilyIndex member of any given element of pname:pQueueCreateInfos must: be unique within pname:pQueueCreateInfos + + + + VkStructureType sType + const void* pNext + VkInstanceCreateFlags flags + const VkApplicationInfo* pApplicationInfo + uint32_t enabledLayerCount + const char* const* ppEnabledLayerNames + uint32_t enabledExtensionCount + const char* const* ppEnabledExtensionNames + + Any given element of pname:ppEnabledLayerNames must: be the name of a layer present on the system, exactly matching a string returned in the sname:VkLayerProperties structure by fname:vkEnumerateInstanceLayerProperties + Any given element of pname:ppEnabledExtensionNames must: be the name of an extension present on the system, exactly matching a string returned in the sname:VkExtensionProperties structure by fname:vkEnumerateInstanceExtensionProperties + If an extension listed in pname:ppEnabledExtensionNames is provided as part of a layer, then both the layer and extension must: be enabled to enable that extension + + + + VkQueueFlags queueFlags + uint32_t queueCount + uint32_t timestampValidBits + VkExtent3D minImageTransferGranularity + + + uint32_t memoryTypeCount + VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES] + uint32_t memoryHeapCount + VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS] + + + VkStructureType sType + const void* pNext + VkDeviceSize allocationSize + uint32_t memoryTypeIndex + + The value of pname:allocationSize must: be less than or equal to the amount of memory available to the sname:VkMemoryHeap specified by pname:memoryTypeIndex and the calling command's sname:VkDevice + The value of pname:allocationSize must: be greater than `0` + + + + VkDeviceSize size + VkDeviceSize alignment + uint32_t memoryTypeBits + + + VkImageAspectFlags aspectMask + VkExtent3D imageGranularity + VkSparseImageFormatFlags flags + + + VkSparseImageFormatProperties formatProperties + uint32_t imageMipTailFirstLod + VkDeviceSize imageMipTailSize + VkDeviceSize imageMipTailOffset + VkDeviceSize imageMipTailStride + + + VkMemoryPropertyFlags propertyFlags + uint32_t heapIndex + + + VkDeviceSize size + VkMemoryHeapFlags flags + + + VkStructureType sType + const void* pNext + VkDeviceMemory memory + VkDeviceSize offset + VkDeviceSize size + + pname:memory must: currently be mapped + pname:offset must: be less than the size of the currently mapped range of pname:memory + If pname:size is not equal to ename:VK_WHOLE_SIZE, the sum of pname:offset and pname:size must: be less than or equal to the size of the currently mapped range of pname:memory + pname:offset and pname:size must: each be a multiple of sname:VkPhysicalDeviceLimits::pname:nonCoherentAtomSize + + + + VkFormatFeatureFlags linearTilingFeatures + VkFormatFeatureFlags optimalTilingFeatures + VkFormatFeatureFlags bufferFeatures + + + VkExtent3D maxExtent + uint32_t maxMipLevels + uint32_t maxArrayLayers + VkSampleCountFlags sampleCounts + VkDeviceSize maxResourceSize + + + VkBuffer buffer + VkDeviceSize offset + VkDeviceSize range + + If pname:range is not equal to ename:VK_WHOLE_SIZE, the sum of pname:offset and pname:range must: be less than or equal to the size of pname:buffer + + + + VkSampler sampler + VkImageView imageView + VkImageLayout imageLayout + + + VkStructureType sType + const void* pNext + VkDescriptorSet dstSet + uint32_t dstBinding + uint32_t dstArrayElement + uint32_t descriptorCount + VkDescriptorType descriptorType + const VkDescriptorImageInfo* pImageInfo + const VkDescriptorBufferInfo* pBufferInfo + const VkBufferView* pTexelBufferView + + pname:dstBinding must: be a valid binding point within pname:dstSet + pname:descriptorType must: match the type of pname:dstBinding within pname:dstSet + The sum of pname:dstArrayElement and pname:descriptorCount must: be less than or equal to the number of array elements in the descriptor set binding specified by pname:dstBinding, and all applicable consecutive bindings, as described by <<descriptorsets-updates-consecutive>> + If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLER, ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE or ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, pname:pImageInfo must: be a pointer to an array of pname:descriptorCount valid sname:VkDescriptorImageInfo structures + If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, pname:pTexelBufferView must: be a pointer to an array of pname:descriptorCount valid sname:VkBufferView handles + If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, pname:pBufferInfo must: be a pointer to an array of pname:descriptorCount valid sname:VkDescriptorBufferInfo structures + If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLER or ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and pname:dstSet was not created with a layout that included immutable samplers for pname:dstBinding with pname:descriptorType, the pname:sampler member of any given element of pname:pImageInfo must: be a valid sname:VkSampler object + If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE or ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the pname:imageView and pname:imageLayout members of any given element of pname:pImageInfo must: be a valid sname:VkImageView and elink:VkImageLayout, respectively + If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the pname:offset member of any given element of pname:pBufferInfo must: be a multiple of the value of sname:VkPhysicalDeviceLimits::pname:minUniformBufferOffsetAlignment + If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the pname:offset member of any given element of pname:pBufferInfo must: be a multiple of the value of sname:VkPhysicalDeviceLimits::pname:minStorageBufferOffsetAlignment + If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the pname:buffer member of any given element of pname:pBufferInfo must: have been created with ename:VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT set + If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the pname:buffer member of any given element of pname:pBufferInfo must: have been created with ename:VK_BUFFER_USAGE_STORAGE_BUFFER_BIT set + If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the pname:range member of any given element of pname:pBufferInfo must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxUniformBufferRange + If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the pname:range member of any given element of pname:pBufferInfo must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxStorageBufferRange + If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, the sname:VkBuffer that pname:pTexelBufferView was created from must: have been created with ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT set + If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, the sname:VkBuffer that pname:pTexelBufferView was created from must: have been created with ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT set + If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE or ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the pname:imageView must: have been created with identity swizzle + + + + VkStructureType sType + const void* pNext + VkDescriptorSet srcSet + uint32_t srcBinding + uint32_t srcArrayElement + VkDescriptorSet dstSet + uint32_t dstBinding + uint32_t dstArrayElement + uint32_t descriptorCount + + pname:srcBinding must: be a valid binding within pname:srcSet + The sum of pname:srcArrayElement and pname:descriptorCount must: be less than or equal to the number of array elements in the descriptor set binding specified by pname:srcBinding, and all applicable consecutive bindings, as described by <<descriptorsets-updates-consecutive>> + pname:dstBinding must: be a valid binding within pname:dstSet + The sum of pname:dstArrayElement and pname:descriptorCount must: be less than or equal to the number of array elements in the descriptor set binding specified by pname:dstBinding, and all applicable consecutive bindings, as described by <<descriptorsets-updates-consecutive>> + + + + VkStructureType sType + const void* pNext + VkBufferCreateFlags flags + VkDeviceSize size + VkBufferUsageFlags usage + VkSharingMode sharingMode + uint32_t queueFamilyIndexCount + const uint32_t* pQueueFamilyIndices + + The value of pname:size must: be greater than `0` + If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, pname:pQueueFamilyIndices must: be a pointer to an array of pname:queueFamilyIndexCount basetype:uint32_t values + If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, pname:queueFamilyIndexCount must: be greater than `1` + If the <<features-features-sparseBinding,sparse bindings>> feature is not enabled, pname:flags mustnot: contain ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT + If the <<features-features-sparseResidencyBuffer,sparse buffer residency>> feature is not enabled, pname:flags mustnot: contain ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT + If the <<features-features-sparseResidencyAliased,sparse aliased residency>> feature is not enabled, pname:flags mustnot: contain ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT + If pname:flags contains ename:VK_BUFFER_CREATE_SPARSE_ALIASED_BIT, it must: also contain at least one of ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT or ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT + + + + VkStructureType sType + const void* pNext + VkBufferViewCreateFlagsflags + VkBuffer buffer + VkFormat format + VkDeviceSize offset + VkDeviceSize range + + The value of pname:offset must: be a multiple of sname:VkPhysicalDeviceLimits::pname:minTexelBufferOffsetAlignment + The value of pname:range must: be greater than `0` + If pname:range is not equal to ename:VK_WHOLE_SIZE, the sum of pname:offset and pname:range must: be less than or equal to the size of pname:buffer + If pname:range is not equal to ename:VK_WHOLE_SIZE, the value of pname:range must: be a multiple of the element size of pname:format + The value of pname:range, divided by the size of an element of pname:format, must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxTexelBufferElements + pname:buffer must: have been created with a pname:usage value containing at least one of ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT + If pname:buffer was created with pname:usage containing ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, pname:format must: be supported for uniform texel buffers, as specified by the ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT flag in sname:VkFormatProperties::pname:bufferFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + If pname:buffer was created with pname:usage containing ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, pname:format must: be supported for storage texel buffers, as specified by the ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT flag in sname:VkFormatProperties::pname:bufferFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + + + + VkImageAspectFlags aspectMask + uint32_t mipLevel + uint32_t arrayLayer + + pname:mipLevel must: be less than the pname:mipLevels specified in slink:VkImageCreateInfo when the image was created + pname:arrayLayer must: be less than the pname:arrayLayers specified in slink:VkImageCreateInfo when the image was created + + + + VkImageAspectFlags aspectMask + uint32_t mipLevel + uint32_t baseArrayLayer + uint32_t layerCount + + If pname:aspectMask contains ename:VK_IMAGE_ASPECT_COLOR_BIT, it mustnot: contain either of ename:VK_IMAGE_ASPECT_DEPTH_BIT or ename:VK_IMAGE_ASPECT_STENCIL_BIT + pname:aspectMask mustnot: contain ename:VK_IMAGE_ASPECT_METADATA_BIT + pname:mipLevel must: be less than the pname:mipLevels specified in slink:VkImageCreateInfo when the image was created + latexmath:[$(baseArrayLayer + layerCount)$] must: be less than or equal to the pname:arrayLayers specified in slink:VkImageCreateInfo when the image was created + + + + VkImageAspectFlags aspectMask + uint32_t baseMipLevel + uint32_t levelCount + uint32_t baseArrayLayer + uint32_t layerCount + + latexmath:[$(baseMipLevel + levelCount)$] must: be less than or equal to the pname:mipLevels specified in slink:VkImageCreateInfo when the image was created + latexmath:[$(baseArrayLayer + layerCount)$] must: be less than or equal to the pname:arrayLayers specified in slink:VkImageCreateInfo when the image was created + + + + VkStructureType sType + const void* pNext + VkAccessFlags srcAccessMask + VkAccessFlags dstAccessMask + + + VkStructureType sType + const void* pNext + VkAccessFlags srcAccessMask + VkAccessFlags dstAccessMask + uint32_t srcQueueFamilyIndex + uint32_t dstQueueFamilyIndex + VkBuffer buffer + VkDeviceSize offset + VkDeviceSize size + + The value of pname:offset must: be less than the size of pname:buffer + The sum of pname:offset and pname:size must: be less than or equal to than the size of pname:buffer + If pname:buffer was created with a sharing mode of ename:VK_SHARING_MODE_CONCURRENT, pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex must: both be VK_QUEUE_FAMILY_IGNORED + If pname:buffer was created with a sharing mode of ename:VK_SHARING_MODE_EXCLUSIVE, pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex must: either both be VK_QUEUE_FAMILY_IGNORED, or both be a valid queue family (see <<devsandqueues-queueprops>>) + If pname:buffer was created with a sharing mode of ename:VK_SHARING_MODE_EXCLUSIVE, and pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex are valid queue families, at least one of them must: be the same as the family of the queue that will execute this barrier + + + + VkStructureType sType + const void* pNext + VkAccessFlags srcAccessMask + VkAccessFlags dstAccessMask + VkImageLayout oldLayout + VkImageLayout newLayout + uint32_t srcQueueFamilyIndex + uint32_t dstQueueFamilyIndex + VkImage image + VkImageSubresourceRange subresourceRange + + pname:oldLayout must: be ename:VK_IMAGE_LAYOUT_UNDEFINED, ename:VK_IMAGE_LAYOUT_PREINITIALIZED or the current layout of the image region affected by the barrier + pname:newLayout mustnot: be ename:VK_IMAGE_LAYOUT_UNDEFINED or ename:VK_IMAGE_LAYOUT_PREINITIALIZED + If pname:image was created with a sharing mode of ename:VK_SHARING_MODE_CONCURRENT, pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex must: both be VK_QUEUE_FAMILY_IGNORED + If pname:image was created with a sharing mode of ename:VK_SHARING_MODE_EXCLUSIVE, pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex must: either both be VK_QUEUE_FAMILY_IGNORED, or both be a valid queue family (see <<devsandqueues-queueprops>>) + If pname:image was created with a sharing mode of ename:VK_SHARING_MODE_EXCLUSIVE, and pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex are valid queue families, at least one of them must: be the same as the family of the queue that will execute this barrier + pname:subresourceRange must: be a valid subresource range for the image (see <<resources-image-views>>) + If pname:image has a depth/stencil format with both depth and stencil components, then pname:aspectMask member of pname:subresourceRange must: include both ename:VK_IMAGE_ASPECT_DEPTH_BIT and ename:VK_IMAGE_ASPECT_STENCIL_BIT + If either pname:oldLayout or pname:newLayout is ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL then pname:image must: have been created with ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT set + If either pname:oldLayout or pname:newLayout is ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL then pname:image must: have been created with ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set + If either pname:oldLayout or pname:newLayout is ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then pname:image must: have been created with ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set + If either pname:oldLayout or pname:newLayout is ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL then pname:image must: have been created with ename:VK_IMAGE_USAGE_SAMPLED_BIT or ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT set + If either pname:oldLayout or pname:newLayout is ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL then pname:image must: have been created with ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT set + If either pname:oldLayout or pname:newLayout is ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL then pname:image must: have been created with ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT set + + + + VkStructureType sType + const void* pNext + VkImageCreateFlags flags + VkImageType imageType + VkFormat format + VkExtent3D extent + uint32_t mipLevels + uint32_t arrayLayers + VkSampleCountFlagBits samples + VkImageTiling tiling + VkImageUsageFlags usage + VkSharingMode sharingMode + uint32_t queueFamilyIndexCount + const uint32_t* pQueueFamilyIndices + VkImageLayout initialLayout + + If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, pname:pQueueFamilyIndices must: be a pointer to an array of pname:queueFamilyIndexCount basetype:uint32_t values + If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT, pname:queueFamilyIndexCount must: be greater than `1` + pname:format mustnot: be ename:VK_FORMAT_UNDEFINED + The values of the pname:width, pname:height and pname:depth members of pname:extent must: all be greater than `0` + The value of pname:mipLevels must: be greater than `0` + The value of pname:arrayLayers must: be greater than `0` + If pname:imageType is ename:VK_IMAGE_TYPE_1D, the value of pname:extent.width must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxImageDimension1D, or the value of sname:VkImageFormatProperties::pname:maxExtent.width (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure) - whichever is higher + If pname:imageType is ename:VK_IMAGE_TYPE_2D and pname:flags does not contain ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, the value of pname:extent.width and pname:extent.height must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxImageDimension2D, or the value of sname:VkImageFormatProperties::pname:maxExtent.width/height (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure) - whichever is higher + If pname:imageType is ename:VK_IMAGE_TYPE_2D and pname:flags contains ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, the value of pname:extent.width and pname:extent.height must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxImageDimensionCube, or the value of sname:VkImageFormatProperties::pname:maxExtent.width/height (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure) - whichever is higher + If pname:imageType is ename:VK_IMAGE_TYPE_2D and pname:flags contains ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, the value of pname:extent.width and pname:extent.height must: be equal + If pname:imageType is ename:VK_IMAGE_TYPE_3D, the value of pname:extent.width, pname:extent.height and pname:extent.depth must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxImageDimension3D, or the value of sname:VkImageFormatProperties::pname:maxExtent.width/height/depth (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure) - whichever is higher + The value of pname:mipLevels must: be less than or equal to or equal to the value of latexmath:[$\lfloor\log_2(\max(\mathit{extent.width}, \mathit{extent.height}, \mathit{extent.depth}))\rfloor + 1$] + If the values of any of pname:extent.width, pname:extent.height or pname:extent.depth are greater than the values of the equivalently named members of sname:VkPhysicalDeviceLimits::pname:maxImageDimension3D, pname:mipLevels must: be less than or equal to the value of sname:VkImageFormatProperties::pname:maxMipLevels (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure) + The value of pname:arrayLayers must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxImageArrayLayers, or the value of sname:VkImageFormatProperties::pname:maxArrayLayers (as returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure) - whichever is higher + The value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:sampleCounts returned by flink:vkGetPhysicalDeviceProperties, or the value of sname:VkImageFormatProperties::pname:maxExtent.sampleCounts returned by fname:vkGetPhysicalDeviceImageFormatProperties with values of pname:format, pname:type, pname:tiling, pname:usage and pname:flags equal to those in this structure + If pname:usage includes ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT or ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, the value of pname:extent.width must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxFramebufferWidth + If pname:usage includes ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, ename:VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT or ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, the value of pname:extent.height must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxFramebufferHeight + If pname:usage includes ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxFramebufferColorSamples + If pname:usage includes ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and pname:format includes a depth aspect, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxFramebufferDepthSamples + If pname:usage includes ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, and pname:format includes a stencil aspect, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxFramebufferStencilSamples + If pname:usage includes ename:VK_IMAGE_USAGE_SAMPLED_BIT, and pname:format includes a color aspect, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxSampledImageColorSamples + If pname:usage includes ename:VK_IMAGE_USAGE_SAMPLED_BIT, and pname:format includes a depth aspect, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxSampledImageDepthSamples + If pname:usage includes ename:VK_IMAGE_USAGE_SAMPLED_BIT, and pname:format is an integer format, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxSampledImageIntegerSamples + If pname:usage includes ename:VK_IMAGE_USAGE_STORAGE_BIT, the value of pname:samples must: be a bit value that is set in the value of sname:VkPhysicalDeviceLimits::pname:maxStorageImageSamples + If the <<features-features-textureCompressionETC2,ETC2 texture compression>> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK, ename:VK_FORMAT_EAC_R11_UNORM_BLOCK, ename:VK_FORMAT_EAC_R11_SNORM_BLOCK, ename:VK_FORMAT_EAC_R11G11_UNORM_BLOCK, or ename:VK_FORMAT_EAC_R11G11_SNORM_BLOCK + If the <<features-features-textureCompressionASTC_LDR,ASTC LDR texture compression>> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_ASTC_4x4_UNORM_BLOCK, ename:VK_FORMAT_ASTC_4x4_SRGB_BLOCK, ename:VK_FORMAT_ASTC_5x4_UNORM_BLOCK, ename:VK_FORMAT_ASTC_5x4_SRGB_BLOCK, ename:VK_FORMAT_ASTC_5x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_5x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_6x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_6x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_6x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_6x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x8_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x8_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x8_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x8_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x10_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x10_SRGB_BLOCK, ename:VK_FORMAT_ASTC_12x10_UNORM_BLOCK, ename:VK_FORMAT_ASTC_12x10_SRGB_BLOCK, ename:VK_FORMAT_ASTC_12x12_UNORM_BLOCK, or ename:VK_FORMAT_ASTC_12x12_SRGB_BLOCK + If the <<features-features-textureCompressionBC,BC texture compression>> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_BC1_RGB_UNORM_BLOCK, ename:VK_FORMAT_BC1_RGB_SRGB_BLOCK, ename:VK_FORMAT_BC1_RGBA_UNORM_BLOCK, ename:VK_FORMAT_BC1_RGBA_SRGB_BLOCK, ename:VK_FORMAT_BC2_UNORM_BLOCK, ename:VK_FORMAT_BC2_SRGB_BLOCK, ename:VK_FORMAT_BC3_UNORM_BLOCK, ename:VK_FORMAT_BC3_SRGB_BLOCK, ename:VK_FORMAT_BC4_UNORM_BLOCK, ename:VK_FORMAT_BC4_SNORM_BLOCK, ename:VK_FORMAT_BC5_UNORM_BLOCK, ename:VK_FORMAT_BC5_SNORM_BLOCK, ename:VK_FORMAT_BC6H_UFLOAT_BLOCK, ename:VK_FORMAT_BC6H_SFLOAT_BLOCK, ename:VK_FORMAT_BC7_UNORM_BLOCK, or ename:VK_FORMAT_BC7_SRGB_BLOCK + If the <<features-features-shaderStorageImageMultisample,multisampled storage images>> feature is not enabled, and pname:usage contains ename:VK_IMAGE_USAGE_STORAGE_BIT, pname:samples must: be ename:VK_SAMPLE_COUNT_1_BIT + If the <<features-features-sparseBinding,sparse bindings>> feature is not enabled, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT + If the <<features-features-sparseResidencyImage2D,sparse residency for 2D images>> feature is not enabled, and pname:imageType is VK_IMAGE_TYPE_2D, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT + If the <<features-features-sparseResidencyImage3D,sparse residency for 3D images>> feature is not enabled, and pname:imageType is VK_IMAGE_TYPE_3D, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT + If the <<features-features-sparseResidency2Samples,sparse residency for images with 2 samples>> feature is not enabled, pname:imageType is VK_IMAGE_TYPE_2D, and pname:samples is ename:VK_SAMPLE_COUNT_2_BIT, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT + If the <<features-features-sparseResidency4Samples,sparse residency for images with 4 samples>> feature is not enabled, pname:imageType is VK_IMAGE_TYPE_2D, and pname:samples is ename:VK_SAMPLE_COUNT_4_BIT, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT + If the <<features-features-sparseResidency8Samples,sparse residency for images with 8 samples>> feature is not enabled, pname:imageType is VK_IMAGE_TYPE_2D, and pname:samples is ename:VK_SAMPLE_COUNT_8_BIT, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT + If the <<features-features-sparseResidency16Samples,sparse residency for images with 16 samples>> feature is not enabled, pname:imageType is VK_IMAGE_TYPE_2D, and pname:samples is ename:VK_SAMPLE_COUNT_16_BIT, pname:flags mustnot: contain ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT + If the value of pname:tiling is ename:VK_IMAGE_TILING_LINEAR, and the value of sname:VkFormatProperties::pname:linearTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_SAMPLED_BIT + If the value of pname:tiling is ename:VK_IMAGE_TILING_LINEAR, and the value of sname:VkFormatProperties::pname:linearTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_STORAGE_BIT + If the value of pname:tiling is ename:VK_IMAGE_TILING_LINEAR, and the value of sname:VkFormatProperties::pname:linearTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT + If the value of pname:tiling is ename:VK_IMAGE_TILING_LINEAR, and the value of sname:VkFormatProperties::pname:linearTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT + If the value of pname:tiling is ename:VK_IMAGE_TILING_OPTIMAL, and the value of sname:VkFormatProperties::pname:optimalTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_SAMPLED_BIT + If the value of pname:tiling is ename:VK_IMAGE_TILING_OPTIMAL, and the value of sname:VkFormatProperties::pname:optimalTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_STORAGE_BIT + If the value of pname:tiling is ename:VK_IMAGE_TILING_OPTIMAL, and the value of sname:VkFormatProperties::pname:optimalTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT + If the value of pname:tiling is ename:VK_IMAGE_TILING_OPTIMAL, and the value of sname:VkFormatProperties::pname:optimalTilingFeatures (as returned by fname:vkGetPhysicalDeviceFormatProperties with the same value of pname:format) does not include VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, pname:usage mustnot: contain ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT + If pname:flags contains ename:VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, it must: also contain at least one of ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT or ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT + + + + VkDeviceSize offset + VkDeviceSize size + VkDeviceSize rowPitch + VkDeviceSize arrayPitch + VkDeviceSize depthPitch + + + VkStructureType sType + const void* pNext + VkImageViewCreateFlags flags + VkImage image + VkImageViewType viewType + VkFormat format + VkComponentMapping components + VkImageSubresourceRange subresourceRange + + If pname:image was not created with ename:VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT then pname:viewType mustnot: be ename:VK_IMAGE_VIEW_TYPE_CUBE or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY + If the <<features-features-imageCubeArray,image cubemap arrays>> feature is not enabled, pname:viewType mustnot: be ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY + If the <<features-features-textureCompressionETC2,ETC2 texture compression>> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, ename:VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK, ename:VK_FORMAT_EAC_R11_UNORM_BLOCK, ename:VK_FORMAT_EAC_R11_SNORM_BLOCK, ename:VK_FORMAT_EAC_R11G11_UNORM_BLOCK, or ename:VK_FORMAT_EAC_R11G11_SNORM_BLOCK + If the <<features-features-textureCompressionASTC_LDR,ASTC LDR texture compression>> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_ASTC_4x4_UNORM_BLOCK, ename:VK_FORMAT_ASTC_4x4_SRGB_BLOCK, ename:VK_FORMAT_ASTC_5x4_UNORM_BLOCK, ename:VK_FORMAT_ASTC_5x4_SRGB_BLOCK, ename:VK_FORMAT_ASTC_5x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_5x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_6x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_6x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_6x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_6x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_8x8_UNORM_BLOCK, ename:VK_FORMAT_ASTC_8x8_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x5_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x5_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x6_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x6_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x8_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x8_SRGB_BLOCK, ename:VK_FORMAT_ASTC_10x10_UNORM_BLOCK, ename:VK_FORMAT_ASTC_10x10_SRGB_BLOCK, ename:VK_FORMAT_ASTC_12x10_UNORM_BLOCK, ename:VK_FORMAT_ASTC_12x10_SRGB_BLOCK, ename:VK_FORMAT_ASTC_12x12_UNORM_BLOCK, or ename:VK_FORMAT_ASTC_12x12_SRGB_BLOCK + If the <<features-features-textureCompressionBC,BC texture compression>> feature is not enabled, pname:format mustnot: be ename:VK_FORMAT_BC1_RGB_UNORM_BLOCK, ename:VK_FORMAT_BC1_RGB_SRGB_BLOCK, ename:VK_FORMAT_BC1_RGBA_UNORM_BLOCK, ename:VK_FORMAT_BC1_RGBA_SRGB_BLOCK, ename:VK_FORMAT_BC2_UNORM_BLOCK, ename:VK_FORMAT_BC2_SRGB_BLOCK, ename:VK_FORMAT_BC3_UNORM_BLOCK, ename:VK_FORMAT_BC3_SRGB_BLOCK, ename:VK_FORMAT_BC4_UNORM_BLOCK, ename:VK_FORMAT_BC4_SNORM_BLOCK, ename:VK_FORMAT_BC5_UNORM_BLOCK, ename:VK_FORMAT_BC5_SNORM_BLOCK, ename:VK_FORMAT_BC6H_UFLOAT_BLOCK, ename:VK_FORMAT_BC6H_SFLOAT_BLOCK, ename:VK_FORMAT_BC7_UNORM_BLOCK, or ename:VK_FORMAT_BC7_SRGB_BLOCK + If pname:image was created with ename:VK_IMAGE_TILING_LINEAR and pname:usage containing ename:VK_IMAGE_USAGE_SAMPLED_BIT, pname:format must: be supported for sampled images, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + If pname:image was created with ename:VK_IMAGE_TILING_LINEAR and pname:usage containing ename:VK_IMAGE_USAGE_STORAGE_BIT, pname:format must: be supported for storage images, as specified by the ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + If pname:image was created with ename:VK_IMAGE_TILING_LINEAR and pname:usage containing ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, pname:format must: be supported for color attachments, as specified by the ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + If pname:image was created with ename:VK_IMAGE_TILING_LINEAR and pname:usage containing ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, pname:format must: be supported for depth/stencil attachments, as specified by the ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + If pname:image was created with ename:VK_IMAGE_TILING_OPTIMAL and pname:usage containing ename:VK_IMAGE_USAGE_SAMPLED_BIT, pname:format must: be supported for sampled images, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT flag in sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + If pname:image was created with ename:VK_IMAGE_TILING_OPTIMAL and pname:usage containing ename:VK_IMAGE_USAGE_STORAGE_BIT, pname:format must: be supported for storage images, as specified by the ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT flag in sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + If pname:image was created with ename:VK_IMAGE_TILING_OPTIMAL and pname:usage containing ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, pname:format must: be supported for color attachments, as specified by the ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + If pname:image was created with ename:VK_IMAGE_TILING_OPTIMAL and pname:usage containing ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, pname:format must: be supported for depth/stencil attachments, as specified by the ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + pname:subresourceRange must: be a valid subresource range for pname:image (see <<resources-image-views>>) + If pname:image was created with the ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, pname:format must: be compatible with the pname:format used to create pname:image, as defined in <<features-formats-compatibility-classes,Format Compatibility Classes>> + If pname:image was not created with the ename:VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT flag, pname:format must: be identical to the pname:format used to create pname:image + pname:subResourceRange and pname:viewType must: be compatible with the image, as described in the <<resources-image-views-compatibility,table below>> + + + + VkDeviceSize srcOffset + VkDeviceSize dstOffset + VkDeviceSize size + + + VkDeviceSize resourceOffset + VkDeviceSize size + VkDeviceMemory memory + VkDeviceSize memoryOffset + VkSparseMemoryBindFlagsflags + + If pname:memory is not sname:VK_NULL_HANDLE, pname:memory and pname:memoryOffset must: match the memory requirements of the resource, as described in section <<resources-association>> + If pname:memory is not sname:VK_NULL_HANDLE, pname:memory mustnot: have been created with a memory type that reports ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set + pname:resourceOffset must: be less than the size of the resource + The sum of pname:resourceOffset and pname:size must: be less than or equal to the size of the resource + pname:memoryOffset must: be less than the size of pname:memory + The sum of pname:memoryOffset and pname:size must: be less than or equal to the size of pname:memory + + + + VkImageSubresource subresource + VkOffset3D offset + VkExtent3D extent + VkDeviceMemory memory + VkDeviceSize memoryOffset + VkSparseMemoryBindFlagsflags + + If the <<features-features-sparseResidencyAliased,sparse aliased residency>> feature is not enabled, and if any other resources are bound to ranges of pname:memory, the range of pname:memory being bound mustnot: overlap with those bound ranges + pname:memory and pname:memoryOffset must: match the memory requirements of the calling command's pname:image, as described in section <<resources-association>> + pname:subresource must: be a valid subresource for pname:image (see <<resources-image-views>>) + pname:offset.x must: be a multiple of the block width (sname:VkSparseImageFormatProperties::pname:imageGranularity.width) of the image + pname:extent.width must: either be a multiple of the block width of the image, or else pname:extent.width + pname:offset.x must: equal the width of the image subresource + pname:offset.y must: be a multiple of the block height (sname:VkSparseImageFormatProperties::pname:imageGranularity.height) of the image + pname:extent.height must: either be a multiple of the block height of the image, or else pname:extent.height + pname:offset.y must: equal the height of the image subresource + pname:offset.z must: be a multiple of the block depth (sname:VkSparseImageFormatProperties::pname:imageGranularity.depth) of the image + pname:extent.depth must: either be a multiple of the block depth of the image, or else pname:extent.depth + pname:offset.z must: equal the depth of the image subresource + + + + VkBuffer buffer + uint32_t bindCount + const VkSparseMemoryBind* pBinds + + + VkImage image + uint32_t bindCount + const VkSparseMemoryBind* pBinds + + For any given element of pname:pBinds, if the pname:flags member of that element contains ename:VK_SPARSE_MEMORY_BIND_METADATA_BIT, the binding range defined must: be within the mip tail region of the metadata aspect of pname:image + + + + VkImage image + uint32_t bindCount + const VkSparseImageMemoryBind* pBinds + + + VkStructureType sType + const void* pNext + uint32_t waitSemaphoreCount + const VkSemaphore* pWaitSemaphores + uint32_t bufferBindCount + const VkSparseBufferMemoryBindInfo* pBufferBinds + uint32_t imageOpaqueBindCount + const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds + uint32_t imageBindCount + const VkSparseImageMemoryBindInfo* pImageBinds + uint32_t signalSemaphoreCount + const VkSemaphore* pSignalSemaphores + + + VkImageSubresourceLayers srcSubresource + VkOffset3D srcOffset + VkImageSubresourceLayers dstSubresource + VkOffset3D dstOffset + VkExtent3D extent + + The pname:aspectMask member of pname:srcSubresource and pname:dstSubresource must: match + The pname:layerCount member of pname:srcSubresource and pname:dstSubresource must: match + If either of the calling command's pname:srcImage or pname:dstImage parameters are of elink:VkImageType ename:VK_IMAGE_TYPE_3D, the pname:baseArrayLayer and pname:layerCount members of both pname:srcSubresource and pname:dstSubresource must: be `0` and `1`, respectively + The pname:aspectMask member of pname:srcSubresource must: specify aspects present in the calling command's pname:srcImage + The pname:aspectMask member of pname:dstSubresource must: specify aspects present in the calling command's pname:dstImage + pname:srcOffset.x and (pname:extent.width + pname:srcOffset.x) must: both be greater than or equal to `0` and less than or equal to the source image subresource width + pname:srcOffset.y and (pname:extent.height + pname:srcOffset.y) must: both be greater than or equal to `0` and less than or equal to the source image subresource height + pname:srcOffset.z and (pname:extent.depth + pname:srcOffset.z) must: both be greater than or equal to `0` and less than or equal to the source image subresource depth + pname:dstOffset.x and (pname:extent.width + pname:dstOffset.x) must: both be greater than or equal to `0` and less than or equal to the destination image subresource width + pname:dstOffset.y and (pname:extent.height + pname:dstOffset.y) must: both be greater than or equal to `0` and less than or equal to the destination image subresource height + pname:dstOffset.z and (pname:extent.depth + pname:dstOffset.z) must: both be greater than or equal to `0` and less than or equal to the destination image subresource depth + If the calling command's pname:srcImage is a compressed format image: + all members of pname:srcOffset must: be a multiple of the block size in the relevant dimensions + pname:extent.width must: be a multiple of the block width or (pname:extent.width + pname:srcOffset.x) must: equal the source image subresource width + pname:extent.height must: be a multiple of the block height or (pname:extent.height + pname:srcOffset.y) must: equal the source image subresource height + pname:extent.depth must: be a multiple of the block depth or (pname:extent.depth + pname:srcOffset.z) must: equal the source image subresource depth + If the calling command's pname:dstImage is a compressed format image: + all members of pname:dstOffset must: be a multiple of the block size in the relevant dimensions + pname:extent.width must: be a multiple of the block width or (pname:extent.width + pname:dstOffset.x) must: equal the destination image subresource width + pname:extent.height must: be a multiple of the block height or (pname:extent.height + pname:dstOffset.y) must: equal the destination image subresource height + pname:extent.depth must: be a multiple of the block depth or (pname:extent.depth + pname:dstOffset.z) must: equal the destination image subresource depth + pname:srcOffset, pname:dstOffset, and pname:extent must: respect the image transfer granularity requirements of the queue family that it will be submitted against, as described in <<execution-physical-device-enumeration,Physical Device Enumeration>> + + + + VkImageSubresourceLayers srcSubresource + VkOffset3D srcOffsets[2] + VkImageSubresourceLayers dstSubresource + VkOffset3D dstOffsets[2] + + The pname:aspectMask member of pname:srcSubresource and pname:dstSubresource must: match + The pname:layerCount member of pname:srcSubresource and pname:dstSubresource must: match + If either of the calling command's pname:srcImage or pname:dstImage parameters are of elink:VkImageType ename:VK_IMAGE_TYPE_3D, the pname:baseArrayLayer and pname:layerCount members of both pname:srcSubresource and pname:dstSubresource must: be `0` and `1`, respectively + The pname:aspectMask member of pname:srcSubresource must: specify aspects present in the calling command's pname:srcImage + The pname:aspectMask member of pname:dstSubresource must: specify aspects present in the calling command's pname:dstImage + pname:srcOffset[0].x and pname:srcOffset[1].x must: both be greater than or equal to `0` and less than or equal to the source image subresource width + pname:srcOffset[0].y and pname:srcOffset[1].y must: both be greater than or equal to `0` and less than or equal to the source image subresource height + pname:srcOffset[0].z and pname:srcOffset[1].z must: both be greater than or equal to `0` and less than or equal to the source image subresource depth + pname:dstOffset[0].x and pname:dstOffset[1].x must: both be greater than or equal to `0` and less than or equal to the destination image subresource width + pname:dstOffset[0].y and pname:dstOffset[1].y must: both be greater than or equal to `0` and less than or equal to the destination image subresource height + pname:dstOffset[0].z and pname:dstOffset[1].z must: both be greater than or equal to `0` and less than or equal to the destination image subresource depth + + + + VkDeviceSize bufferOffset + uint32_t bufferRowLength + uint32_t bufferImageHeight + VkImageSubresourceLayers imageSubresource + VkOffset3D imageOffset + VkExtent3D imageExtent + + pname:bufferOffset must: be a multiple of the calling command's sname:VkImage parameter's texel size + pname:bufferOffset must: be a multiple of `4` + pname:bufferRowLength must: be `0`, or greater than or equal to the pname:width member of pname:imageExtent + pname:bufferImageHeight must: be `0`, or greater than or equal to the pname:height member of pname:imageExtent + pname:imageOffset.x and (pname:imageExtent.width + pname:imageOffset.x) must: both be greater than or equal to `0` and less than or equal to the image subresource width + pname:imageOffset.y and (imageExtent.height + pname:imageOffset.y) must: both be greater than or equal to `0` and less than or equal to the image subresource height + pname:imageOffset.z and (imageExtent.depth + pname:imageOffset.z) must: both be greater than or equal to `0` and less than or equal to the image subresource depth + If the calling command's sname:VkImage parameter is a compressed format image: + pname:bufferRowLength, pname:bufferImageHeight and all members of pname:imageOffset must: be a multiple of the block size in the relevant dimensions + pname:bufferOffset must: be a multiple of the block size in bytes + pname:imageExtent.width must: be a multiple of the block width or (pname:imageExtent.width + pname:imageOffset.x) must: equal the image subresource width + pname:imageExtent.height must: be a multiple of the block height or (pname:imageExtent.height + pname:imageOffset.y) must: equal the image subresource height + pname:imageExtent.depth must: be a multiple of the block depth or (pname:imageExtent.depth + pname:imageOffset.z) must: equal the image subresource depth + pname:bufferOffset, pname:bufferRowLength, pname:bufferImageHeight and all members of pname:imageOffset and pname:imageExtent must: respect the image transfer granularity requirements of the queue family that it will be submitted against, as described in <<execution-physical-device-enumeration,Physical Device Enumeration>> + The pname:aspectMask member of pname:srcSubresource must: specify aspects present in the calling command's sname:VkImage parameter + The pname:aspectMask member of pname:pSubresource must: only have a single bit set + If the calling command's sname:VkImage parameter is of elink:VkImageType ename:VK_IMAGE_TYPE_3D, the pname:baseArrayLayer and pname:layerCount members of both pname:srcSubresource and pname:dstSubresource must: be `0` and `1`, respectively + + + + VkImageSubresourceLayers srcSubresource + VkOffset3D srcOffset + VkImageSubresourceLayers dstSubresource + VkOffset3D dstOffset + VkExtent3D extent + + The pname:aspectMask member of pname:srcSubresource and pname:dstSubresource must: only contain ename:VK_IMAGE_ASPECT_COLOR_BIT + The pname:layerCount member of pname:srcSubresource and pname:dstSubresource must: match + If either of the calling command's pname:srcImage or pname:dstImage parameters are of elink:VkImageType ename:VK_IMAGE_TYPE_3D, the pname:baseArrayLayer and pname:layerCount members of both pname:srcSubresource and pname:dstSubresource must: be `0` and `1`, respectively + + + + VkStructureType sType + const void* pNext + VkShaderModuleCreateFlags flags + size_t codeSize + const uint32_t* pCode + + pname:codeSize must: be greater than 0 + pname:codeSize must: be a multiple of 4 + pname:pCode must: point to valid SPIR-V code, formatted and packed as described by https://www.khronos.org/registry/spir-v/specs/1.0/SPIRV.html[the SPIR-V Specification v1.0] + pname:pCode must: adhere to the validation rules described by the <<spirvenv-module-validation, Validation Rules within a Module>> section of the <<spirvenv-capabilities,SPIR-V Environment>> appendix + pname:pCode must: declare the code:Shader capability + pname:pCode mustnot: declare any capability that is not supported by the API, as described by the <<spirvenv-module-validation, Capabilities>> section of the <<spirvenv-capabilities,SPIR-V Environment>> appendix + If pname:pCode declares any of the capabilities that are listed as not required by the implementation, the relevant feature must: be enabled, as listed in the <<spirvenv-capabilities-table,SPIR-V Environment>> appendix + + + + uint32_t binding + VkDescriptorType descriptorType + uint32_t descriptorCount + VkShaderStageFlags stageFlags + const VkSampler* pImmutableSamplers + + If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLER or ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and pname:descriptorCount is not `0` and pname:pImmutableSamplers is not `NULL`, pname:pImmutableSamplers must: be a pointer to an array of pname:descriptorCount valid sname:VkSampler handles + If pname:descriptorCount is not `0`, pname:stageFlags must: be a valid combination of elink:VkShaderStageFlagBits values + + + + VkStructureType sType + const void* pNext + VkDescriptorSetLayoutCreateFlags flags + uint32_t bindingCount + const VkDescriptorSetLayoutBinding* pBindings + + + VkDescriptorType type + uint32_t descriptorCount + + The value of pname:descriptorCount must: be greater than `0` + + + + VkStructureType sType + const void* pNext + VkDescriptorPoolCreateFlags flags + uint32_t maxSets + uint32_t poolSizeCount + const VkDescriptorPoolSize* pPoolSizes + + The value of pname:maxSets must: be greater than `0` + + + + VkStructureType sType + const void* pNext + VkDescriptorPool descriptorPool + uint32_t descriptorSetCount + const VkDescriptorSetLayout* pSetLayouts + + The value of pname:descriptorSetCount mustnot: be greater than the number of sets that are currently available for allocation in pname:descriptorPool + + + + uint32_t constantID + uint32_t offset + size_t size + + + uint32_t mapEntryCount + const VkSpecializationMapEntry* pMapEntries + size_t dataSize + const void* pData + + The pname:offset member of any given element of pname:pMapEntries must: be less than pname:dataSize + The sum of the pname:offset and pname:size members of any given element of pname:pMapEntries must: be less than or equal to pname:dataSize + + + + VkStructureType sType + const void* pNext + VkPipelineShaderStageCreateFlags flags + VkShaderStageFlagBits stage + VkShaderModule module + const char* pName + const VkSpecializationInfo* pSpecializationInfo + + If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:stage mustnot: be pname:VK_SHADER_STAGE_GEOMETRY_BIT + If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:stage mustnot: be pname:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or pname:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT + pname:stage mustnot: be ename:VK_SHADER_STAGE_ALL_GRAPHICS, or ename:VK_SHADER_STAGE_ALL + pname:pName must: be the name of an code:OpEntryPoint in pname:module with an execution model that matches pname:stage + If the identified entry point includes any variable in its interface that is declared with the code:ClipDistance code:BuiltIn decoration, that variable mustnot: have an array size greater than sname:VkPhysicalDeviceLimits::pname:maxClipDistances + If the identified entry point includes any variable in its interface that is declared with the code:CullDistance code:BuiltIn decoration, that variable mustnot: have an array size greater than sname:VkPhysicalDeviceLimits::pname:maxCullDistances + If the identified entry point includes any variables in its interface that are declared with the code:ClipDistance or code:CullDistance code:BuiltIn decoration, those variables mustnot: have array sizes which sum to more than sname:VkPhysicalDeviceLimits::pname:maxCombinedClipAndCullDistances + If the identified entry point includes any variable in its interface that is declared with the code:SampleMask code:BuiltIn decoration, that variable mustnot: have an array size greater than sname:VkPhysicalDeviceLimits::pname:maxSampleMaskWords + If pname:stage is ename:VK_SHADER_STAGE_VERTEX_BIT, the identified entry point mustnot: include any input variable in its interface that is decorated with code:CullDistance + If pname:stage is ename:VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT or ename:VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, and the identified entry point has an code:OpExecutionMode instruction that specifies a patch size with code:OutputVertices, the patch size must: be greater than `0` and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxTessellationPatchSize + If pname:stage is ename:VK_SHADER_STAGE_GEOMETRY_BIT, the identified entry point must: have an code:OpExecutionMode instruction that specifies a maximum output vertex count that is greater than `0` and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxGeometryOutputVertices + If pname:stage is ename:VK_SHADER_STAGE_GEOMETRY_BIT, the identified entry point must: have an code:OpExecutionMode instruction that specifies an invocation count that is greater than `0` and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxGeometryShaderInvocations + If pname:stage is ename:VK_SHADER_STAGE_GEOMETRY_BIT, and the identified entry point writes to code:Layer for any primitive, it must: write the same value to code:Layer for all vertices of a given primitive + If pname:stage is ename:VK_SHADER_STAGE_GEOMETRY_BIT, and the identified entry point writes to code:ViewportIndex for any primitive, it must: write the same value to code:ViewportIndex for all vertices of a given primitive + If pname:stage is ename:VK_SHADER_STAGE_FRAGMENT_BIT, the identified entry point mustnot: include any output variables in its interface decorated with code:CullDistance + If pname:stage is ename:VK_SHADER_STAGE_FRAGMENT_BIT, and the identified entry point writes to code:FragDepth in any execution path, it must: write to code:FragDepth in all execution paths + + + + VkStructureType sType + const void* pNext + VkPipelineCreateFlags flags + VkPipelineShaderStageCreateInfo stage + VkPipelineLayout layout + VkPipeline basePipelineHandle + int32_t basePipelineIndex + + If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineIndex is not `-1`, pname:basePipelineHandle must: be sname:VK_NULL_HANDLE + If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineIndex is not `-1`, it must: be a valid index into the calling command's pname:pCreateInfos parameter + If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, pname:basePipelineIndex must: be `-1` + If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, pname:basePipelineHandle must: be a valid sname:VkPipeline handle + If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, it must: be a valid handle to a compute sname:VkPipeline + The pname:stage member of pname:stage must: be ename:VK_SHADER_STAGE_COMPUTE_BIT + The shader code for the entry point identified by pname:stage and the rest of the state identified by this structure must: adhere to the pipeline linking rules described in the <<interfaces,Shader Interfaces>> chapter + pname:layout must: be <<descriptorsets-pipelinelayout-consistency,consistent>> with all shaders specified in pname:pStages + + + + uint32_t binding + uint32_t stride + VkVertexInputRate inputRate + + pname:binding must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindings + pname:stride must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindingStride + + + + uint32_t location + uint32_t binding + VkFormat format + uint32_t offset + + pname:binding must: be less than sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindings + pname:offset must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputAttributeOffset + pname:format must: be allowed as a vertex buffer format, as specified by the ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT flag in sname:VkFormatProperties::pname:bufferFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + + + + VkStructureType sType + const void* pNext + VkPipelineVertexInputStateCreateFlags flags + uint32_t vertexBindingDescriptionCount + const VkVertexInputBindingDescription* pVertexBindingDescriptions + uint32_t vertexAttributeDescriptionCount + const VkVertexInputAttributeDescription* pVertexAttributeDescriptions + + pname:vertexBindingDescriptionCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindings + pname:vertexAttributeDescriptionCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputAttributes + For every value of pname:binding specified by any given element of pname:pVertexAttributeDescriptions, a sname:VkVertexInputBindingDescription must: exist in pname:pVertexBindingDescriptions with the same value of pname:binding + All elements of pname:pVertexBindingDescriptions must: describe distinct binding numbers + All elements of pname:pVertexAttributeDescriptions must: describe distinct attribute locations + + + + + VkStructureType sType + const void* pNext + VkPipelineInputAssemblyStateCreateFlags flags + VkPrimitiveTopology topology + VkBool32 primitiveRestartEnable + + If pname:topology is ename:VK_PRIMITIVE_TOPOLOGY_POINT_LIST, ename:VK_PRIMITIVE_TOPOLOGY_LINE_LIST, ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, ename:VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, the value of pname:primitiveRestartEnable must: be ename:VK_FALSE + If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:topology mustnot: be any of ename:VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, ename:VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY, ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY or ename:VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY + If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:topology mustnot: be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST + + + + VkStructureType sType + const void* pNext + VkPipelineTessellationStateCreateFlags flags + uint32_t patchControlPoints + + pname:patchControlPoints must: be greater than zero and less than or equal to sname:VkPhysicalDeviceLimits::pname:maxTessellationPatchSize + + + + VkStructureType sType + const void* pNext + VkPipelineViewportStateCreateFlags flags + uint32_t viewportCount + const VkViewport* pViewports + uint32_t scissorCount + const VkRect2D* pScissors + + If the <<features-features-multiViewport,multiple viewports>> feature is not enabled, pname:viewportCount must: be `1` + If the <<features-features-multiViewport,multiple viewports>> feature is not enabled, pname:scissorCount must: be `1` + pname:viewportCount must: be between `1` and sname:VkPhysicalDeviceLimits::pname:maxViewports, inclusive + pname:scissorCount must: be between `1` and sname:VkPhysicalDeviceLimits::pname:maxViewports, inclusive + The values of pname:scissorCount and pname:viewportCount must: be identical + + + + VkStructureType sType + const void* pNext + VkPipelineRasterizationStateCreateFlags flags + VkBool32 depthClampEnable + VkBool32 rasterizerDiscardEnable + VkPolygonMode polygonMode + VkCullModeFlags cullMode + VkFrontFace frontFace + VkBool32 depthBiasEnable + float depthBiasConstantFactor + float depthBiasClamp + float depthBiasSlopeFactor + float lineWidth + + If the <<features-features-depthClamp,depth clamping>> feature is not enabled, the value of pname:depthClampEnable must: be ename:VK_FALSE + If the <<features-features-fillModeNonSolid,non-solid fill modes>> feature is not enabled, the value of pname:fillMode must: be ename:VK_POLYGON_MODE_FILL + + + + VkStructureType sType + const void* pNext + VkPipelineMultisampleStateCreateFlags flags + VkSampleCountFlagBits rasterizationSamples + VkBool32 sampleShadingEnable + float minSampleShading + const VkSampleMask* pSampleMask + VkBool32 alphaToCoverageEnable + VkBool32 alphaToOneEnable + + If the <<features-features-sampleRateShading,sample rate shading>> feature is not enabled, pname:sampleShadingEnable must: be ename:VK_FALSE + If the <<features-features-alphaToOne,alpha to one>> feature is not enabled, pname:alphaToOneEnable must: be ename:VK_FALSE + + + + VkBool32 blendEnable + VkBlendFactor srcColorBlendFactor + VkBlendFactor dstColorBlendFactor + VkBlendOp colorBlendOp + VkBlendFactor srcAlphaBlendFactor + VkBlendFactor dstAlphaBlendFactor + VkBlendOp alphaBlendOp + VkColorComponentFlags colorWriteMask + + If the <<features-features-dualSrcBlend,dual source blending>> feature is not enabled, pname:srcColorBlendFactor mustnot: be pname:VK_BLEND_SRC1_COLOR, pname:VK_BLEND_ONE_MINUS_SRC1_COLOR, pname:VK_BLEND_SRC1_ALPHA, or pname:VK_BLEND_ONE_MINUS_SRC1_ALPHA + If the <<features-features-dualSrcBlend,dual source blending>> feature is not enabled, pname:dstColorBlendFactor mustnot: be pname:VK_BLEND_SRC1_COLOR, pname:VK_BLEND_ONE_MINUS_SRC1_COLOR, pname:VK_BLEND_SRC1_ALPHA, or pname:VK_BLEND_ONE_MINUS_SRC1_ALPHA + If the <<features-features-dualSrcBlend,dual source blending>> feature is not enabled, pname:srcAlphaBlendFactor mustnot: be pname:VK_BLEND_SRC1_COLOR, pname:VK_BLEND_ONE_MINUS_SRC1_COLOR, pname:VK_BLEND_SRC1_ALPHA, or pname:VK_BLEND_ONE_MINUS_SRC1_ALPHA + If the <<features-features-dualSrcBlend,dual source blending>> feature is not enabled, pname:dstAlphaBlendFactor mustnot: be pname:VK_BLEND_SRC1_COLOR, pname:VK_BLEND_ONE_MINUS_SRC1_COLOR, pname:VK_BLEND_SRC1_ALPHA, or pname:VK_BLEND_ONE_MINUS_SRC1_ALPHA + + + + VkStructureType sType + const void* pNext + VkPipelineColorBlendStateCreateFlags flags + VkBool32 logicOpEnable + VkLogicOp logicOp + uint32_t attachmentCount + const VkPipelineColorBlendAttachmentState* pAttachments + float blendConstants[4] + + If the <<features-features-independentBlend,independent blending>> feature is not enabled, all elements of pname:pAttachments must: be identical + If the <<features-features-logicOp,logic operations>> feature is not enabled, pname:logicOpEnable must: be ename:VK_FALSE + If pname:logicOpEnable is ename:VK_TRUE, pname:logicOp must: be a valid elink:VkLogicOp value + + + + VkStructureType sType + const void* pNext + VkPipelineDynamicStateCreateFlags flags + uint32_t dynamicStateCount + const VkDynamicState* pDynamicStates + + + VkStencilOp failOp + VkStencilOp passOp + VkStencilOp depthFailOp + VkCompareOp compareOp + uint32_t compareMask + uint32_t writeMask + uint32_t reference + + + VkStructureType sType + const void* pNext + VkPipelineDepthStencilStateCreateFlags flags + VkBool32 depthTestEnable + VkBool32 depthWriteEnable + VkCompareOp depthCompareOp + VkBool32 depthBoundsTestEnable + VkBool32 stencilTestEnable + VkStencilOpState front + VkStencilOpState back + float minDepthBounds + float maxDepthBounds + + If the <<features-features-depthBounds,depth bounds testing>> feature is not enabled, the value of pname:depthBoundsTestEnable must: be ename:VK_FALSE + + + + VkStructureType sType + const void* pNext + VkPipelineCreateFlags flags + uint32_t stageCount + const VkPipelineShaderStageCreateInfo* pStages + const VkPipelineVertexInputStateCreateInfo* pVertexInputState + const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState + const VkPipelineTessellationStateCreateInfo* pTessellationState + const VkPipelineViewportStateCreateInfo* pViewportState + const VkPipelineRasterizationStateCreateInfo* pRasterizationState + const VkPipelineMultisampleStateCreateInfo* pMultisampleState + const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState + const VkPipelineColorBlendStateCreateInfo* pColorBlendState + const VkPipelineDynamicStateCreateInfo* pDynamicState + VkPipelineLayout layout + VkRenderPass renderPass + uint32_t subpass + VkPipeline basePipelineHandle + int32_t basePipelineIndex + + If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineIndex is not `-1`, pname:basePipelineHandle must: be sname:VK_NULL_HANDLE + If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineIndex is not `-1`, it must: be a valid index into the calling command's pname:pCreateInfos parameter + If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, pname:basePipelineIndex must: be `-1` + If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, pname:basePipelineHandle must: be a valid sname:VkPipeline handle + If pname:flags contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and pname:basePipelineHandle is not sname:VK_NULL_HANDLE, it must: be a valid handle to a graphics sname:VkPipeline + pname:stageCount must: be greater than or equal to `1` + The pname:stage member of each element of pname:pStages must: be unique + The pname:stage member of one element of pname:pStages must: be ename:VK_SHADER_STAGE_VERTEX_BIT + The pname:stage member of any given element of pname:pStages mustnot: be ename:VK_SHADER_STAGE_COMPUTE_BIT + If pname:pStages includes a tessellation control shader stage, it must: include a tessellation evaluation shader stage + If pname:pStages includes a tessellation evaluation shader stage, it must: include a tessellation control shader stage + If pname:pStages includes a tessellation control shader stage and a tessellation evaluation shader stage, pname:pTessellationState mustnot: be `NULL` + If pname:pStages includes both a tessellation control shader stage and a tessellation evaluation shader stage, the shader code of at least one must: contain an code:OpExecutionMode instruction that specifies the type of subdivision in the pipeline + If pname:pStages includes both a tessellation control shader stage and a tessellation evaluation shader stage, and the shader code of both contain an code:OpExecutionMode instruction that specifies the type of subdivision in the pipeline, they must: both specify the same subdivision mode + If pname:pStages includes both a tessellation control shader stage and a tessellation evaluation shader stage, the shader code of at least one must: contain an code:OpExecutionMode instruction that specifies the output patch size in the pipeline + If pname:pStages includes both a tessellation control shader stage and a tessellation evaluation shader stage, and the shader code of both contain an code:OpExecutionMode instruction that specifies the out patch size in the pipeline, they must: both specify the same patch size + If pname:pStages includes tessellation shader stages, the pname:topology member of pname:pInputAssembly must: be ename:VK_PRIMITIVE_TOPOLOGY_PATCH_LIST + If pname:pStages includes a geometry shader stage, and doesn't include any tessellation shader stages, its shader code must: contain an code:OpExecutionMode instruction that specifies an input primitive type that is <<shaders-geometry-execution, compatible>> with the primitive topology specified in pname:pInputAssembly + If pname:pStages includes a geometry shader stage, and also includes tessellation shader stages, its shader code must: contain an code:OpExecutionMode instruction that specifies an input primitive type that is <<shaders-geometry-execution, compatible>> with the primitive topology that is output by the tessellation stages + If pname:pStages includes a fragment shader stage and a geometry shader stage, and the fragment shader code reads from an input variable that is decorated with code:PrimitiveID, then the geometry shader code must: write to a matching output variable, decorated with code:PrimitiveID, in all execution paths + If pname:pStages includes a fragment shader stage, its shader code mustnot: read from any input attachment that is defined as ename:VK_ATTACHMENT_UNUSED in pname:subpass + The shader code for the entry points identified by pname:pStages, and the rest of the state identified by this structure must: adhere to the pipeline linking rules described in the <<interfaces,Shader Interfaces>> chapter + If pname:subpass uses a depth/stencil attachment in pname:renderpass that has a layout of ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL in the sname:VkAttachmentReference defined by pname:subpass, and pname:pDepthStencilState is not `NULL`, the pname:depthWriteEnable member of pname:pDepthStencilState must: be ename:VK_FALSE + If pname:subpass uses a depth/stencil attachment in pname:renderpass that has a layout of ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL in the sname:VkAttachmentReference defined by pname:subpass, and pname:pDepthStencilState is not `NULL`, the value of the pname:failOp, pname:passOp and pname:depthFailOp members of each of the pname:front and pname:back members of pname:pDepthStencilState must: be ename:VK_STENCIL_OP_KEEP + If pname:pColorBlendState is not `NULL`, the value of the pname:blendEnable member of each element of the pname:pAttachment member of pname:pColorBlendState must: be ename:VK_FALSE if the pname:format of the attachment referred to in pname:subpass of pname:renderPass does not support color blend operations, as specified by the ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures or sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + If pname:pColorBlendState is not `NULL`, The pname:attachmentCount member of pname:pColorBlendState must: be equal to the value of pname:colorAttachmentCount used to create pname:subpass + If no element of the pname:pDynamicStates member of pname:pDynamicState is ename:VK_DYNAMIC_STATE_VIEWPORT, the pname:pViewports member of pname:pViewportState must: be a pointer to an array of pname:pViewportState->viewportCount sname:VkViewport structures + If no element of the pname:pDynamicStates member of pname:pDynamicState is ename:VK_DYNAMIC_STATE_SCISSOR, the pname:pScissors member of pname:pViewportState must: be a pointer to an array of pname:pViewportState->scissorCount sname:VkRect2D structures + If the wide lines feature is not enabled, and no element of the pname:pDynamicStates member of pname:pDynamicState is ename:VK_DYNAMIC_STATE_LINE_WIDTH, the pname:lineWidth member of pname:pRasterizationState must: be `1.0` + If the pname:rasterizerDiscardEnable member of pname:pRasterizationState is ename:VK_FALSE, pname:pViewportState must: be a pointer to a valid sname:VkPipelineViewportStateCreateInfo structure + If the pname:rasterizerDiscardEnable member of pname:pRasterizationState is ename:VK_FALSE, pname:pMultisampleState must: be a pointer to a valid sname:VkPipelineMultisampleStateCreateInfo structure + If the pname:rasterizerDiscardEnable member of pname:pRasterizationState is ename:VK_FALSE, and pname:subpass uses a depth/stencil attachment, pname:pDepthStencilState must: be a pointer to a valid sname:VkPipelineDepthStencilStateCreateInfo structure + If the pname:rasterizerDiscardEnable member of pname:pRasterizationState is ename:VK_FALSE, and pname:subpass uses color attachments, pname:pColorBlendState must: be a pointer to a valid sname:VkPipelineColorBlendStateCreateInfo structure + If the depth bias clamping feature is not enabled, no element of the pname:pDynamicStates member of pname:pDynamicState is ename:VK_DYNAMIC_STATE_DEPTH_BIAS, and the pname:depthBiasEnable member of pname:pDepthStencil is ename:VK_TRUE, the pname:depthBiasClamp member of pname:pDepthStencil must: be `0.0` + If no element of the pname:pDynamicStates member of pname:pDynamicState is ename:VK_DYNAMIC_STATE_DEPTH_BOUNDS, and the pname:depthBoundsTestEnable member of pname:pDepthStencil is ename:VK_TRUE, the value of the pname:minDepthBounds and pname:maxDepthBounds members of pname:pDepthStencil must: be between `0.0` and `1.0`, inclusive + pname:layout must: be <<descriptorsets-pipelinelayout-consistency,consistent>> with all shaders specified in pname:pStages + If pname:subpass uses color and/or depth/stencil attachments, then the pname:rasterizationSamples member of pname:pMultisampleState must: be the same as the sample count for those subpass attachments + If pname:subpass does not use any color and/or depth/stencil attachments, then the pname:rasterizationSamples member of pname:pMultisampleState must: follow the rules for a <<renderpass-noattachments, zero-attachment subpass>> + pname:subpass must: be a valid subpass within pname:renderpass + + + + VkStructureType sType + const void* pNext + VkPipelineCacheCreateFlags flags + size_t initialDataSize + const void* pInitialData + + If pname:initialDataSize is not `0`, it must: be equal to the size of pname:pInitialData, as returned by fname:vkGetPipelineCacheData when pname:pInitialData was originally retrieved + If pname:initialDataSize is not `0`, pname:pInitialData must: have been retrieved from a previous call to fname:vkGetPipelineCacheData + + + + VkShaderStageFlags stageFlags + uint32_t offset + uint32_t size + + The sum of pname:offset and pname:size must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPushConstantsSize + The value of pname:size must: be greater than `0` + The value of pname:size must: be a multiple of `4` + + + + VkStructureType sType + const void* pNext + VkPipelineLayoutCreateFlags flags + uint32_t setLayoutCount + const VkDescriptorSetLayout* pSetLayouts + uint32_t pushConstantRangeCount + const VkPushConstantRange* pPushConstantRanges + + pname:setLayoutCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxBoundDescriptorSets + The total number of descriptors of the type ename:VK_DESCRIPTOR_TYPE_SAMPLER and ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER accessible to any given shader stage across all elements of pname:pSetLayouts must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorSamplers + The total number of descriptors of the type ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER and ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC accessible to any given shader stage across all elements of pname:pSetLayouts must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorUniformBuffers + The total number of descriptors of the type ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER and ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC accessible to any given shader stage across all elements of pname:pSetLayouts must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorStorageBuffers + The total number of descriptors of the type ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, and ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER accessible to any given shader stage across all elements of pname:pSetLayouts must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorSampledImages + The total number of descriptors of the type ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, and ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER accessible to any given shader stage across all elements of pname:pSetLayouts must: be less than or equal to the value of sname:VkPhysicalDeviceLimits::pname:maxPerStageDescriptorStorageImages + + + + VkStructureType sType + const void* pNext + VkSamplerCreateFlags flags + VkFilter magFilter + VkFilter minFilter + VkSamplerMipmapMode mipmapMode + VkSamplerAddressMode addressModeU + VkSamplerAddressMode addressModeV + VkSamplerAddressMode addressModeW + float mipLodBias + VkBool32 anisotropyEnable + float maxAnisotropy + VkBool32 compareEnable + VkCompareOp compareOp + float minLod + float maxLod + VkBorderColor borderColor + VkBool32 unnormalizedCoordinates + + The absolute value of pname:mipLodBias must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxSamplerLodBias + If the <<features-features-samplerAnisotropy,anisotropic sampling>> feature is not enabled, pname:anisotropyEnable must: be ename:VK_FALSE + If pname:anisotropyEnable is ename:VK_TRUE, the value of pname:maxAnisotropy must: be between `1.0` and sname:VkPhysicalDeviceLimits::pname:maxSamplerAnisotropy, inclusive + If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:minFilter and pname:magFilter must: be equal + If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:mipmapMode must: be ename:VK_SAMPLER_MIPMAP_MODE_NEAREST + If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:minLod and pname:maxLod must: be zero + If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:addressModeU and pname:addressModeV must: each be either ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE or ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER + If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:anisotropyEnable must: be ename:VK_FALSE + If pname:unnormalizedCoordinates is ename:VK_TRUE, pname:compareEnable must: be ename:VK_FALSE + If any of pname:addressModeU, pname:addressModeV or pname:addressModeW are ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER, pname:borderColor must: be a valid elink:VkBorderColor value + If pname:compareEnable is ename:VK_TRUE, pname:compareOp must: be a valid elink:VkCompareOp value + + + + VkStructureType sType + const void* pNext + VkCommandPoolCreateFlags flags + uint32_t queueFamilyIndex + + pname:queueFamilyIndex must: be the index of a queue family available in the calling command's pname:device parameter + + + + VkStructureType sType + const void* pNext + VkCommandPool commandPool + VkCommandBufferLevel level + uint32_t commandBufferCount + + + VkStructureType sType + const void* pNext + VkRenderPass renderPass + uint32_t subpass + VkFramebuffer framebuffer + VkBool32 occlusionQueryEnable + VkQueryControlFlags queryFlags + VkQueryPipelineStatisticFlags pipelineStatistics + + If the <<features-features-inheritedQueries,inherited queries>> feature is not enabled, pname:occlusionQueryEnable must: be ename:VK_FALSE + If the <<features-features-inheritedQueries,inherited queries>> feature is enabled, pname:queryFlags must: be a valid combination of elink:VkQueryControlFlagBits values + If the <<features-features-pipelineStatisticsQuery,pipeline statistics queries>> feature is not enabled, pname:pipelineStatistics must: be code:0 + + + + VkStructureType sType + const void* pNext + VkCommandBufferUsageFlags flags + const VkCommandBufferInheritanceInfo* pInheritanceInfo + + If pname:flags contains ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the pname:renderPass member of pname:pInheritanceInfo must: be a valid sname:VkRenderPass + If pname:flags contains ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the pname:subpass member of pname:pInheritanceInfo must: be a valid subpass index within the pname:renderPass member of pname:pInheritanceInfo + If pname:flags contains ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the pname:framebuffer member of pname:pInheritanceInfo must: be either sname:VK_NULL_HANDLE, or a valid sname:VkFramebuffer that is compatible with the pname:renderPass member of pname:pInheritanceInfo + + + + VkStructureType sType + const void* pNext + VkRenderPass renderPass + VkFramebuffer framebuffer + VkRect2D renderArea + uint32_t clearValueCount + const VkClearValue* pClearValues + + The value of pname:clearValueCount must: be greater than or equal to the number of attachments in pname:renderPass that specify a pname:loadOp of ename:VK_ATTACHMENT_LOAD_OP_CLEAR + + + + float float32[4] + int32_t int32[4] + uint32_t uint32[4] + + + float depth + uint32_t stencil + + + VkClearColorValue color + VkClearDepthStencilValue depthStencil + + + VkImageAspectFlags aspectMask + uint32_t colorAttachment + VkClearValue clearValue + + If pname:aspectMask includes ename:VK_IMAGE_ASPECT_COLOR_BIT, it mustnot: include ename:VK_IMAGE_ASPECT_DEPTH_BIT or ename:VK_IMAGE_ASPECT_STENCIL_BIT + pname:aspectMask mustnot: include ename:VK_IMAGE_ASPECT_METADATA_BIT + + + + VkAttachmentDescriptionFlags flags + VkFormat format + VkSampleCountFlagBits samples + VkAttachmentLoadOp loadOp + VkAttachmentStoreOp storeOp + VkAttachmentLoadOp stencilLoadOp + VkAttachmentStoreOp stencilStoreOp + VkImageLayout initialLayout + VkImageLayout finalLayout + + + uint32_t attachment + VkImageLayout layout + + + VkSubpassDescriptionFlags flags + VkPipelineBindPoint pipelineBindPoint + uint32_t inputAttachmentCount + const VkAttachmentReference* pInputAttachments + uint32_t colorAttachmentCount + const VkAttachmentReference* pColorAttachments + const VkAttachmentReference* pResolveAttachments + const VkAttachmentReference* pDepthStencilAttachment + uint32_t preserveAttachmentCount + const uint32_t* pPreserveAttachments + + pname:pipelineBindPoint must: be ename:VK_PIPELINE_BIND_POINT_GRAPHICS + The value of pname:colorCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxColorAttachments + If the first use of an attachment in this render pass is as an input attachment, and the attachment is not also used as a color or depth/stencil attachment in the same subpass, then pname:loadOp mustnot: be ename:VK_ATTACHMENT_LOAD_OP_CLEAR + If pname:pResolveAttachments is not `NULL`, for each resolve attachment that does not have the value ename:VK_ATTACHMENT_UNUSED, the corresponding color attachment mustnot: have the value ename:VK_ATTACHMENT_UNUSED + If pname:pResolveAttachments is not `NULL`, the sample count of each element of pname:pColorAttachments must: be anything other than ename:VK_SAMPLE_COUNT_1_BIT + Any given element of pname:pResolveAttachments must: have a sample count of ename:VK_SAMPLE_COUNT_1_BIT + Any given element of pname:pResolveAttachments must: have the same elink:VkFormat as its corresponding color attachment + All attachments in pname:pColorAttachments and pname:pDepthStencilAttachment that are not ename:VK_ATTACHMENT_UNUSED must: have the same sample count + If any input attachments are ename:VK_ATTACHMENT_UNUSED, then any pipelines bound during the subpass mustnot: accesss those input attachments from the fragment shader + The pname:attachment member of any element of pname:pPreserveAttachments mustnot: be ename:VK_ATTACHMENT_UNUSED + Any given element of pname:pPreserveAttachments mustnot: also be an element of any other member of the subpass description + If any attachment is used as both an input attachment and a color or depth/stencil attachment, then each use must use the same pname:layout + + + + uint32_t srcSubpass + uint32_t dstSubpass + VkPipelineStageFlags srcStageMask + VkPipelineStageFlags dstStageMask + VkAccessFlags srcAccessMask + VkAccessFlags dstAccessMask + VkDependencyFlags dependencyFlags + + If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT + If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT + If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT + If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT + The value of pname:srcSubpass must: be less than or equal to pname:dstSubpass, unless one of them is ename:VK_SUBPASS_EXTERNAL, to avoid cyclic dependencies and ensure a valid execution order + The values of pname:srcSubpass and pname:dstSubpass mustnot: both be equal to ename:VK_SUBPASS_EXTERNAL + + + + VkStructureType sType + const void* pNext + VkRenderPassCreateFlags flags + uint32_t attachmentCount + const VkAttachmentDescription* pAttachments + uint32_t subpassCount + const VkSubpassDescription* pSubpasses + uint32_t dependencyCount + const VkSubpassDependency* pDependencies + + If any two subpasses operate on attachments with overlapping ranges of the same sname:VkDeviceMemory object, and at least one subpass writes to that area of sname:VkDeviceMemory, a subpass dependency must: be included (either directly or via some intermediate subpasses) between them + If the pname:attachment member of any element of pname:pInputAttachments, pname:pColorAttachments, pname:pResolveAttachments or pname:pDepthStencilAttachment, or the attachment indexed by any element of pname:pPreserveAttachments in any given element of pname:pSubpasses is bound to a range of a sname:VkDeviceMemory object that overlaps with any other attachment in any subpass (including the same subpass), the sname:VkAttachmentDescription structures describing them must: include ename:VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT in pname:flags + If the pname:attachment member of any element of pname:pInputAttachments, pname:pColorAttachments, pname:pResolveAttachments or pname:pDepthStencilAttachment, or the value of any element of pname:pPreserveAttachments in any given element of pname:pSubpasses is not ename:VK_ATTACHMENT_UNUSED, it must: be less than the value of pname:attachmentCount + The value of any element of the pname:pPreserveAttachments member in any given element of pname:pSubpasses mustnot: be ename:VK_ATTACHMENT_UNUSED + + + + VkStructureType sType + const void* pNext + VkEventCreateFlags flags + + + VkStructureType sType + const void* pNext + VkFenceCreateFlags flags + + + VkBool32 robustBufferAccess + VkBool32 fullDrawIndexUint32 + VkBool32 imageCubeArray + VkBool32 independentBlend + VkBool32 geometryShader + VkBool32 tessellationShader + VkBool32 sampleRateShading + VkBool32 dualSrcBlend + VkBool32 logicOp + VkBool32 multiDrawIndirect + VkBool32 drawIndirectFirstInstance + VkBool32 depthClamp + VkBool32 depthBiasClamp + VkBool32 fillModeNonSolid + VkBool32 depthBounds + VkBool32 wideLines + VkBool32 largePoints + VkBool32 alphaToOne + VkBool32 multiViewport + VkBool32 samplerAnisotropy + VkBool32 textureCompressionETC2 + VkBool32 textureCompressionASTC_LDR + VkBool32 textureCompressionBC + VkBool32 occlusionQueryPrecise + VkBool32 pipelineStatisticsQuery + VkBool32 vertexPipelineStoresAndAtomics + VkBool32 fragmentStoresAndAtomics + VkBool32 shaderTessellationAndGeometryPointSize + VkBool32 shaderImageGatherExtended + VkBool32 shaderStorageImageExtendedFormats + VkBool32 shaderStorageImageMultisample + VkBool32 shaderStorageImageReadWithoutFormat + VkBool32 shaderStorageImageWriteWithoutFormat + VkBool32 shaderUniformBufferArrayDynamicIndexing + VkBool32 shaderSampledImageArrayDynamicIndexing + VkBool32 shaderStorageBufferArrayDynamicIndexing + VkBool32 shaderStorageImageArrayDynamicIndexing + VkBool32 shaderClipDistance + VkBool32 shaderCullDistance + VkBool32 shaderFloat64 + VkBool32 shaderInt64 + VkBool32 shaderInt16 + VkBool32 shaderResourceResidency + VkBool32 shaderResourceMinLod + VkBool32 sparseBinding + VkBool32 sparseResidencyBuffer + VkBool32 sparseResidencyImage2D + VkBool32 sparseResidencyImage3D + VkBool32 sparseResidency2Samples + VkBool32 sparseResidency4Samples + VkBool32 sparseResidency8Samples + VkBool32 sparseResidency16Samples + VkBool32 sparseResidencyAliased + VkBool32 variableMultisampleRate + VkBool32 inheritedQueries + + If the value of any member of this structure is ename:VK_FALSE, as returned by flink:vkGetPhysicalDeviceFeatures, then it must: be ename:VK_FALSE when passed as part of the sname:VkDeviceCreateInfo struct when creating a device + + + + VkBool32 residencyStandard2DBlockShape + VkBool32 residencyStandard2DMultisampleBlockShape + VkBool32 residencyStandard3DBlockShape + VkBool32 residencyAlignedMipSize + VkBool32 residencyNonResidentStrict + + + + uint32_t maxImageDimension1D + uint32_t maxImageDimension2D + uint32_t maxImageDimension3D + uint32_t maxImageDimensionCube + uint32_t maxImageArrayLayers + uint32_t maxTexelBufferElements + uint32_t maxUniformBufferRange + uint32_t maxStorageBufferRange + uint32_t maxPushConstantsSize + + uint32_t maxMemoryAllocationCount + uint32_t maxSamplerAllocationCount + VkDeviceSize bufferImageGranularity + VkDeviceSize sparseAddressSpaceSize + + uint32_t maxBoundDescriptorSets + uint32_t maxPerStageDescriptorSamplers + uint32_t maxPerStageDescriptorUniformBuffers + uint32_t maxPerStageDescriptorStorageBuffers + uint32_t maxPerStageDescriptorSampledImages + uint32_t maxPerStageDescriptorStorageImages + uint32_t maxPerStageDescriptorInputAttachments + uint32_t maxPerStageResources + uint32_t maxDescriptorSetSamplers + uint32_t maxDescriptorSetUniformBuffers + uint32_t maxDescriptorSetUniformBuffersDynamic + uint32_t maxDescriptorSetStorageBuffers + uint32_t maxDescriptorSetStorageBuffersDynamic + uint32_t maxDescriptorSetSampledImages + uint32_t maxDescriptorSetStorageImages + uint32_t maxDescriptorSetInputAttachments + + uint32_t maxVertexInputAttributes + uint32_t maxVertexInputBindings + uint32_t maxVertexInputAttributeOffset + uint32_t maxVertexInputBindingStride + uint32_t maxVertexOutputComponents + + uint32_t maxTessellationGenerationLevel + uint32_t maxTessellationPatchSize + uint32_t maxTessellationControlPerVertexInputComponents + uint32_t maxTessellationControlPerVertexOutputComponents + uint32_t maxTessellationControlPerPatchOutputComponents + uint32_t maxTessellationControlTotalOutputComponents + + uint32_t maxTessellationEvaluationInputComponents + uint32_t maxTessellationEvaluationOutputComponents + + uint32_t maxGeometryShaderInvocations + uint32_t maxGeometryInputComponents + uint32_t maxGeometryOutputComponents + uint32_t maxGeometryOutputVertices + uint32_t maxGeometryTotalOutputComponents + + uint32_t maxFragmentInputComponents + uint32_t maxFragmentOutputAttachments + uint32_t maxFragmentDualSrcAttachments + uint32_t maxFragmentCombinedOutputResources + + uint32_t maxComputeSharedMemorySize + uint32_t maxComputeWorkGroupCount[3] + uint32_t maxComputeWorkGroupInvocations + uint32_t maxComputeWorkGroupSize[3] + + uint32_t subPixelPrecisionBits + uint32_t subTexelPrecisionBits + uint32_t mipmapPrecisionBits + + uint32_t maxDrawIndexedIndexValue + uint32_t maxDrawIndirectCount + + float maxSamplerLodBias + float maxSamplerAnisotropy + + uint32_t maxViewports + uint32_t maxViewportDimensions[2] + float viewportBoundsRange[2] + uint32_t viewportSubPixelBits + + size_t minMemoryMapAlignment + VkDeviceSize minTexelBufferOffsetAlignment + VkDeviceSize minUniformBufferOffsetAlignment + VkDeviceSize minStorageBufferOffsetAlignment + + int32_t minTexelOffset + uint32_t maxTexelOffset + int32_t minTexelGatherOffset + uint32_t maxTexelGatherOffset + float minInterpolationOffset + float maxInterpolationOffset + uint32_t subPixelInterpolationOffsetBits + + uint32_t maxFramebufferWidth + uint32_t maxFramebufferHeight + uint32_t maxFramebufferLayers + VkSampleCountFlags framebufferColorSampleCounts + VkSampleCountFlags framebufferDepthSampleCounts + VkSampleCountFlags framebufferStencilSampleCounts + VkSampleCountFlags framebufferNoAttachmentsSampleCounts + uint32_t maxColorAttachments + + VkSampleCountFlags sampledImageColorSampleCounts + VkSampleCountFlags sampledImageIntegerSampleCounts + VkSampleCountFlags sampledImageDepthSampleCounts + VkSampleCountFlags sampledImageStencilSampleCounts + VkSampleCountFlags storageImageSampleCounts + uint32_t maxSampleMaskWords + + VkBool32 timestampComputeAndGraphics + float timestampPeriod + + uint32_t maxClipDistances + uint32_t maxCullDistances + uint32_t maxCombinedClipAndCullDistances + + uint32_t discreteQueuePriorities + + float pointSizeRange[2] + float lineWidthRange[2] + float pointSizeGranularity + float lineWidthGranularity + VkBool32 strictLines + VkBool32 standardSampleLocations + VkDeviceSize optimalBufferCopyOffsetAlignment + VkDeviceSize optimalBufferCopyRowPitchAlignment + VkDeviceSize nonCoherentAtomSize + + + VkStructureType sType + const void* pNext + VkSemaphoreCreateFlags flags + + + VkStructureType sType + const void* pNext + VkQueryPoolCreateFlags flags + VkQueryType queryType + uint32_t queryCount + VkQueryPipelineStatisticFlags pipelineStatistics + + If the <<features-features-pipelineStatisticsQuery,pipeline statistics queries>> feature is not enabled, pname:queryType mustnot: be ename:VK_QUERY_TYPE_PIPELINE_STATISTICS + If pname:queryType is ename:VK_QUERY_TYPE_PIPELINE_STATISTICS, pname:pipelineStatistics must: be a valid combination of elink:VkQueryPipelineStatisticFlagBits values + + + + VkStructureType sType + const void* pNext + VkFramebufferCreateFlags flags + VkRenderPass renderPass + uint32_t attachmentCount + const VkImageView* pAttachments + uint32_t width + uint32_t height + uint32_t layers + + The value of pname:attachmentCount must: be equal to the attachment count specified in pname:renderPass + Any given element of pname:pAttachments that is used as a color attachment or resolve attachment by pname:renderPass must: have been created with a pname:usage value including ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT + Any given element of pname:pAttachments that is used as a depth/stencil attachment by pname:renderPass must: have been created with a pname:usage value including ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT + Any given element of pname:pAttachments that is used as an input attachment by pname:renderPass must: have been created with a pname:usage value including ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT + Any given element of pname:pAttachments must: have been created with an elink:VkFormat value that matches the elink:VkFormat specified by the corresponding sname:VkAttachmentDescription in pname:renderPass + Any given element of pname:pAttachments must: have been created with a pname:samples value that matches the pname:samples value specified by the corresponding sname:VkAttachmentDescription in pname:renderPass + Any given element of pname:pAttachments must: have dimensions at least as large as the corresponding framebuffer dimension + Any given element of pname:pAttachments must: only specify a single mip-level + Any given element of pname:pAttachments must: have been created with identity swizzle + The value of pname:width must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxFramebufferWidth + The value of pname:height must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxFramebufferHeight + The value of pname:layers must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxFramebufferLayers + + + + uint32_t vertexCount + uint32_t instanceCount + uint32_t firstVertex + uint32_t firstInstance + + For a given vertex buffer binding, any attribute data fetched must: be entirely contained within the corresponding vertex buffer binding, as described in <<fxvertex-input>> + If the <<features-features-drawIndirectFirstInstance,drawIndirectFirstInstance>> feature is not enabled, pname:firstInstance must: be code:0 + + + + uint32_t indexCount + uint32_t instanceCount + uint32_t firstIndex + int32_t vertexOffset + uint32_t firstInstance + + For a given vertex buffer binding, any attribute data fetched must: be entirely contained within the corresponding vertex buffer binding, as described in <<fxvertex-input>> + The total value of (pname:indexSize * (pname:firstIndex + pname:indexCount) + pname:offset) must: be less than or equal to the size of the currently bound index buffer, with indexSize being based on the type specified by pname:indexType, where the index buffer, pname:indexType, and pname:offset are specified via fname:vkCmdBindIndexBuffer + If the <<features-features-drawIndirectFirstInstance,drawIndirectFirstInstance>> feature is not enabled, pname:firstInstance must: be code:0 + + + + uint32_t x + uint32_t y + uint32_t z + + pname:x must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[0] + pname:y must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[1] + pname:z must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[2] + + + + VkStructureType sType + const void* pNext + uint32_t waitSemaphoreCount + const VkSemaphore* pWaitSemaphores + const VkPipelineStageFlags* pWaitDstStageMask + uint32_t commandBufferCount + const VkCommandBuffer* pCommandBuffers + uint32_t signalSemaphoreCount + const VkSemaphore* pSignalSemaphores + + Any given element of pname:pSignalSemaphores must: currently be unsignalled + Any given element of pname:pCommandBuffers must: either have been recorded with the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, or not currently be executing on the device + Any given element of pname:pCommandBuffers must: be in the executable state + If any given element of pname:pCommandBuffers contains commands that execute secondary command buffers, those secondary command buffers must: have been recorded with the ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, or not currently be executing on the device + If any given element of pname:pCommandBuffers was created with ename:VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, it mustnot: have been previously submitted without re-recording that command buffer + Any given element of pname:pCommandBuffers mustnot: contain commands that execute a secondary command buffer, if that secondary command buffer has been recorded in another primary command buffer after it was recorded into this sname:VkCommandBuffer + Any given element of pname:pCommandBuffers must: have been created on a sname:VkCommandPool that was created for the same queue family that the calling command's pname:queue belongs to + Any given element of pname:pCommandBuffers mustnot: have been created with ename:VK_COMMAND_BUFFER_LEVEL_SECONDARY + Any given element of sname:VkSemaphore in pname:pWaitSemaphores must: refer to a prior signal of that sname:VkSemaphore that won't be consumed by any other wait on that semaphore + If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, any given element of pname:pWaitDstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT + If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, any given element of pname:pWaitDstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT + + + + + VkDisplayKHR display + const char* displayName + VkExtent2D physicalDimensions + VkExtent2D physicalResolution + VkSurfaceTransformFlagsKHR supportedTransforms + VkBool32 planeReorderPossible + VkBool32 persistentContent + + + VkDisplayKHR currentDisplay + uint32_t currentStackIndex + + + VkExtent2D visibleRegion + uint32_t refreshRate + + + VkDisplayModeKHR displayMode + VkDisplayModeParametersKHR parameters + + + VkStructureType sType + const void* pNext + VkDisplayModeCreateFlagsKHR flags + VkDisplayModeParametersKHR parameters + + The pname:width and pname:height members of the pname:visibleRegion member of pname:parameters must be greater than `0` + The pname:refreshRate member of pname:parameters must be greater than `0` + + + + VkDisplayPlaneAlphaFlagsKHR supportedAlpha + VkOffset2D minSrcPosition + VkOffset2D maxSrcPosition + VkExtent2D minSrcExtent + VkExtent2D maxSrcExtent + VkOffset2D minDstPosition + VkOffset2D maxDstPosition + VkExtent2D minDstExtent + VkExtent2D maxDstExtent + + + VkStructureType sType + const void* pNext + VkDisplaySurfaceCreateFlagsKHR flags + VkDisplayModeKHR displayMode + uint32_t planeIndex + uint32_t planeStackIndex + VkSurfaceTransformFlagBitsKHR transform + float globalAlpha + VkDisplayPlaneAlphaFlagBitsKHR alphaMode + VkExtent2D imageExtent + + pname:planeIndex must: be less than the number of display planes supported by the device as determined by calling fname:vkGetPhysicalDeviceDisplayPlanePropertiesKHR + If the pname:planeReorderPossible member of the sname:VkDisplayPropertiesKHR structure returned by fname:vkGetPhysicalDeviceDisplayPropertiesKHR for the display corresponding to pname:displayMode is ename:VK_TRUE then pname:planeStackIndex must: be less than the number of display planes supported by the device as determined by calling fname:vkGetPhysicalDeviceDisplayPlanePropertiesKHR; otherwise pname:planeStackIndex must: equal the pname:currentStackIndex member of sname:VkDisplayPlanePropertiesKHR returned by fname:vkGetPhysicalDeviceDisplayPlanePropertiesKHR for the display plane corresponding to pname:displayMode + If pname:alphaMode is ename:VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR then pname:globalAlpha must: be between `0` and `1`, inclusive + pname:alphaMode must: be `0` or one of the bits present in the pname:supportedAlpha member of sname:VkDisplayPlaneCapabilitiesKHR returned by fname:vkGetDisplayPlaneCapabilitiesKHR for the display plane corresponding to pname:displayMode + The pname:width and pname:height members of pname:imageExtent must be less than the pname:maxImageDimensions2D member of sname:VkPhysicalDeviceLimits + + + + VkStructureType sType + const void* pNext + VkRect2D srcRect + VkRect2D dstRect + VkBool32 persistent + + pname:srcRect must: specify a rectangular region that is a subset of the image being presented + pname:dstRect must: specify a rectangular region that is a subset of the pname:visibleRegion parameter of the display mode the swapchain being presented uses + If the pname:persistentContent member of the sname:VkDisplayPropertiesKHR structure returned by fname:vkGetPhysicalDeviceDisplayPropertiesKHR for the display the present operation targets then pname:persistent must: be ename:VK_FALSE + + + + uint32_t minImageCount + uint32_t maxImageCount + VkExtent2D currentExtent + VkExtent2D minImageExtent + VkExtent2D maxImageExtent + uint32_t maxImageArrayLayers + VkSurfaceTransformFlagsKHR supportedTransforms + VkSurfaceTransformFlagBitsKHR currentTransform + VkCompositeAlphaFlagsKHR supportedCompositeAlpha + VkImageUsageFlags supportedUsageFlags + + + VkStructureType sType + const void* pNext + VkAndroidSurfaceCreateFlagsKHR flags + ANativeWindow* window + + pname:window mustnot: be in a connected state + + + + VkStructureType sType + const void* pNext + VkMirSurfaceCreateFlagsKHR flags + MirConnection* connection + MirSurface* mirSurface + + + VkStructureType sType + const void* pNext + VkWaylandSurfaceCreateFlagsKHR flags + struct wl_display* display + struct wl_surface* surface + + + VkStructureType sType + const void* pNext + VkWin32SurfaceCreateFlagsKHR flags + HINSTANCE hinstance + HWND hwnd + + + VkStructureType sType + const void* pNext + VkXlibSurfaceCreateFlagsKHR flags + Display* dpy + Window window + + + VkStructureType sType + const void* pNext + VkXcbSurfaceCreateFlagsKHR flags + xcb_connection_t* connection + xcb_window_t window + + + VkFormat format + VkColorSpaceKHR colorSpace + + + VkStructureType sType + const void* pNext + VkSwapchainCreateFlagsKHR flags + VkSurfaceKHR surface + uint32_t minImageCount + VkFormat imageFormat + VkColorSpaceKHR imageColorSpace + VkExtent2D imageExtent + uint32_t imageArrayLayers + VkImageUsageFlags imageUsage + VkSharingMode imageSharingMode + uint32_t queueFamilyIndexCount + const uint32_t* pQueueFamilyIndices + VkSurfaceTransformFlagBitsKHR preTransform + VkCompositeAlphaFlagBitsKHR compositeAlpha + VkPresentModeKHR presentMode + VkBool32 clipped + VkSwapchainKHR oldSwapchain + + pname:surface must: be a surface that is supported by the device as determined using fname:vkGetPhysicalDeviceSurfaceSupportKHR + The native window referred to by pname:surface mustnot: already be associated with a swapchain other than pname:oldSwapchain, or with a non-{apiname} graphics API surface + pname:minImageCount must: be greater than or equal to the value returned in the pname:minImageCount member of the sname:VkSurfaceCapabilitiesKHR structure returned by fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface + pname:minImageCount must: be less than or equal to the value returned in the pname:maxImageCount member of the sname:VkSurfaceCapabilitiesKHR structure returned by fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface if the returned value of pname:maxImageCount is not zero + pname:imageFormat and pname:imageColorspace must: match the pname:format and pname:colorSpace members, respectively, of one of the sname:VkSurfaceFormatKHR structures returned by fname:vkGetPhysicalDeviceSurfaceFormatsKHR for the surface + pname:imageExtent must: be between pname:minImageExtent and pname:maxImageExtent, inclusive, where pname:minImageExtent and pname:maxImageExtent are members of the sname:VkSurfaceCapabilitiesKHR structure returned by fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface + pname:imageArrayLayers must: be greater than `0` and less than or equal to the pname:maxImageArrayLayers member of the sname:VkSurfaceCapabilitiesKHR structure returned by fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface + pname:imageUsage must: be a subset of the supported usage flags present in the pname:supportedUsageFlags member of the sname:VkSurfaceCapabilitiesKHR structure returned by fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface + If pname:imageSharingMode is ename:VK_SHARING_MODE_CONCURRENT, pname:pQueueFamilyIndices must: be a pointer to an array of pname:queueFamilyIndexCount basetype:uint32_t values + If pname:imageSharingMode is ename:VK_SHARING_MODE_CONCURRENT, pname:queueFamilyIndexCount must: be greater than `1` + pname:preTransform must: be one of the bits present in the pname:supportedTransforms member of the sname:VkSurfaceCapabilitiesKHR structure returned by fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface + pname:compositeAlpha must: be one of the bits present in the pname:supportedCompositeAlpha member of the sname:VkSurfaceCapabilitiesKHR structure returned by fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface + pname:presentMode must: be one of the ename:VkPresentModeKHR values returned by fname:vkGetPhysicalDeviceSurfacePresentModesKHR for the surface + + + + VkStructureType sType + const void* pNext + uint32_t waitSemaphoreCount + const VkSemaphore* pWaitSemaphores + uint32_t swapchainCount + const VkSwapchainKHR* pSwapchains + const uint32_t* pImageIndices + VkResult* pResults + + Any given element of pname:pImageIndices must: be the index of a presentable image acquired from the swapchain specified by the corresponding element of the pname:pSwapchains array that is owned by the application + Any given element of sname:VkSemaphore in pname:pWaitSemaphores must: refer to a prior signal of that sname:VkSemaphore that won't be consumed by any other wait on that semaphore + + + + VkStructureType sType + const void* pNext + VkDebugReportFlagsEXT flags + PFN_vkDebugReportCallbackEXT pfnCallback + void* pUserData + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VkResult vkCreateInstance + const VkInstanceCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkInstance* pInstance + + + void vkDestroyInstance + VkInstance instance + const VkAllocationCallbacks* pAllocator + + All child objects created using pname:instance must: have been destroyed prior to destroying pname:instance + If sname:VkAllocationCallbacks were provided when pname:instance was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:instance was created, pname:pAllocator must: be `NULL` + + + + VkResult vkEnumeratePhysicalDevices + VkInstance instance + uint32_t* pPhysicalDeviceCount + VkPhysicalDevice* pPhysicalDevices + + + PFN_vkVoidFunction vkGetDeviceProcAddr + VkDevice device + const char* pName + + pname:pName must: be the name of a supported command that has a first parameter of type sname:VkDevice, sname:VkQueue or sname:VkCommandBuffer, either in the core API or an enabled extension + + + + PFN_vkVoidFunction vkGetInstanceProcAddr + VkInstance instance + const char* pName + + If pname:instance is `NULL`, pname:pName must: be one of: fname:vkEnumerateInstanceExtensionProperties, fname:vkEnumerateInstanceLayerProperties or fname:vkCreateInstance + If pname:instance is not `NULL`, pname:pName must: be the name of a core command or a command from an enabled extension, other than: fname:vkEnumerateInstanceExtensionProperties, fname:vkEnumerateInstanceLayerProperties or fname:vkCreateInstance + + + + void vkGetPhysicalDeviceProperties + VkPhysicalDevice physicalDevice + VkPhysicalDeviceProperties* pProperties + + + void vkGetPhysicalDeviceQueueFamilyProperties + VkPhysicalDevice physicalDevice + uint32_t* pQueueFamilyPropertyCount + VkQueueFamilyProperties* pQueueFamilyProperties + + + void vkGetPhysicalDeviceMemoryProperties + VkPhysicalDevice physicalDevice + VkPhysicalDeviceMemoryProperties* pMemoryProperties + + + void vkGetPhysicalDeviceFeatures + VkPhysicalDevice physicalDevice + VkPhysicalDeviceFeatures* pFeatures + + + void vkGetPhysicalDeviceFormatProperties + VkPhysicalDevice physicalDevice + VkFormat format + VkFormatProperties* pFormatProperties + + + VkResult vkGetPhysicalDeviceImageFormatProperties + VkPhysicalDevice physicalDevice + VkFormat format + VkImageType type + VkImageTiling tiling + VkImageUsageFlags usage + VkImageCreateFlags flags + VkImageFormatProperties* pImageFormatProperties + + + VkResult vkCreateDevice + VkPhysicalDevice physicalDevice + const VkDeviceCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDevice* pDevice + + + void vkDestroyDevice + VkDevice device + const VkAllocationCallbacks* pAllocator + + All child objects created on pname:device must: have been destroyed prior to destroying pname:device + If sname:VkAllocationCallbacks were provided when pname:device was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:device was created, pname:pAllocator must: be `NULL` + + + + VkResult vkEnumerateInstanceLayerProperties + uint32_t* pPropertyCount + VkLayerProperties* pProperties + + + VkResult vkEnumerateInstanceExtensionProperties + const char* pLayerName + uint32_t* pPropertyCount + VkExtensionProperties* pProperties + + If pname:pLayerName is not `NULL`, it must: be the name of a layer available on the system + + + + VkResult vkEnumerateDeviceLayerProperties + VkPhysicalDevice physicalDevice + uint32_t* pPropertyCount + VkLayerProperties* pProperties + + + VkResult vkEnumerateDeviceExtensionProperties + VkPhysicalDevice physicalDevice + const char* pLayerName + uint32_t* pPropertyCount + VkExtensionProperties* pProperties + + If pname:pLayerName is not `NULL`, it must: be the name of a layer available on the system + + + + void vkGetDeviceQueue + VkDevice device + uint32_t queueFamilyIndex + uint32_t queueIndex + VkQueue* pQueue + + pname:queueFamilyIndex must: be one of the queue family indexes specified when pname:device was created, via the sname:VkDeviceQueueCreateInfo structure + pname:queueIndex must: be less than the number of queues created for the specified queue family index when pname:device was created, via the pname:queueCount member of the sname:VkDeviceQueueCreateInfo structure + + + + VkResult vkQueueSubmit + VkQueue queue + uint32_t submitCount + const VkSubmitInfo* pSubmits + VkFence fence + + pname:fence must: be unsignalled + pname:fence mustnot: be associated with any other queue command that has not yet completed execution on that queue + + + + VkResult vkQueueWaitIdle + VkQueue queue + + + VkResult vkDeviceWaitIdle + VkDevice device + + all sname:VkQueue objects created from pname:device + + + + VkResult vkAllocateMemory + VkDevice device + const VkMemoryAllocateInfo* pAllocateInfo + const VkAllocationCallbacks* pAllocator + VkDeviceMemory* pMemory + + The number of currently valid memory objects, allocated from pname:device, must: be less than sname:VkPhysicalDeviceLimits::pname:maxMemoryAllocationCount + + + + void vkFreeMemory + VkDevice device + VkDeviceMemory memory + const VkAllocationCallbacks* pAllocator + + All submitted commands that refer to pname:memory (via images or buffers) must: have completed execution + + + + VkResult vkMapMemory + VkDevice device + VkDeviceMemory memory + VkDeviceSize offset + VkDeviceSize size + VkMemoryMapFlags flags + void** ppData + + pname:memory mustnot: currently be mapped + pname:offset must: be less than the size of pname:memory + If pname:size is not equal to ename:VK_WHOLE_SIZE, the sum of pname:offset and pname:size must: be less than or equal to the pname:size of the pname:memory + pname:memory must: have been created with a memory type that reports ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT + + + + void vkUnmapMemory + VkDevice device + VkDeviceMemory memory + + pname:memory must: currently be mapped + + + + VkResult vkFlushMappedMemoryRanges + VkDevice device + uint32_t memoryRangeCount + const VkMappedMemoryRange* pMemoryRanges + + The memory ranges specified by pname:pMemoryRanges must: all currently be mapped + + + + VkResult vkInvalidateMappedMemoryRanges + VkDevice device + uint32_t memoryRangeCount + const VkMappedMemoryRange* pMemoryRanges + + The memory ranges specified by pname:pMemoryRanges must: all currently be mapped + + + + void vkGetDeviceMemoryCommitment + VkDevice device + VkDeviceMemory memory + VkDeviceSize* pCommittedMemoryInBytes + + pname:memory must: have been created with a memory type that reports ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT + + + + void vkGetBufferMemoryRequirements + VkDevice device + VkBuffer buffer + VkMemoryRequirements* pMemoryRequirements + + + VkResult vkBindBufferMemory + VkDevice device + VkBuffer buffer + VkDeviceMemory memory + VkDeviceSize memoryOffset + + pname:buffer mustnot: already be backed by a memory object + pname:buffer mustnot: have been created with any sparse memory binding flags + pname:memoryOffset must: be less than the size of pname:memory + If pname:buffer was created with the ename:VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or ename:VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, pname:memoryOffset must: be a multiple of the value of sname:VkPhysicalDeviceLimits::pname:minTexelBufferOffsetAlignment + If pname:buffer was created with the ename:VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, pname:memoryOffset must: be a multiple of the value of sname:VkPhysicalDeviceLimits::pname:minUniformBufferOffsetAlignment + If pname:buffer was created with the ename:VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, pname:memoryOffset must: be a multiple of the value of sname:VkPhysicalDeviceLimits::pname:minStorageBufferOffsetAlignment + pname:memory must: have been allocated using one of the memory types allowed in the pname:memoryTypeBits member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetBufferMemoryRequirements with pname:buffer + The sum of pname:memoryOffset and the size of pname:buffer must: be less than or equal to the size of pname:memory + pname:memoryOffset must: be an integer multiple of the pname:alignment member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetBufferMemoryRequirements with pname:buffer + + + + void vkGetImageMemoryRequirements + VkDevice device + VkImage image + VkMemoryRequirements* pMemoryRequirements + + + VkResult vkBindImageMemory + VkDevice device + VkImage image + VkDeviceMemory memory + VkDeviceSize memoryOffset + + pname:image mustnot: already be backed by a memory object + pname:image mustnot: have been created with any sparse memory binding flags + pname:memoryOffset must: be less than the size of pname:memory + pname:memory must: have been allocated using one of the memory types allowed in the pname:memoryTypeBits member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetImageMemoryRequirements with pname:image + pname:memoryOffset must: be an integer multiple of the pname:alignment member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetImageMemoryRequirements with pname:image + pname:memory must: have storage from pname:memoryOffset onwards equal to or greater than the pname:size member of the sname:VkMemoryRequirements structure returned from a call to fname:vkGetImageMemoryRequirements with pname:image + + + + void vkGetImageSparseMemoryRequirements + VkDevice device + VkImage image + uint32_t* pSparseMemoryRequirementCount + VkSparseImageMemoryRequirements* pSparseMemoryRequirements + + pname:image must: have been created with the ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag + + + + void vkGetPhysicalDeviceSparseImageFormatProperties + VkPhysicalDevice physicalDevice + VkFormat format + VkImageType type + VkSampleCountFlagBits samples + VkImageUsageFlags usage + VkImageTiling tiling + uint32_t* pPropertyCount + VkSparseImageFormatProperties* pProperties + + If pname:format is an integer format, samples must: be one of the bit flag values specified in the value of sname:VkPhysicalDeviceLimits::pname:sampledImageIntegerSampleCounts + If pname:format is a non-integer color format, samples must: be one of the bit flag values specified in the value of sname:VkPhysicalDeviceLimits::pname:sampledImageColorSampleCounts + If pname:format is a depth format, samples must: be one of the bit flag values specified in the value of sname:VkPhysicalDeviceLimits::pname:sampledImageDepthSampleCounts + If pname:format is a stencil format, samples must: be one of the bit flag values specified in the value of sname:VkPhysicalDeviceLimits::pname:sampledImageStencilSampleCounts + If pname:usage includes ename:VK_IMAGE_USAGE_STORAGE_BIT, samples must: be one of the bit flag values specified in the value of sname:VkPhysicalDeviceLimits::pname:storageImageSampleCounts + + + + VkResult vkQueueBindSparse + VkQueue queue + uint32_t bindInfoCount + const VkBindSparseInfo* pBindInfo + VkFence fence + + pname:fence must: be unsignalled + pname:fence mustnot: be associated with any other queue command that has not yet completed execution on that queue + + + + VkResult vkCreateFence + VkDevice device + const VkFenceCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkFence* pFence + + + void vkDestroyFence + VkDevice device + VkFence fence + const VkAllocationCallbacks* pAllocator + + pname:fence mustnot: be associated with any queue command that has not yet completed execution on that queue + If sname:VkAllocationCallbacks were provided when pname:fence was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:fence was created, pname:pAllocator must: be `NULL` + + + + VkResult vkResetFences + VkDevice device + uint32_t fenceCount + const VkFence* pFences + + Any given element of pname:pFences mustnot: currently be associated with any queue command that has not yet completed execution on that queue + + + + VkResult vkGetFenceStatus + VkDevice device + VkFence fence + + + VkResult vkWaitForFences + VkDevice device + uint32_t fenceCount + const VkFence* pFences + VkBool32 waitAll + uint64_t timeout + + + VkResult vkCreateSemaphore + VkDevice device + const VkSemaphoreCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSemaphore* pSemaphore + + + void vkDestroySemaphore + VkDevice device + VkSemaphore semaphore + const VkAllocationCallbacks* pAllocator + + pname:semaphore mustnot: be associated with any queue command that has not yet completed execution on that queue + If sname:VkAllocationCallbacks were provided when pname:semaphore was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:semaphore was created, pname:pAllocator must: be `NULL` + + + + VkResult vkCreateEvent + VkDevice device + const VkEventCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkEvent* pEvent + + + void vkDestroyEvent + VkDevice device + VkEvent event + const VkAllocationCallbacks* pAllocator + + All submitted commands that refer to pname:event must: have completed execution + If sname:VkAllocationCallbacks were provided when pname:event was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:event was created, pname:pAllocator must: be `NULL` + + + + VkResult vkGetEventStatus + VkDevice device + VkEvent event + + + VkResult vkSetEvent + VkDevice device + VkEvent event + + + VkResult vkResetEvent + VkDevice device + VkEvent event + + + VkResult vkCreateQueryPool + VkDevice device + const VkQueryPoolCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkQueryPool* pQueryPool + + + void vkDestroyQueryPool + VkDevice device + VkQueryPool queryPool + const VkAllocationCallbacks* pAllocator + + All submitted commands that refer to pname:queryPool must: have completed execution + If sname:VkAllocationCallbacks were provided when pname:queryPool was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:queryPool was created, pname:pAllocator must: be `NULL` + + + + VkResult vkGetQueryPoolResults + VkDevice device + VkQueryPool queryPool + uint32_t firstQuery + uint32_t queryCount + size_t dataSize + void* pData + VkDeviceSize stride + VkQueryResultFlags flags + + pname:firstQuery must: be less than the number of queries in pname:queryPool + If ename:VK_QUERY_RESULT_64_BIT is not set in pname:flags then pname:pData and pname:stride must be multiples of `4` + If ename:VK_QUERY_RESULT_64_BIT is set in pname:flags then pname:pData and pname:stride must be multiples of `8` + The sum of pname:firstQuery and pname:queryCount must: be less than or equal to the number of queries in pname:queryPool + pname:dataSize must: be large enough to contain the result of each query, as described <<queries-operation-memorylayout,here>> + If the pname:queryType used to create pname:queryPool was ename:VK_QUERY_TYPE_TIMESTAMP, pname:flags mustnot: contain ename:VK_QUERY_RESULT_PARTIAL_BIT + + + + VkResult vkCreateBuffer + VkDevice device + const VkBufferCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkBuffer* pBuffer + + If the pname:flags member of pname:pCreateInfo includes ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT or ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, creating this sname:VkBuffer mustnot: cause the total required sparse memory for all currently valid sparse resources on the device to exceed sname:VkPhysicalDeviceLimits::pname:sparseAddressSpaceSize + + + + void vkDestroyBuffer + VkDevice device + VkBuffer buffer + const VkAllocationCallbacks* pAllocator + + All submitted commands that refer to pname:buffer, either directly or via a sname:VkBufferView, must: have completed execution + If sname:VkAllocationCallbacks were provided when pname:buffer was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:buffer was created, pname:pAllocator must: be `NULL` + + + + VkResult vkCreateBufferView + VkDevice device + const VkBufferViewCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkBufferView* pView + + + void vkDestroyBufferView + VkDevice device + VkBufferView bufferView + const VkAllocationCallbacks* pAllocator + + All submitted commands that refer to pname:bufferView must: have completed execution + If sname:VkAllocationCallbacks were provided when pname:bufferView was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:bufferView was created, pname:pAllocator must: be `NULL` + + + + VkResult vkCreateImage + VkDevice device + const VkImageCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkImage* pImage + + If the pname:flags member of pname:pCreateInfo includes ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT or ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, creating this sname:VkImage mustnot: cause the total required sparse memory for all currently valid sparse resources on the device to exceed sname:VkPhysicalDeviceLimits::pname:sparseAddressSpaceSize + + + + void vkDestroyImage + VkDevice device + VkImage image + const VkAllocationCallbacks* pAllocator + + All submitted commands that refer to pname:image, either directly or via a sname:VkImageView, must: have completed execution + If sname:VkAllocationCallbacks were provided when pname:image was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:image was created, pname:pAllocator must: be `NULL` + + + + void vkGetImageSubresourceLayout + VkDevice device + VkImage image + const VkImageSubresource* pSubresource + VkSubresourceLayout* pLayout + + pname:image must: have been created with pname:tiling equal to ename:VK_IMAGE_TILING_LINEAR + The pname:aspectMask member of pname:pSubresource must: only have a single bit set + + + + VkResult vkCreateImageView + VkDevice device + const VkImageViewCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkImageView* pView + + + void vkDestroyImageView + VkDevice device + VkImageView imageView + const VkAllocationCallbacks* pAllocator + + All submitted commands that refer to pname:imageView must: have completed execution + If sname:VkAllocationCallbacks were provided when pname:imageView was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:imageView was created, pname:pAllocator must: be `NULL` + + + + VkResult vkCreateShaderModule + VkDevice device + const VkShaderModuleCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkShaderModule* pShaderModule + + + void vkDestroyShaderModule + VkDevice device + VkShaderModule shaderModule + const VkAllocationCallbacks* pAllocator + + If sname:VkAllocationCallbacks were provided when pname:shaderModule was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:shaderModule was created, pname:pAllocator must: be `NULL` + + + + VkResult vkCreatePipelineCache + VkDevice device + const VkPipelineCacheCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkPipelineCache* pPipelineCache + + + void vkDestroyPipelineCache + VkDevice device + VkPipelineCache pipelineCache + const VkAllocationCallbacks* pAllocator + + If sname:VkAllocationCallbacks were provided when pname:pipelineCache was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:pipelineCache was created, pname:pAllocator must: be `NULL` + + + + VkResult vkGetPipelineCacheData + VkDevice device + VkPipelineCache pipelineCache + size_t* pDataSize + void* pData + + + VkResult vkMergePipelineCaches + VkDevice device + VkPipelineCache dstCache + uint32_t srcCacheCount + const VkPipelineCache* pSrcCaches + + pname:dstCache mustnot: appear in the list of source caches + + + + VkResult vkCreateGraphicsPipelines + VkDevice device + VkPipelineCache pipelineCache + uint32_t createInfoCount + const VkGraphicsPipelineCreateInfo* pCreateInfos + const VkAllocationCallbacks* pAllocator + VkPipeline* pPipelines + + If the value of the pname:flags member of any given element of pname:pCreateInfos contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the pname:basePipelineIndex member of that same element is not `-1`, the value of pname:basePipelineIndex must: be less than the index into pname:pCreateInfos that corresponds to that element + + + + VkResult vkCreateComputePipelines + VkDevice device + VkPipelineCache pipelineCache + uint32_t createInfoCount + const VkComputePipelineCreateInfo* pCreateInfos + const VkAllocationCallbacks* pAllocator + VkPipeline* pPipelines + + If the value of the pname:flags member of any given element of pname:pCreateInfos contains the ename:VK_PIPELINE_CREATE_DERIVATIVE_BIT flag, and the pname:basePipelineIndex member of that same element is not `-1`, the value of pname:basePipelineIndex must: be less than the index into pname:pCreateInfos that corresponds to that element + + + + void vkDestroyPipeline + VkDevice device + VkPipeline pipeline + const VkAllocationCallbacks* pAllocator + + All submitted commands that refer to pname:pipeline must: have completed execution + If sname:VkAllocationCallbacks were provided when pname:pipeline was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:pipeline was created, pname:pAllocator must: be `NULL` + + + + VkResult vkCreatePipelineLayout + VkDevice device + const VkPipelineLayoutCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkPipelineLayout* pPipelineLayout + + + void vkDestroyPipelineLayout + VkDevice device + VkPipelineLayout pipelineLayout + const VkAllocationCallbacks* pAllocator + + If sname:VkAllocationCallbacks were provided when pname:pipelineLayout was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:pipelineLayout was created, pname:pAllocator must: be `NULL` + + + + VkResult vkCreateSampler + VkDevice device + const VkSamplerCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSampler* pSampler + + + void vkDestroySampler + VkDevice device + VkSampler sampler + const VkAllocationCallbacks* pAllocator + + All submitted commands that refer to pname:sampler must: have completed execution + If sname:VkAllocationCallbacks were provided when pname:sampler was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:sampler was created, pname:pAllocator must: be `NULL` + + + + VkResult vkCreateDescriptorSetLayout + VkDevice device + const VkDescriptorSetLayoutCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDescriptorSetLayout* pSetLayout + + + void vkDestroyDescriptorSetLayout + VkDevice device + VkDescriptorSetLayout descriptorSetLayout + const VkAllocationCallbacks* pAllocator + + If sname:VkAllocationCallbacks were provided when pname:descriptorSetLayout was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:descriptorSetLayout was created, pname:pAllocator must: be `NULL` + + + + VkResult vkCreateDescriptorPool + VkDevice device + const VkDescriptorPoolCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDescriptorPool* pDescriptorPool + + + void vkDestroyDescriptorPool + VkDevice device + VkDescriptorPool descriptorPool + const VkAllocationCallbacks* pAllocator + + All submitted commands that refer to pname:descriptorPool (via any allocated descriptor sets) must: have completed execution + If sname:VkAllocationCallbacks were provided when pname:descriptorPool was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:descriptorPool was created, pname:pAllocator must: be `NULL` + + + + VkResult vkResetDescriptorPool + VkDevice device + VkDescriptorPool descriptorPool + VkDescriptorPoolResetFlags flags + + any sname:VkDescriptorSet objects allocated from pname:descriptorPool + + + All uses of pname:descriptorPool (via any allocated descriptor sets) must: have completed execution + + + + VkResult vkAllocateDescriptorSets + VkDevice device + const VkDescriptorSetAllocateInfo* pAllocateInfo + VkDescriptorSet* pDescriptorSets + + + VkResult vkFreeDescriptorSets + VkDevice device + VkDescriptorPool descriptorPool + uint32_t descriptorSetCount + const VkDescriptorSet* pDescriptorSets + + All submitted commands that refer to any element of pname:pDesciptorSets must: have completed execution + pname:pDescriptorSets must: be a pointer to an array of pname:descriptorSetCount sname:VkDescriptorSet handles, each element of which must: either be a valid handle or sname:VK_NULL_HANDLE + pname:descriptorPool must: have been created with the ename:VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT flag + + + + void vkUpdateDescriptorSets + VkDevice device + uint32_t descriptorWriteCount + const VkWriteDescriptorSet* pDescriptorWrites + uint32_t descriptorCopyCount + const VkCopyDescriptorSet* pDescriptorCopies + + + VkResult vkCreateFramebuffer + VkDevice device + const VkFramebufferCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkFramebuffer* pFramebuffer + + + void vkDestroyFramebuffer + VkDevice device + VkFramebuffer framebuffer + const VkAllocationCallbacks* pAllocator + + All submitted commands that refer to pname:framebuffer must: have completed execution + If sname:VkAllocationCallbacks were provided when pname:framebuffer was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:framebuffer was created, pname:pAllocator must: be `NULL` + + + + VkResult vkCreateRenderPass + VkDevice device + const VkRenderPassCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkRenderPass* pRenderPass + + + void vkDestroyRenderPass + VkDevice device + VkRenderPass renderPass + const VkAllocationCallbacks* pAllocator + + All submitted commands that refer to pname:renderPass must: have completed execution + If sname:VkAllocationCallbacks were provided when pname:renderPass was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:renderPass was created, pname:pAllocator must: be `NULL` + + + + void vkGetRenderAreaGranularity + VkDevice device + VkRenderPass renderPass + VkExtent2D* pGranularity + + + VkResult vkCreateCommandPool + VkDevice device + const VkCommandPoolCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkCommandPool* pCommandPool + + + void vkDestroyCommandPool + VkDevice device + VkCommandPool commandPool + const VkAllocationCallbacks* pAllocator + + All sname:VkCommandBuffer objects allocated from pname:commandPool mustnot: be pending execution + If sname:VkAllocationCallbacks were provided when pname:commandPool was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:commandPool was created, pname:pAllocator must: be `NULL` + + + + VkResult vkResetCommandPool + VkDevice device + VkCommandPool commandPool + VkCommandPoolResetFlags flags + + All sname:VkCommandBuffer objects allocated from pname:commandPool mustnot: currently be pending execution + + + + VkResult vkAllocateCommandBuffers + VkDevice device + const VkCommandBufferAllocateInfo* pAllocateInfo + VkCommandBuffer* pCommandBuffers + + + void vkFreeCommandBuffers + VkDevice device + VkCommandPool commandPool + uint32_t commandBufferCount + const VkCommandBuffer* pCommandBuffers + + All elements of pname:pCommandBuffers mustnot: be pending execution + pname:pCommandBuffers must: be a pointer to an array of pname:commandBufferCount sname:VkCommandBuffer handles, each element of which must: either be a valid handle or sname:VK_NULL_HANDLE + + + + VkResult vkBeginCommandBuffer + VkCommandBuffer commandBuffer + const VkCommandBufferBeginInfo* pBeginInfo + + pname:commandBuffer mustnot: be in the recording state + If pname:commandBuffer was allocated from a sname:VkCommandPool which did not have the ename:VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT flag set, pname:commandBuffer must: be in the initial state. + If pname:commandBuffer is a secondary command buffer, the pname:pInheritanceInfo member of pname:pBeginInfo must: be a valid sname:VkCommandBufferInheritanceInfo structure + If pname:commandBuffer is a secondary command buffer and either the pname:occlusionQueryEnable member of the pname:pInheritanceInfo member of pname:pBeginInfo is ename:VK_FALSE, or the precise occlusion queries feature is not enabled, the pname:queryFlags member of the pname:pInheritanceInfo member pname:pBeginInfo mustnot: contain ename:VK_QUERY_CONTROL_PRECISE_BIT + + + + + VkResult vkEndCommandBuffer + VkCommandBuffer commandBuffer + + pname:commandBuffer must: be in the recording state + fname:vkEndCommandBuffer mustnot: be called inside a render pass instance + All queries made <<queries-operation-active,active>> during the recording of pname:commandBuffer must: have been made inactive + + + + VkResult vkResetCommandBuffer + VkCommandBuffer commandBuffer + VkCommandBufferResetFlags flags + + pname:commandBuffer mustnot: currently be pending execution + pname:commandBuffer must: have been allocated from a pool that was created with the ename:VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT + + + + void vkCmdBindPipeline + VkCommandBuffer commandBuffer + VkPipelineBindPoint pipelineBindPoint + VkPipeline pipeline + + If the value of pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_COMPUTE, the sname:VkCommandPool that pname:commandBuffer was allocated from must: support compute operations + If the value of pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_GRAPHICS, the sname:VkCommandPool that pname:commandBuffer was allocated from must: support graphics operations + If the value of pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_COMPUTE, pname:pipeline must: be a compute pipeline + If the value of pname:pipelineBindPoint is ename:VK_PIPELINE_BIND_POINT_GRAPHICS, pname:pipeline must: be a graphics pipeline + If the <<features-features-variableMultisampleRate,variable multisample rate>> feature is not supported, pname:pipeline is a graphics pipeline, the current subpass has no attachments, and this is not the first call to this function with a graphics pipeline after transitioning to the current subpass, then the sample count specified by this pipeline must: match that set in the previous pipeline + + + + void vkCmdSetViewport + VkCommandBuffer commandBuffer + uint32_t firstViewport + uint32_t viewportCount + const VkViewport* pViewports + + pname:firstViewport must: be less than sname:VkPhysicalDeviceLimits::pname:maxViewports + The sum of pname:firstViewport and pname:viewportCount must: be between `1` and sname:VkPhysicalDeviceLimits::pname:maxViewports, inclusive + + + + void vkCmdSetScissor + VkCommandBuffer commandBuffer + uint32_t firstScissor + uint32_t scissorCount + const VkRect2D* pScissors + + pname:firstScissor must: be less than sname:VkPhysicalDeviceLimits::pname:maxViewports + The sum of pname:firstScissor and pname:scissorCount must: be between `1` and sname:VkPhysicalDeviceLimits::pname:maxViewports, inclusive + The pname:x and pname:y members of pname:offset must: be greater than or equal to `0` + Evaluation of (pname:offset.x + pname:extent.width) mustnot: cause a signed integer addition overflow + Evaluation of (pname:offset.y + pname:extent.height) mustnot: cause a signed integer addition overflow + + + + void vkCmdSetLineWidth + VkCommandBuffer commandBuffer + float lineWidth + + If the <<features-features-wideLines,wide lines>> feature is not enabled, the value of pname:lineWidth must: be `1.0` + + + + void vkCmdSetDepthBias + VkCommandBuffer commandBuffer + float depthBiasConstantFactor + float depthBiasClamp + float depthBiasSlopeFactor + + If the <<features-features-depthBiasClamp,depth bias clamping>> feature is not enabled, the value of pname:depthBiasClamp must: be code:0.0 + + + + void vkCmdSetBlendConstants + VkCommandBuffer commandBuffer + const float blendConstants[4] + + + void vkCmdSetDepthBounds + VkCommandBuffer commandBuffer + float minDepthBounds + float maxDepthBounds + + The value of pname:minDepthBounds must: be between `0.0` and `1.0`, inclusive + The value of pname:maxDepthBounds must: be between `0.0` and `1.0`, inclusive + + + + void vkCmdSetStencilCompareMask + VkCommandBuffer commandBuffer + VkStencilFaceFlags faceMask + uint32_t compareMask + + + void vkCmdSetStencilWriteMask + VkCommandBuffer commandBuffer + VkStencilFaceFlags faceMask + uint32_t writeMask + + + void vkCmdSetStencilReference + VkCommandBuffer commandBuffer + VkStencilFaceFlags faceMask + uint32_t reference + + + void vkCmdBindDescriptorSets + VkCommandBuffer commandBuffer + VkPipelineBindPoint pipelineBindPoint + VkPipelineLayout layout + uint32_t firstSet + uint32_t descriptorSetCount + const VkDescriptorSet* pDescriptorSets + uint32_t dynamicOffsetCount + const uint32_t* pDynamicOffsets + + Any given element of pname:pDescriptorSets must: have been created with a sname:VkDescriptorSetLayout that matches the sname:VkDescriptorSetLayout at set _n_ in pname:layout, where _n_ is the sum of the index into pname:pDescriptorSets and pname:firstSet + pname:dynamicOffsetCount must: be equal to the total number of dynamic descriptors in pname:pDescriptorSets + pname:pipelineBindPoint must: be supported by the pname:commandBuffer's parent sname:VkCommandPool's queue family + Any given element of pname:pDynamicOffsets must: satisfy the required alignment for the corresponding descriptor binding's descriptor type + + + + void vkCmdBindIndexBuffer + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + VkIndexType indexType + + The value of pname:offset must: be less than the size of pname:buffer + The sum of pname:offset, and the address of the range of sname:VkDeviceMemory object that's backing pname:buffer, must: be a multiple of the type indicated by pname:indexType + pname:buffer must: have been created with the ename:VK_BUFFER_USAGE_INDEX_BUFFER_BIT flag + + + + void vkCmdBindVertexBuffers + VkCommandBuffer commandBuffer + uint32_t firstBinding + uint32_t bindingCount + const VkBuffer* pBuffers + const VkDeviceSize* pOffsets + + pname:firstBinding must: be less than sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindings + The sum of pname:firstBinding and pname:bindingCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxVertexInputBindings + All elements of pname:pOffsets must: be less than the size of the corresponding element in pname:pBuffers + All elements of pname:pBuffers must: have been created with the ename:VK_BUFFER_USAGE_VERTEX_BUFFER_BIT flag + + + + void vkCmdDraw + VkCommandBuffer commandBuffer + uint32_t vertexCount + uint32_t instanceCount + uint32_t firstVertex + uint32_t firstInstance + + For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>> + For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for push constants, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>> + Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline + All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must: have valid buffers bound + For a given vertex buffer binding, any attribute data fetched must: be entirely contained within the corresponding vertex buffer binding, as described in <<fxvertex-input>> + A valid graphics pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_GRAPHICS + If the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must: have been set on the current command buffer + Every input attachment used by the current subpass must: be bound to the pipeline via a descriptor set + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with code:ImplicitLod, code:Dref or code:Proj in their name, in any shader stage + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage + If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set + If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set + Any slink:VkImage being sampled with ename:VK_FILTER_LINEAR as a result of this command must: be of a format which supports linear filtering, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + + + + void vkCmdDrawIndexed + VkCommandBuffer commandBuffer + uint32_t indexCount + uint32_t instanceCount + uint32_t firstIndex + int32_t vertexOffset + uint32_t firstInstance + + For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>> + For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for push constants, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>> + Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline + All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must: have valid buffers bound + For a given vertex buffer binding, any attribute data fetched must: be entirely contained within the corresponding vertex buffer binding, as described in <<fxvertex-input>> + A valid graphics pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_GRAPHICS + If the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must: have been set on the current command buffer + The total value of (pname:indexSize * (pname:firstIndex + pname:indexCount) + pname:offset) must: be less than or equal to the size of the currently bound index buffer, with indexSize being based on the type specified by pname:indexType, where the index buffer, pname:indexType, and pname:offset are specified via fname:vkCmdBindIndexBuffer + Every input attachment used by the current subpass must: be bound to the pipeline via a descriptor set + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with code:ImplicitLod, code:Dref or code:Proj in their name, in any shader stage + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage + If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set + If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set + Any slink:VkImage being sampled with ename:VK_FILTER_LINEAR as a result of this command must: be of a format which supports linear filtering, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + + + + void vkCmdDrawIndirect + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + uint32_t drawCount + uint32_t stride + + The value of pname:offset must: be a multiple of `4` + If pname:drawCount is greater than `1`, the value of pname:stride must: be a multiple of `4` and must: be greater than or equal to sizeof(sname:VkDrawIndirectCommand) + If the <<features-features-multiDrawIndirect,multi-draw indirect>> feature is not enabled, the value of pname:drawCount must: be `0` or `1` + If the <<features-features-drawIndirectFirstInstance,drawIndirectFirstInstance>> feature is not enabled, all the pname:firstInstance members of the sname:VkDrawIndirectCommand structures accessed by this command must: be code:0 + For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>> + For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for push constants, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>> + Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline + All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must: have valid buffers bound + A valid graphics pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_GRAPHICS + If the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must: have been set on the current command buffer + If pname:drawCount is equal to `1`, the total value of (pname:offset + sizeof(sname:VkDrawIndirectCommand)) must: be less than or equal to the size of pname:buffer + If pname:drawCount is greater than `1`, the total value of (pname:stride x (pname:drawCount - 1) + pname:offset + sizeof(sname:VkDrawIndirectCommand)) must: be less than or equal to the size of pname:buffer + pname:drawCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxDrawIndirectCount + Every input attachment used by the current subpass must: be bound to the pipeline via a descriptor set + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with code:ImplicitLod, code:Dref or code:Proj in their name, in any shader stage + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage + If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set + If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set + Any slink:VkImage being sampled with ename:VK_FILTER_LINEAR as a result of this command must: be of a format which supports linear filtering, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + + + + void vkCmdDrawIndexedIndirect + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + uint32_t drawCount + uint32_t stride + + The value of pname:offset must: be a multiple of `4` + If pname:drawCount is greater than `1`, the value of pname:stride must: be a multiple of `4` and must: be greater than or equal to sizeof(sname:VkDrawIndexedIndirectCommand) + If the <<features-features-multiDrawIndirect,multi-draw indirect>> feature is not enabled, the value of pname:drawCount must: be `0` or `1` + If the <<features-features-drawIndirectFirstInstance,drawIndirectFirstInstance>> feature is not enabled, all the pname:firstInstance members of the sname:VkDrawIndexedIndirectCommand structures accessed by this command must: be code:0 + For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>> + For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_GRAPHICS, with a sname:VkPipelineLayout that is compatible for push constants, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>> + Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline + All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point's interface must: have valid buffers bound + A valid graphics pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_GRAPHICS + If the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS requires any dynamic state, that state must: have been set on the current command buffer + If pname:drawCount is equal to `1`, the total value of (pname:offset + sizeof(sname:VkDrawIndexedIndirectCommand)) must: be less than or equal to the size of pname:buffer + If pname:drawCount is greater than `1`, the total value of (pname:stride x (pname:drawCount - 1) + pname:offset + sizeof(sname:VkDrawIndexedIndirectCommand)) must: be less than or equal to the size of pname:buffer + pname:drawCount must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxDrawIndirectCount + Every input attachment used by the current subpass must: be bound to the pipeline via a descriptor set + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with code:ImplicitLod, code:Dref or code:Proj in their name, in any shader stage + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage + If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set + If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_GRAPHICS accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set + Any slink:VkImage being sampled with ename:VK_FILTER_LINEAR as a result of this command must: be of a format which supports linear filtering, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + + + + void vkCmdDispatch + VkCommandBuffer commandBuffer + uint32_t x + uint32_t y + uint32_t z + + pname:x must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[0] + pname:y must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[1] + pname:z must: be less than or equal to sname:VkPhysicalDeviceLimits::pname:maxComputeWorkGroupCount[2] + For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_COMPUTE, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>> + Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline + A valid compute pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_COMPUTE + For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_COMPUTE, with a sname:VkPipelineLayout that is compatible for push constants with the one used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>> + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with code:ImplicitLod, code:Dref or code:Proj in their name, in any shader stage + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage + If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set + If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set + Any slink:VkImage being sampled with ename:VK_FILTER_LINEAR as a result of this command must: be of a format which supports linear filtering, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + + + + void vkCmdDispatchIndirect + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + + For each set _n_ that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE, a descriptor set must: have been bound to _n_ at ename:VK_PIPELINE_BIND_POINT_COMPUTE, with a sname:VkPipelineLayout that is compatible for set _n_, with the sname:VkPipelineLayout used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>> + Descriptors in each bound descriptor set, specified via fname:vkCmdBindDescriptorSets, must: be valid if they are statically used by the currently bound sname:VkPipeline object, specified via fname:vkCmdBindPipeline + A valid compute pipeline must: be bound to the current command buffer with ename:VK_PIPELINE_BIND_POINT_COMPUTE + pname:buffer must: have been created with the ename:VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set + The value of pname:offset must: be a multiple of `4` + The sum of pname:offset and the size of sname:VkDispatchIndirectCommand must: be less than or equal to the size of pname:buffer + For each push constant that is statically used by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE, a push constant value must: have been set for ename:VK_PIPELINE_BIND_POINT_COMPUTE, with a sname:VkPipelineLayout that is compatible for push constants with the one used to create the current sname:VkPipeline, as described in <<descriptorsets-compatibility>> + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used to sample from any sname:VkImage with a sname:VkImageView of the type ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions with code:ImplicitLod, code:Dref or code:Proj in their name, in any shader stage + If any sname:VkSampler object that is accessed from a shader by the sname:VkPipeline currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE uses unnormalized coordinates, it mustnot: be used with any of the SPIR-V `OpImageSample*` or `OpImageSparseSample*` instructions that includes a lod bias or any offset values, in any shader stage + If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE accesses a uniform buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set + If the <<features-features-robustBufferAccess,robust buffer access>> feature is not enabled, and any shader stage in the sname:VkPipeline object currently bound to ename:VK_PIPELINE_BIND_POINT_COMPUTE accesses a storage buffer, it mustnot: access values outside of the range of that buffer specified in the currently bound descriptor set + Any slink:VkImage being sampled with ename:VK_FILTER_LINEAR as a result of this command must: be of a format which supports linear filtering, as specified by the ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + + + + void vkCmdCopyBuffer + VkCommandBuffer commandBuffer + VkBuffer srcBuffer + VkBuffer dstBuffer + uint32_t regionCount + const VkBufferCopy* pRegions + + The sum of the pname:srcOffset and pname:copySize members of a given element of pname:pRegions must: be less than or equal to the size of pname:srcBuffer + The sum of the pname:dstOffset and pname:copySize members of a given element of pname:pRegions must: be less than or equal to the size of pname:dstBuffer + The union of the source regions, and the union of the destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory + pname:srcBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage flag + pname:dstBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag + + + + void vkCmdCopyImage + VkCommandBuffer commandBuffer + VkImage srcImage + VkImageLayout srcImageLayout + VkImage dstImage + VkImageLayout dstImageLayout + uint32_t regionCount + const VkImageCopy* pRegions + + The source region specified by a given element of pname:pRegions must: be a region that is contained within pname:srcImage + The destination region specified by a given element of pname:pRegions must: be a region that is contained within pname:dstImage + The union of all source regions, and the union of all destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory + pname:srcImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag + pname:srcImageLayout must: specify the layout of the subresources of pname:srcImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice + pname:srcImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL + pname:dstImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag + pname:dstImageLayout must: specify the layout of the subresources of pname:dstImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice + pname:dstImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL + The elink:VkFormat of each of pname:srcImage and pname:dstImage must: be compatible, as defined <<copies-images-format-compatibility, below>> + The sample count of pname:srcImage and pname:dstImage must: match + + + + void vkCmdBlitImage + VkCommandBuffer commandBuffer + VkImage srcImage + VkImageLayout srcImageLayout + VkImage dstImage + VkImageLayout dstImageLayout + uint32_t regionCount + const VkImageBlit* pRegions + VkFilter filter + + The source region specified by a given element of pname:pRegions must: be a region that is contained within pname:srcImage + The destination region specified by a given element of pname:pRegions must: be a region that is contained within pname:dstImage + The union of all source regions, and the union of all destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory + pname:srcImage must: use a format that supports ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT, which is indicated by sname:VkFormatProperties::pname:linearTilingFeatures (for linear tiled images) or sname:VkFormatProperties::pname:optimalTilingFeatures (for optimally tiled images) - as returned by fname:vkGetPhysicalDeviceFormatProperties + pname:srcImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag + pname:srcImageLayout must: specify the layout of the subresources of pname:srcImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice + pname:srcImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL + pname:dstImage must: use a format that supports ename:VK_FORMAT_FEATURE_BLIT_DST_BIT, which is indicated by sname:VkFormatProperties::pname:linearTilingFeatures (for linear tiled images) or sname:VkFormatProperties::pname:optimalTilingFeatures (for optimally tiled images) - as returned by fname:vkGetPhysicalDeviceFormatProperties + pname:dstImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag + pname:dstImageLayout must: specify the layout of the subresources of pname:dstImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice + pname:dstImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL + The sample count of pname:srcImage and pname:dstImage must: both be equal to ename:VK_SAMPLE_COUNT_1_BIT + If either of pname:srcImage or pname:dstImage was created with a signed integer elink:VkFormat, the other must: also have been created with a signed integer elink:VkFormat + If either of pname:srcImage or pname:dstImage was created with an unsigned integer elink:VkFormat, the other must: also have been created with an unsigned integer elink:VkFormat + If either of pname:srcImage or pname:dstImage was created with a depth/stencil format, the other must: have exactly the same format + If pname:srcImage was created with a depth/stencil format, pname:filter must: be ename:VK_FILTER_NEAREST + + + + void vkCmdCopyBufferToImage + VkCommandBuffer commandBuffer + VkBuffer srcBuffer + VkImage dstImage + VkImageLayout dstImageLayout + uint32_t regionCount + const VkBufferImageCopy* pRegions + + The buffer region specified by a given element of pname:pRegions must: be a region that is contained within pname:srcBuffer + The image region specified by a given element of pname:pRegions must: be a region that is contained within pname:dstImage + The union of all source regions, and the union of all destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory + pname:srcBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_SRC_BIT usage flag + pname:dstImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag + pname:dstImage must: have a sample count equal to ename:VK_SAMPLE_COUNT_1_BIT + pname:dstImageLayout must: specify the layout of the subresources of pname:dstImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice + pname:dstImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL + + + + void vkCmdCopyImageToBuffer + VkCommandBuffer commandBuffer + VkImage srcImage + VkImageLayout srcImageLayout + VkBuffer dstBuffer + uint32_t regionCount + const VkBufferImageCopy* pRegions + + The image region specified by a given element of pname:pRegions must: be a region that is contained within pname:srcImage + The buffer region specified by a given element of pname:pRegions must: be a region that is contained within pname:dstBuffer + The union of all source regions, and the union of all destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory + pname:srcImage must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag + pname:srcImage must: have a sample count equal to ename:VK_SAMPLE_COUNT_1_BIT + pname:srcImageLayout must: specify the layout of the subresources of pname:srcImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice + pname:srcImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL + pname:dstBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag + + + + void vkCmdUpdateBuffer + VkCommandBuffer commandBuffer + VkBuffer dstBuffer + VkDeviceSize dstOffset + VkDeviceSize dataSize + const uint32_t* pData + + The sum of pname:dstOffset and pname:dataSize must: be less than or equal to the size of pname:dstBuffer + pname:dstBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag + The value of pname:dstOffset must: be a multiple of `4` + The value of pname:dataSize must: be greater than `0` + The value of pname:dataSize must: be less than `65536` + The value of pname:dataSize must: be a multiple of `4` + + + + void vkCmdFillBuffer + VkCommandBuffer commandBuffer + VkBuffer dstBuffer + VkDeviceSize dstOffset + VkDeviceSize size + uint32_t data + + If pname:size is not equal to ename:VK_WHOLE_SIZE, the sum of pname:dstOffset and pname:size must: be less than or equal to the size of pname:dstBuffer + pname:dstBuffer must: have been created with pname:VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag + pname:dstOffset must: be a multiple of `4` + If pname:size is not equal to ename:VK_WHOLE_SIZE, pname:size must: be a multiple of `4` + + + + void vkCmdClearColorImage + VkCommandBuffer commandBuffer + VkImage image + VkImageLayout imageLayout + const VkClearColorValue* pColor + uint32_t rangeCount + const VkImageSubresourceRange* pRanges + + pname:image must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag + pname:imageLayout must: specify the layout of the subresource ranges of pname:image specified in pname:pRanges at the time this command is executed on a sname:VkDevice + pname:imageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL + The image range of any given element of pname:pRanges must: be a subresource range that is contained within pname:image + + + + void vkCmdClearDepthStencilImage + VkCommandBuffer commandBuffer + VkImage image + VkImageLayout imageLayout + const VkClearDepthStencilValue* pDepthStencil + uint32_t rangeCount + const VkImageSubresourceRange* pRanges + + pname:image must: have been created with pname:VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag + pname:imageLayout must: specify the layout of the subresource ranges of pname:image specified in pname:pRanges at the time this command is executed on a sname:VkDevice + pname:imageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL + The image range of any given element of pname:pRanges must: be a subresource range that is contained within pname:image + + + + void vkCmdClearAttachments + VkCommandBuffer commandBuffer + uint32_t attachmentCount + const VkClearAttachment* pAttachments + uint32_t rectCount + const VkClearRect* pRects + + If the pname:aspectMask member of any given element of pname:pAttachments contains ename:VK_IMAGE_ASPECT_COLOR_BIT, the pname:colorAttachment member of those elements must: refer to a valid color attachment in the current subpass + The rectangular region specified by a given element of pname:pRects must: be contained within the render area of the current render pass instance + The layers specified by a given element of pname:pRects must: be contained within every attachment that pname:pAttachments refers to + + + + void vkCmdResolveImage + VkCommandBuffer commandBuffer + VkImage srcImage + VkImageLayout srcImageLayout + VkImage dstImage + VkImageLayout dstImageLayout + uint32_t regionCount + const VkImageResolve* pRegions + + The source region specified by a given element of pname:pRegions must: be a region that is contained within pname:srcImage + The destination region specified by a given element of pname:pRegions must: be a region that is contained within pname:dstImage + The union of all source regions, and the union of all destination regions, specified by the elements of pname:pRegions, mustnot: overlap in memory + pname:srcImage must: have a sample count equal to any valid sample count value other than ename:VK_SAMPLE_COUNT_1_BIT + pname:dstImage must: have a sample count equal to ename:VK_SAMPLE_COUNT_1_BIT + pname:srcImageLayout must: specify the layout of the subresources of pname:srcImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice + pname:srcImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL + pname:dstImageLayout must: specify the layout of the subresources of pname:dstImage specified in pname:pRegions at the time this command is executed on a sname:VkDevice + pname:dstImageLayout must: be either of VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or VK_IMAGE_LAYOUT_GENERAL + If pname:dstImage was created with pname:tiling equal to ename:VK_IMAGE_TILING_LINEAR, pname:dstImage must: have been created with a pname:format that supports being a color attachment, as specified by the ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:linearTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + If pname:dstImage was created with pname:tiling equal to ename:VK_IMAGE_TILING_OPTIMAL, pname:dstImage must: have been created with a pname:format that supports being a color attachment, as specified by the ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT flag in sname:VkFormatProperties::pname:optimalTilingFeatures returned by fname:vkGetPhysicalDeviceFormatProperties + + + + + void vkCmdSetEvent + VkCommandBuffer commandBuffer + VkEvent event + VkPipelineStageFlags stageMask + + If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:stageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT + If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:stageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT + + + + void vkCmdResetEvent + VkCommandBuffer commandBuffer + VkEvent event + VkPipelineStageFlags stageMask + + If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:stageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT + If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:stageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT + + + + void vkCmdWaitEvents + VkCommandBuffer commandBuffer + uint32_t eventCount + const VkEvent* pEvents + VkPipelineStageFlags srcStageMask + VkPipelineStageFlags dstStageMask + uint32_t memoryBarrierCount + const VkMemoryBarrier* pMemoryBarriers + uint32_t bufferMemoryBarrierCount + const VkBufferMemoryBarrier* pBufferMemoryBarriers + uint32_t imageMemoryBarrierCount + const VkImageMemoryBarrier* pImageMemoryBarriers + + pname:srcStageMask must: be the bitwise OR of the pname:stageMask parameter used in previous calls to fname:vkCmdSetEvent with any of the members of pname:pEvents and VK_PIPELINE_STAGE_HOST_BIT if any of the members of pname:pEvents was set using fname:vkSetEvent + If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT + If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT + If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT + If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT + If pname:pEvents includes one or more events that will be signaled by fname:vkSetEvent after pname:commandBuffer has been submitted to a queue, then fname:vkCmdWaitEvents mustnot: be called inside a render pass instance + + + + void vkCmdPipelineBarrier + VkCommandBuffer commandBuffer + VkPipelineStageFlags srcStageMask + VkPipelineStageFlags dstStageMask + VkDependencyFlags dependencyFlags + uint32_t memoryBarrierCount + const VkMemoryBarrier* pMemoryBarriers + uint32_t bufferMemoryBarrierCount + const VkBufferMemoryBarrier* pBufferMemoryBarriers + uint32_t imageMemoryBarrierCount + const VkImageMemoryBarrier* pImageMemoryBarriers + + If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT + If the <<features-features-geometryShader,geometry shaders>> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT + If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:srcStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT + If the <<features-features-tessellationShader,tessellation shaders>> feature is not enabled, pname:dstStageMask mustnot: contain pname:VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or pname:VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT + If fname:vkCmdPipelineBarrier is called within a render pass instance, the render pass must: declare at least one self-dependency from the current subpass to itself - see <<synchronization-pipeline-barriers-subpass-self-dependencies,Subpass Self-dependency>> + + + + void vkCmdBeginQuery + VkCommandBuffer commandBuffer + VkQueryPool queryPool + uint32_t query + VkQueryControlFlags flags + + The query identified by pname:queryPool and pname:query must: currently not be <<queries-operation-active,active>> + The query identified by pname:queryPool and pname:query must: be unavailable + If the <<features-features-occlusionQueryPrecise,precise occlusion queries>> feature is not enabled, or the pname:queryType used to create pname:queryPool was not ename:VK_QUERY_TYPE_OCCLUSION, pname:flags mustnot: contain ename:VK_QUERY_CONTROL_PRECISE_BIT + pname:queryPool must: have been created with a pname:queryType that differs from that of any other queries that have been made <<queries-operation-active,active>>, and are currently still active within pname:commandBuffer + pname:query must: be less than the number of queries in pname:queryPool + If the pname:queryType used to create pname:queryPool was ename:VK_QUERY_TYPE_OCCLUSION, the sname:VkCommandPool that pname:commandBuffer was created from must: support graphics operations + If the pname:queryType used to create pname:queryPool was ename:VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the pname:pipelineStatistics indicate graphics operations, the sname:VkCommandPool that pname:commandBuffer was created from must: support graphics operations + If the pname:queryType used to create pname:queryPool was ename:VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the pname:pipelineStatistics indicate compute operations, the sname:VkCommandPool that pname:commandBuffer was created from must: support compute operations + + + + void vkCmdEndQuery + VkCommandBuffer commandBuffer + VkQueryPool queryPool + uint32_t query + + The query identified by pname:queryPool and pname:query must: currently be <<queries-operation-active,active>> + pname:query must: be less than the number of queries in pname:queryPool + + + + void vkCmdResetQueryPool + VkCommandBuffer commandBuffer + VkQueryPool queryPool + uint32_t firstQuery + uint32_t queryCount + + pname:firstQuery must: be less than the number of queries in pname:queryPool + The sum of pname:firstQuery and pname:queryCount must: be less than or equal to the number of queries in pname:queryPool + + + + void vkCmdWriteTimestamp + VkCommandBuffer commandBuffer + VkPipelineStageFlagBits pipelineStage + VkQueryPool queryPool + uint32_t query + + The query identified by pname:queryPool and pname:query must: be _unavailable_ + The command pool's queue family must: support a non-zero value of pname:timestampValidBits + + + + void vkCmdCopyQueryPoolResults + VkCommandBuffer commandBuffer + VkQueryPool queryPool + uint32_t firstQuery + uint32_t queryCount + VkBuffer dstBuffer + VkDeviceSize dstOffset + VkDeviceSize stride + VkQueryResultFlags flags + + pname:firstQuery must: be less than the number of queries in pname:queryPool + The sum of pname:firstQuery and pname:queryCount must: be less than or equal to the number of queries in pname:queryPool + If ename:VK_QUERY_RESULT_64_BIT is not set in pname:flags then pname:dstOffset and pname:stride must be multiples of `4` + If ename:VK_QUERY_RESULT_64_BIT is set in pname:flags then pname:dstOffset and pname:stride must be multiples of `8` + pname:dstBuffer must: have enough storage, from pname:dstOffset, to contain the result of each query, as described <<queries-operation-memorylayout,here>> + If the pname:queryType used to create pname:queryPool was ename:VK_QUERY_TYPE_TIMESTAMP, pname:flags mustnot: contain ename:VK_QUERY_RESULT_PARTIAL_BIT + + + + void vkCmdPushConstants + VkCommandBuffer commandBuffer + VkPipelineLayout layout + VkShaderStageFlags stageFlags + uint32_t offset + uint32_t size + const void* pValues + + pname:stageFlags must: match exactly the shader stages used in pname:layout for the range specified by pname:offset and pname:size + pname:offset must: be a multiple of `4` + pname:size must: be a multiple of `4` + + + + void vkCmdBeginRenderPass + VkCommandBuffer commandBuffer + const VkRenderPassBeginInfo* pRenderPassBegin + VkSubpassContents contents + + If any of the pname:initialLayout or pname:finalLayout member of the sname:VkAttachmentDescription structures or the pname:layout member of the sname:VkAttachmentReference structures specified when creating the render pass specified in the pname:renderPass member of pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL then the corresponding attachment image of the framebuffer specified in the pname:framebuffer member of pname:pRenderPassBegin must: have been created with ename:VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT set + If any of the pname:initialLayout or pname:finalLayout member of the sname:VkAttachmentDescription structures or the pname:layout member of the sname:VkAttachmentReference structures specified when creating the render pass specified in the pname:renderPass member of pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL or ename:VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL then the corresponding attachment image of the framebuffer specified in the pname:framebuffer member of pname:pRenderPassBegin must: have been created with ename:VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT set + If any of the pname:initialLayout or pname:finalLayout member of the sname:VkAttachmentDescription structures or the pname:layout member of the sname:VkAttachmentReference structures specified when creating the render pass specified in the pname:renderPass member of pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL then the corresponding attachment image of the framebuffer specified in the pname:framebuffer member of pname:pRenderPassBegin must: have been created with ename:VK_IMAGE_USAGE_SAMPLED_BIT or ename:VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT set + If any of the pname:initialLayout or pname:finalLayout member of the sname:VkAttachmentDescription structures or the pname:layout member of the sname:VkAttachmentReference structures specified when creating the render pass specified in the pname:renderPass member of pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_BIT then the corresponding attachment image of the framebuffer specified in the pname:framebuffer member of pname:pRenderPassBegin must: have been created with ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT set + If any of the pname:initialLayout or pname:finalLayout member of the sname:VkAttachmentDescription structures or the pname:layout member of the sname:VkAttachmentReference structures specified when creating the render pass specified in the pname:renderPass member of pname:pRenderPassBegin is ename:VK_IMAGE_LAYOUT_TRANSFER_DST_BIT then the corresponding attachment image of the framebuffer specified in the pname:framebuffer member of pname:pRenderPassBegin must: have been created with ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT set + + + + void vkCmdNextSubpass + VkCommandBuffer commandBuffer + VkSubpassContents contents + + The current subpass index must: be less than the number of subpasses in the render pass minus one + + + + void vkCmdEndRenderPass + VkCommandBuffer commandBuffer + + The current subpass index must: be equal to the number of subpasses in the render pass minus one + + + + void vkCmdExecuteCommands + VkCommandBuffer commandBuffer + uint32_t commandBufferCount + const VkCommandBuffer* pCommandBuffers + + pname:commandBuffer must: have been created with a pname:level value of VK_COMMAND_BUFFER_LEVEL_PRIMARY + Any given element of pname:pCommandBuffers must: have been created with a pname:level value of VK_COMMAND_BUFFER_LEVEL_SECONDARY + Any given element of pname:pCommandBuffers mustnot: be already pending execution in pname:commandBuffer, or appear twice in pname:pCommandBuffers, unless it was created with the ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag + Any given element of pname:pCommandBuffers mustnot: be already pending execution in any other sname:VkCommandBuffer, unless it was created with the ename:VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag + Any given element of pname:pCommandBuffers must: be in the executable state + If fname:vkCmdExecuteCommands is being called within a render pass instance, that render pass instance must: have been begun with the pname:contents parameter of fname:vkCmdBeginRenderPass set to ename:VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS + If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with the ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT + If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with the pname:subpass member of the pname:inheritanceInfo structure set to the index of the subpass which the given command buffer will be executed in + If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with a render pass that is compatible with the current render pass - see <<renderpass-compatibility>> + If fname:vkCmdExecuteCommands is being called within a render pass instance, and any given element of pname:pCommandBuffers was recorded with the pname:framebuffer member of the sname:VkCommandBufferInheritanceInfo structure not equal to sname:VK_NULL_HANDLE, that sname:VkFramebuffer must: be compatible with the sname:VkFramebuffer used in the current render pass instance + If the <<features-features-inheritedQueries,inherited queries>> feature is not enabled, pname:commandBuffer mustnot: have any queries <<queries-operation-active,active>> + If pname:commandBuffer has a ename:VK_QUERY_TYPE_OCCLUSION query <<queries-operation-active,active>>, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferBeginInfo::pname:occlusionQueryEnable set to ename:VK_TRUE + If pname:commandBuffer has a ename:VK_QUERY_TYPE_OCCLUSION query <<queries-operation-active,active>>, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferBeginInfo::pname:queryFlags having all bits set that are set for the query + If pname:commandBuffer has a ename:VK_QUERY_TYPE_PIPELINE_STATISTICS query <<queries-operation-active,active>>, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferBeginInfo::pname:pipelineStatistics having all bits set that are set in the sname:VkQueryPool the query uses + Any given element of pname:pCommandBuffers mustnot: begin any query types that are <<queries-operation-active,active>> in pname:commandBuffer + + + + VkResult vkCreateAndroidSurfaceKHR + VkInstance instance + const VkAndroidSurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkResult vkGetPhysicalDeviceDisplayPropertiesKHR + VkPhysicalDevice physicalDevice + uint32_t* pPropertyCount + VkDisplayPropertiesKHR* pProperties + + + VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR + VkPhysicalDevice physicalDevice + uint32_t* pPropertyCount + VkDisplayPlanePropertiesKHR* pProperties + + + VkResult vkGetDisplayPlaneSupportedDisplaysKHR + VkPhysicalDevice physicalDevice + uint32_t planeIndex + uint32_t* pDisplayCount + VkDisplayKHR* pDisplays + + pname:planeIndex must: be less than the number of display planes supported by the device as determined by calling fname:vkGetPhysicalDeviceDisplayPlanePropertiesKHR + + + + VkResult vkGetDisplayModePropertiesKHR + VkPhysicalDevice physicalDevice + VkDisplayKHR display + uint32_t* pPropertyCount + VkDisplayModePropertiesKHR* pProperties + + + VkResult vkCreateDisplayModeKHR + VkPhysicalDevice physicalDevice + VkDisplayKHR display + const VkDisplayModeCreateInfoKHR*pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDisplayModeKHR* pMode + + + VkResult vkGetDisplayPlaneCapabilitiesKHR + VkPhysicalDevice physicalDevice + VkDisplayModeKHR mode + uint32_t planeIndex + VkDisplayPlaneCapabilitiesKHR* pCapabilities + + + VkResult vkCreateDisplayPlaneSurfaceKHR + VkInstance instance + const VkDisplaySurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkResult vkCreateSharedSwapchainsKHR + VkDevice device + uint32_t swapchainCount + const VkSwapchainCreateInfoKHR* pCreateInfos + const VkAllocationCallbacks* pAllocator + VkSwapchainKHR* pSwapchains + + + VkResult vkCreateMirSurfaceKHR + VkInstance instance + const VkMirSurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + MirConnection* connection + + pname:queueFamilyIndex must: be less than the value of pname:pQueueFamilyPropertyCount returned by fname:vkGetPhysicalDeviceQueueFamilyProperties for the given pname:physicalDevice + + + + void vkDestroySurfaceKHR + VkInstance instance + VkSurfaceKHR surface + const VkAllocationCallbacks* pAllocator + + All sname:VkSwapchainKHR objects created for pname:surface must: have been destroyed prior to destroying pname:surface + If sname:VkAllocationCallbacks were provided when pname:surface was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:surface was created, pname:pAllocator must: be `NULL` + + + + VkResult vkGetPhysicalDeviceSurfaceSupportKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + VkSurfaceKHR surface + VkBool32* pSupported + + pname:queueFamilyIndex must: be less than the value of pname:pQueueFamilyPropertyCount returned by fname:vkGetPhysicalDeviceQueueFamilyProperties for the given pname:physicalDevice + + + + VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR + VkPhysicalDevice physicalDevice + VkSurfaceKHR surface + VkSurfaceCapabilitiesKHR* pSurfaceCapabilities + + + VkResult vkGetPhysicalDeviceSurfaceFormatsKHR + VkPhysicalDevice physicalDevice + VkSurfaceKHR surface + uint32_t* pSurfaceFormatCount + VkSurfaceFormatKHR* pSurfaceFormats + + + VkResult vkGetPhysicalDeviceSurfacePresentModesKHR + VkPhysicalDevice physicalDevice + VkSurfaceKHR surface + uint32_t* pPresentModeCount + VkPresentModeKHR* pPresentModes + + + VkResult vkCreateSwapchainKHR + VkDevice device + const VkSwapchainCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSwapchainKHR* pSwapchain + + + void vkDestroySwapchainKHR + VkDevice device + VkSwapchainKHR swapchain + const VkAllocationCallbacks* pAllocator + + All uses of presentable images acquired from pname:swapchain and owned by the application must: have completed execution + If sname:VkAllocationCallbacks were provided when pname:swapchain was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:swapchain was created, pname:pAllocator must: be `NULL` + + + + VkResult vkGetSwapchainImagesKHR + VkDevice device + VkSwapchainKHR swapchain + uint32_t* pSwapchainImageCount + VkImage* pSwapchainImages + + + VkResult vkAcquireNextImageKHR + VkDevice device + VkSwapchainKHR swapchain + uint64_t timeout + VkSemaphore semaphore + VkFence fence + uint32_t* pImageIndex + + If pname:semaphore is not sname:VK_NULL_HANDLE it must: be unsignalled + If pname:fence is not sname:VK_NULL_HANDLE it must: be unsignalled and mustnot: be associated with any other queue command that has not yet completed execution on that queue + + + + VkResult vkQueuePresentKHR + VkQueue queue + const VkPresentInfoKHR* pPresentInfo + + Any given element of pname:pSwapchains member of pname:pPresentInfo must: be a swapchain that is created for a surface for which presentation is supported from pname:queue as determined using a call to fname:vkGetPhysicalDeviceSurfaceSupportKHR + + + + VkResult vkCreateWaylandSurfaceKHR + VkInstance instance + const VkWaylandSurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + struct wl_display* display + + pname:queueFamilyIndex must: be less than the value of pname:pQueueFamilyPropertyCount returned by fname:vkGetPhysicalDeviceQueueFamilyProperties for the given pname:physicalDevice + + + + VkResult vkCreateWin32SurfaceKHR + VkInstance instance + const VkWin32SurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkBool32 vkGetPhysicalDeviceWin32PresentationSupportKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + + pname:queueFamilyIndex must: be less than the value of pname:pQueueFamilyPropertyCount returned by fname:vkGetPhysicalDeviceQueueFamilyProperties for the given pname:physicalDevice + + + + VkResult vkCreateXlibSurfaceKHR + VkInstance instance + const VkXlibSurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + Display* dpy + VisualID visualID + + pname:queueFamilyIndex must: be less than the value of pname:pQueueFamilyPropertyCount returned by fname:vkGetPhysicalDeviceQueueFamilyProperties for the given pname:physicalDevice + + + + VkResult vkCreateXcbSurfaceKHR + VkInstance instance + const VkXcbSurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + xcb_connection_t* connection + xcb_visualid_t visual_id + + pname:queueFamilyIndex must: be less than the value of pname:pQueueFamilyPropertyCount returned by fname:vkGetPhysicalDeviceQueueFamilyProperties for the given pname:physicalDevice + + + + VkResult vkCreateDebugReportCallbackEXT + VkInstance instance + const VkDebugReportCallbackCreateInfoEXT* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDebugReportCallbackEXT* pCallback + + + void vkDestroyDebugReportCallbackEXT + VkInstance instance + VkDebugReportCallbackEXT callback + const VkAllocationCallbacks* pAllocator + + If sname:VkAllocationCallbacks were provided when pname:instance was created, a compatible set of callbacks must: be provided here + If no sname:VkAllocationCallbacks were provided when pname:instance was created, pname:pAllocator must: be `NULL` + + + + void vkDebugReportMessageEXT + VkInstance instance + VkDebugReportFlagsEXT flags + VkDebugReportObjectTypeEXT objectType + uint64_t object + size_t location + int32_t messageCode + const char* pLayerPrefix + const char* pMessage + + pname:instance must: be a valid sname:VkInstance handle + pname:flags must be a combination of one or more of sname:VkDebugReportFlagBitsEXT + pname:objType must be one of sname:VkDebugReportObjectTypeEXT, ename:VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT if pname:object is `NULL` + pname:object may be a {apiname} object + pname:pLayerPrefix must: be a `NULL` terminated string. + pname:pMsg must: be a `NULL` terminated string. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/vulkan/vk_platform.h b/src/vulkan/vk_platform.h new file mode 100644 index 00000000..a53e725a --- /dev/null +++ b/src/vulkan/vk_platform.h @@ -0,0 +1,127 @@ +// +// File: vk_platform.h +// +/* +** Copyright (c) 2014-2015 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + + +#ifndef __VK_PLATFORM_H__ +#define __VK_PLATFORM_H__ + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +/* +*************************************************************************************************** +* Platform-specific directives and type declarations +*************************************************************************************************** +*/ + +/* Platform-specific calling convention macros. + * + * Platforms should define these so that Vulkan clients call Vulkan commands + * with the same calling conventions that the Vulkan implementation expects. + * + * VKAPI_ATTR - Placed before the return type in function declarations. + * Useful for C++11 and GCC/Clang-style function attribute syntax. + * VKAPI_CALL - Placed after the return type in function declarations. + * Useful for MSVC-style calling convention syntax. + * VKAPI_PTR - Placed between the '(' and '*' in function pointer types. + * + * Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void); + * Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void); + */ +#if defined(_WIN32) + // On Windows, Vulkan commands use the stdcall convention + #define VKAPI_ATTR + #define VKAPI_CALL __stdcall + #define VKAPI_PTR VKAPI_CALL +#elif defined(__ANDROID__) && defined(__ARM_EABI__) && !defined(__ARM_ARCH_7A__) + // Android does not support Vulkan in native code using the "armeabi" ABI. + #error "Vulkan requires the 'armeabi-v7a' or 'armeabi-v7a-hard' ABI on 32-bit ARM CPUs" +#elif defined(__ANDROID__) && defined(__ARM_ARCH_7A__) + // On Android/ARMv7a, Vulkan functions use the armeabi-v7a-hard calling + // convention, even if the application's native code is compiled with the + // armeabi-v7a calling convention. + #define VKAPI_ATTR __attribute__((pcs("aapcs-vfp"))) + #define VKAPI_CALL + #define VKAPI_PTR VKAPI_ATTR +#else + // On other platforms, use the default calling convention + #define VKAPI_ATTR + #define VKAPI_CALL + #define VKAPI_PTR +#endif + +#include + +#if !defined(VK_NO_STDINT_H) + #if defined(_MSC_VER) && (_MSC_VER < 1600) + typedef signed __int8 int8_t; + typedef unsigned __int8 uint8_t; + typedef signed __int16 int16_t; + typedef unsigned __int16 uint16_t; + typedef signed __int32 int32_t; + typedef unsigned __int32 uint32_t; + typedef signed __int64 int64_t; + typedef unsigned __int64 uint64_t; + #else + #include + #endif +#endif // !defined(VK_NO_STDINT_H) + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus + +// Platform-specific headers required by platform window system extensions. +// These are enabled prior to #including "vulkan.h". The same enable then +// controls inclusion of the extension interfaces in vulkan.h. + +#ifdef VK_USE_PLATFORM_ANDROID_KHR +#include +#endif + +#ifdef VK_USE_PLATFORM_MIR_KHR +#include +#endif + +#ifdef VK_USE_PLATFORM_WAYLAND_KHR +#include +#endif + +#ifdef VK_USE_PLATFORM_WIN32_KHR +#include +#endif + +#ifdef VK_USE_PLATFORM_XLIB_KHR +#include +#endif + +#ifdef VK_USE_PLATFORM_XCB_KHR +#include +#endif + +#endif // __VK_PLATFORM_H__ diff --git a/src/vulkan/vulkan.h b/src/vulkan/vulkan.h new file mode 100644 index 00000000..cd6a71ac --- /dev/null +++ b/src/vulkan/vulkan.h @@ -0,0 +1,3775 @@ +#ifndef __vulkan_h_ +#define __vulkan_h_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2015-2016 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* +** This header is generated from the Khronos Vulkan XML API Registry. +** +*/ + + +#define VK_VERSION_1_0 1 +#include "vk_platform.h" + +#define VK_MAKE_VERSION(major, minor, patch) \ + (((major) << 22) | ((minor) << 12) | (patch)) + +// Vulkan API version supported by this file +#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 3) + +#define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22) +#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff) +#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff) + +#define VK_NULL_HANDLE 0 + + + +#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; + + +#if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) + #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object; +#else + #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object; +#endif + + + +typedef uint32_t VkFlags; +typedef uint32_t VkBool32; +typedef uint64_t VkDeviceSize; +typedef uint32_t VkSampleMask; + +VK_DEFINE_HANDLE(VkInstance) +VK_DEFINE_HANDLE(VkPhysicalDevice) +VK_DEFINE_HANDLE(VkDevice) +VK_DEFINE_HANDLE(VkQueue) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore) +VK_DEFINE_HANDLE(VkCommandBuffer) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool) + +#define VK_LOD_CLAMP_NONE 1000.0f +#define VK_REMAINING_MIP_LEVELS (~0U) +#define VK_REMAINING_ARRAY_LAYERS (~0U) +#define VK_WHOLE_SIZE (~0ULL) +#define VK_ATTACHMENT_UNUSED (~0U) +#define VK_TRUE 1 +#define VK_FALSE 0 +#define VK_QUEUE_FAMILY_IGNORED (~0U) +#define VK_SUBPASS_EXTERNAL (~0U) +#define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256 +#define VK_UUID_SIZE 16 +#define VK_MAX_MEMORY_TYPES 32 +#define VK_MAX_MEMORY_HEAPS 16 +#define VK_MAX_EXTENSION_NAME_SIZE 256 +#define VK_MAX_DESCRIPTION_SIZE 256 + + +typedef enum VkPipelineCacheHeaderVersion { + VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1, + VK_PIPELINE_CACHE_HEADER_VERSION_BEGIN_RANGE = VK_PIPELINE_CACHE_HEADER_VERSION_ONE, + VK_PIPELINE_CACHE_HEADER_VERSION_END_RANGE = VK_PIPELINE_CACHE_HEADER_VERSION_ONE, + VK_PIPELINE_CACHE_HEADER_VERSION_RANGE_SIZE = (VK_PIPELINE_CACHE_HEADER_VERSION_ONE - VK_PIPELINE_CACHE_HEADER_VERSION_ONE + 1), + VK_PIPELINE_CACHE_HEADER_VERSION_MAX_ENUM = 0x7FFFFFFF +} VkPipelineCacheHeaderVersion; + +typedef enum VkResult { + VK_SUCCESS = 0, + VK_NOT_READY = 1, + VK_TIMEOUT = 2, + VK_EVENT_SET = 3, + VK_EVENT_RESET = 4, + VK_INCOMPLETE = 5, + VK_ERROR_OUT_OF_HOST_MEMORY = -1, + VK_ERROR_OUT_OF_DEVICE_MEMORY = -2, + VK_ERROR_INITIALIZATION_FAILED = -3, + VK_ERROR_DEVICE_LOST = -4, + VK_ERROR_MEMORY_MAP_FAILED = -5, + VK_ERROR_LAYER_NOT_PRESENT = -6, + VK_ERROR_EXTENSION_NOT_PRESENT = -7, + VK_ERROR_FEATURE_NOT_PRESENT = -8, + VK_ERROR_INCOMPATIBLE_DRIVER = -9, + VK_ERROR_TOO_MANY_OBJECTS = -10, + VK_ERROR_FORMAT_NOT_SUPPORTED = -11, + VK_ERROR_SURFACE_LOST_KHR = -1000000000, + VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001, + VK_SUBOPTIMAL_KHR = 1000001003, + VK_ERROR_OUT_OF_DATE_KHR = -1000001004, + VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001, + VK_ERROR_VALIDATION_FAILED_EXT = -1000011001, + VK_RESULT_BEGIN_RANGE = VK_ERROR_FORMAT_NOT_SUPPORTED, + VK_RESULT_END_RANGE = VK_INCOMPLETE, + VK_RESULT_RANGE_SIZE = (VK_INCOMPLETE - VK_ERROR_FORMAT_NOT_SUPPORTED + 1), + VK_RESULT_MAX_ENUM = 0x7FFFFFFF +} VkResult; + +typedef enum VkStructureType { + VK_STRUCTURE_TYPE_APPLICATION_INFO = 0, + VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1, + VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2, + VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3, + VK_STRUCTURE_TYPE_SUBMIT_INFO = 4, + VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5, + VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6, + VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7, + VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8, + VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9, + VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10, + VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11, + VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12, + VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13, + VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14, + VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15, + VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16, + VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17, + VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18, + VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19, + VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, + VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21, + VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22, + VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23, + VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24, + VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25, + VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26, + VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27, + VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28, + VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29, + VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30, + VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31, + VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32, + VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33, + VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34, + VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35, + VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36, + VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37, + VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38, + VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39, + VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40, + VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41, + VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42, + VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43, + VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44, + VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45, + VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46, + VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47, + VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48, + VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000, + VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001, + VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000, + VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001, + VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR = 1000003000, + VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000, + VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000, + VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000, + VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000, + VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000, + VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000, + VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = 1000011000, + VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO, + VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO, + VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1), + VK_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF +} VkStructureType; + +typedef enum VkSystemAllocationScope { + VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0, + VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1, + VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 2, + VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 3, + VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 4, + VK_SYSTEM_ALLOCATION_SCOPE_BEGIN_RANGE = VK_SYSTEM_ALLOCATION_SCOPE_COMMAND, + VK_SYSTEM_ALLOCATION_SCOPE_END_RANGE = VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE, + VK_SYSTEM_ALLOCATION_SCOPE_RANGE_SIZE = (VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE - VK_SYSTEM_ALLOCATION_SCOPE_COMMAND + 1), + VK_SYSTEM_ALLOCATION_SCOPE_MAX_ENUM = 0x7FFFFFFF +} VkSystemAllocationScope; + +typedef enum VkInternalAllocationType { + VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0, + VK_INTERNAL_ALLOCATION_TYPE_BEGIN_RANGE = VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE, + VK_INTERNAL_ALLOCATION_TYPE_END_RANGE = VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE, + VK_INTERNAL_ALLOCATION_TYPE_RANGE_SIZE = (VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE - VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE + 1), + VK_INTERNAL_ALLOCATION_TYPE_MAX_ENUM = 0x7FFFFFFF +} VkInternalAllocationType; + +typedef enum VkFormat { + VK_FORMAT_UNDEFINED = 0, + VK_FORMAT_R4G4_UNORM_PACK8 = 1, + VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2, + VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3, + VK_FORMAT_R5G6B5_UNORM_PACK16 = 4, + VK_FORMAT_B5G6R5_UNORM_PACK16 = 5, + VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6, + VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7, + VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8, + VK_FORMAT_R8_UNORM = 9, + VK_FORMAT_R8_SNORM = 10, + VK_FORMAT_R8_USCALED = 11, + VK_FORMAT_R8_SSCALED = 12, + VK_FORMAT_R8_UINT = 13, + VK_FORMAT_R8_SINT = 14, + VK_FORMAT_R8_SRGB = 15, + VK_FORMAT_R8G8_UNORM = 16, + VK_FORMAT_R8G8_SNORM = 17, + VK_FORMAT_R8G8_USCALED = 18, + VK_FORMAT_R8G8_SSCALED = 19, + VK_FORMAT_R8G8_UINT = 20, + VK_FORMAT_R8G8_SINT = 21, + VK_FORMAT_R8G8_SRGB = 22, + VK_FORMAT_R8G8B8_UNORM = 23, + VK_FORMAT_R8G8B8_SNORM = 24, + VK_FORMAT_R8G8B8_USCALED = 25, + VK_FORMAT_R8G8B8_SSCALED = 26, + VK_FORMAT_R8G8B8_UINT = 27, + VK_FORMAT_R8G8B8_SINT = 28, + VK_FORMAT_R8G8B8_SRGB = 29, + VK_FORMAT_B8G8R8_UNORM = 30, + VK_FORMAT_B8G8R8_SNORM = 31, + VK_FORMAT_B8G8R8_USCALED = 32, + VK_FORMAT_B8G8R8_SSCALED = 33, + VK_FORMAT_B8G8R8_UINT = 34, + VK_FORMAT_B8G8R8_SINT = 35, + VK_FORMAT_B8G8R8_SRGB = 36, + VK_FORMAT_R8G8B8A8_UNORM = 37, + VK_FORMAT_R8G8B8A8_SNORM = 38, + VK_FORMAT_R8G8B8A8_USCALED = 39, + VK_FORMAT_R8G8B8A8_SSCALED = 40, + VK_FORMAT_R8G8B8A8_UINT = 41, + VK_FORMAT_R8G8B8A8_SINT = 42, + VK_FORMAT_R8G8B8A8_SRGB = 43, + VK_FORMAT_B8G8R8A8_UNORM = 44, + VK_FORMAT_B8G8R8A8_SNORM = 45, + VK_FORMAT_B8G8R8A8_USCALED = 46, + VK_FORMAT_B8G8R8A8_SSCALED = 47, + VK_FORMAT_B8G8R8A8_UINT = 48, + VK_FORMAT_B8G8R8A8_SINT = 49, + VK_FORMAT_B8G8R8A8_SRGB = 50, + VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51, + VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52, + VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53, + VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54, + VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55, + VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56, + VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57, + VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58, + VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59, + VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60, + VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61, + VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62, + VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63, + VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64, + VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65, + VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66, + VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67, + VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68, + VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69, + VK_FORMAT_R16_UNORM = 70, + VK_FORMAT_R16_SNORM = 71, + VK_FORMAT_R16_USCALED = 72, + VK_FORMAT_R16_SSCALED = 73, + VK_FORMAT_R16_UINT = 74, + VK_FORMAT_R16_SINT = 75, + VK_FORMAT_R16_SFLOAT = 76, + VK_FORMAT_R16G16_UNORM = 77, + VK_FORMAT_R16G16_SNORM = 78, + VK_FORMAT_R16G16_USCALED = 79, + VK_FORMAT_R16G16_SSCALED = 80, + VK_FORMAT_R16G16_UINT = 81, + VK_FORMAT_R16G16_SINT = 82, + VK_FORMAT_R16G16_SFLOAT = 83, + VK_FORMAT_R16G16B16_UNORM = 84, + VK_FORMAT_R16G16B16_SNORM = 85, + VK_FORMAT_R16G16B16_USCALED = 86, + VK_FORMAT_R16G16B16_SSCALED = 87, + VK_FORMAT_R16G16B16_UINT = 88, + VK_FORMAT_R16G16B16_SINT = 89, + VK_FORMAT_R16G16B16_SFLOAT = 90, + VK_FORMAT_R16G16B16A16_UNORM = 91, + VK_FORMAT_R16G16B16A16_SNORM = 92, + VK_FORMAT_R16G16B16A16_USCALED = 93, + VK_FORMAT_R16G16B16A16_SSCALED = 94, + VK_FORMAT_R16G16B16A16_UINT = 95, + VK_FORMAT_R16G16B16A16_SINT = 96, + VK_FORMAT_R16G16B16A16_SFLOAT = 97, + VK_FORMAT_R32_UINT = 98, + VK_FORMAT_R32_SINT = 99, + VK_FORMAT_R32_SFLOAT = 100, + VK_FORMAT_R32G32_UINT = 101, + VK_FORMAT_R32G32_SINT = 102, + VK_FORMAT_R32G32_SFLOAT = 103, + VK_FORMAT_R32G32B32_UINT = 104, + VK_FORMAT_R32G32B32_SINT = 105, + VK_FORMAT_R32G32B32_SFLOAT = 106, + VK_FORMAT_R32G32B32A32_UINT = 107, + VK_FORMAT_R32G32B32A32_SINT = 108, + VK_FORMAT_R32G32B32A32_SFLOAT = 109, + VK_FORMAT_R64_UINT = 110, + VK_FORMAT_R64_SINT = 111, + VK_FORMAT_R64_SFLOAT = 112, + VK_FORMAT_R64G64_UINT = 113, + VK_FORMAT_R64G64_SINT = 114, + VK_FORMAT_R64G64_SFLOAT = 115, + VK_FORMAT_R64G64B64_UINT = 116, + VK_FORMAT_R64G64B64_SINT = 117, + VK_FORMAT_R64G64B64_SFLOAT = 118, + VK_FORMAT_R64G64B64A64_UINT = 119, + VK_FORMAT_R64G64B64A64_SINT = 120, + VK_FORMAT_R64G64B64A64_SFLOAT = 121, + VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122, + VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123, + VK_FORMAT_D16_UNORM = 124, + VK_FORMAT_X8_D24_UNORM_PACK32 = 125, + VK_FORMAT_D32_SFLOAT = 126, + VK_FORMAT_S8_UINT = 127, + VK_FORMAT_D16_UNORM_S8_UINT = 128, + VK_FORMAT_D24_UNORM_S8_UINT = 129, + VK_FORMAT_D32_SFLOAT_S8_UINT = 130, + VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131, + VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132, + VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133, + VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134, + VK_FORMAT_BC2_UNORM_BLOCK = 135, + VK_FORMAT_BC2_SRGB_BLOCK = 136, + VK_FORMAT_BC3_UNORM_BLOCK = 137, + VK_FORMAT_BC3_SRGB_BLOCK = 138, + VK_FORMAT_BC4_UNORM_BLOCK = 139, + VK_FORMAT_BC4_SNORM_BLOCK = 140, + VK_FORMAT_BC5_UNORM_BLOCK = 141, + VK_FORMAT_BC5_SNORM_BLOCK = 142, + VK_FORMAT_BC6H_UFLOAT_BLOCK = 143, + VK_FORMAT_BC6H_SFLOAT_BLOCK = 144, + VK_FORMAT_BC7_UNORM_BLOCK = 145, + VK_FORMAT_BC7_SRGB_BLOCK = 146, + VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147, + VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148, + VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149, + VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150, + VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151, + VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152, + VK_FORMAT_EAC_R11_UNORM_BLOCK = 153, + VK_FORMAT_EAC_R11_SNORM_BLOCK = 154, + VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155, + VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156, + VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157, + VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158, + VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159, + VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160, + VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161, + VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162, + VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163, + VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164, + VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165, + VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166, + VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167, + VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168, + VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169, + VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170, + VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171, + VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172, + VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173, + VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174, + VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175, + VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176, + VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177, + VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178, + VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179, + VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180, + VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181, + VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182, + VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183, + VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184, + VK_FORMAT_BEGIN_RANGE = VK_FORMAT_UNDEFINED, + VK_FORMAT_END_RANGE = VK_FORMAT_ASTC_12x12_SRGB_BLOCK, + VK_FORMAT_RANGE_SIZE = (VK_FORMAT_ASTC_12x12_SRGB_BLOCK - VK_FORMAT_UNDEFINED + 1), + VK_FORMAT_MAX_ENUM = 0x7FFFFFFF +} VkFormat; + +typedef enum VkImageType { + VK_IMAGE_TYPE_1D = 0, + VK_IMAGE_TYPE_2D = 1, + VK_IMAGE_TYPE_3D = 2, + VK_IMAGE_TYPE_BEGIN_RANGE = VK_IMAGE_TYPE_1D, + VK_IMAGE_TYPE_END_RANGE = VK_IMAGE_TYPE_3D, + VK_IMAGE_TYPE_RANGE_SIZE = (VK_IMAGE_TYPE_3D - VK_IMAGE_TYPE_1D + 1), + VK_IMAGE_TYPE_MAX_ENUM = 0x7FFFFFFF +} VkImageType; + +typedef enum VkImageTiling { + VK_IMAGE_TILING_OPTIMAL = 0, + VK_IMAGE_TILING_LINEAR = 1, + VK_IMAGE_TILING_BEGIN_RANGE = VK_IMAGE_TILING_OPTIMAL, + VK_IMAGE_TILING_END_RANGE = VK_IMAGE_TILING_LINEAR, + VK_IMAGE_TILING_RANGE_SIZE = (VK_IMAGE_TILING_LINEAR - VK_IMAGE_TILING_OPTIMAL + 1), + VK_IMAGE_TILING_MAX_ENUM = 0x7FFFFFFF +} VkImageTiling; + +typedef enum VkPhysicalDeviceType { + VK_PHYSICAL_DEVICE_TYPE_OTHER = 0, + VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1, + VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2, + VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 3, + VK_PHYSICAL_DEVICE_TYPE_CPU = 4, + VK_PHYSICAL_DEVICE_TYPE_BEGIN_RANGE = VK_PHYSICAL_DEVICE_TYPE_OTHER, + VK_PHYSICAL_DEVICE_TYPE_END_RANGE = VK_PHYSICAL_DEVICE_TYPE_CPU, + VK_PHYSICAL_DEVICE_TYPE_RANGE_SIZE = (VK_PHYSICAL_DEVICE_TYPE_CPU - VK_PHYSICAL_DEVICE_TYPE_OTHER + 1), + VK_PHYSICAL_DEVICE_TYPE_MAX_ENUM = 0x7FFFFFFF +} VkPhysicalDeviceType; + +typedef enum VkQueryType { + VK_QUERY_TYPE_OCCLUSION = 0, + VK_QUERY_TYPE_PIPELINE_STATISTICS = 1, + VK_QUERY_TYPE_TIMESTAMP = 2, + VK_QUERY_TYPE_BEGIN_RANGE = VK_QUERY_TYPE_OCCLUSION, + VK_QUERY_TYPE_END_RANGE = VK_QUERY_TYPE_TIMESTAMP, + VK_QUERY_TYPE_RANGE_SIZE = (VK_QUERY_TYPE_TIMESTAMP - VK_QUERY_TYPE_OCCLUSION + 1), + VK_QUERY_TYPE_MAX_ENUM = 0x7FFFFFFF +} VkQueryType; + +typedef enum VkSharingMode { + VK_SHARING_MODE_EXCLUSIVE = 0, + VK_SHARING_MODE_CONCURRENT = 1, + VK_SHARING_MODE_BEGIN_RANGE = VK_SHARING_MODE_EXCLUSIVE, + VK_SHARING_MODE_END_RANGE = VK_SHARING_MODE_CONCURRENT, + VK_SHARING_MODE_RANGE_SIZE = (VK_SHARING_MODE_CONCURRENT - VK_SHARING_MODE_EXCLUSIVE + 1), + VK_SHARING_MODE_MAX_ENUM = 0x7FFFFFFF +} VkSharingMode; + +typedef enum VkImageLayout { + VK_IMAGE_LAYOUT_UNDEFINED = 0, + VK_IMAGE_LAYOUT_GENERAL = 1, + VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2, + VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3, + VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4, + VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5, + VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6, + VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7, + VK_IMAGE_LAYOUT_PREINITIALIZED = 8, + VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002, + VK_IMAGE_LAYOUT_BEGIN_RANGE = VK_IMAGE_LAYOUT_UNDEFINED, + VK_IMAGE_LAYOUT_END_RANGE = VK_IMAGE_LAYOUT_PREINITIALIZED, + VK_IMAGE_LAYOUT_RANGE_SIZE = (VK_IMAGE_LAYOUT_PREINITIALIZED - VK_IMAGE_LAYOUT_UNDEFINED + 1), + VK_IMAGE_LAYOUT_MAX_ENUM = 0x7FFFFFFF +} VkImageLayout; + +typedef enum VkImageViewType { + VK_IMAGE_VIEW_TYPE_1D = 0, + VK_IMAGE_VIEW_TYPE_2D = 1, + VK_IMAGE_VIEW_TYPE_3D = 2, + VK_IMAGE_VIEW_TYPE_CUBE = 3, + VK_IMAGE_VIEW_TYPE_1D_ARRAY = 4, + VK_IMAGE_VIEW_TYPE_2D_ARRAY = 5, + VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 6, + VK_IMAGE_VIEW_TYPE_BEGIN_RANGE = VK_IMAGE_VIEW_TYPE_1D, + VK_IMAGE_VIEW_TYPE_END_RANGE = VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, + VK_IMAGE_VIEW_TYPE_RANGE_SIZE = (VK_IMAGE_VIEW_TYPE_CUBE_ARRAY - VK_IMAGE_VIEW_TYPE_1D + 1), + VK_IMAGE_VIEW_TYPE_MAX_ENUM = 0x7FFFFFFF +} VkImageViewType; + +typedef enum VkComponentSwizzle { + VK_COMPONENT_SWIZZLE_IDENTITY = 0, + VK_COMPONENT_SWIZZLE_ZERO = 1, + VK_COMPONENT_SWIZZLE_ONE = 2, + VK_COMPONENT_SWIZZLE_R = 3, + VK_COMPONENT_SWIZZLE_G = 4, + VK_COMPONENT_SWIZZLE_B = 5, + VK_COMPONENT_SWIZZLE_A = 6, + VK_COMPONENT_SWIZZLE_BEGIN_RANGE = VK_COMPONENT_SWIZZLE_IDENTITY, + VK_COMPONENT_SWIZZLE_END_RANGE = VK_COMPONENT_SWIZZLE_A, + VK_COMPONENT_SWIZZLE_RANGE_SIZE = (VK_COMPONENT_SWIZZLE_A - VK_COMPONENT_SWIZZLE_IDENTITY + 1), + VK_COMPONENT_SWIZZLE_MAX_ENUM = 0x7FFFFFFF +} VkComponentSwizzle; + +typedef enum VkVertexInputRate { + VK_VERTEX_INPUT_RATE_VERTEX = 0, + VK_VERTEX_INPUT_RATE_INSTANCE = 1, + VK_VERTEX_INPUT_RATE_BEGIN_RANGE = VK_VERTEX_INPUT_RATE_VERTEX, + VK_VERTEX_INPUT_RATE_END_RANGE = VK_VERTEX_INPUT_RATE_INSTANCE, + VK_VERTEX_INPUT_RATE_RANGE_SIZE = (VK_VERTEX_INPUT_RATE_INSTANCE - VK_VERTEX_INPUT_RATE_VERTEX + 1), + VK_VERTEX_INPUT_RATE_MAX_ENUM = 0x7FFFFFFF +} VkVertexInputRate; + +typedef enum VkPrimitiveTopology { + VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0, + VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1, + VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2, + VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3, + VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4, + VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5, + VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6, + VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7, + VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8, + VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9, + VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10, + VK_PRIMITIVE_TOPOLOGY_BEGIN_RANGE = VK_PRIMITIVE_TOPOLOGY_POINT_LIST, + VK_PRIMITIVE_TOPOLOGY_END_RANGE = VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, + VK_PRIMITIVE_TOPOLOGY_RANGE_SIZE = (VK_PRIMITIVE_TOPOLOGY_PATCH_LIST - VK_PRIMITIVE_TOPOLOGY_POINT_LIST + 1), + VK_PRIMITIVE_TOPOLOGY_MAX_ENUM = 0x7FFFFFFF +} VkPrimitiveTopology; + +typedef enum VkPolygonMode { + VK_POLYGON_MODE_FILL = 0, + VK_POLYGON_MODE_LINE = 1, + VK_POLYGON_MODE_POINT = 2, + VK_POLYGON_MODE_BEGIN_RANGE = VK_POLYGON_MODE_FILL, + VK_POLYGON_MODE_END_RANGE = VK_POLYGON_MODE_POINT, + VK_POLYGON_MODE_RANGE_SIZE = (VK_POLYGON_MODE_POINT - VK_POLYGON_MODE_FILL + 1), + VK_POLYGON_MODE_MAX_ENUM = 0x7FFFFFFF +} VkPolygonMode; + +typedef enum VkFrontFace { + VK_FRONT_FACE_COUNTER_CLOCKWISE = 0, + VK_FRONT_FACE_CLOCKWISE = 1, + VK_FRONT_FACE_BEGIN_RANGE = VK_FRONT_FACE_COUNTER_CLOCKWISE, + VK_FRONT_FACE_END_RANGE = VK_FRONT_FACE_CLOCKWISE, + VK_FRONT_FACE_RANGE_SIZE = (VK_FRONT_FACE_CLOCKWISE - VK_FRONT_FACE_COUNTER_CLOCKWISE + 1), + VK_FRONT_FACE_MAX_ENUM = 0x7FFFFFFF +} VkFrontFace; + +typedef enum VkCompareOp { + VK_COMPARE_OP_NEVER = 0, + VK_COMPARE_OP_LESS = 1, + VK_COMPARE_OP_EQUAL = 2, + VK_COMPARE_OP_LESS_OR_EQUAL = 3, + VK_COMPARE_OP_GREATER = 4, + VK_COMPARE_OP_NOT_EQUAL = 5, + VK_COMPARE_OP_GREATER_OR_EQUAL = 6, + VK_COMPARE_OP_ALWAYS = 7, + VK_COMPARE_OP_BEGIN_RANGE = VK_COMPARE_OP_NEVER, + VK_COMPARE_OP_END_RANGE = VK_COMPARE_OP_ALWAYS, + VK_COMPARE_OP_RANGE_SIZE = (VK_COMPARE_OP_ALWAYS - VK_COMPARE_OP_NEVER + 1), + VK_COMPARE_OP_MAX_ENUM = 0x7FFFFFFF +} VkCompareOp; + +typedef enum VkStencilOp { + VK_STENCIL_OP_KEEP = 0, + VK_STENCIL_OP_ZERO = 1, + VK_STENCIL_OP_REPLACE = 2, + VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3, + VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4, + VK_STENCIL_OP_INVERT = 5, + VK_STENCIL_OP_INCREMENT_AND_WRAP = 6, + VK_STENCIL_OP_DECREMENT_AND_WRAP = 7, + VK_STENCIL_OP_BEGIN_RANGE = VK_STENCIL_OP_KEEP, + VK_STENCIL_OP_END_RANGE = VK_STENCIL_OP_DECREMENT_AND_WRAP, + VK_STENCIL_OP_RANGE_SIZE = (VK_STENCIL_OP_DECREMENT_AND_WRAP - VK_STENCIL_OP_KEEP + 1), + VK_STENCIL_OP_MAX_ENUM = 0x7FFFFFFF +} VkStencilOp; + +typedef enum VkLogicOp { + VK_LOGIC_OP_CLEAR = 0, + VK_LOGIC_OP_AND = 1, + VK_LOGIC_OP_AND_REVERSE = 2, + VK_LOGIC_OP_COPY = 3, + VK_LOGIC_OP_AND_INVERTED = 4, + VK_LOGIC_OP_NO_OP = 5, + VK_LOGIC_OP_XOR = 6, + VK_LOGIC_OP_OR = 7, + VK_LOGIC_OP_NOR = 8, + VK_LOGIC_OP_EQUIVALENT = 9, + VK_LOGIC_OP_INVERT = 10, + VK_LOGIC_OP_OR_REVERSE = 11, + VK_LOGIC_OP_COPY_INVERTED = 12, + VK_LOGIC_OP_OR_INVERTED = 13, + VK_LOGIC_OP_NAND = 14, + VK_LOGIC_OP_SET = 15, + VK_LOGIC_OP_BEGIN_RANGE = VK_LOGIC_OP_CLEAR, + VK_LOGIC_OP_END_RANGE = VK_LOGIC_OP_SET, + VK_LOGIC_OP_RANGE_SIZE = (VK_LOGIC_OP_SET - VK_LOGIC_OP_CLEAR + 1), + VK_LOGIC_OP_MAX_ENUM = 0x7FFFFFFF +} VkLogicOp; + +typedef enum VkBlendFactor { + VK_BLEND_FACTOR_ZERO = 0, + VK_BLEND_FACTOR_ONE = 1, + VK_BLEND_FACTOR_SRC_COLOR = 2, + VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3, + VK_BLEND_FACTOR_DST_COLOR = 4, + VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5, + VK_BLEND_FACTOR_SRC_ALPHA = 6, + VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7, + VK_BLEND_FACTOR_DST_ALPHA = 8, + VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9, + VK_BLEND_FACTOR_CONSTANT_COLOR = 10, + VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11, + VK_BLEND_FACTOR_CONSTANT_ALPHA = 12, + VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13, + VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14, + VK_BLEND_FACTOR_SRC1_COLOR = 15, + VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16, + VK_BLEND_FACTOR_SRC1_ALPHA = 17, + VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18, + VK_BLEND_FACTOR_BEGIN_RANGE = VK_BLEND_FACTOR_ZERO, + VK_BLEND_FACTOR_END_RANGE = VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA, + VK_BLEND_FACTOR_RANGE_SIZE = (VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA - VK_BLEND_FACTOR_ZERO + 1), + VK_BLEND_FACTOR_MAX_ENUM = 0x7FFFFFFF +} VkBlendFactor; + +typedef enum VkBlendOp { + VK_BLEND_OP_ADD = 0, + VK_BLEND_OP_SUBTRACT = 1, + VK_BLEND_OP_REVERSE_SUBTRACT = 2, + VK_BLEND_OP_MIN = 3, + VK_BLEND_OP_MAX = 4, + VK_BLEND_OP_BEGIN_RANGE = VK_BLEND_OP_ADD, + VK_BLEND_OP_END_RANGE = VK_BLEND_OP_MAX, + VK_BLEND_OP_RANGE_SIZE = (VK_BLEND_OP_MAX - VK_BLEND_OP_ADD + 1), + VK_BLEND_OP_MAX_ENUM = 0x7FFFFFFF +} VkBlendOp; + +typedef enum VkDynamicState { + VK_DYNAMIC_STATE_VIEWPORT = 0, + VK_DYNAMIC_STATE_SCISSOR = 1, + VK_DYNAMIC_STATE_LINE_WIDTH = 2, + VK_DYNAMIC_STATE_DEPTH_BIAS = 3, + VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4, + VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5, + VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6, + VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7, + VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8, + VK_DYNAMIC_STATE_BEGIN_RANGE = VK_DYNAMIC_STATE_VIEWPORT, + VK_DYNAMIC_STATE_END_RANGE = VK_DYNAMIC_STATE_STENCIL_REFERENCE, + VK_DYNAMIC_STATE_RANGE_SIZE = (VK_DYNAMIC_STATE_STENCIL_REFERENCE - VK_DYNAMIC_STATE_VIEWPORT + 1), + VK_DYNAMIC_STATE_MAX_ENUM = 0x7FFFFFFF +} VkDynamicState; + +typedef enum VkFilter { + VK_FILTER_NEAREST = 0, + VK_FILTER_LINEAR = 1, + VK_FILTER_BEGIN_RANGE = VK_FILTER_NEAREST, + VK_FILTER_END_RANGE = VK_FILTER_LINEAR, + VK_FILTER_RANGE_SIZE = (VK_FILTER_LINEAR - VK_FILTER_NEAREST + 1), + VK_FILTER_MAX_ENUM = 0x7FFFFFFF +} VkFilter; + +typedef enum VkSamplerMipmapMode { + VK_SAMPLER_MIPMAP_MODE_NEAREST = 0, + VK_SAMPLER_MIPMAP_MODE_LINEAR = 1, + VK_SAMPLER_MIPMAP_MODE_BEGIN_RANGE = VK_SAMPLER_MIPMAP_MODE_NEAREST, + VK_SAMPLER_MIPMAP_MODE_END_RANGE = VK_SAMPLER_MIPMAP_MODE_LINEAR, + VK_SAMPLER_MIPMAP_MODE_RANGE_SIZE = (VK_SAMPLER_MIPMAP_MODE_LINEAR - VK_SAMPLER_MIPMAP_MODE_NEAREST + 1), + VK_SAMPLER_MIPMAP_MODE_MAX_ENUM = 0x7FFFFFFF +} VkSamplerMipmapMode; + +typedef enum VkSamplerAddressMode { + VK_SAMPLER_ADDRESS_MODE_REPEAT = 0, + VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1, + VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2, + VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3, + VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 4, + VK_SAMPLER_ADDRESS_MODE_BEGIN_RANGE = VK_SAMPLER_ADDRESS_MODE_REPEAT, + VK_SAMPLER_ADDRESS_MODE_END_RANGE = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE, + VK_SAMPLER_ADDRESS_MODE_RANGE_SIZE = (VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE - VK_SAMPLER_ADDRESS_MODE_REPEAT + 1), + VK_SAMPLER_ADDRESS_MODE_MAX_ENUM = 0x7FFFFFFF +} VkSamplerAddressMode; + +typedef enum VkBorderColor { + VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0, + VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1, + VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2, + VK_BORDER_COLOR_INT_OPAQUE_BLACK = 3, + VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4, + VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5, + VK_BORDER_COLOR_BEGIN_RANGE = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK, + VK_BORDER_COLOR_END_RANGE = VK_BORDER_COLOR_INT_OPAQUE_WHITE, + VK_BORDER_COLOR_RANGE_SIZE = (VK_BORDER_COLOR_INT_OPAQUE_WHITE - VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK + 1), + VK_BORDER_COLOR_MAX_ENUM = 0x7FFFFFFF +} VkBorderColor; + +typedef enum VkDescriptorType { + VK_DESCRIPTOR_TYPE_SAMPLER = 0, + VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1, + VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2, + VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 3, + VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 4, + VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 5, + VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 6, + VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7, + VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 8, + VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 9, + VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 10, + VK_DESCRIPTOR_TYPE_BEGIN_RANGE = VK_DESCRIPTOR_TYPE_SAMPLER, + VK_DESCRIPTOR_TYPE_END_RANGE = VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, + VK_DESCRIPTOR_TYPE_RANGE_SIZE = (VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT - VK_DESCRIPTOR_TYPE_SAMPLER + 1), + VK_DESCRIPTOR_TYPE_MAX_ENUM = 0x7FFFFFFF +} VkDescriptorType; + +typedef enum VkAttachmentLoadOp { + VK_ATTACHMENT_LOAD_OP_LOAD = 0, + VK_ATTACHMENT_LOAD_OP_CLEAR = 1, + VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2, + VK_ATTACHMENT_LOAD_OP_BEGIN_RANGE = VK_ATTACHMENT_LOAD_OP_LOAD, + VK_ATTACHMENT_LOAD_OP_END_RANGE = VK_ATTACHMENT_LOAD_OP_DONT_CARE, + VK_ATTACHMENT_LOAD_OP_RANGE_SIZE = (VK_ATTACHMENT_LOAD_OP_DONT_CARE - VK_ATTACHMENT_LOAD_OP_LOAD + 1), + VK_ATTACHMENT_LOAD_OP_MAX_ENUM = 0x7FFFFFFF +} VkAttachmentLoadOp; + +typedef enum VkAttachmentStoreOp { + VK_ATTACHMENT_STORE_OP_STORE = 0, + VK_ATTACHMENT_STORE_OP_DONT_CARE = 1, + VK_ATTACHMENT_STORE_OP_BEGIN_RANGE = VK_ATTACHMENT_STORE_OP_STORE, + VK_ATTACHMENT_STORE_OP_END_RANGE = VK_ATTACHMENT_STORE_OP_DONT_CARE, + VK_ATTACHMENT_STORE_OP_RANGE_SIZE = (VK_ATTACHMENT_STORE_OP_DONT_CARE - VK_ATTACHMENT_STORE_OP_STORE + 1), + VK_ATTACHMENT_STORE_OP_MAX_ENUM = 0x7FFFFFFF +} VkAttachmentStoreOp; + +typedef enum VkPipelineBindPoint { + VK_PIPELINE_BIND_POINT_GRAPHICS = 0, + VK_PIPELINE_BIND_POINT_COMPUTE = 1, + VK_PIPELINE_BIND_POINT_BEGIN_RANGE = VK_PIPELINE_BIND_POINT_GRAPHICS, + VK_PIPELINE_BIND_POINT_END_RANGE = VK_PIPELINE_BIND_POINT_COMPUTE, + VK_PIPELINE_BIND_POINT_RANGE_SIZE = (VK_PIPELINE_BIND_POINT_COMPUTE - VK_PIPELINE_BIND_POINT_GRAPHICS + 1), + VK_PIPELINE_BIND_POINT_MAX_ENUM = 0x7FFFFFFF +} VkPipelineBindPoint; + +typedef enum VkCommandBufferLevel { + VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0, + VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1, + VK_COMMAND_BUFFER_LEVEL_BEGIN_RANGE = VK_COMMAND_BUFFER_LEVEL_PRIMARY, + VK_COMMAND_BUFFER_LEVEL_END_RANGE = VK_COMMAND_BUFFER_LEVEL_SECONDARY, + VK_COMMAND_BUFFER_LEVEL_RANGE_SIZE = (VK_COMMAND_BUFFER_LEVEL_SECONDARY - VK_COMMAND_BUFFER_LEVEL_PRIMARY + 1), + VK_COMMAND_BUFFER_LEVEL_MAX_ENUM = 0x7FFFFFFF +} VkCommandBufferLevel; + +typedef enum VkIndexType { + VK_INDEX_TYPE_UINT16 = 0, + VK_INDEX_TYPE_UINT32 = 1, + VK_INDEX_TYPE_BEGIN_RANGE = VK_INDEX_TYPE_UINT16, + VK_INDEX_TYPE_END_RANGE = VK_INDEX_TYPE_UINT32, + VK_INDEX_TYPE_RANGE_SIZE = (VK_INDEX_TYPE_UINT32 - VK_INDEX_TYPE_UINT16 + 1), + VK_INDEX_TYPE_MAX_ENUM = 0x7FFFFFFF +} VkIndexType; + +typedef enum VkSubpassContents { + VK_SUBPASS_CONTENTS_INLINE = 0, + VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1, + VK_SUBPASS_CONTENTS_BEGIN_RANGE = VK_SUBPASS_CONTENTS_INLINE, + VK_SUBPASS_CONTENTS_END_RANGE = VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS, + VK_SUBPASS_CONTENTS_RANGE_SIZE = (VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS - VK_SUBPASS_CONTENTS_INLINE + 1), + VK_SUBPASS_CONTENTS_MAX_ENUM = 0x7FFFFFFF +} VkSubpassContents; + +typedef VkFlags VkInstanceCreateFlags; + +typedef enum VkFormatFeatureFlagBits { + VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, + VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, + VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, + VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, + VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, + VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, + VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, + VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, + VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, + VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, + VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, + VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800, + VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000, +} VkFormatFeatureFlagBits; +typedef VkFlags VkFormatFeatureFlags; + +typedef enum VkImageUsageFlagBits { + VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, + VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, + VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, + VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, + VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, + VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, + VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, + VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, +} VkImageUsageFlagBits; +typedef VkFlags VkImageUsageFlags; + +typedef enum VkImageCreateFlagBits { + VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, + VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, + VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004, + VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, + VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010, +} VkImageCreateFlagBits; +typedef VkFlags VkImageCreateFlags; + +typedef enum VkSampleCountFlagBits { + VK_SAMPLE_COUNT_1_BIT = 0x00000001, + VK_SAMPLE_COUNT_2_BIT = 0x00000002, + VK_SAMPLE_COUNT_4_BIT = 0x00000004, + VK_SAMPLE_COUNT_8_BIT = 0x00000008, + VK_SAMPLE_COUNT_16_BIT = 0x00000010, + VK_SAMPLE_COUNT_32_BIT = 0x00000020, + VK_SAMPLE_COUNT_64_BIT = 0x00000040, +} VkSampleCountFlagBits; +typedef VkFlags VkSampleCountFlags; + +typedef enum VkQueueFlagBits { + VK_QUEUE_GRAPHICS_BIT = 0x00000001, + VK_QUEUE_COMPUTE_BIT = 0x00000002, + VK_QUEUE_TRANSFER_BIT = 0x00000004, + VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, +} VkQueueFlagBits; +typedef VkFlags VkQueueFlags; + +typedef enum VkMemoryPropertyFlagBits { + VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001, + VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002, + VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004, + VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008, + VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010, +} VkMemoryPropertyFlagBits; +typedef VkFlags VkMemoryPropertyFlags; + +typedef enum VkMemoryHeapFlagBits { + VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001, +} VkMemoryHeapFlagBits; +typedef VkFlags VkMemoryHeapFlags; +typedef VkFlags VkDeviceCreateFlags; +typedef VkFlags VkDeviceQueueCreateFlags; + +typedef enum VkPipelineStageFlagBits { + VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, + VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, + VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, + VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, + VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, + VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, + VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, + VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, + VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, + VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, + VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, + VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, + VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, + VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000, + VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, + VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, + VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, +} VkPipelineStageFlagBits; +typedef VkFlags VkPipelineStageFlags; +typedef VkFlags VkMemoryMapFlags; + +typedef enum VkImageAspectFlagBits { + VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001, + VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, + VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, + VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008, +} VkImageAspectFlagBits; +typedef VkFlags VkImageAspectFlags; + +typedef enum VkSparseImageFormatFlagBits { + VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, + VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 0x00000002, + VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, +} VkSparseImageFormatFlagBits; +typedef VkFlags VkSparseImageFormatFlags; + +typedef enum VkSparseMemoryBindFlagBits { + VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001, +} VkSparseMemoryBindFlagBits; +typedef VkFlags VkSparseMemoryBindFlags; + +typedef enum VkFenceCreateFlagBits { + VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001, +} VkFenceCreateFlagBits; +typedef VkFlags VkFenceCreateFlags; +typedef VkFlags VkSemaphoreCreateFlags; +typedef VkFlags VkEventCreateFlags; +typedef VkFlags VkQueryPoolCreateFlags; + +typedef enum VkQueryPipelineStatisticFlagBits { + VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, + VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, + VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, + VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, + VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, + VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, + VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, + VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, + VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, + VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, + VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, +} VkQueryPipelineStatisticFlagBits; +typedef VkFlags VkQueryPipelineStatisticFlags; + +typedef enum VkQueryResultFlagBits { + VK_QUERY_RESULT_64_BIT = 0x00000001, + VK_QUERY_RESULT_WAIT_BIT = 0x00000002, + VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, + VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, +} VkQueryResultFlagBits; +typedef VkFlags VkQueryResultFlags; + +typedef enum VkBufferCreateFlagBits { + VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, + VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, + VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, +} VkBufferCreateFlagBits; +typedef VkFlags VkBufferCreateFlags; + +typedef enum VkBufferUsageFlagBits { + VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, + VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, + VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, + VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, + VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, + VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, + VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, + VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, + VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, +} VkBufferUsageFlagBits; +typedef VkFlags VkBufferUsageFlags; +typedef VkFlags VkBufferViewCreateFlags; +typedef VkFlags VkImageViewCreateFlags; +typedef VkFlags VkShaderModuleCreateFlags; +typedef VkFlags VkPipelineCacheCreateFlags; + +typedef enum VkPipelineCreateFlagBits { + VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001, + VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002, + VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004, +} VkPipelineCreateFlagBits; +typedef VkFlags VkPipelineCreateFlags; +typedef VkFlags VkPipelineShaderStageCreateFlags; + +typedef enum VkShaderStageFlagBits { + VK_SHADER_STAGE_VERTEX_BIT = 0x00000001, + VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002, + VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004, + VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008, + VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010, + VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020, + VK_SHADER_STAGE_ALL_GRAPHICS = 0x1F, + VK_SHADER_STAGE_ALL = 0x7FFFFFFF, +} VkShaderStageFlagBits; +typedef VkFlags VkPipelineVertexInputStateCreateFlags; +typedef VkFlags VkPipelineInputAssemblyStateCreateFlags; +typedef VkFlags VkPipelineTessellationStateCreateFlags; +typedef VkFlags VkPipelineViewportStateCreateFlags; +typedef VkFlags VkPipelineRasterizationStateCreateFlags; + +typedef enum VkCullModeFlagBits { + VK_CULL_MODE_NONE = 0, + VK_CULL_MODE_FRONT_BIT = 0x00000001, + VK_CULL_MODE_BACK_BIT = 0x00000002, + VK_CULL_MODE_FRONT_AND_BACK = 0x3, +} VkCullModeFlagBits; +typedef VkFlags VkCullModeFlags; +typedef VkFlags VkPipelineMultisampleStateCreateFlags; +typedef VkFlags VkPipelineDepthStencilStateCreateFlags; +typedef VkFlags VkPipelineColorBlendStateCreateFlags; + +typedef enum VkColorComponentFlagBits { + VK_COLOR_COMPONENT_R_BIT = 0x00000001, + VK_COLOR_COMPONENT_G_BIT = 0x00000002, + VK_COLOR_COMPONENT_B_BIT = 0x00000004, + VK_COLOR_COMPONENT_A_BIT = 0x00000008, +} VkColorComponentFlagBits; +typedef VkFlags VkColorComponentFlags; +typedef VkFlags VkPipelineDynamicStateCreateFlags; +typedef VkFlags VkPipelineLayoutCreateFlags; +typedef VkFlags VkShaderStageFlags; +typedef VkFlags VkSamplerCreateFlags; +typedef VkFlags VkDescriptorSetLayoutCreateFlags; + +typedef enum VkDescriptorPoolCreateFlagBits { + VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001, +} VkDescriptorPoolCreateFlagBits; +typedef VkFlags VkDescriptorPoolCreateFlags; +typedef VkFlags VkDescriptorPoolResetFlags; +typedef VkFlags VkFramebufferCreateFlags; +typedef VkFlags VkRenderPassCreateFlags; + +typedef enum VkAttachmentDescriptionFlagBits { + VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001, +} VkAttachmentDescriptionFlagBits; +typedef VkFlags VkAttachmentDescriptionFlags; +typedef VkFlags VkSubpassDescriptionFlags; + +typedef enum VkAccessFlagBits { + VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001, + VK_ACCESS_INDEX_READ_BIT = 0x00000002, + VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004, + VK_ACCESS_UNIFORM_READ_BIT = 0x00000008, + VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010, + VK_ACCESS_SHADER_READ_BIT = 0x00000020, + VK_ACCESS_SHADER_WRITE_BIT = 0x00000040, + VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080, + VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100, + VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200, + VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400, + VK_ACCESS_TRANSFER_READ_BIT = 0x00000800, + VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000, + VK_ACCESS_HOST_READ_BIT = 0x00002000, + VK_ACCESS_HOST_WRITE_BIT = 0x00004000, + VK_ACCESS_MEMORY_READ_BIT = 0x00008000, + VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000, +} VkAccessFlagBits; +typedef VkFlags VkAccessFlags; + +typedef enum VkDependencyFlagBits { + VK_DEPENDENCY_BY_REGION_BIT = 0x00000001, +} VkDependencyFlagBits; +typedef VkFlags VkDependencyFlags; + +typedef enum VkCommandPoolCreateFlagBits { + VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, + VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, +} VkCommandPoolCreateFlagBits; +typedef VkFlags VkCommandPoolCreateFlags; + +typedef enum VkCommandPoolResetFlagBits { + VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, +} VkCommandPoolResetFlagBits; +typedef VkFlags VkCommandPoolResetFlags; + +typedef enum VkCommandBufferUsageFlagBits { + VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001, + VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002, + VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004, +} VkCommandBufferUsageFlagBits; +typedef VkFlags VkCommandBufferUsageFlags; + +typedef enum VkQueryControlFlagBits { + VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001, +} VkQueryControlFlagBits; +typedef VkFlags VkQueryControlFlags; + +typedef enum VkCommandBufferResetFlagBits { + VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, +} VkCommandBufferResetFlagBits; +typedef VkFlags VkCommandBufferResetFlags; + +typedef enum VkStencilFaceFlagBits { + VK_STENCIL_FACE_FRONT_BIT = 0x00000001, + VK_STENCIL_FACE_BACK_BIT = 0x00000002, + VK_STENCIL_FRONT_AND_BACK = 0x3, +} VkStencilFaceFlagBits; +typedef VkFlags VkStencilFaceFlags; + +typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)( + void* pUserData, + size_t size, + size_t alignment, + VkSystemAllocationScope allocationScope); + +typedef void* (VKAPI_PTR *PFN_vkReallocationFunction)( + void* pUserData, + void* pOriginal, + size_t size, + size_t alignment, + VkSystemAllocationScope allocationScope); + +typedef void (VKAPI_PTR *PFN_vkFreeFunction)( + void* pUserData, + void* pMemory); + +typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)( + void* pUserData, + size_t size, + VkInternalAllocationType allocationType, + VkSystemAllocationScope allocationScope); + +typedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)( + void* pUserData, + size_t size, + VkInternalAllocationType allocationType, + VkSystemAllocationScope allocationScope); + +typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void); + +typedef struct VkApplicationInfo { + VkStructureType sType; + const void* pNext; + const char* pApplicationName; + uint32_t applicationVersion; + const char* pEngineName; + uint32_t engineVersion; + uint32_t apiVersion; +} VkApplicationInfo; + +typedef struct VkInstanceCreateInfo { + VkStructureType sType; + const void* pNext; + VkInstanceCreateFlags flags; + const VkApplicationInfo* pApplicationInfo; + uint32_t enabledLayerCount; + const char* const* ppEnabledLayerNames; + uint32_t enabledExtensionCount; + const char* const* ppEnabledExtensionNames; +} VkInstanceCreateInfo; + +typedef struct VkAllocationCallbacks { + void* pUserData; + PFN_vkAllocationFunction pfnAllocation; + PFN_vkReallocationFunction pfnReallocation; + PFN_vkFreeFunction pfnFree; + PFN_vkInternalAllocationNotification pfnInternalAllocation; + PFN_vkInternalFreeNotification pfnInternalFree; +} VkAllocationCallbacks; + +typedef struct VkPhysicalDeviceFeatures { + VkBool32 robustBufferAccess; + VkBool32 fullDrawIndexUint32; + VkBool32 imageCubeArray; + VkBool32 independentBlend; + VkBool32 geometryShader; + VkBool32 tessellationShader; + VkBool32 sampleRateShading; + VkBool32 dualSrcBlend; + VkBool32 logicOp; + VkBool32 multiDrawIndirect; + VkBool32 drawIndirectFirstInstance; + VkBool32 depthClamp; + VkBool32 depthBiasClamp; + VkBool32 fillModeNonSolid; + VkBool32 depthBounds; + VkBool32 wideLines; + VkBool32 largePoints; + VkBool32 alphaToOne; + VkBool32 multiViewport; + VkBool32 samplerAnisotropy; + VkBool32 textureCompressionETC2; + VkBool32 textureCompressionASTC_LDR; + VkBool32 textureCompressionBC; + VkBool32 occlusionQueryPrecise; + VkBool32 pipelineStatisticsQuery; + VkBool32 vertexPipelineStoresAndAtomics; + VkBool32 fragmentStoresAndAtomics; + VkBool32 shaderTessellationAndGeometryPointSize; + VkBool32 shaderImageGatherExtended; + VkBool32 shaderStorageImageExtendedFormats; + VkBool32 shaderStorageImageMultisample; + VkBool32 shaderStorageImageReadWithoutFormat; + VkBool32 shaderStorageImageWriteWithoutFormat; + VkBool32 shaderUniformBufferArrayDynamicIndexing; + VkBool32 shaderSampledImageArrayDynamicIndexing; + VkBool32 shaderStorageBufferArrayDynamicIndexing; + VkBool32 shaderStorageImageArrayDynamicIndexing; + VkBool32 shaderClipDistance; + VkBool32 shaderCullDistance; + VkBool32 shaderFloat64; + VkBool32 shaderInt64; + VkBool32 shaderInt16; + VkBool32 shaderResourceResidency; + VkBool32 shaderResourceMinLod; + VkBool32 sparseBinding; + VkBool32 sparseResidencyBuffer; + VkBool32 sparseResidencyImage2D; + VkBool32 sparseResidencyImage3D; + VkBool32 sparseResidency2Samples; + VkBool32 sparseResidency4Samples; + VkBool32 sparseResidency8Samples; + VkBool32 sparseResidency16Samples; + VkBool32 sparseResidencyAliased; + VkBool32 variableMultisampleRate; + VkBool32 inheritedQueries; +} VkPhysicalDeviceFeatures; + +typedef struct VkFormatProperties { + VkFormatFeatureFlags linearTilingFeatures; + VkFormatFeatureFlags optimalTilingFeatures; + VkFormatFeatureFlags bufferFeatures; +} VkFormatProperties; + +typedef struct VkExtent3D { + uint32_t width; + uint32_t height; + uint32_t depth; +} VkExtent3D; + +typedef struct VkImageFormatProperties { + VkExtent3D maxExtent; + uint32_t maxMipLevels; + uint32_t maxArrayLayers; + VkSampleCountFlags sampleCounts; + VkDeviceSize maxResourceSize; +} VkImageFormatProperties; + +typedef struct VkPhysicalDeviceLimits { + uint32_t maxImageDimension1D; + uint32_t maxImageDimension2D; + uint32_t maxImageDimension3D; + uint32_t maxImageDimensionCube; + uint32_t maxImageArrayLayers; + uint32_t maxTexelBufferElements; + uint32_t maxUniformBufferRange; + uint32_t maxStorageBufferRange; + uint32_t maxPushConstantsSize; + uint32_t maxMemoryAllocationCount; + uint32_t maxSamplerAllocationCount; + VkDeviceSize bufferImageGranularity; + VkDeviceSize sparseAddressSpaceSize; + uint32_t maxBoundDescriptorSets; + uint32_t maxPerStageDescriptorSamplers; + uint32_t maxPerStageDescriptorUniformBuffers; + uint32_t maxPerStageDescriptorStorageBuffers; + uint32_t maxPerStageDescriptorSampledImages; + uint32_t maxPerStageDescriptorStorageImages; + uint32_t maxPerStageDescriptorInputAttachments; + uint32_t maxPerStageResources; + uint32_t maxDescriptorSetSamplers; + uint32_t maxDescriptorSetUniformBuffers; + uint32_t maxDescriptorSetUniformBuffersDynamic; + uint32_t maxDescriptorSetStorageBuffers; + uint32_t maxDescriptorSetStorageBuffersDynamic; + uint32_t maxDescriptorSetSampledImages; + uint32_t maxDescriptorSetStorageImages; + uint32_t maxDescriptorSetInputAttachments; + uint32_t maxVertexInputAttributes; + uint32_t maxVertexInputBindings; + uint32_t maxVertexInputAttributeOffset; + uint32_t maxVertexInputBindingStride; + uint32_t maxVertexOutputComponents; + uint32_t maxTessellationGenerationLevel; + uint32_t maxTessellationPatchSize; + uint32_t maxTessellationControlPerVertexInputComponents; + uint32_t maxTessellationControlPerVertexOutputComponents; + uint32_t maxTessellationControlPerPatchOutputComponents; + uint32_t maxTessellationControlTotalOutputComponents; + uint32_t maxTessellationEvaluationInputComponents; + uint32_t maxTessellationEvaluationOutputComponents; + uint32_t maxGeometryShaderInvocations; + uint32_t maxGeometryInputComponents; + uint32_t maxGeometryOutputComponents; + uint32_t maxGeometryOutputVertices; + uint32_t maxGeometryTotalOutputComponents; + uint32_t maxFragmentInputComponents; + uint32_t maxFragmentOutputAttachments; + uint32_t maxFragmentDualSrcAttachments; + uint32_t maxFragmentCombinedOutputResources; + uint32_t maxComputeSharedMemorySize; + uint32_t maxComputeWorkGroupCount[3]; + uint32_t maxComputeWorkGroupInvocations; + uint32_t maxComputeWorkGroupSize[3]; + uint32_t subPixelPrecisionBits; + uint32_t subTexelPrecisionBits; + uint32_t mipmapPrecisionBits; + uint32_t maxDrawIndexedIndexValue; + uint32_t maxDrawIndirectCount; + float maxSamplerLodBias; + float maxSamplerAnisotropy; + uint32_t maxViewports; + uint32_t maxViewportDimensions[2]; + float viewportBoundsRange[2]; + uint32_t viewportSubPixelBits; + size_t minMemoryMapAlignment; + VkDeviceSize minTexelBufferOffsetAlignment; + VkDeviceSize minUniformBufferOffsetAlignment; + VkDeviceSize minStorageBufferOffsetAlignment; + int32_t minTexelOffset; + uint32_t maxTexelOffset; + int32_t minTexelGatherOffset; + uint32_t maxTexelGatherOffset; + float minInterpolationOffset; + float maxInterpolationOffset; + uint32_t subPixelInterpolationOffsetBits; + uint32_t maxFramebufferWidth; + uint32_t maxFramebufferHeight; + uint32_t maxFramebufferLayers; + VkSampleCountFlags framebufferColorSampleCounts; + VkSampleCountFlags framebufferDepthSampleCounts; + VkSampleCountFlags framebufferStencilSampleCounts; + VkSampleCountFlags framebufferNoAttachmentsSampleCounts; + uint32_t maxColorAttachments; + VkSampleCountFlags sampledImageColorSampleCounts; + VkSampleCountFlags sampledImageIntegerSampleCounts; + VkSampleCountFlags sampledImageDepthSampleCounts; + VkSampleCountFlags sampledImageStencilSampleCounts; + VkSampleCountFlags storageImageSampleCounts; + uint32_t maxSampleMaskWords; + VkBool32 timestampComputeAndGraphics; + float timestampPeriod; + uint32_t maxClipDistances; + uint32_t maxCullDistances; + uint32_t maxCombinedClipAndCullDistances; + uint32_t discreteQueuePriorities; + float pointSizeRange[2]; + float lineWidthRange[2]; + float pointSizeGranularity; + float lineWidthGranularity; + VkBool32 strictLines; + VkBool32 standardSampleLocations; + VkDeviceSize optimalBufferCopyOffsetAlignment; + VkDeviceSize optimalBufferCopyRowPitchAlignment; + VkDeviceSize nonCoherentAtomSize; +} VkPhysicalDeviceLimits; + +typedef struct VkPhysicalDeviceSparseProperties { + VkBool32 residencyStandard2DBlockShape; + VkBool32 residencyStandard2DMultisampleBlockShape; + VkBool32 residencyStandard3DBlockShape; + VkBool32 residencyAlignedMipSize; + VkBool32 residencyNonResidentStrict; +} VkPhysicalDeviceSparseProperties; + +typedef struct VkPhysicalDeviceProperties { + uint32_t apiVersion; + uint32_t driverVersion; + uint32_t vendorID; + uint32_t deviceID; + VkPhysicalDeviceType deviceType; + char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]; + uint8_t pipelineCacheUUID[VK_UUID_SIZE]; + VkPhysicalDeviceLimits limits; + VkPhysicalDeviceSparseProperties sparseProperties; +} VkPhysicalDeviceProperties; + +typedef struct VkQueueFamilyProperties { + VkQueueFlags queueFlags; + uint32_t queueCount; + uint32_t timestampValidBits; + VkExtent3D minImageTransferGranularity; +} VkQueueFamilyProperties; + +typedef struct VkMemoryType { + VkMemoryPropertyFlags propertyFlags; + uint32_t heapIndex; +} VkMemoryType; + +typedef struct VkMemoryHeap { + VkDeviceSize size; + VkMemoryHeapFlags flags; +} VkMemoryHeap; + +typedef struct VkPhysicalDeviceMemoryProperties { + uint32_t memoryTypeCount; + VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES]; + uint32_t memoryHeapCount; + VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS]; +} VkPhysicalDeviceMemoryProperties; + +typedef struct VkDeviceQueueCreateInfo { + VkStructureType sType; + const void* pNext; + VkDeviceQueueCreateFlags flags; + uint32_t queueFamilyIndex; + uint32_t queueCount; + const float* pQueuePriorities; +} VkDeviceQueueCreateInfo; + +typedef struct VkDeviceCreateInfo { + VkStructureType sType; + const void* pNext; + VkDeviceCreateFlags flags; + uint32_t queueCreateInfoCount; + const VkDeviceQueueCreateInfo* pQueueCreateInfos; + uint32_t enabledLayerCount; + const char* const* ppEnabledLayerNames; + uint32_t enabledExtensionCount; + const char* const* ppEnabledExtensionNames; + const VkPhysicalDeviceFeatures* pEnabledFeatures; +} VkDeviceCreateInfo; + +typedef struct VkExtensionProperties { + char extensionName[VK_MAX_EXTENSION_NAME_SIZE]; + uint32_t specVersion; +} VkExtensionProperties; + +typedef struct VkLayerProperties { + char layerName[VK_MAX_EXTENSION_NAME_SIZE]; + uint32_t specVersion; + uint32_t implementationVersion; + char description[VK_MAX_DESCRIPTION_SIZE]; +} VkLayerProperties; + +typedef struct VkSubmitInfo { + VkStructureType sType; + const void* pNext; + uint32_t waitSemaphoreCount; + const VkSemaphore* pWaitSemaphores; + const VkPipelineStageFlags* pWaitDstStageMask; + uint32_t commandBufferCount; + const VkCommandBuffer* pCommandBuffers; + uint32_t signalSemaphoreCount; + const VkSemaphore* pSignalSemaphores; +} VkSubmitInfo; + +typedef struct VkMemoryAllocateInfo { + VkStructureType sType; + const void* pNext; + VkDeviceSize allocationSize; + uint32_t memoryTypeIndex; +} VkMemoryAllocateInfo; + +typedef struct VkMappedMemoryRange { + VkStructureType sType; + const void* pNext; + VkDeviceMemory memory; + VkDeviceSize offset; + VkDeviceSize size; +} VkMappedMemoryRange; + +typedef struct VkMemoryRequirements { + VkDeviceSize size; + VkDeviceSize alignment; + uint32_t memoryTypeBits; +} VkMemoryRequirements; + +typedef struct VkSparseImageFormatProperties { + VkImageAspectFlags aspectMask; + VkExtent3D imageGranularity; + VkSparseImageFormatFlags flags; +} VkSparseImageFormatProperties; + +typedef struct VkSparseImageMemoryRequirements { + VkSparseImageFormatProperties formatProperties; + uint32_t imageMipTailFirstLod; + VkDeviceSize imageMipTailSize; + VkDeviceSize imageMipTailOffset; + VkDeviceSize imageMipTailStride; +} VkSparseImageMemoryRequirements; + +typedef struct VkSparseMemoryBind { + VkDeviceSize resourceOffset; + VkDeviceSize size; + VkDeviceMemory memory; + VkDeviceSize memoryOffset; + VkSparseMemoryBindFlags flags; +} VkSparseMemoryBind; + +typedef struct VkSparseBufferMemoryBindInfo { + VkBuffer buffer; + uint32_t bindCount; + const VkSparseMemoryBind* pBinds; +} VkSparseBufferMemoryBindInfo; + +typedef struct VkSparseImageOpaqueMemoryBindInfo { + VkImage image; + uint32_t bindCount; + const VkSparseMemoryBind* pBinds; +} VkSparseImageOpaqueMemoryBindInfo; + +typedef struct VkImageSubresource { + VkImageAspectFlags aspectMask; + uint32_t mipLevel; + uint32_t arrayLayer; +} VkImageSubresource; + +typedef struct VkOffset3D { + int32_t x; + int32_t y; + int32_t z; +} VkOffset3D; + +typedef struct VkSparseImageMemoryBind { + VkImageSubresource subresource; + VkOffset3D offset; + VkExtent3D extent; + VkDeviceMemory memory; + VkDeviceSize memoryOffset; + VkSparseMemoryBindFlags flags; +} VkSparseImageMemoryBind; + +typedef struct VkSparseImageMemoryBindInfo { + VkImage image; + uint32_t bindCount; + const VkSparseImageMemoryBind* pBinds; +} VkSparseImageMemoryBindInfo; + +typedef struct VkBindSparseInfo { + VkStructureType sType; + const void* pNext; + uint32_t waitSemaphoreCount; + const VkSemaphore* pWaitSemaphores; + uint32_t bufferBindCount; + const VkSparseBufferMemoryBindInfo* pBufferBinds; + uint32_t imageOpaqueBindCount; + const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds; + uint32_t imageBindCount; + const VkSparseImageMemoryBindInfo* pImageBinds; + uint32_t signalSemaphoreCount; + const VkSemaphore* pSignalSemaphores; +} VkBindSparseInfo; + +typedef struct VkFenceCreateInfo { + VkStructureType sType; + const void* pNext; + VkFenceCreateFlags flags; +} VkFenceCreateInfo; + +typedef struct VkSemaphoreCreateInfo { + VkStructureType sType; + const void* pNext; + VkSemaphoreCreateFlags flags; +} VkSemaphoreCreateInfo; + +typedef struct VkEventCreateInfo { + VkStructureType sType; + const void* pNext; + VkEventCreateFlags flags; +} VkEventCreateInfo; + +typedef struct VkQueryPoolCreateInfo { + VkStructureType sType; + const void* pNext; + VkQueryPoolCreateFlags flags; + VkQueryType queryType; + uint32_t queryCount; + VkQueryPipelineStatisticFlags pipelineStatistics; +} VkQueryPoolCreateInfo; + +typedef struct VkBufferCreateInfo { + VkStructureType sType; + const void* pNext; + VkBufferCreateFlags flags; + VkDeviceSize size; + VkBufferUsageFlags usage; + VkSharingMode sharingMode; + uint32_t queueFamilyIndexCount; + const uint32_t* pQueueFamilyIndices; +} VkBufferCreateInfo; + +typedef struct VkBufferViewCreateInfo { + VkStructureType sType; + const void* pNext; + VkBufferViewCreateFlags flags; + VkBuffer buffer; + VkFormat format; + VkDeviceSize offset; + VkDeviceSize range; +} VkBufferViewCreateInfo; + +typedef struct VkImageCreateInfo { + VkStructureType sType; + const void* pNext; + VkImageCreateFlags flags; + VkImageType imageType; + VkFormat format; + VkExtent3D extent; + uint32_t mipLevels; + uint32_t arrayLayers; + VkSampleCountFlagBits samples; + VkImageTiling tiling; + VkImageUsageFlags usage; + VkSharingMode sharingMode; + uint32_t queueFamilyIndexCount; + const uint32_t* pQueueFamilyIndices; + VkImageLayout initialLayout; +} VkImageCreateInfo; + +typedef struct VkSubresourceLayout { + VkDeviceSize offset; + VkDeviceSize size; + VkDeviceSize rowPitch; + VkDeviceSize arrayPitch; + VkDeviceSize depthPitch; +} VkSubresourceLayout; + +typedef struct VkComponentMapping { + VkComponentSwizzle r; + VkComponentSwizzle g; + VkComponentSwizzle b; + VkComponentSwizzle a; +} VkComponentMapping; + +typedef struct VkImageSubresourceRange { + VkImageAspectFlags aspectMask; + uint32_t baseMipLevel; + uint32_t levelCount; + uint32_t baseArrayLayer; + uint32_t layerCount; +} VkImageSubresourceRange; + +typedef struct VkImageViewCreateInfo { + VkStructureType sType; + const void* pNext; + VkImageViewCreateFlags flags; + VkImage image; + VkImageViewType viewType; + VkFormat format; + VkComponentMapping components; + VkImageSubresourceRange subresourceRange; +} VkImageViewCreateInfo; + +typedef struct VkShaderModuleCreateInfo { + VkStructureType sType; + const void* pNext; + VkShaderModuleCreateFlags flags; + size_t codeSize; + const uint32_t* pCode; +} VkShaderModuleCreateInfo; + +typedef struct VkPipelineCacheCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineCacheCreateFlags flags; + size_t initialDataSize; + const void* pInitialData; +} VkPipelineCacheCreateInfo; + +typedef struct VkSpecializationMapEntry { + uint32_t constantID; + uint32_t offset; + size_t size; +} VkSpecializationMapEntry; + +typedef struct VkSpecializationInfo { + uint32_t mapEntryCount; + const VkSpecializationMapEntry* pMapEntries; + size_t dataSize; + const void* pData; +} VkSpecializationInfo; + +typedef struct VkPipelineShaderStageCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineShaderStageCreateFlags flags; + VkShaderStageFlagBits stage; + VkShaderModule module; + const char* pName; + const VkSpecializationInfo* pSpecializationInfo; +} VkPipelineShaderStageCreateInfo; + +typedef struct VkVertexInputBindingDescription { + uint32_t binding; + uint32_t stride; + VkVertexInputRate inputRate; +} VkVertexInputBindingDescription; + +typedef struct VkVertexInputAttributeDescription { + uint32_t location; + uint32_t binding; + VkFormat format; + uint32_t offset; +} VkVertexInputAttributeDescription; + +typedef struct VkPipelineVertexInputStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineVertexInputStateCreateFlags flags; + uint32_t vertexBindingDescriptionCount; + const VkVertexInputBindingDescription* pVertexBindingDescriptions; + uint32_t vertexAttributeDescriptionCount; + const VkVertexInputAttributeDescription* pVertexAttributeDescriptions; +} VkPipelineVertexInputStateCreateInfo; + +typedef struct VkPipelineInputAssemblyStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineInputAssemblyStateCreateFlags flags; + VkPrimitiveTopology topology; + VkBool32 primitiveRestartEnable; +} VkPipelineInputAssemblyStateCreateInfo; + +typedef struct VkPipelineTessellationStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineTessellationStateCreateFlags flags; + uint32_t patchControlPoints; +} VkPipelineTessellationStateCreateInfo; + +typedef struct VkViewport { + float x; + float y; + float width; + float height; + float minDepth; + float maxDepth; +} VkViewport; + +typedef struct VkOffset2D { + int32_t x; + int32_t y; +} VkOffset2D; + +typedef struct VkExtent2D { + uint32_t width; + uint32_t height; +} VkExtent2D; + +typedef struct VkRect2D { + VkOffset2D offset; + VkExtent2D extent; +} VkRect2D; + +typedef struct VkPipelineViewportStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineViewportStateCreateFlags flags; + uint32_t viewportCount; + const VkViewport* pViewports; + uint32_t scissorCount; + const VkRect2D* pScissors; +} VkPipelineViewportStateCreateInfo; + +typedef struct VkPipelineRasterizationStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineRasterizationStateCreateFlags flags; + VkBool32 depthClampEnable; + VkBool32 rasterizerDiscardEnable; + VkPolygonMode polygonMode; + VkCullModeFlags cullMode; + VkFrontFace frontFace; + VkBool32 depthBiasEnable; + float depthBiasConstantFactor; + float depthBiasClamp; + float depthBiasSlopeFactor; + float lineWidth; +} VkPipelineRasterizationStateCreateInfo; + +typedef struct VkPipelineMultisampleStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineMultisampleStateCreateFlags flags; + VkSampleCountFlagBits rasterizationSamples; + VkBool32 sampleShadingEnable; + float minSampleShading; + const VkSampleMask* pSampleMask; + VkBool32 alphaToCoverageEnable; + VkBool32 alphaToOneEnable; +} VkPipelineMultisampleStateCreateInfo; + +typedef struct VkStencilOpState { + VkStencilOp failOp; + VkStencilOp passOp; + VkStencilOp depthFailOp; + VkCompareOp compareOp; + uint32_t compareMask; + uint32_t writeMask; + uint32_t reference; +} VkStencilOpState; + +typedef struct VkPipelineDepthStencilStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineDepthStencilStateCreateFlags flags; + VkBool32 depthTestEnable; + VkBool32 depthWriteEnable; + VkCompareOp depthCompareOp; + VkBool32 depthBoundsTestEnable; + VkBool32 stencilTestEnable; + VkStencilOpState front; + VkStencilOpState back; + float minDepthBounds; + float maxDepthBounds; +} VkPipelineDepthStencilStateCreateInfo; + +typedef struct VkPipelineColorBlendAttachmentState { + VkBool32 blendEnable; + VkBlendFactor srcColorBlendFactor; + VkBlendFactor dstColorBlendFactor; + VkBlendOp colorBlendOp; + VkBlendFactor srcAlphaBlendFactor; + VkBlendFactor dstAlphaBlendFactor; + VkBlendOp alphaBlendOp; + VkColorComponentFlags colorWriteMask; +} VkPipelineColorBlendAttachmentState; + +typedef struct VkPipelineColorBlendStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineColorBlendStateCreateFlags flags; + VkBool32 logicOpEnable; + VkLogicOp logicOp; + uint32_t attachmentCount; + const VkPipelineColorBlendAttachmentState* pAttachments; + float blendConstants[4]; +} VkPipelineColorBlendStateCreateInfo; + +typedef struct VkPipelineDynamicStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineDynamicStateCreateFlags flags; + uint32_t dynamicStateCount; + const VkDynamicState* pDynamicStates; +} VkPipelineDynamicStateCreateInfo; + +typedef struct VkGraphicsPipelineCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineCreateFlags flags; + uint32_t stageCount; + const VkPipelineShaderStageCreateInfo* pStages; + const VkPipelineVertexInputStateCreateInfo* pVertexInputState; + const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState; + const VkPipelineTessellationStateCreateInfo* pTessellationState; + const VkPipelineViewportStateCreateInfo* pViewportState; + const VkPipelineRasterizationStateCreateInfo* pRasterizationState; + const VkPipelineMultisampleStateCreateInfo* pMultisampleState; + const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState; + const VkPipelineColorBlendStateCreateInfo* pColorBlendState; + const VkPipelineDynamicStateCreateInfo* pDynamicState; + VkPipelineLayout layout; + VkRenderPass renderPass; + uint32_t subpass; + VkPipeline basePipelineHandle; + int32_t basePipelineIndex; +} VkGraphicsPipelineCreateInfo; + +typedef struct VkComputePipelineCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineCreateFlags flags; + VkPipelineShaderStageCreateInfo stage; + VkPipelineLayout layout; + VkPipeline basePipelineHandle; + int32_t basePipelineIndex; +} VkComputePipelineCreateInfo; + +typedef struct VkPushConstantRange { + VkShaderStageFlags stageFlags; + uint32_t offset; + uint32_t size; +} VkPushConstantRange; + +typedef struct VkPipelineLayoutCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineLayoutCreateFlags flags; + uint32_t setLayoutCount; + const VkDescriptorSetLayout* pSetLayouts; + uint32_t pushConstantRangeCount; + const VkPushConstantRange* pPushConstantRanges; +} VkPipelineLayoutCreateInfo; + +typedef struct VkSamplerCreateInfo { + VkStructureType sType; + const void* pNext; + VkSamplerCreateFlags flags; + VkFilter magFilter; + VkFilter minFilter; + VkSamplerMipmapMode mipmapMode; + VkSamplerAddressMode addressModeU; + VkSamplerAddressMode addressModeV; + VkSamplerAddressMode addressModeW; + float mipLodBias; + VkBool32 anisotropyEnable; + float maxAnisotropy; + VkBool32 compareEnable; + VkCompareOp compareOp; + float minLod; + float maxLod; + VkBorderColor borderColor; + VkBool32 unnormalizedCoordinates; +} VkSamplerCreateInfo; + +typedef struct VkDescriptorSetLayoutBinding { + uint32_t binding; + VkDescriptorType descriptorType; + uint32_t descriptorCount; + VkShaderStageFlags stageFlags; + const VkSampler* pImmutableSamplers; +} VkDescriptorSetLayoutBinding; + +typedef struct VkDescriptorSetLayoutCreateInfo { + VkStructureType sType; + const void* pNext; + VkDescriptorSetLayoutCreateFlags flags; + uint32_t bindingCount; + const VkDescriptorSetLayoutBinding* pBindings; +} VkDescriptorSetLayoutCreateInfo; + +typedef struct VkDescriptorPoolSize { + VkDescriptorType type; + uint32_t descriptorCount; +} VkDescriptorPoolSize; + +typedef struct VkDescriptorPoolCreateInfo { + VkStructureType sType; + const void* pNext; + VkDescriptorPoolCreateFlags flags; + uint32_t maxSets; + uint32_t poolSizeCount; + const VkDescriptorPoolSize* pPoolSizes; +} VkDescriptorPoolCreateInfo; + +typedef struct VkDescriptorSetAllocateInfo { + VkStructureType sType; + const void* pNext; + VkDescriptorPool descriptorPool; + uint32_t descriptorSetCount; + const VkDescriptorSetLayout* pSetLayouts; +} VkDescriptorSetAllocateInfo; + +typedef struct VkDescriptorImageInfo { + VkSampler sampler; + VkImageView imageView; + VkImageLayout imageLayout; +} VkDescriptorImageInfo; + +typedef struct VkDescriptorBufferInfo { + VkBuffer buffer; + VkDeviceSize offset; + VkDeviceSize range; +} VkDescriptorBufferInfo; + +typedef struct VkWriteDescriptorSet { + VkStructureType sType; + const void* pNext; + VkDescriptorSet dstSet; + uint32_t dstBinding; + uint32_t dstArrayElement; + uint32_t descriptorCount; + VkDescriptorType descriptorType; + const VkDescriptorImageInfo* pImageInfo; + const VkDescriptorBufferInfo* pBufferInfo; + const VkBufferView* pTexelBufferView; +} VkWriteDescriptorSet; + +typedef struct VkCopyDescriptorSet { + VkStructureType sType; + const void* pNext; + VkDescriptorSet srcSet; + uint32_t srcBinding; + uint32_t srcArrayElement; + VkDescriptorSet dstSet; + uint32_t dstBinding; + uint32_t dstArrayElement; + uint32_t descriptorCount; +} VkCopyDescriptorSet; + +typedef struct VkFramebufferCreateInfo { + VkStructureType sType; + const void* pNext; + VkFramebufferCreateFlags flags; + VkRenderPass renderPass; + uint32_t attachmentCount; + const VkImageView* pAttachments; + uint32_t width; + uint32_t height; + uint32_t layers; +} VkFramebufferCreateInfo; + +typedef struct VkAttachmentDescription { + VkAttachmentDescriptionFlags flags; + VkFormat format; + VkSampleCountFlagBits samples; + VkAttachmentLoadOp loadOp; + VkAttachmentStoreOp storeOp; + VkAttachmentLoadOp stencilLoadOp; + VkAttachmentStoreOp stencilStoreOp; + VkImageLayout initialLayout; + VkImageLayout finalLayout; +} VkAttachmentDescription; + +typedef struct VkAttachmentReference { + uint32_t attachment; + VkImageLayout layout; +} VkAttachmentReference; + +typedef struct VkSubpassDescription { + VkSubpassDescriptionFlags flags; + VkPipelineBindPoint pipelineBindPoint; + uint32_t inputAttachmentCount; + const VkAttachmentReference* pInputAttachments; + uint32_t colorAttachmentCount; + const VkAttachmentReference* pColorAttachments; + const VkAttachmentReference* pResolveAttachments; + const VkAttachmentReference* pDepthStencilAttachment; + uint32_t preserveAttachmentCount; + const uint32_t* pPreserveAttachments; +} VkSubpassDescription; + +typedef struct VkSubpassDependency { + uint32_t srcSubpass; + uint32_t dstSubpass; + VkPipelineStageFlags srcStageMask; + VkPipelineStageFlags dstStageMask; + VkAccessFlags srcAccessMask; + VkAccessFlags dstAccessMask; + VkDependencyFlags dependencyFlags; +} VkSubpassDependency; + +typedef struct VkRenderPassCreateInfo { + VkStructureType sType; + const void* pNext; + VkRenderPassCreateFlags flags; + uint32_t attachmentCount; + const VkAttachmentDescription* pAttachments; + uint32_t subpassCount; + const VkSubpassDescription* pSubpasses; + uint32_t dependencyCount; + const VkSubpassDependency* pDependencies; +} VkRenderPassCreateInfo; + +typedef struct VkCommandPoolCreateInfo { + VkStructureType sType; + const void* pNext; + VkCommandPoolCreateFlags flags; + uint32_t queueFamilyIndex; +} VkCommandPoolCreateInfo; + +typedef struct VkCommandBufferAllocateInfo { + VkStructureType sType; + const void* pNext; + VkCommandPool commandPool; + VkCommandBufferLevel level; + uint32_t commandBufferCount; +} VkCommandBufferAllocateInfo; + +typedef struct VkCommandBufferInheritanceInfo { + VkStructureType sType; + const void* pNext; + VkRenderPass renderPass; + uint32_t subpass; + VkFramebuffer framebuffer; + VkBool32 occlusionQueryEnable; + VkQueryControlFlags queryFlags; + VkQueryPipelineStatisticFlags pipelineStatistics; +} VkCommandBufferInheritanceInfo; + +typedef struct VkCommandBufferBeginInfo { + VkStructureType sType; + const void* pNext; + VkCommandBufferUsageFlags flags; + const VkCommandBufferInheritanceInfo* pInheritanceInfo; +} VkCommandBufferBeginInfo; + +typedef struct VkBufferCopy { + VkDeviceSize srcOffset; + VkDeviceSize dstOffset; + VkDeviceSize size; +} VkBufferCopy; + +typedef struct VkImageSubresourceLayers { + VkImageAspectFlags aspectMask; + uint32_t mipLevel; + uint32_t baseArrayLayer; + uint32_t layerCount; +} VkImageSubresourceLayers; + +typedef struct VkImageCopy { + VkImageSubresourceLayers srcSubresource; + VkOffset3D srcOffset; + VkImageSubresourceLayers dstSubresource; + VkOffset3D dstOffset; + VkExtent3D extent; +} VkImageCopy; + +typedef struct VkImageBlit { + VkImageSubresourceLayers srcSubresource; + VkOffset3D srcOffsets[2]; + VkImageSubresourceLayers dstSubresource; + VkOffset3D dstOffsets[2]; +} VkImageBlit; + +typedef struct VkBufferImageCopy { + VkDeviceSize bufferOffset; + uint32_t bufferRowLength; + uint32_t bufferImageHeight; + VkImageSubresourceLayers imageSubresource; + VkOffset3D imageOffset; + VkExtent3D imageExtent; +} VkBufferImageCopy; + +typedef union VkClearColorValue { + float float32[4]; + int32_t int32[4]; + uint32_t uint32[4]; +} VkClearColorValue; + +typedef struct VkClearDepthStencilValue { + float depth; + uint32_t stencil; +} VkClearDepthStencilValue; + +typedef union VkClearValue { + VkClearColorValue color; + VkClearDepthStencilValue depthStencil; +} VkClearValue; + +typedef struct VkClearAttachment { + VkImageAspectFlags aspectMask; + uint32_t colorAttachment; + VkClearValue clearValue; +} VkClearAttachment; + +typedef struct VkClearRect { + VkRect2D rect; + uint32_t baseArrayLayer; + uint32_t layerCount; +} VkClearRect; + +typedef struct VkImageResolve { + VkImageSubresourceLayers srcSubresource; + VkOffset3D srcOffset; + VkImageSubresourceLayers dstSubresource; + VkOffset3D dstOffset; + VkExtent3D extent; +} VkImageResolve; + +typedef struct VkMemoryBarrier { + VkStructureType sType; + const void* pNext; + VkAccessFlags srcAccessMask; + VkAccessFlags dstAccessMask; +} VkMemoryBarrier; + +typedef struct VkBufferMemoryBarrier { + VkStructureType sType; + const void* pNext; + VkAccessFlags srcAccessMask; + VkAccessFlags dstAccessMask; + uint32_t srcQueueFamilyIndex; + uint32_t dstQueueFamilyIndex; + VkBuffer buffer; + VkDeviceSize offset; + VkDeviceSize size; +} VkBufferMemoryBarrier; + +typedef struct VkImageMemoryBarrier { + VkStructureType sType; + const void* pNext; + VkAccessFlags srcAccessMask; + VkAccessFlags dstAccessMask; + VkImageLayout oldLayout; + VkImageLayout newLayout; + uint32_t srcQueueFamilyIndex; + uint32_t dstQueueFamilyIndex; + VkImage image; + VkImageSubresourceRange subresourceRange; +} VkImageMemoryBarrier; + +typedef struct VkRenderPassBeginInfo { + VkStructureType sType; + const void* pNext; + VkRenderPass renderPass; + VkFramebuffer framebuffer; + VkRect2D renderArea; + uint32_t clearValueCount; + const VkClearValue* pClearValues; +} VkRenderPassBeginInfo; + +typedef struct VkDispatchIndirectCommand { + uint32_t x; + uint32_t y; + uint32_t z; +} VkDispatchIndirectCommand; + +typedef struct VkDrawIndexedIndirectCommand { + uint32_t indexCount; + uint32_t instanceCount; + uint32_t firstIndex; + int32_t vertexOffset; + uint32_t firstInstance; +} VkDrawIndexedIndirectCommand; + +typedef struct VkDrawIndirectCommand { + uint32_t vertexCount; + uint32_t instanceCount; + uint32_t firstVertex; + uint32_t firstInstance; +} VkDrawIndirectCommand; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance); +typedef void (VKAPI_PTR *PFN_vkDestroyInstance)(VkInstance instance, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices); +typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures); +typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties); +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties); +typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties); +typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties); +typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties); +typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vkGetInstanceProcAddr)(VkInstance instance, const char* pName); +typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vkGetDeviceProcAddr)(VkDevice device, const char* pName); +typedef VkResult (VKAPI_PTR *PFN_vkCreateDevice)(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice); +typedef void (VKAPI_PTR *PFN_vkDestroyDevice)(VkDevice device, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceExtensionProperties)(const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties); +typedef VkResult (VKAPI_PTR *PFN_vkEnumerateDeviceExtensionProperties)(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties); +typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceLayerProperties)(uint32_t* pPropertyCount, VkLayerProperties* pProperties); +typedef VkResult (VKAPI_PTR *PFN_vkEnumerateDeviceLayerProperties)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkLayerProperties* pProperties); +typedef void (VKAPI_PTR *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue); +typedef VkResult (VKAPI_PTR *PFN_vkQueueSubmit)(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence); +typedef VkResult (VKAPI_PTR *PFN_vkQueueWaitIdle)(VkQueue queue); +typedef VkResult (VKAPI_PTR *PFN_vkDeviceWaitIdle)(VkDevice device); +typedef VkResult (VKAPI_PTR *PFN_vkAllocateMemory)(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory); +typedef void (VKAPI_PTR *PFN_vkFreeMemory)(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkMapMemory)(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData); +typedef void (VKAPI_PTR *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory memory); +typedef VkResult (VKAPI_PTR *PFN_vkFlushMappedMemoryRanges)(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges); +typedef VkResult (VKAPI_PTR *PFN_vkInvalidateMappedMemoryRanges)(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges); +typedef void (VKAPI_PTR *PFN_vkGetDeviceMemoryCommitment)(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes); +typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory)(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset); +typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory)(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset); +typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements)(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements); +typedef void (VKAPI_PTR *PFN_vkGetImageMemoryRequirements)(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements); +typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements)(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements); +typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties); +typedef VkResult (VKAPI_PTR *PFN_vkQueueBindSparse)(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence); +typedef VkResult (VKAPI_PTR *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence); +typedef void (VKAPI_PTR *PFN_vkDestroyFence)(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences); +typedef VkResult (VKAPI_PTR *PFN_vkGetFenceStatus)(VkDevice device, VkFence fence); +typedef VkResult (VKAPI_PTR *PFN_vkWaitForFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout); +typedef VkResult (VKAPI_PTR *PFN_vkCreateSemaphore)(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore); +typedef void (VKAPI_PTR *PFN_vkDestroySemaphore)(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkCreateEvent)(VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkEvent* pEvent); +typedef void (VKAPI_PTR *PFN_vkDestroyEvent)(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkGetEventStatus)(VkDevice device, VkEvent event); +typedef VkResult (VKAPI_PTR *PFN_vkSetEvent)(VkDevice device, VkEvent event); +typedef VkResult (VKAPI_PTR *PFN_vkResetEvent)(VkDevice device, VkEvent event); +typedef VkResult (VKAPI_PTR *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool); +typedef void (VKAPI_PTR *PFN_vkDestroyQueryPool)(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkGetQueryPoolResults)(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags); +typedef VkResult (VKAPI_PTR *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer); +typedef void (VKAPI_PTR *PFN_vkDestroyBuffer)(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferView* pView); +typedef void (VKAPI_PTR *PFN_vkDestroyBufferView)(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkCreateImage)(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage); +typedef void (VKAPI_PTR *PFN_vkDestroyImage)(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator); +typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout)(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout); +typedef VkResult (VKAPI_PTR *PFN_vkCreateImageView)(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImageView* pView); +typedef void (VKAPI_PTR *PFN_vkDestroyImageView)(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkCreateShaderModule)(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule); +typedef void (VKAPI_PTR *PFN_vkDestroyShaderModule)(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkCreatePipelineCache)(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache); +typedef void (VKAPI_PTR *PFN_vkDestroyPipelineCache)(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkGetPipelineCacheData)(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData); +typedef VkResult (VKAPI_PTR *PFN_vkMergePipelineCaches)(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches); +typedef VkResult (VKAPI_PTR *PFN_vkCreateGraphicsPipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); +typedef VkResult (VKAPI_PTR *PFN_vkCreateComputePipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); +typedef void (VKAPI_PTR *PFN_vkDestroyPipeline)(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkCreatePipelineLayout)(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout); +typedef void (VKAPI_PTR *PFN_vkDestroyPipelineLayout)(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkCreateSampler)(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSampler* pSampler); +typedef void (VKAPI_PTR *PFN_vkDestroySampler)(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorSetLayout)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout); +typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorSetLayout)(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorPool)(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool); +typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkResetDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags); +typedef VkResult (VKAPI_PTR *PFN_vkAllocateDescriptorSets)(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets); +typedef VkResult (VKAPI_PTR *PFN_vkFreeDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets); +typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies); +typedef VkResult (VKAPI_PTR *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer); +typedef void (VKAPI_PTR *PFN_vkDestroyFramebuffer)(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); +typedef void (VKAPI_PTR *PFN_vkDestroyRenderPass)(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator); +typedef void (VKAPI_PTR *PFN_vkGetRenderAreaGranularity)(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity); +typedef VkResult (VKAPI_PTR *PFN_vkCreateCommandPool)(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool); +typedef void (VKAPI_PTR *PFN_vkDestroyCommandPool)(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkResetCommandPool)(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags); +typedef VkResult (VKAPI_PTR *PFN_vkAllocateCommandBuffers)(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers); +typedef void (VKAPI_PTR *PFN_vkFreeCommandBuffers)(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers); +typedef VkResult (VKAPI_PTR *PFN_vkBeginCommandBuffer)(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo); +typedef VkResult (VKAPI_PTR *PFN_vkEndCommandBuffer)(VkCommandBuffer commandBuffer); +typedef VkResult (VKAPI_PTR *PFN_vkResetCommandBuffer)(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags); +typedef void (VKAPI_PTR *PFN_vkCmdBindPipeline)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline); +typedef void (VKAPI_PTR *PFN_vkCmdSetViewport)(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports); +typedef void (VKAPI_PTR *PFN_vkCmdSetScissor)(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors); +typedef void (VKAPI_PTR *PFN_vkCmdSetLineWidth)(VkCommandBuffer commandBuffer, float lineWidth); +typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBias)(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor); +typedef void (VKAPI_PTR *PFN_vkCmdSetBlendConstants)(VkCommandBuffer commandBuffer, const float blendConstants[4]); +typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBounds)(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds); +typedef void (VKAPI_PTR *PFN_vkCmdSetStencilCompareMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask); +typedef void (VKAPI_PTR *PFN_vkCmdSetStencilWriteMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask); +typedef void (VKAPI_PTR *PFN_vkCmdSetStencilReference)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference); +typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorSets)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets); +typedef void (VKAPI_PTR *PFN_vkCmdBindIndexBuffer)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType); +typedef void (VKAPI_PTR *PFN_vkCmdBindVertexBuffers)(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets); +typedef void (VKAPI_PTR *PFN_vkCmdDraw)(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance); +typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexed)(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance); +typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); +typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); +typedef void (VKAPI_PTR *PFN_vkCmdDispatch)(VkCommandBuffer commandBuffer, uint32_t x, uint32_t y, uint32_t z); +typedef void (VKAPI_PTR *PFN_vkCmdDispatchIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); +typedef void (VKAPI_PTR *PFN_vkCmdCopyBuffer)(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions); +typedef void (VKAPI_PTR *PFN_vkCmdCopyImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions); +typedef void (VKAPI_PTR *PFN_vkCmdBlitImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter); +typedef void (VKAPI_PTR *PFN_vkCmdCopyBufferToImage)(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions); +typedef void (VKAPI_PTR *PFN_vkCmdCopyImageToBuffer)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions); +typedef void (VKAPI_PTR *PFN_vkCmdUpdateBuffer)(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const uint32_t* pData); +typedef void (VKAPI_PTR *PFN_vkCmdFillBuffer)(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data); +typedef void (VKAPI_PTR *PFN_vkCmdClearColorImage)(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); +typedef void (VKAPI_PTR *PFN_vkCmdClearDepthStencilImage)(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); +typedef void (VKAPI_PTR *PFN_vkCmdClearAttachments)(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects); +typedef void (VKAPI_PTR *PFN_vkCmdResolveImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions); +typedef void (VKAPI_PTR *PFN_vkCmdSetEvent)(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask); +typedef void (VKAPI_PTR *PFN_vkCmdResetEvent)(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask); +typedef void (VKAPI_PTR *PFN_vkCmdWaitEvents)(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers); +typedef void (VKAPI_PTR *PFN_vkCmdPipelineBarrier)(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers); +typedef void (VKAPI_PTR *PFN_vkCmdBeginQuery)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags); +typedef void (VKAPI_PTR *PFN_vkCmdEndQuery)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query); +typedef void (VKAPI_PTR *PFN_vkCmdResetQueryPool)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount); +typedef void (VKAPI_PTR *PFN_vkCmdWriteTimestamp)(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query); +typedef void (VKAPI_PTR *PFN_vkCmdCopyQueryPoolResults)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags); +typedef void (VKAPI_PTR *PFN_vkCmdPushConstants)(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues); +typedef void (VKAPI_PTR *PFN_vkCmdBeginRenderPass)(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents); +typedef void (VKAPI_PTR *PFN_vkCmdNextSubpass)(VkCommandBuffer commandBuffer, VkSubpassContents contents); +typedef void (VKAPI_PTR *PFN_vkCmdEndRenderPass)(VkCommandBuffer commandBuffer); +typedef void (VKAPI_PTR *PFN_vkCmdExecuteCommands)(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance( + const VkInstanceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkInstance* pInstance); + +VKAPI_ATTR void VKAPI_CALL vkDestroyInstance( + VkInstance instance, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDevices( + VkInstance instance, + uint32_t* pPhysicalDeviceCount, + VkPhysicalDevice* pPhysicalDevices); + +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures( + VkPhysicalDevice physicalDevice, + VkPhysicalDeviceFeatures* pFeatures); + +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties( + VkPhysicalDevice physicalDevice, + VkFormat format, + VkFormatProperties* pFormatProperties); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties( + VkPhysicalDevice physicalDevice, + VkFormat format, + VkImageType type, + VkImageTiling tiling, + VkImageUsageFlags usage, + VkImageCreateFlags flags, + VkImageFormatProperties* pImageFormatProperties); + +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties( + VkPhysicalDevice physicalDevice, + VkPhysicalDeviceProperties* pProperties); + +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties( + VkPhysicalDevice physicalDevice, + uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties* pQueueFamilyProperties); + +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties( + VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties* pMemoryProperties); + +VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr( + VkInstance instance, + const char* pName); + +VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr( + VkDevice device, + const char* pName); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice( + VkPhysicalDevice physicalDevice, + const VkDeviceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDevice* pDevice); + +VKAPI_ATTR void VKAPI_CALL vkDestroyDevice( + VkDevice device, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties( + const char* pLayerName, + uint32_t* pPropertyCount, + VkExtensionProperties* pProperties); + +VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties( + VkPhysicalDevice physicalDevice, + const char* pLayerName, + uint32_t* pPropertyCount, + VkExtensionProperties* pProperties); + +VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties( + uint32_t* pPropertyCount, + VkLayerProperties* pProperties); + +VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceLayerProperties( + VkPhysicalDevice physicalDevice, + uint32_t* pPropertyCount, + VkLayerProperties* pProperties); + +VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue( + VkDevice device, + uint32_t queueFamilyIndex, + uint32_t queueIndex, + VkQueue* pQueue); + +VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit( + VkQueue queue, + uint32_t submitCount, + const VkSubmitInfo* pSubmits, + VkFence fence); + +VKAPI_ATTR VkResult VKAPI_CALL vkQueueWaitIdle( + VkQueue queue); + +VKAPI_ATTR VkResult VKAPI_CALL vkDeviceWaitIdle( + VkDevice device); + +VKAPI_ATTR VkResult VKAPI_CALL vkAllocateMemory( + VkDevice device, + const VkMemoryAllocateInfo* pAllocateInfo, + const VkAllocationCallbacks* pAllocator, + VkDeviceMemory* pMemory); + +VKAPI_ATTR void VKAPI_CALL vkFreeMemory( + VkDevice device, + VkDeviceMemory memory, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkMapMemory( + VkDevice device, + VkDeviceMemory memory, + VkDeviceSize offset, + VkDeviceSize size, + VkMemoryMapFlags flags, + void** ppData); + +VKAPI_ATTR void VKAPI_CALL vkUnmapMemory( + VkDevice device, + VkDeviceMemory memory); + +VKAPI_ATTR VkResult VKAPI_CALL vkFlushMappedMemoryRanges( + VkDevice device, + uint32_t memoryRangeCount, + const VkMappedMemoryRange* pMemoryRanges); + +VKAPI_ATTR VkResult VKAPI_CALL vkInvalidateMappedMemoryRanges( + VkDevice device, + uint32_t memoryRangeCount, + const VkMappedMemoryRange* pMemoryRanges); + +VKAPI_ATTR void VKAPI_CALL vkGetDeviceMemoryCommitment( + VkDevice device, + VkDeviceMemory memory, + VkDeviceSize* pCommittedMemoryInBytes); + +VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory( + VkDevice device, + VkBuffer buffer, + VkDeviceMemory memory, + VkDeviceSize memoryOffset); + +VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory( + VkDevice device, + VkImage image, + VkDeviceMemory memory, + VkDeviceSize memoryOffset); + +VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements( + VkDevice device, + VkBuffer buffer, + VkMemoryRequirements* pMemoryRequirements); + +VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements( + VkDevice device, + VkImage image, + VkMemoryRequirements* pMemoryRequirements); + +VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements( + VkDevice device, + VkImage image, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements* pSparseMemoryRequirements); + +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties( + VkPhysicalDevice physicalDevice, + VkFormat format, + VkImageType type, + VkSampleCountFlagBits samples, + VkImageUsageFlags usage, + VkImageTiling tiling, + uint32_t* pPropertyCount, + VkSparseImageFormatProperties* pProperties); + +VKAPI_ATTR VkResult VKAPI_CALL vkQueueBindSparse( + VkQueue queue, + uint32_t bindInfoCount, + const VkBindSparseInfo* pBindInfo, + VkFence fence); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateFence( + VkDevice device, + const VkFenceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkFence* pFence); + +VKAPI_ATTR void VKAPI_CALL vkDestroyFence( + VkDevice device, + VkFence fence, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkResetFences( + VkDevice device, + uint32_t fenceCount, + const VkFence* pFences); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceStatus( + VkDevice device, + VkFence fence); + +VKAPI_ATTR VkResult VKAPI_CALL vkWaitForFences( + VkDevice device, + uint32_t fenceCount, + const VkFence* pFences, + VkBool32 waitAll, + uint64_t timeout); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateSemaphore( + VkDevice device, + const VkSemaphoreCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSemaphore* pSemaphore); + +VKAPI_ATTR void VKAPI_CALL vkDestroySemaphore( + VkDevice device, + VkSemaphore semaphore, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateEvent( + VkDevice device, + const VkEventCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkEvent* pEvent); + +VKAPI_ATTR void VKAPI_CALL vkDestroyEvent( + VkDevice device, + VkEvent event, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetEventStatus( + VkDevice device, + VkEvent event); + +VKAPI_ATTR VkResult VKAPI_CALL vkSetEvent( + VkDevice device, + VkEvent event); + +VKAPI_ATTR VkResult VKAPI_CALL vkResetEvent( + VkDevice device, + VkEvent event); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateQueryPool( + VkDevice device, + const VkQueryPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkQueryPool* pQueryPool); + +VKAPI_ATTR void VKAPI_CALL vkDestroyQueryPool( + VkDevice device, + VkQueryPool queryPool, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetQueryPoolResults( + VkDevice device, + VkQueryPool queryPool, + uint32_t firstQuery, + uint32_t queryCount, + size_t dataSize, + void* pData, + VkDeviceSize stride, + VkQueryResultFlags flags); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateBuffer( + VkDevice device, + const VkBufferCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkBuffer* pBuffer); + +VKAPI_ATTR void VKAPI_CALL vkDestroyBuffer( + VkDevice device, + VkBuffer buffer, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferView( + VkDevice device, + const VkBufferViewCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkBufferView* pView); + +VKAPI_ATTR void VKAPI_CALL vkDestroyBufferView( + VkDevice device, + VkBufferView bufferView, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateImage( + VkDevice device, + const VkImageCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkImage* pImage); + +VKAPI_ATTR void VKAPI_CALL vkDestroyImage( + VkDevice device, + VkImage image, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout( + VkDevice device, + VkImage image, + const VkImageSubresource* pSubresource, + VkSubresourceLayout* pLayout); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateImageView( + VkDevice device, + const VkImageViewCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkImageView* pView); + +VKAPI_ATTR void VKAPI_CALL vkDestroyImageView( + VkDevice device, + VkImageView imageView, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateShaderModule( + VkDevice device, + const VkShaderModuleCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkShaderModule* pShaderModule); + +VKAPI_ATTR void VKAPI_CALL vkDestroyShaderModule( + VkDevice device, + VkShaderModule shaderModule, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineCache( + VkDevice device, + const VkPipelineCacheCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkPipelineCache* pPipelineCache); + +VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineCache( + VkDevice device, + VkPipelineCache pipelineCache, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineCacheData( + VkDevice device, + VkPipelineCache pipelineCache, + size_t* pDataSize, + void* pData); + +VKAPI_ATTR VkResult VKAPI_CALL vkMergePipelineCaches( + VkDevice device, + VkPipelineCache dstCache, + uint32_t srcCacheCount, + const VkPipelineCache* pSrcCaches); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateGraphicsPipelines( + VkDevice device, + VkPipelineCache pipelineCache, + uint32_t createInfoCount, + const VkGraphicsPipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, + VkPipeline* pPipelines); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateComputePipelines( + VkDevice device, + VkPipelineCache pipelineCache, + uint32_t createInfoCount, + const VkComputePipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, + VkPipeline* pPipelines); + +VKAPI_ATTR void VKAPI_CALL vkDestroyPipeline( + VkDevice device, + VkPipeline pipeline, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineLayout( + VkDevice device, + const VkPipelineLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkPipelineLayout* pPipelineLayout); + +VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineLayout( + VkDevice device, + VkPipelineLayout pipelineLayout, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateSampler( + VkDevice device, + const VkSamplerCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSampler* pSampler); + +VKAPI_ATTR void VKAPI_CALL vkDestroySampler( + VkDevice device, + VkSampler sampler, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorSetLayout( + VkDevice device, + const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorSetLayout* pSetLayout); + +VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorSetLayout( + VkDevice device, + VkDescriptorSetLayout descriptorSetLayout, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorPool( + VkDevice device, + const VkDescriptorPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorPool* pDescriptorPool); + +VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorPool( + VkDevice device, + VkDescriptorPool descriptorPool, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkResetDescriptorPool( + VkDevice device, + VkDescriptorPool descriptorPool, + VkDescriptorPoolResetFlags flags); + +VKAPI_ATTR VkResult VKAPI_CALL vkAllocateDescriptorSets( + VkDevice device, + const VkDescriptorSetAllocateInfo* pAllocateInfo, + VkDescriptorSet* pDescriptorSets); + +VKAPI_ATTR VkResult VKAPI_CALL vkFreeDescriptorSets( + VkDevice device, + VkDescriptorPool descriptorPool, + uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets); + +VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSets( + VkDevice device, + uint32_t descriptorWriteCount, + const VkWriteDescriptorSet* pDescriptorWrites, + uint32_t descriptorCopyCount, + const VkCopyDescriptorSet* pDescriptorCopies); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateFramebuffer( + VkDevice device, + const VkFramebufferCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkFramebuffer* pFramebuffer); + +VKAPI_ATTR void VKAPI_CALL vkDestroyFramebuffer( + VkDevice device, + VkFramebuffer framebuffer, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass( + VkDevice device, + const VkRenderPassCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkRenderPass* pRenderPass); + +VKAPI_ATTR void VKAPI_CALL vkDestroyRenderPass( + VkDevice device, + VkRenderPass renderPass, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR void VKAPI_CALL vkGetRenderAreaGranularity( + VkDevice device, + VkRenderPass renderPass, + VkExtent2D* pGranularity); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateCommandPool( + VkDevice device, + const VkCommandPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkCommandPool* pCommandPool); + +VKAPI_ATTR void VKAPI_CALL vkDestroyCommandPool( + VkDevice device, + VkCommandPool commandPool, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandPool( + VkDevice device, + VkCommandPool commandPool, + VkCommandPoolResetFlags flags); + +VKAPI_ATTR VkResult VKAPI_CALL vkAllocateCommandBuffers( + VkDevice device, + const VkCommandBufferAllocateInfo* pAllocateInfo, + VkCommandBuffer* pCommandBuffers); + +VKAPI_ATTR void VKAPI_CALL vkFreeCommandBuffers( + VkDevice device, + VkCommandPool commandPool, + uint32_t commandBufferCount, + const VkCommandBuffer* pCommandBuffers); + +VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer( + VkCommandBuffer commandBuffer, + const VkCommandBufferBeginInfo* pBeginInfo); + +VKAPI_ATTR VkResult VKAPI_CALL vkEndCommandBuffer( + VkCommandBuffer commandBuffer); + +VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandBuffer( + VkCommandBuffer commandBuffer, + VkCommandBufferResetFlags flags); + +VKAPI_ATTR void VKAPI_CALL vkCmdBindPipeline( + VkCommandBuffer commandBuffer, + VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetViewport( + VkCommandBuffer commandBuffer, + uint32_t firstViewport, + uint32_t viewportCount, + const VkViewport* pViewports); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetScissor( + VkCommandBuffer commandBuffer, + uint32_t firstScissor, + uint32_t scissorCount, + const VkRect2D* pScissors); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetLineWidth( + VkCommandBuffer commandBuffer, + float lineWidth); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBias( + VkCommandBuffer commandBuffer, + float depthBiasConstantFactor, + float depthBiasClamp, + float depthBiasSlopeFactor); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetBlendConstants( + VkCommandBuffer commandBuffer, + const float blendConstants[4]); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBounds( + VkCommandBuffer commandBuffer, + float minDepthBounds, + float maxDepthBounds); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilCompareMask( + VkCommandBuffer commandBuffer, + VkStencilFaceFlags faceMask, + uint32_t compareMask); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilWriteMask( + VkCommandBuffer commandBuffer, + VkStencilFaceFlags faceMask, + uint32_t writeMask); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilReference( + VkCommandBuffer commandBuffer, + VkStencilFaceFlags faceMask, + uint32_t reference); + +VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets( + VkCommandBuffer commandBuffer, + VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, + uint32_t firstSet, + uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets, + uint32_t dynamicOffsetCount, + const uint32_t* pDynamicOffsets); + +VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer( + VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkIndexType indexType); + +VKAPI_ATTR void VKAPI_CALL vkCmdBindVertexBuffers( + VkCommandBuffer commandBuffer, + uint32_t firstBinding, + uint32_t bindingCount, + const VkBuffer* pBuffers, + const VkDeviceSize* pOffsets); + +VKAPI_ATTR void VKAPI_CALL vkCmdDraw( + VkCommandBuffer commandBuffer, + uint32_t vertexCount, + uint32_t instanceCount, + uint32_t firstVertex, + uint32_t firstInstance); + +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexed( + VkCommandBuffer commandBuffer, + uint32_t indexCount, + uint32_t instanceCount, + uint32_t firstIndex, + int32_t vertexOffset, + uint32_t firstInstance); + +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirect( + VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + uint32_t drawCount, + uint32_t stride); + +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirect( + VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + uint32_t drawCount, + uint32_t stride); + +VKAPI_ATTR void VKAPI_CALL vkCmdDispatch( + VkCommandBuffer commandBuffer, + uint32_t x, + uint32_t y, + uint32_t z); + +VKAPI_ATTR void VKAPI_CALL vkCmdDispatchIndirect( + VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset); + +VKAPI_ATTR void VKAPI_CALL vkCmdCopyBuffer( + VkCommandBuffer commandBuffer, + VkBuffer srcBuffer, + VkBuffer dstBuffer, + uint32_t regionCount, + const VkBufferCopy* pRegions); + +VKAPI_ATTR void VKAPI_CALL vkCmdCopyImage( + VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageCopy* pRegions); + +VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage( + VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageBlit* pRegions, + VkFilter filter); + +VKAPI_ATTR void VKAPI_CALL vkCmdCopyBufferToImage( + VkCommandBuffer commandBuffer, + VkBuffer srcBuffer, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkBufferImageCopy* pRegions); + +VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToBuffer( + VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkBuffer dstBuffer, + uint32_t regionCount, + const VkBufferImageCopy* pRegions); + +VKAPI_ATTR void VKAPI_CALL vkCmdUpdateBuffer( + VkCommandBuffer commandBuffer, + VkBuffer dstBuffer, + VkDeviceSize dstOffset, + VkDeviceSize dataSize, + const uint32_t* pData); + +VKAPI_ATTR void VKAPI_CALL vkCmdFillBuffer( + VkCommandBuffer commandBuffer, + VkBuffer dstBuffer, + VkDeviceSize dstOffset, + VkDeviceSize size, + uint32_t data); + +VKAPI_ATTR void VKAPI_CALL vkCmdClearColorImage( + VkCommandBuffer commandBuffer, + VkImage image, + VkImageLayout imageLayout, + const VkClearColorValue* pColor, + uint32_t rangeCount, + const VkImageSubresourceRange* pRanges); + +VKAPI_ATTR void VKAPI_CALL vkCmdClearDepthStencilImage( + VkCommandBuffer commandBuffer, + VkImage image, + VkImageLayout imageLayout, + const VkClearDepthStencilValue* pDepthStencil, + uint32_t rangeCount, + const VkImageSubresourceRange* pRanges); + +VKAPI_ATTR void VKAPI_CALL vkCmdClearAttachments( + VkCommandBuffer commandBuffer, + uint32_t attachmentCount, + const VkClearAttachment* pAttachments, + uint32_t rectCount, + const VkClearRect* pRects); + +VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage( + VkCommandBuffer commandBuffer, + VkImage srcImage, + VkImageLayout srcImageLayout, + VkImage dstImage, + VkImageLayout dstImageLayout, + uint32_t regionCount, + const VkImageResolve* pRegions); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetEvent( + VkCommandBuffer commandBuffer, + VkEvent event, + VkPipelineStageFlags stageMask); + +VKAPI_ATTR void VKAPI_CALL vkCmdResetEvent( + VkCommandBuffer commandBuffer, + VkEvent event, + VkPipelineStageFlags stageMask); + +VKAPI_ATTR void VKAPI_CALL vkCmdWaitEvents( + VkCommandBuffer commandBuffer, + uint32_t eventCount, + const VkEvent* pEvents, + VkPipelineStageFlags srcStageMask, + VkPipelineStageFlags dstStageMask, + uint32_t memoryBarrierCount, + const VkMemoryBarrier* pMemoryBarriers, + uint32_t bufferMemoryBarrierCount, + const VkBufferMemoryBarrier* pBufferMemoryBarriers, + uint32_t imageMemoryBarrierCount, + const VkImageMemoryBarrier* pImageMemoryBarriers); + +VKAPI_ATTR void VKAPI_CALL vkCmdPipelineBarrier( + VkCommandBuffer commandBuffer, + VkPipelineStageFlags srcStageMask, + VkPipelineStageFlags dstStageMask, + VkDependencyFlags dependencyFlags, + uint32_t memoryBarrierCount, + const VkMemoryBarrier* pMemoryBarriers, + uint32_t bufferMemoryBarrierCount, + const VkBufferMemoryBarrier* pBufferMemoryBarriers, + uint32_t imageMemoryBarrierCount, + const VkImageMemoryBarrier* pImageMemoryBarriers); + +VKAPI_ATTR void VKAPI_CALL vkCmdBeginQuery( + VkCommandBuffer commandBuffer, + VkQueryPool queryPool, + uint32_t query, + VkQueryControlFlags flags); + +VKAPI_ATTR void VKAPI_CALL vkCmdEndQuery( + VkCommandBuffer commandBuffer, + VkQueryPool queryPool, + uint32_t query); + +VKAPI_ATTR void VKAPI_CALL vkCmdResetQueryPool( + VkCommandBuffer commandBuffer, + VkQueryPool queryPool, + uint32_t firstQuery, + uint32_t queryCount); + +VKAPI_ATTR void VKAPI_CALL vkCmdWriteTimestamp( + VkCommandBuffer commandBuffer, + VkPipelineStageFlagBits pipelineStage, + VkQueryPool queryPool, + uint32_t query); + +VKAPI_ATTR void VKAPI_CALL vkCmdCopyQueryPoolResults( + VkCommandBuffer commandBuffer, + VkQueryPool queryPool, + uint32_t firstQuery, + uint32_t queryCount, + VkBuffer dstBuffer, + VkDeviceSize dstOffset, + VkDeviceSize stride, + VkQueryResultFlags flags); + +VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants( + VkCommandBuffer commandBuffer, + VkPipelineLayout layout, + VkShaderStageFlags stageFlags, + uint32_t offset, + uint32_t size, + const void* pValues); + +VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderPass( + VkCommandBuffer commandBuffer, + const VkRenderPassBeginInfo* pRenderPassBegin, + VkSubpassContents contents); + +VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass( + VkCommandBuffer commandBuffer, + VkSubpassContents contents); + +VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass( + VkCommandBuffer commandBuffer); + +VKAPI_ATTR void VKAPI_CALL vkCmdExecuteCommands( + VkCommandBuffer commandBuffer, + uint32_t commandBufferCount, + const VkCommandBuffer* pCommandBuffers); +#endif + +#define VK_KHR_surface 1 +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR) + +#define VK_KHR_SURFACE_SPEC_VERSION 25 +#define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface" + + +typedef enum VkColorSpaceKHR { + VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0, + VK_COLORSPACE_BEGIN_RANGE = VK_COLORSPACE_SRGB_NONLINEAR_KHR, + VK_COLORSPACE_END_RANGE = VK_COLORSPACE_SRGB_NONLINEAR_KHR, + VK_COLORSPACE_RANGE_SIZE = (VK_COLORSPACE_SRGB_NONLINEAR_KHR - VK_COLORSPACE_SRGB_NONLINEAR_KHR + 1), + VK_COLORSPACE_MAX_ENUM = 0x7FFFFFFF +} VkColorSpaceKHR; + +typedef enum VkPresentModeKHR { + VK_PRESENT_MODE_IMMEDIATE_KHR = 0, + VK_PRESENT_MODE_MAILBOX_KHR = 1, + VK_PRESENT_MODE_FIFO_KHR = 2, + VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3, + VK_PRESENT_MODE_BEGIN_RANGE = VK_PRESENT_MODE_IMMEDIATE_KHR, + VK_PRESENT_MODE_END_RANGE = VK_PRESENT_MODE_FIFO_RELAXED_KHR, + VK_PRESENT_MODE_RANGE_SIZE = (VK_PRESENT_MODE_FIFO_RELAXED_KHR - VK_PRESENT_MODE_IMMEDIATE_KHR + 1), + VK_PRESENT_MODE_MAX_ENUM = 0x7FFFFFFF +} VkPresentModeKHR; + + +typedef enum VkSurfaceTransformFlagBitsKHR { + VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001, + VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002, + VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004, + VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008, + VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010, + VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020, + VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040, + VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080, + VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100, +} VkSurfaceTransformFlagBitsKHR; +typedef VkFlags VkSurfaceTransformFlagsKHR; + +typedef enum VkCompositeAlphaFlagBitsKHR { + VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, + VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002, + VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004, + VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008, +} VkCompositeAlphaFlagBitsKHR; +typedef VkFlags VkCompositeAlphaFlagsKHR; + +typedef struct VkSurfaceCapabilitiesKHR { + uint32_t minImageCount; + uint32_t maxImageCount; + VkExtent2D currentExtent; + VkExtent2D minImageExtent; + VkExtent2D maxImageExtent; + uint32_t maxImageArrayLayers; + VkSurfaceTransformFlagsKHR supportedTransforms; + VkSurfaceTransformFlagBitsKHR currentTransform; + VkCompositeAlphaFlagsKHR supportedCompositeAlpha; + VkImageUsageFlags supportedUsageFlags; +} VkSurfaceCapabilitiesKHR; + +typedef struct VkSurfaceFormatKHR { + VkFormat format; + VkColorSpaceKHR colorSpace; +} VkSurfaceFormatKHR; + + +typedef void (VKAPI_PTR *PFN_vkDestroySurfaceKHR)(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32* pSupported); +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities); +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats); +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkDestroySurfaceKHR( + VkInstance instance, + VkSurfaceKHR surface, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceSupportKHR( + VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, + VkSurfaceKHR surface, + VkBool32* pSupported); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR( + VkPhysicalDevice physicalDevice, + VkSurfaceKHR surface, + VkSurfaceCapabilitiesKHR* pSurfaceCapabilities); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR( + VkPhysicalDevice physicalDevice, + VkSurfaceKHR surface, + uint32_t* pSurfaceFormatCount, + VkSurfaceFormatKHR* pSurfaceFormats); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR( + VkPhysicalDevice physicalDevice, + VkSurfaceKHR surface, + uint32_t* pPresentModeCount, + VkPresentModeKHR* pPresentModes); +#endif + +#define VK_KHR_swapchain 1 +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR) + +#define VK_KHR_SWAPCHAIN_SPEC_VERSION 67 +#define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain" + +typedef VkFlags VkSwapchainCreateFlagsKHR; + +typedef struct VkSwapchainCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkSwapchainCreateFlagsKHR flags; + VkSurfaceKHR surface; + uint32_t minImageCount; + VkFormat imageFormat; + VkColorSpaceKHR imageColorSpace; + VkExtent2D imageExtent; + uint32_t imageArrayLayers; + VkImageUsageFlags imageUsage; + VkSharingMode imageSharingMode; + uint32_t queueFamilyIndexCount; + const uint32_t* pQueueFamilyIndices; + VkSurfaceTransformFlagBitsKHR preTransform; + VkCompositeAlphaFlagBitsKHR compositeAlpha; + VkPresentModeKHR presentMode; + VkBool32 clipped; + VkSwapchainKHR oldSwapchain; +} VkSwapchainCreateInfoKHR; + +typedef struct VkPresentInfoKHR { + VkStructureType sType; + const void* pNext; + uint32_t waitSemaphoreCount; + const VkSemaphore* pWaitSemaphores; + uint32_t swapchainCount; + const VkSwapchainKHR* pSwapchains; + const uint32_t* pImageIndices; + VkResult* pResults; +} VkPresentInfoKHR; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateSwapchainKHR)(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain); +typedef void (VKAPI_PTR *PFN_vkDestroySwapchainKHR)(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainImagesKHR)(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages); +typedef VkResult (VKAPI_PTR *PFN_vkAcquireNextImageKHR)(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex); +typedef VkResult (VKAPI_PTR *PFN_vkQueuePresentKHR)(VkQueue queue, const VkPresentInfoKHR* pPresentInfo); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateSwapchainKHR( + VkDevice device, + const VkSwapchainCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSwapchainKHR* pSwapchain); + +VKAPI_ATTR void VKAPI_CALL vkDestroySwapchainKHR( + VkDevice device, + VkSwapchainKHR swapchain, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainImagesKHR( + VkDevice device, + VkSwapchainKHR swapchain, + uint32_t* pSwapchainImageCount, + VkImage* pSwapchainImages); + +VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImageKHR( + VkDevice device, + VkSwapchainKHR swapchain, + uint64_t timeout, + VkSemaphore semaphore, + VkFence fence, + uint32_t* pImageIndex); + +VKAPI_ATTR VkResult VKAPI_CALL vkQueuePresentKHR( + VkQueue queue, + const VkPresentInfoKHR* pPresentInfo); +#endif + +#define VK_KHR_display 1 +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayKHR) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayModeKHR) + +#define VK_KHR_DISPLAY_SPEC_VERSION 21 +#define VK_KHR_DISPLAY_EXTENSION_NAME "VK_KHR_display" + + +typedef enum VkDisplayPlaneAlphaFlagBitsKHR { + VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, + VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002, + VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004, + VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008, +} VkDisplayPlaneAlphaFlagBitsKHR; +typedef VkFlags VkDisplayModeCreateFlagsKHR; +typedef VkFlags VkDisplayPlaneAlphaFlagsKHR; +typedef VkFlags VkDisplaySurfaceCreateFlagsKHR; + +typedef struct VkDisplayPropertiesKHR { + VkDisplayKHR display; + const char* displayName; + VkExtent2D physicalDimensions; + VkExtent2D physicalResolution; + VkSurfaceTransformFlagsKHR supportedTransforms; + VkBool32 planeReorderPossible; + VkBool32 persistentContent; +} VkDisplayPropertiesKHR; + +typedef struct VkDisplayModeParametersKHR { + VkExtent2D visibleRegion; + uint32_t refreshRate; +} VkDisplayModeParametersKHR; + +typedef struct VkDisplayModePropertiesKHR { + VkDisplayModeKHR displayMode; + VkDisplayModeParametersKHR parameters; +} VkDisplayModePropertiesKHR; + +typedef struct VkDisplayModeCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkDisplayModeCreateFlagsKHR flags; + VkDisplayModeParametersKHR parameters; +} VkDisplayModeCreateInfoKHR; + +typedef struct VkDisplayPlaneCapabilitiesKHR { + VkDisplayPlaneAlphaFlagsKHR supportedAlpha; + VkOffset2D minSrcPosition; + VkOffset2D maxSrcPosition; + VkExtent2D minSrcExtent; + VkExtent2D maxSrcExtent; + VkOffset2D minDstPosition; + VkOffset2D maxDstPosition; + VkExtent2D minDstExtent; + VkExtent2D maxDstExtent; +} VkDisplayPlaneCapabilitiesKHR; + +typedef struct VkDisplayPlanePropertiesKHR { + VkDisplayKHR currentDisplay; + uint32_t currentStackIndex; +} VkDisplayPlanePropertiesKHR; + +typedef struct VkDisplaySurfaceCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkDisplaySurfaceCreateFlagsKHR flags; + VkDisplayModeKHR displayMode; + uint32_t planeIndex; + uint32_t planeStackIndex; + VkSurfaceTransformFlagBitsKHR transform; + float globalAlpha; + VkDisplayPlaneAlphaFlagBitsKHR alphaMode; + VkExtent2D imageExtent; +} VkDisplaySurfaceCreateInfoKHR; + + +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPropertiesKHR* pProperties); +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties); +typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneSupportedDisplaysKHR)(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, VkDisplayKHR* pDisplays); +typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayModePropertiesKHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties); +typedef VkResult (VKAPI_PTR *PFN_vkCreateDisplayModeKHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR*pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode); +typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneCapabilitiesKHR)(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities); +typedef VkResult (VKAPI_PTR *PFN_vkCreateDisplayPlaneSurfaceKHR)(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayPropertiesKHR( + VkPhysicalDevice physicalDevice, + uint32_t* pPropertyCount, + VkDisplayPropertiesKHR* pProperties); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayPlanePropertiesKHR( + VkPhysicalDevice physicalDevice, + uint32_t* pPropertyCount, + VkDisplayPlanePropertiesKHR* pProperties); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneSupportedDisplaysKHR( + VkPhysicalDevice physicalDevice, + uint32_t planeIndex, + uint32_t* pDisplayCount, + VkDisplayKHR* pDisplays); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayModePropertiesKHR( + VkPhysicalDevice physicalDevice, + VkDisplayKHR display, + uint32_t* pPropertyCount, + VkDisplayModePropertiesKHR* pProperties); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayModeKHR( + VkPhysicalDevice physicalDevice, + VkDisplayKHR display, + const VkDisplayModeCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDisplayModeKHR* pMode); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneCapabilitiesKHR( + VkPhysicalDevice physicalDevice, + VkDisplayModeKHR mode, + uint32_t planeIndex, + VkDisplayPlaneCapabilitiesKHR* pCapabilities); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayPlaneSurfaceKHR( + VkInstance instance, + const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface); +#endif + +#define VK_KHR_display_swapchain 1 +#define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION 9 +#define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME "VK_KHR_display_swapchain" + +typedef struct VkDisplayPresentInfoKHR { + VkStructureType sType; + const void* pNext; + VkRect2D srcRect; + VkRect2D dstRect; + VkBool32 persistent; +} VkDisplayPresentInfoKHR; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateSharedSwapchainsKHR)(VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateSharedSwapchainsKHR( + VkDevice device, + uint32_t swapchainCount, + const VkSwapchainCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, + VkSwapchainKHR* pSwapchains); +#endif + +#ifdef VK_USE_PLATFORM_XLIB_KHR +#define VK_KHR_xlib_surface 1 +#include + +#define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6 +#define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface" + +typedef VkFlags VkXlibSurfaceCreateFlagsKHR; + +typedef struct VkXlibSurfaceCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkXlibSurfaceCreateFlagsKHR flags; + Display* dpy; + Window window; +} VkXlibSurfaceCreateInfoKHR; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR( + VkInstance instance, + const VkXlibSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface); + +VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR( + VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, + Display* dpy, + VisualID visualID); +#endif +#endif /* VK_USE_PLATFORM_XLIB_KHR */ + +#ifdef VK_USE_PLATFORM_XCB_KHR +#define VK_KHR_xcb_surface 1 +#include + +#define VK_KHR_XCB_SURFACE_SPEC_VERSION 6 +#define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface" + +typedef VkFlags VkXcbSurfaceCreateFlagsKHR; + +typedef struct VkXcbSurfaceCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkXcbSurfaceCreateFlagsKHR flags; + xcb_connection_t* connection; + xcb_window_t window; +} VkXcbSurfaceCreateInfoKHR; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR( + VkInstance instance, + const VkXcbSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface); + +VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR( + VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, + xcb_connection_t* connection, + xcb_visualid_t visual_id); +#endif +#endif /* VK_USE_PLATFORM_XCB_KHR */ + +#ifdef VK_USE_PLATFORM_WAYLAND_KHR +#define VK_KHR_wayland_surface 1 +#include + +#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 5 +#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface" + +typedef VkFlags VkWaylandSurfaceCreateFlagsKHR; + +typedef struct VkWaylandSurfaceCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkWaylandSurfaceCreateFlagsKHR flags; + struct wl_display* display; + struct wl_surface* surface; +} VkWaylandSurfaceCreateInfoKHR; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR( + VkInstance instance, + const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface); + +VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR( + VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, + struct wl_display* display); +#endif +#endif /* VK_USE_PLATFORM_WAYLAND_KHR */ + +#ifdef VK_USE_PLATFORM_MIR_KHR +#define VK_KHR_mir_surface 1 +#include + +#define VK_KHR_MIR_SURFACE_SPEC_VERSION 4 +#define VK_KHR_MIR_SURFACE_EXTENSION_NAME "VK_KHR_mir_surface" + +typedef VkFlags VkMirSurfaceCreateFlagsKHR; + +typedef struct VkMirSurfaceCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkMirSurfaceCreateFlagsKHR flags; + MirConnection* connection; + MirSurface* mirSurface; +} VkMirSurfaceCreateInfoKHR; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateMirSurfaceKHR)(VkInstance instance, const VkMirSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceMirPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, MirConnection* connection); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateMirSurfaceKHR( + VkInstance instance, + const VkMirSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface); + +VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceMirPresentationSupportKHR( + VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, + MirConnection* connection); +#endif +#endif /* VK_USE_PLATFORM_MIR_KHR */ + +#ifdef VK_USE_PLATFORM_ANDROID_KHR +#define VK_KHR_android_surface 1 +#include + +#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6 +#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface" + +typedef VkFlags VkAndroidSurfaceCreateFlagsKHR; + +typedef struct VkAndroidSurfaceCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkAndroidSurfaceCreateFlagsKHR flags; + ANativeWindow* window; +} VkAndroidSurfaceCreateInfoKHR; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR( + VkInstance instance, + const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface); +#endif +#endif /* VK_USE_PLATFORM_ANDROID_KHR */ + +#ifdef VK_USE_PLATFORM_WIN32_KHR +#define VK_KHR_win32_surface 1 +#include + +#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 5 +#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface" + +typedef VkFlags VkWin32SurfaceCreateFlagsKHR; + +typedef struct VkWin32SurfaceCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkWin32SurfaceCreateFlagsKHR flags; + HINSTANCE hinstance; + HWND hwnd; +} VkWin32SurfaceCreateInfoKHR; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR( + VkInstance instance, + const VkWin32SurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface); + +VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR( + VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex); +#endif +#endif /* VK_USE_PLATFORM_WIN32_KHR */ + +#define VK_EXT_debug_report 1 +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) + +#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 1 +#define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report" + + +typedef enum VkDebugReportObjectTypeEXT { + VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0, + VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1, + VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2, + VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3, + VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4, + VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5, + VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6, + VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7, + VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8, + VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9, + VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10, + VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11, + VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12, + VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13, + VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14, + VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15, + VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16, + VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17, + VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18, + VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19, + VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20, + VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21, + VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22, + VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23, + VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24, + VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25, + VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26, + VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27, + VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28, +} VkDebugReportObjectTypeEXT; + +typedef enum VkDebugReportErrorEXT { + VK_DEBUG_REPORT_ERROR_NONE_EXT = 0, + VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = 1, +} VkDebugReportErrorEXT; + + +typedef enum VkDebugReportFlagBitsEXT { + VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001, + VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002, + VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004, + VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008, + VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010, +} VkDebugReportFlagBitsEXT; +typedef VkFlags VkDebugReportFlagsEXT; + +typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)( + VkDebugReportFlagsEXT flags, + VkDebugReportObjectTypeEXT objectType, + uint64_t object, + size_t location, + int32_t messageCode, + const char* pLayerPrefix, + const char* pMessage, + void* pUserData); + + +typedef struct VkDebugReportCallbackCreateInfoEXT { + VkStructureType sType; + const void* pNext; + VkDebugReportFlagsEXT flags; + PFN_vkDebugReportCallbackEXT pfnCallback; + void* pUserData; +} VkDebugReportCallbackCreateInfoEXT; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateDebugReportCallbackEXT)(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback); +typedef void (VKAPI_PTR *PFN_vkDestroyDebugReportCallbackEXT)(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator); +typedef void (VKAPI_PTR *PFN_vkDebugReportMessageEXT)(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDebugReportCallbackEXT( + VkInstance instance, + const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDebugReportCallbackEXT* pCallback); + +VKAPI_ATTR void VKAPI_CALL vkDestroyDebugReportCallbackEXT( + VkInstance instance, + VkDebugReportCallbackEXT callback, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR void VKAPI_CALL vkDebugReportMessageEXT( + VkInstance instance, + VkDebugReportFlagsEXT flags, + VkDebugReportObjectTypeEXT objectType, + uint64_t object, + size_t location, + int32_t messageCode, + const char* pLayerPrefix, + const char* pMessage); +#endif + +#ifdef __cplusplus +} +#endif + +#endif