diff options
author | dan sinclair <dj2@everburning.com> | 2019-04-17 08:15:35 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-17 08:15:35 -0400 |
commit | 5b339a50227541ae7f52aaaf911132637e3f46f9 (patch) | |
tree | 9a5d3e74e25f6a93fcd3f2cf27f60b00b06c9d3a /docs | |
parent | 3ba84017a953c88c9951f8b63a2a506ca6fd0765 (diff) | |
download | amber-5b339a50227541ae7f52aaaf911132637e3f46f9.tar.gz |
Scripting document cleanups (#478)
This CL does some cleanups of the markup in the scripting documentation.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/amber_script.md | 487 | ||||
-rw-r--r-- | docs/vk_script.md | 566 |
2 files changed, 528 insertions, 525 deletions
diff --git a/docs/amber_script.md b/docs/amber_script.md index c298fed..3cc4c19 100644 --- a/docs/amber_script.md +++ b/docs/amber_script.md @@ -40,13 +40,13 @@ with `VariablePointerFeatures.variablePointers` and ### Shaders #### Shader Type - * vertex - * fragment - * geometry - * tessellation\_evaluation - * tessellation\_control - * compute - * multi + * `vertex` + * `fragment` + * `geometry` + * `tessellation_evaluation` + * `tessellation_control` + * `compute` + * `multi` The compute pipeline can only contain compute shaders. The graphics pipeline can not contain compute shaders, and must contain a vertex shader and a fragment @@ -60,21 +60,21 @@ Note, `SPIRV-ASM` and `SPIRV-HEX` can also be used with each of the other shader types, but in that case must only provide a single shader type in the module. #### Shader Format - * GLSL (with glslang) - * HLSL (with dxc or glslang if dxc disabled) -- future - * SPIRV-ASM (with spirv-as) - * SPIRV-HEX (decoded straight to spv) - * OPENCL-C (with clspv) --- potentially? -- future + * `GLSL` (with glslang) + * `HLSL` (with dxc or glslang if dxc disabled) -- future + * `SPIRV-ASM` (with spirv-as) + * `SPIRV-HEX` (decoded straight to spv) + * `OPENCL-C` (with clspv) --- potentially? -- future ``` # Creates a passthrough vertex shader. The shader passes the vec4 at input # location 0 through to the `gl_Position`. -SHADER vertex <shader_name> PASSTHROUGH +SHADER vertex {shader_name} PASSTHROUGH # Creates a shader of |shader_type| with the given |shader_name|. The shader # will be of |shader_format|. The shader should then be inlined before the # |END| tag. -SHADER <shader_type> <shader_name> <shader_format> +SHADER {shader_type} {shader_name} {shader_format} ... END ``` @@ -85,85 +85,80 @@ An AmberScript buffer represents a set of contiguous bits. This can be used for either image buffers or, what the target API would refer to as a buffer. #### Data Types - * int8 - * int16 - * int32 - * int64 - * uint8 - * uint16 - * uint32 - * uint64 - * float - * double - * vec[2,3,4]\<type> - * mat[2,3,4]x[2,3,4]\<type> -- useful? + * `int8` + * `int16` + * `int32` + * `int64` + * `uint8` + * `uint16` + * `uint32` + * `uint64` + * `float` + * `double` + * vec[2,3,4]{type} + * mat[2,3,4]x[2,3,4]{type} * Any of the `Image Formats` listed below. Sized arrays and structures are not currently representable. ``` # Filling the buffer with a given set of data. The values must be -# of <type> data. The data can be provided as the type or as a hex value. -BUFFER <name> DATA_TYPE <type> DATA -<value>+ +# of |type| data. The data can be provided as the type or as a hex value. +BUFFER {name} DATA_TYPE {type} DATA +_value_+ END # Defines a buffer which is filled with data as specified by the `initializer`. -BUFFER <name> DATA_TYPE <type> SIZE <size_in_items> <initializer> +BUFFER {name} DATA_TYPE {type} SIZE _size_in_items_ {initializer} # Creates a buffer which will store the given `FORMAT` of data. These # buffers are used as image and depth buffers in the `PIPELINE` commands. # The buffer will be sized based on the `RENDER_SIZE` of the `PIPELINE`. -BUFFER <name> FORMAT <format_string> +BUFFER {name} FORMAT {format_string} ``` #### Buffer Initializers ``` # Fill the buffer with a single value. -FILL <value> +FILL _value_ -# Fill the buffer with an increasing value from \<start> increasing by \<inc>. -# Floating point data uses floating point addition to generate increasting +# Fill the buffer with an increasing value from |start| increasing by |inc|. +# Floating point data uses floating point addition to generate increasing # values. Likewise, integer data uses integer addition to generate increasing # values. -SERIES_FROM <start> INC_BY <inc> +SERIES_FROM _start_ INC_BY _inc_ ``` #### Buffer Copy -The COPY command copy all data, values and memory from <buffer_from> to -<buffer_to>. - ``` -COPY <buffer_from> TO <buffer_to> +# Copies all data, values and memory from |buffer_from| to |buffer_to|. +# Both buffers must be declared, and of the same data type. +# Buffers used as copy destination can be used only as copy destination, and as +# argument to an EXPECT command. +COPY {buffer_from} TO {buffer_to} ``` -Both buffers must be declared, and of the same data type. - -Buffers used as copy destination can be used only as copy destination, and as -argument to an EXPECT command. - ### Pipelines #### Pipeline type - * compute - * graphics + * `compute` + * `graphics` ``` # The PIPELINE command creates a pipeline. This can be either compute or # graphics. Shaders are attached to the pipeline at pipeline creation time. -PIPELINE <pipeline_type> <pipeline_name> +PIPELINE {pipeline_type} {pipeline_name} ... END # Create a pipeline and inherit from a previously declared pipeline. -DERIVE_PIPELINE <<pipeline_name> FROM <parent_pipeline> +DERIVE_PIPELINE {pipeline_name} FROM {parent_pipeline} ... END ``` - ### Pipeline Content The following commands are all specified within the `PIPELINE` command. @@ -171,23 +166,23 @@ The following commands are all specified within the `PIPELINE` command. # Attach the shader provided by |name_of_shader| to the pipeline and set # the entry point to be |name|. The provided shader for ATTACH must _not_ be # a 'multi' shader. - ATTACH <name_of_shader> ENTRY_POINT <name> + ATTACH {name_of_shader} ENTRY_POINT {name} # Attach the shader provided by |name_of_shader| to the pipeline and set # the entry point to be 'main'. The provided shader for ATTACH must _not_ be # a 'multi' shader. - ATTACH <name_of_shader> + ATTACH {name_of_shader} # Attach a 'multi' shader to the pipeline of |shader_type| and use the entry # point with |name|. The provided shader _must_ be a 'multi' shader. - ATTACH <name_of_multi_shader> TYPE <shader_type> ENTRY_POINT <name> + ATTACH {name_of_multi_shader} TYPE {shader_type} ENTRY_POINT {name} ``` ``` # Set the SPIRV-Tools optimization passes to use for a given shader. The # default is to run no optimization passes. - SHADER_OPTIMIZATION <shader_name> - <optimization_name>+ + SHADER_OPTIMIZATION {shader_name} + {optimization_name}+ END ``` @@ -200,9 +195,9 @@ The following commands are all specified within the `PIPELINE` command. ### Pipeline Buffers #### Buffer Types - * push\_constant - * uniform - * storage + * `push_constant` + * `uniform` + * `storage` TODO(dsinclair): Sync the BufferTypes with the list of Vulkan Descriptor types. @@ -214,43 +209,43 @@ attachment content, depth/stencil content, uniform buffers, etc. # The provided buffer must be a `FORMAT` buffer. If no color attachments are # provided a single attachment with format `B8G8R8A8_UNORM` will be created # for graphics pipelines. - BIND BUFFER <buffer_name> AS color LOCATION <idx> + BIND BUFFER {buffer_name} AS color LOCATION _idx_ # Attach |buffer_name| as the depth/stencil buffer. The provided buffer must # be a `FORMAT` buffer. If no depth/stencil buffer is specified a default # buffer of format `D32_SFLOAT_S8_UINT` will be created for graphics # pipelines. - BIND BUFFER <buffer_name> AS depth_stencil + BIND BUFFER {buffer_name} AS depth_stencil # Bind the buffer of the given |buffer_type| at the given descriptor set # and binding. The buffer will use a start index of 0. - BIND BUFFER <buffer_name> AS <buffer_type> DESCRIPTOR_SET <id> \ - BINDING <id> + BIND BUFFER {buffer_name} AS {buffer_type} DESCRIPTOR_SET _id_ \ + BINDING _id_ # Bind the sampler at the given descriptor set and binding. - BIND SAMPLER <sampler_name> DESCRIPTOR_SET <id> BINDING <id> + BIND SAMPLER {sampler_name} DESCRIPTOR_SET _id_ BINDING _id_ ``` ``` # Set |buffer_name| as the vertex data at location |val|. - VERTEX_DATA <buffer_name> LOCATION <val> + VERTEX_DATA {buffer_name} LOCATION _val_ # Set |buffer_name| as the index data to use for `INDEXED` draw commands. - INDEX_DATA <buffer_name> + INDEX_DATA {buffer_name} ``` ##### Topologies - * point\_list - * line\_list - * line\_list\_with\_adjacency - * line\_strip - * line\_strip\_with\_adjacency - * triangle\_list - * triangle\_list\_with\_adjacency - * triangle\_strip - * triangle\_strip\_with\_adjacency - * triangle\_fan - * patch\_list + * `point_list` + * `line_list` + * `line_list_with_adjacency` + * `line_strip` + * `line_strip_with_adjacency` + * `triangle_list` + * `triangle_list_with_adjacency` + * `triangle_strip` + * `triangle_strip_with_adjacency` + * `triangle_fan` + * `patch_list` ### Run a pipeline. @@ -269,55 +264,62 @@ vertex buffer minus the `START_IDX`. # Run the given |pipeline_name| which must be a `compute` pipeline. The # pipeline will be run with the given number of workgroups in the |x|, |y|, |z| # dimensions. Each of the x, y and z values must be a uint32. -RUN <pipeline_name> <x> <y> <z> +RUN {pipeline_name} _x_ _y_ _z_ # Run the given |pipeline_name| which must be a `graphics` pipeline. The # rectangle at |x|, |y|, |width|x|height| will be rendered. -RUN <pipeline_name> \ - DRAW_RECT POS <x_in_pixels> <y_in_pixels> \ - SIZE <width_in_pixels> <height_in_pixels> +RUN {pipeline_name} \ + DRAW_RECT POS _x_in_pixels_ _y_in_pixels_ \ + SIZE _width_in_pixels_ _height_in_pixels_ +``` +``` # Run the |pipeline_name| which must be a `graphics` pipeline. The vertex # data must be attached to the pipeline. A start index of 0 will be used # and a count of the number of elements in the vertex buffer. -RUN <pipeline_name> DRAW_ARRAY AS <topology> +RUN {pipeline_name} DRAW_ARRAY AS {topology} + # Run the |pipeline_name| which must be a `graphics` pipeline. The vertex # data must be attached to the pipeline. A start index of |value| will be used # and a count of the number of items from |value| to the end of the vertex # buffer. -RUN <pipeline_name> DRAW_ARRAY AS <topology> START_IDX <value> +RUN {pipeline_name} DRAW_ARRAY AS {topology} START_IDX _value_ + # Run the |pipeline_name| which must be a `graphics` pipeline. The vertex # data must be attached to the pipeline. A start index of |value| will be used # and a count |count_value| will be used. -RUN <pipeline_name> DRAW_ARRAY AS <topology> START_IDX <value> \ - COUNT <count_value> +RUN {pipeline_name} DRAW_ARRAY AS {topology} START_IDX _value_ \ + COUNT _count_value_ +``` +``` # Run the |pipeline_name| which must be a `graphics` pipeline. The vertex # data and index data must be attached to the pipeline. The vertices will be # drawn using the given |topology|. A start index of 0 will be used and the # count will be determined by the size of the index data buffer. -RUN <pipeline_name> DRAW_ARRAY INDEXED AS <topology> +RUN {pipeline_name} DRAW_ARRAY INDEXED AS {topology} + # Run the |pipeline_name| which must be a `graphics` pipeline. The vertex # data and index data must be attached to the pipeline. The vertices will be # drawn using the given |topology|. A start index of |value| will be used and # the count will be determined by the size of the index data buffer. -RUN <pipeline_name> DRAW_ARRAY INDEXED AS <topology> START_IDX <value> +RUN {pipeline_name} DRAW_ARRAY INDEXED AS {topology} START_IDX _value_ + # Run the |pipeline_name| which must be a `graphics` pipeline. The vertex # data and index data must be attached to the pipeline. The vertices will be # drawn using the given |topology|. A start index of |value| will be used and # the count of |count_value| items will be processed. -RUN <pipeline_name> DRAW_ARRAY INDEXED AS <topology> \ - START_IDX <value> COUNT <count_value> +RUN {pipeline_name} DRAW_ARRAY INDEXED AS {topology} \ + START_IDX _value_ COUNT _count_value_ ``` ### Repeating commands -It is sometimes useful to run a given draw command multiple times. This can be -to detect deterministic rendering or other features. - ``` -REPEAT <count> -<command>+ +# It is sometimes useful to run a given draw command multiple times. This can be +# to detect deterministic rendering or other features. +REPEAT {count} +{command}+ END ``` @@ -329,55 +331,56 @@ The commands which can be used inside a `REPEAT` block are: * `RUN` ### Commands + ``` # Sets the clear color to use for |pipeline| which must be a `graphics` # pipeline. The colors are integers from 0 - 255. -CLEAR_COLOR <pipeline> <r (0 - 255)> <g (0 - 255)> <b (0 - 255)> <a (0 - 255)> +CLEAR_COLOR {pipeline} _r (0 - 255)_ _g (0 - 255)_ _b (0 - 255)_ _a (0 - 255)_ # Instructs the |pipeline| which must be a `graphics` pipeline to execute the # clear command. -CLEAR <pipeline> +CLEAR {pipeline} ``` ### Expectations #### Comparators - * EQ - * NE - * LT - * LE - * GT - * GE - * EQ\_RGB - * EQ\_RGBA - * EQ\_BUFFER + * `EQ` + * `NE` + * `LT` + * `LE` + * `GT` + * `GE` + * `EQ_RGB` + * `EQ_RGBA` + * `EQ_BUFFER` ``` # Checks that |buffer_name| at |x| has the given |value|s when compared # with the given |comparator|. -EXPECT <buffer_name> IDX <x> <comparator> <value>+ +EXPECT {buffer_name} IDX _x_ {comparator} _value_+ # Checks that |buffer_name| at |x| has values within |tolerance| of |value| # when compared with the given |comparator|. The |tolerance| can be specified # as 1-4 float values separated by spaces. -EXPECT <buffer_name> IDX <x> TOLERANCE \ - <tolerance>{1,4} <comparator> <value>+ +EXPECT {buffer_name} IDX _x_ TOLERANCE \ + _tolerance_{1,4} {comparator} _value_+ # Checks that |buffer_name| at |x|, |y| for |width|x|height| pixels has the # given |r|, |g|, |b| values. Each r, g, b value is an integer from 0-255. -EXPECT <buffer_name> IDX <x_in_pixels> <y_in_pixels> \ - SIZE <width_in_pixels> <height_in_pixels> \ - EQ_RGB <r (0 - 255)> <g (0 - 255)> <b (0 - 255)> +EXPECT {buffer_name} IDX _x_in_pixels_ _y_in_pixels_ \ + SIZE _width_in_pixels_ _height_in_pixels_ \ + EQ_RGB _r (0 - 255)_ _g (0 - 255)_ _b (0 - 255)_ # Checks that |buffer_name| at |x|, |y| for |width|x|height| pixels has the # given |r|, |g|, |b|, |a| values. Each r, g, b, a value is an integer # from 0-255. -EXPECT <buffer_name> IDX <x_in_pixels> <y_in_pixels> \ - SIZE <width_in_pixels> <height_in_pixels> \ - EQ_RGBA <r (0 - 255)> <g (0 - 255)> <b (0 - 255)> <a (0 - 255)> +EXPECT {buffer_name} IDX _x_in_pixels_ _y_in_pixels_ \ + SIZE _width_in_pixels_ _height_in_pixels_ \ + EQ_RGBA _r (0 - 255)_ _g (0 - 255)_ _b (0 - 255)_ _a (0 - 255)_ # Checks that |buffer_1| contents are equal to those of |buffer_2| -EXPECT <buffer_1> EQ_BUFFER <buffer_2> +EXPECT {buffer_1} EQ_BUFFER {buffer_2} ``` ## Examples @@ -595,132 +598,132 @@ RUN kGraphicsPipeline DRAW_ARRAY AS triangle_list START_IDX 0 COUNT 24 ``` ### Image Formats - * A1R5G5B5_UNORM_PACK16 - * A2B10G10R10_SINT_PACK32 - * A2B10G10R10_SNORM_PACK32 - * A2B10G10R10_SSCALED_PACK32 - * A2B10G10R10_UINT_PACK32 - * A2B10G10R10_UNORM_PACK32 - * A2B10G10R10_USCALED_PACK32 - * A2R10G10B10_SINT_PACK32 - * A2R10G10B10_SNORM_PACK32 - * A2R10G10B10_SSCALED_PACK32 - * A2R10G10B10_UINT_PACK32 - * A2R10G10B10_UNORM_PACK32 - * A2R10G10B10_USCALED_PACK32 - * A8B8G8R8_SINT_PACK32 - * A8B8G8R8_SNORM_PACK32 - * A8B8G8R8_SRGB_PACK32 - * A8B8G8R8_SSCALED_PACK32 - * A8B8G8R8_UINT_PACK32 - * A8B8G8R8_UNORM_PACK32 - * A8B8G8R8_USCALED_PACK32 - * B10G11R11_UFLOAT_PACK32 - * B4G4R4A4_UNORM_PACK16 - * B5G5R5A1_UNORM_PACK16 - * B5G6R5_UNORM_PACK16 - * B8G8R8A8_SINT - * B8G8R8A8_SNORM - * B8G8R8A8_SRGB - * B8G8R8A8_SSCALED - * B8G8R8A8_UINT - * B8G8R8A8_UNORM - * B8G8R8A8_USCALED - * B8G8R8_SINT - * B8G8R8_SNORM - * B8G8R8_SRGB - * B8G8R8_SSCALED - * B8G8R8_UINT - * B8G8R8_UNORM - * B8G8R8_USCALED - * D16_UNORM - * D16_UNORM_S8_UINT - * D24_UNORM_S8_UINT - * D32_SFLOAT - * D32_SFLOAT_S8_UINT - * R16G16B16A16_SFLOAT - * R16G16B16A16_SINT - * R16G16B16A16_SNORM - * R16G16B16A16_SSCALED - * R16G16B16A16_UINT - * R16G16B16A16_UNORM - * R16G16B16A16_USCALED - * R16G16B16_SFLOAT - * R16G16B16_SINT - * R16G16B16_SNORM - * R16G16B16_SSCALED - * R16G16B16_UINT - * R16G16B16_UNORM - * R16G16B16_USCALED - * R16G16_SFLOAT - * R16G16_SINT - * R16G16_SNORM - * R16G16_SSCALED - * R16G16_UINT - * R16G16_UNORM - * R16G16_USCALED - * R16_SFLOAT - * R16_SINT - * R16_SNORM - * R16_SSCALED - * R16_UINT - * R16_UNORM - * R16_USCALED - * R32G32B32A32_SFLOAT - * R32G32B32A32_SINT - * R32G32B32A32_UINT - * R32G32B32_SFLOAT - * R32G32B32_SINT - * R32G32B32_UINT - * R32G32_SFLOAT - * R32G32_SINT - * R32G32_UINT - * R32_SFLOAT - * R32_SINT - * R32_UINT - * R4G4B4A4_UNORM_PACK16 - * R4G4_UNORM_PACK8 - * R5G5B5A1_UNORM_PACK16 - * R5G6B5_UNORM_PACK16 - * R64G64B64A64_SFLOAT - * R64G64B64A64_SINT - * R64G64B64A64_UINT - * R64G64B64_SFLOAT - * R64G64B64_SINT - * R64G64B64_UINT - * R64G64_SFLOAT - * R64G64_SINT - * R64G64_UINT - * R64_SFLOAT - * R64_SINT - * R64_UINT - * R8G8B8A8_SINT - * R8G8B8A8_SNORM - * R8G8B8A8_SRGB - * R8G8B8A8_SSCALED - * R8G8B8A8_UINT - * R8G8B8A8_UNORM - * R8G8B8A8_USCALED - * R8G8B8_SINT - * R8G8B8_SNORM - * R8G8B8_SRGB - * R8G8B8_SSCALED - * R8G8B8_UINT - * R8G8B8_UNORM - * R8G8B8_USCALED - * R8G8_SINT - * R8G8_SNORM - * R8G8_SRGB - * R8G8_SSCALED - * R8G8_UINT - * R8G8_UNORM - * R8G8_USCALED - * R8_SINT - * R8_SNORM - * R8_SRGB - * R8_SSCALED - * R8_UINT - * R8_UNORM - * R8_USCALED - * S8_UINT - * X8_D24_UNORM_PACK32 + * `A1R5G5B5_UNORM_PACK16` + * `A2B10G10R10_SINT_PACK32` + * `A2B10G10R10_SNORM_PACK32` + * `A2B10G10R10_SSCALED_PACK32` + * `A2B10G10R10_UINT_PACK32` + * `A2B10G10R10_UNORM_PACK32` + * `A2B10G10R10_USCALED_PACK32` + * `A2R10G10B10_SINT_PACK32` + * `A2R10G10B10_SNORM_PACK32` + * `A2R10G10B10_SSCALED_PACK32` + * `A2R10G10B10_UINT_PACK32` + * `A2R10G10B10_UNORM_PACK32` + * `A2R10G10B10_USCALED_PACK32` + * `A8B8G8R8_SINT_PACK32` + * `A8B8G8R8_SNORM_PACK32` + * `A8B8G8R8_SRGB_PACK32` + * `A8B8G8R8_SSCALED_PACK32` + * `A8B8G8R8_UINT_PACK32` + * `A8B8G8R8_UNORM_PACK32` + * `A8B8G8R8_USCALED_PACK32` + * `B10G11R11_UFLOAT_PACK32` + * `B4G4R4A4_UNORM_PACK16` + * `B5G5R5A1_UNORM_PACK16` + * `B5G6R5_UNORM_PACK16` + * `B8G8R8A8_SINT` + * `B8G8R8A8_SNORM` + * `B8G8R8A8_SRGB` + * `B8G8R8A8_SSCALED` + * `B8G8R8A8_UINT` + * `B8G8R8A8_UNORM` + * `B8G8R8A8_USCALED` + * `B8G8R8_SINT` + * `B8G8R8_SNORM` + * `B8G8R8_SRGB` + * `B8G8R8_SSCALED` + * `B8G8R8_UINT` + * `B8G8R8_UNORM` + * `B8G8R8_USCALED` + * `D16_UNORM` + * `D16_UNORM_S8_UINT` + * `D24_UNORM_S8_UINT` + * `D32_SFLOAT` + * `D32_SFLOAT_S8_UINT` + * `R16G16B16A16_SFLOAT` + * `R16G16B16A16_SINT` + * `R16G16B16A16_SNORM` + * `R16G16B16A16_SSCALED` + * `R16G16B16A16_UINT` + * `R16G16B16A16_UNORM` + * `R16G16B16A16_USCALED` + * `R16G16B16_SFLOAT` + * `R16G16B16_SINT` + * `R16G16B16_SNORM` + * `R16G16B16_SSCALED` + * `R16G16B16_UINT` + * `R16G16B16_UNORM` + * `R16G16B16_USCALED` + * `R16G16_SFLOAT` + * `R16G16_SINT` + * `R16G16_SNORM` + * `R16G16_SSCALED` + * `R16G16_UINT` + * `R16G16_UNORM` + * `R16G16_USCALED` + * `R16_SFLOAT` + * `R16_SINT` + * `R16_SNORM` + * `R16_SSCALED` + * `R16_UINT` + * `R16_UNORM` + * `R16_USCALED` + * `R32G32B32A32_SFLOAT` + * `R32G32B32A32_SINT` + * `R32G32B32A32_UINT` + * `R32G32B32_SFLOAT` + * `R32G32B32_SINT` + * `R32G32B32_UINT` + * `R32G32_SFLOAT` + * `R32G32_SINT` + * `R32G32_UINT` + * `R32_SFLOAT` + * `R32_SINT` + * `R32_UINT` + * `R4G4B4A4_UNORM_PACK16` + * `R4G4_UNORM_PACK8` + * `R5G5B5A1_UNORM_PACK16` + * `R5G6B5_UNORM_PACK16` + * `R64G64B64A64_SFLOAT` + * `R64G64B64A64_SINT` + * `R64G64B64A64_UINT` + * `R64G64B64_SFLOAT` + * `R64G64B64_SINT` + * `R64G64B64_UINT` + * `R64G64_SFLOAT` + * `R64G64_SINT` + * `R64G64_UINT` + * `R64_SFLOAT` + * `R64_SINT` + * `R64_UINT` + * `R8G8B8A8_SINT` + * `R8G8B8A8_SNORM` + * `R8G8B8A8_SRGB` + * `R8G8B8A8_SSCALED` + * `R8G8B8A8_UINT` + * `R8G8B8A8_UNORM` + * `R8G8B8A8_USCALED` + * `R8G8B8_SINT` + * `R8G8B8_SNORM` + * `R8G8B8_SRGB` + * `R8G8B8_SSCALED` + * `R8G8B8_UINT` + * `R8G8B8_UNORM` + * `R8G8B8_USCALED` + * `R8G8_SINT` + * `R8G8_SNORM` + * `R8G8_SRGB` + * `R8G8_SSCALED` + * `R8G8_UINT` + * `R8G8_UNORM` + * `R8G8_USCALED` + * `R8_SINT` + * `R8_SNORM` + * `R8_SRGB` + * `R8_SSCALED` + * `R8_UINT` + * `R8_UNORM` + * `R8_USCALED` + * `S8_UINT` + * `X8_D24_UNORM_PACK32` diff --git a/docs/vk_script.md b/docs/vk_script.md index da0960e..07c75eb 100644 --- a/docs/vk_script.md +++ b/docs/vk_script.md @@ -16,18 +16,18 @@ continuation of the current line. ## Descriptor Sets and Bindings Any command below which accepts a binding will accept either a single integer value which will have a descriptor set of 0 and a binding of the value give or -a string can be provided of the form <set integer>:<binding integer> in which +a string can be provided of the form _set integer_:_binding integer_ in which case the descriptor set value will be `set` and the binding value will be `binding`. # Sections The format is broken down into five main sections: - * require - * shaders - * indices - * vertex data - * test + * `require` + * `shaders` + * `indices` + * `vertex data` + * `test` ## Require The `require` section lists all of the requirements for the testing environment. @@ -70,12 +70,12 @@ default is `GLSL`, SPIRV-ASM is specified as `spirv` and SPIRV-Hex as `spirv hex`. The shaders accepted are: - * compute - * fragment - * geometry - * tessellation control - * tessellation evaulation - * vertex + * `compute` + * `fragment` + * `geometry` + * `tessellation control` + * `tessellation evaulation` + * `vertex` #### Shader examples ``` @@ -331,285 +331,285 @@ relative probe rect rgba (0.0, 0.0, 1.0, 1.0) (1.0, 0.4, 0.5, 0.2) ``` ### Data Types - * int - * uint - * int8_t - * uint8_t - * int16_t - * uint16_t - * int64_t - * uint64_t - * float - * double - * vec - * vec[234] - * dvec - * dvec[234] - * ivec - * ivec[234] - * uvec - * uvec[234] - * i8vec - * i8vec[234] - * u8vec - * u8vec[234] - * i16vec - * i16vec[234] - * u16vec - * u16vec[234] - * i64vec - * i64vec[234] - * u64vec - * u64vec[234] - * mat - * mat[234]x[234] - * dmat - * dmat[234]x[234] + * `int` + * `uint` + * `int8_t` + * `uint8_t` + * `int16_t` + * `uint16_t` + * `int64_t` + * `uint64_t` + * `float` + * `double` + * `vec` + * `vec[234]` + * `dvec` + * `dvec[234]` + * `ivec` + * `ivec[234]` + * `uvec` + * `uvec[234]` + * `i8vec` + * `i8vec[234]` + * `u8vec` + * `u8vec[234]` + * `i16vec` + * `i16vec[234]` + * `u16vec` + * `u16vec[234]` + * `i64vec` + * `i64vec[234]` + * `u64vec` + * `u64vec[234]` + * `mat` + * `mat[234]x[234]` + * `dmat` + * `dmat[234]x[234]` ### Topologies - * PATCH_LIST - * POINT_LIST - * GL_LINE_STRIP_ADJACENCY - * GL_LINE_STRIP - * GL_LINES - * GL_LINES_ADJACENCY - * GL_PATCHES - * GL_POINTS - * GL_TRIANGLE_STRIP - * GL_TRIANGLE_FAN - * GL_TRIANGLES - * GL_TRIANGLES_ADJACENCY - * GL_TRIANGLE_STRIP_ADJACENCY - * LINE_LIST - * LINE_LIST_WITH_ADJACENCY - * LINE_STRIP - * LINE_STRIP_WITH_ADJACENCY - * TRIANGLE_FAN - * TRIANGLE_LIST - * TRIANGLE_LIST_WITH_ADJACENCY - * TRIANGLE_STRIP - * TRIANGLE_STRIP_WITH_ADJACENCY + * `PATCH_LIST` + * `POINT_LIST` + * `GL_LINE_STRIP_ADJACENCY` + * `GL_LINE_STRIP` + * `GL_LINES` + * `GL_LINES_ADJACENCY` + * `GL_PATCHES` + * `GL_POINTS` + * `GL_TRIANGLE_STRIP` + * `GL_TRIANGLE_FAN` + * `GL_TRIANGLES` + * `GL_TRIANGLES_ADJACENCY` + * `GL_TRIANGLE_STRIP_ADJACENCY` + * `LINE_LIST` + * `LINE_LIST_WITH_ADJACENCY` + * `LINE_STRIP` + * `LINE_STRIP_WITH_ADJACENCY` + * `TRIANGLE_FAN` + * `TRIANGLE_LIST` + * `TRIANGLE_LIST_WITH_ADJACENCY` + * `TRIANGLE_STRIP` + * `TRIANGLE_STRIP_WITH_ADJACENCY` ### GL Types - * byte - * ubyte - * short - * ushort - * int - * uint - * half - * float - * double + * `byte` + * `ubyte` + * `short` + * `ushort` + * `int` + * `uint` + * `half` + * `float` + * `double` ### GLSL Types - * int - * uint - * float - * double - * vec - * vec2 - * vec3 - * vec4 - * dvec - * dvec2 - * dvec3 - * dvec4 - * uvec - * uvec2 - * uvec3 - * uvec4 - * ivec - * ivec2 - * ivec3 - * ivec4 + * `int` + * `uint` + * `float` + * `double` + * `vec` + * `vec2` + * `vec3` + * `vec4` + * `dvec` + * `dvec2` + * `dvec3` + * `dvec4` + * `uvec` + * `uvec2` + * `uvec3` + * `uvec4` + * `ivec` + * `ivec2` + * `ivec3` + * `ivec4` ### Available Require Features - * 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 - -### Image Formats - * A1R5G5B5_UNORM_PACK16 - * A2B10G10R10_SINT_PACK32 - * A2B10G10R10_SNORM_PACK32 - * A2B10G10R10_SSCALED_PACK32 - * A2B10G10R10_UINT_PACK32 - * A2B10G10R10_UNORM_PACK32 - * A2B10G10R10_USCALED_PACK32 - * A2R10G10B10_SINT_PACK32 - * A2R10G10B10_SNORM_PACK32 - * A2R10G10B10_SSCALED_PACK32 - * A2R10G10B10_UINT_PACK32 - * A2R10G10B10_UNORM_PACK32 - * A2R10G10B10_USCALED_PACK32 - * A8B8G8R8_SINT_PACK32 - * A8B8G8R8_SNORM_PACK32 - * A8B8G8R8_SRGB_PACK32 - * A8B8G8R8_SSCALED_PACK32 - * A8B8G8R8_UINT_PACK32 - * A8B8G8R8_UNORM_PACK32 - * A8B8G8R8_USCALED_PACK32 - * B10G11R11_UFLOAT_PACK32 - * B4G4R4A4_UNORM_PACK16 - * B5G5R5A1_UNORM_PACK16 - * B5G6R5_UNORM_PACK16 - * B8G8R8A8_SINT - * B8G8R8A8_SNORM - * B8G8R8A8_SRGB - * B8G8R8A8_SSCALED - * B8G8R8A8_UINT - * B8G8R8A8_UNORM - * B8G8R8A8_USCALED - * B8G8R8_SINT - * B8G8R8_SNORM - * B8G8R8_SRGB - * B8G8R8_SSCALED - * B8G8R8_UINT - * B8G8R8_UNORM - * B8G8R8_USCALED - * D16_UNORM - * D16_UNORM_S8_UINT - * D24_UNORM_S8_UINT - * D32_SFLOAT - * D32_SFLOAT_S8_UINT - * R16G16B16A16_SFLOAT - * R16G16B16A16_SINT - * R16G16B16A16_SNORM - * R16G16B16A16_SSCALED - * R16G16B16A16_UINT - * R16G16B16A16_UNORM - * R16G16B16A16_USCALED - * R16G16B16_SFLOAT - * R16G16B16_SINT - * R16G16B16_SNORM - * R16G16B16_SSCALED - * R16G16B16_UINT - * R16G16B16_UNORM - * R16G16B16_USCALED - * R16G16_SFLOAT - * R16G16_SINT - * R16G16_SNORM - * R16G16_SSCALED - * R16G16_UINT - * R16G16_UNORM - * R16G16_USCALED - * R16_SFLOAT - * R16_SINT - * R16_SNORM - * R16_SSCALED - * R16_UINT - * R16_UNORM - * R16_USCALED - * R32G32B32A32_SFLOAT - * R32G32B32A32_SINT - * R32G32B32A32_UINT - * R32G32B32_SFLOAT - * R32G32B32_SINT - * R32G32B32_UINT - * R32G32_SFLOAT - * R32G32_SINT - * R32G32_UINT - * R32_SFLOAT - * R32_SINT - * R32_UINT - * R4G4B4A4_UNORM_PACK16 - * R4G4_UNORM_PACK8 - * R5G5B5A1_UNORM_PACK16 - * R5G6B5_UNORM_PACK16 - * R64G64B64A64_SFLOAT - * R64G64B64A64_SINT - * R64G64B64A64_UINT - * R64G64B64_SFLOAT - * R64G64B64_SINT - * R64G64B64_UINT - * R64G64_SFLOAT - * R64G64_SINT - * R64G64_UINT - * R64_SFLOAT - * R64_SINT - * R64_UINT - * R8G8B8A8_SINT - * R8G8B8A8_SNORM - * R8G8B8A8_SRGB - * R8G8B8A8_SSCALED - * R8G8B8A8_UINT - * R8G8B8A8_UNORM - * R8G8B8A8_USCALED - * R8G8B8_SINT - * R8G8B8_SNORM - * R8G8B8_SRGB - * R8G8B8_SSCALED - * R8G8B8_UINT - * R8G8B8_UNORM - * R8G8B8_USCALED - * R8G8_SINT - * R8G8_SNORM - * R8G8_SRGB - * R8G8_SSCALED - * R8G8_UINT - * R8G8_UNORM - * R8G8_USCALED - * R8_SINT - * R8_SNORM - * R8_SRGB - * R8_SSCALED - * R8_UINT - * R8_UNORM - * R8_USCALED - * S8_UINT - * X8_D24_UNORM_PACK32 + * `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` +`` +### `Image Formats` + * `A1R5G5B5_UNORM_PACK16` + * `A2B10G10R10_SINT_PACK32` + * `A2B10G10R10_SNORM_PACK32` + * `A2B10G10R10_SSCALED_PACK32` + * `A2B10G10R10_UINT_PACK32` + * `A2B10G10R10_UNORM_PACK32` + * `A2B10G10R10_USCALED_PACK32` + * `A2R10G10B10_SINT_PACK32` + * `A2R10G10B10_SNORM_PACK32` + * `A2R10G10B10_SSCALED_PACK32` + * `A2R10G10B10_UINT_PACK32` + * `A2R10G10B10_UNORM_PACK32` + * `A2R10G10B10_USCALED_PACK32` + * `A8B8G8R8_SINT_PACK32` + * `A8B8G8R8_SNORM_PACK32` + * `A8B8G8R8_SRGB_PACK32` + * `A8B8G8R8_SSCALED_PACK32` + * `A8B8G8R8_UINT_PACK32` + * `A8B8G8R8_UNORM_PACK32` + * `A8B8G8R8_USCALED_PACK32` + * `B10G11R11_UFLOAT_PACK32` + * `B4G4R4A4_UNORM_PACK16` + * `B5G5R5A1_UNORM_PACK16` + * `B5G6R5_UNORM_PACK16` + * `B8G8R8A8_SINT` + * `B8G8R8A8_SNORM` + * `B8G8R8A8_SRGB` + * `B8G8R8A8_SSCALED` + * `B8G8R8A8_UINT` + * `B8G8R8A8_UNORM` + * `B8G8R8A8_USCALED` + * `B8G8R8_SINT` + * `B8G8R8_SNORM` + * `B8G8R8_SRGB` + * `B8G8R8_SSCALED` + * `B8G8R8_UINT` + * `B8G8R8_UNORM` + * `B8G8R8_USCALED` + * `D16_UNORM` + * `D16_UNORM_S8_UINT` + * `D24_UNORM_S8_UINT` + * `D32_SFLOAT` + * `D32_SFLOAT_S8_UINT` + * `R16G16B16A16_SFLOAT` + * `R16G16B16A16_SINT` + * `R16G16B16A16_SNORM` + * `R16G16B16A16_SSCALED` + * `R16G16B16A16_UINT` + * `R16G16B16A16_UNORM` + * `R16G16B16A16_USCALED` + * `R16G16B16_SFLOAT` + * `R16G16B16_SINT` + * `R16G16B16_SNORM` + * `R16G16B16_SSCALED` + * `R16G16B16_UINT` + * `R16G16B16_UNORM` + * `R16G16B16_USCALED` + * `R16G16_SFLOAT` + * `R16G16_SINT` + * `R16G16_SNORM` + * `R16G16_SSCALED` + * `R16G16_UINT` + * `R16G16_UNORM` + * `R16G16_USCALED` + * `R16_SFLOAT` + * `R16_SINT` + * `R16_SNORM` + * `R16_SSCALED` + * `R16_UINT` + * `R16_UNORM` + * `R16_USCALED` + * `R32G32B32A32_SFLOAT` + * `R32G32B32A32_SINT` + * `R32G32B32A32_UINT` + * `R32G32B32_SFLOAT` + * `R32G32B32_SINT` + * `R32G32B32_UINT` + * `R32G32_SFLOAT` + * `R32G32_SINT` + * `R32G32_UINT` + * `R32_SFLOAT` + * `R32_SINT` + * `R32_UINT` + * `R4G4B4A4_UNORM_PACK16` + * `R4G4_UNORM_PACK8` + * `R5G5B5A1_UNORM_PACK16` + * `R5G6B5_UNORM_PACK16` + * `R64G64B64A64_SFLOAT` + * `R64G64B64A64_SINT` + * `R64G64B64A64_UINT` + * `R64G64B64_SFLOAT` + * `R64G64B64_SINT` + * `R64G64B64_UINT` + * `R64G64_SFLOAT` + * `R64G64_SINT` + * `R64G64_UINT` + * `R64_SFLOAT` + * `R64_SINT` + * `R64_UINT` + * `R8G8B8A8_SINT` + * `R8G8B8A8_SNORM` + * `R8G8B8A8_SRGB` + * `R8G8B8A8_SSCALED` + * `R8G8B8A8_UINT` + * `R8G8B8A8_UNORM` + * `R8G8B8A8_USCALED` + * `R8G8B8_SINT` + * `R8G8B8_SNORM` + * `R8G8B8_SRGB` + * `R8G8B8_SSCALED` + * `R8G8B8_UINT` + * `R8G8B8_UNORM` + * `R8G8B8_USCALED` + * `R8G8_SINT` + * `R8G8_SNORM` + * `R8G8_SRGB` + * `R8G8_SSCALED` + * `R8G8_UINT` + * `R8G8_UNORM` + * `R8G8_USCALED` + * `R8_SINT` + * `R8_SNORM` + * `R8_SRGB` + * `R8_SSCALED` + * `R8_UINT` + * `R8_UNORM` + * `R8_USCALED` + * `S8_UINT` + * `X8_D24_UNORM_PACK32` 1- https://github.com/Igalia/vkrunner/blob/d817f8b186cccebed89471580a685dc80a330946/README.md |