Rework API graphique Vulkan - EnTT pour ECS + Chargement modèle 3D assimp + SDL3 pour events input et fenetre + mesh texture camera transform ok + attention tous les assets nouveaus ne sont pas commités et il y a du code test en dur dans scene addentity + restructuration globale

This commit is contained in:
Tom Ray
2026-03-14 20:24:17 +01:00
parent 7c352bc280
commit 6695d46bcd
672 changed files with 238656 additions and 1821 deletions

Binary file not shown.

View File

@@ -0,0 +1,357 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 6
op: 22
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000008 # FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 16, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 14
op: 23
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 16, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td2
id: 22
op: 21
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 16, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td3
id: 30
op: 23
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000104 # VECTOR INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 16, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td4
id: 38
op: 21
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 16, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td5
id: 46
op: 23
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000104 # VECTOR INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 16, signedness: 1 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
all_block_variables:
all_descriptor_bindings:
all_interface_variables:
- &iv0
spirv_id: 10
name: "a"
location: 0
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 16, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 76 # VK_FORMAT_R16_SFLOAT
type_description: *td0
word_offset: { location: 122 }
- &iv1
spirv_id: 18
name: "b"
location: 1
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 16, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 90 # VK_FORMAT_R16G16B16_SFLOAT
type_description: *td1
word_offset: { location: 130 }
- &iv2
spirv_id: 26
name: "c"
location: 2
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 16, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 74 # VK_FORMAT_R16_UINT
type_description: *td2
word_offset: { location: 138 }
- &iv3
spirv_id: 34
name: "d"
location: 3
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 16, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 88 # VK_FORMAT_R16G16B16_UINT
type_description: *td3
word_offset: { location: 146 }
- &iv4
spirv_id: 42
name: "e"
location: 4
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 16, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 75 # VK_FORMAT_R16_SINT
type_description: *td4
word_offset: { location: 154 }
- &iv5
spirv_id: 50
name: "f"
location: 5
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 16, signedness: 1 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 89 # VK_FORMAT_R16G16B16_SINT
type_description: *td5
word_offset: { location: 162 }
- &iv6
spirv_id: 8
name: "_a"
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 16, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 76 # VK_FORMAT_R16_SFLOAT
type_description: *td0
word_offset: { location: 118 }
- &iv7
spirv_id: 16
name: "_b"
location: 1
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 16, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 90 # VK_FORMAT_R16G16B16_SFLOAT
type_description: *td1
word_offset: { location: 126 }
- &iv8
spirv_id: 24
name: "_c"
location: 2
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 16, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 74 # VK_FORMAT_R16_UINT
type_description: *td2
word_offset: { location: 134 }
- &iv9
spirv_id: 32
name: "_d"
location: 3
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 16, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 88 # VK_FORMAT_R16G16B16_UINT
type_description: *td3
word_offset: { location: 142 }
- &iv10
spirv_id: 40
name: "_e"
location: 4
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 16, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 75 # VK_FORMAT_R16_SINT
type_description: *td4
word_offset: { location: 150 }
- &iv11
spirv_id: 48
name: "_f"
location: 5
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 16, signedness: 1 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 89 # VK_FORMAT_R16G16B16_SINT
type_description: *td5
word_offset: { location: 158 }
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 0 # Vertex
shader_stage: 0x00000001 # VS
descriptor_binding_count: 0
descriptor_bindings:
descriptor_set_count: 0
descriptor_sets:
input_variable_count: 6,
input_variables:
- *iv0 # "a"
- *iv1 # "b"
- *iv2 # "c"
- *iv3 # "d"
- *iv4 # "e"
- *iv5 # "f"
output_variable_count: 6,
output_variables:
- *iv6 # "_a"
- *iv7 # "_b"
- *iv8 # "_c"
- *iv9 # "_d"
- *iv10 # "_e"
- *iv11 # "_f"
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,27 @@
#version 450
#extension GL_EXT_shader_explicit_arithmetic_types_int16 : require
#extension GL_EXT_shader_explicit_arithmetic_types_float16 : require
layout(location = 0) in float16_t a;
layout(location = 1) in f16vec3 b;
layout(location = 2) in uint16_t c;
layout(location = 3) in u16vec3 d;
layout(location = 4) in int16_t e;
layout(location = 5) in i16vec3 f;
layout(location = 0) out float16_t _a;
layout(location = 1) out f16vec3 _b;
layout(location = 2) out uint16_t _c;
layout(location = 3) out u16vec3 _d;
layout(location = 4) out int16_t _e;
layout(location = 5) out i16vec3 _f;
void main()
{
_a = a * float16_t(2.0);
_b = b * f16vec3(2.0);
_c = c * 2us;
_d = d * u16vec3(2);
_e = e * 2s;
_f = f * i16vec3(2);
}

View File

@@ -0,0 +1,152 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 7
op: 21
type_name:
struct_member_name:
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 4
op: 29
type_name:
struct_member_name:
storage_class: 0 # UniformConstant
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [0,], stride: 4 }
member_count: 0
members:
- &td2
id: 3
op: 30
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td0
- *td1
all_block_variables:
- &bv0
name:
offset: 0
absolute_offset: 0
size: 4
padded_size: 4
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td0
- &bv1
name:
offset: 4
absolute_offset: 4
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td1
- &bv2
name:
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 2
members:
- *bv0
- *bv1
type_description: *td2
all_descriptor_bindings:
- &db0
spirv_id: 2
name:
binding: 0
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 7 # VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
resource_type: 8 # UAV
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
block: *bv2 #
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td2
word_offset: { binding: 43, set: 39 }
all_interface_variables:
module:
generator: 7 # Khronos SPIR-V Tools Assembler
entry_point_name: "main"
entry_point_id: 1
source_language: 0 # Unknown
source_language_version: 0
spirv_execution_model: 4 # Fragment
shader_stage: 0x00000010 # PS
descriptor_binding_count: 1
descriptor_bindings:
- *db0 #
descriptor_set_count: 1
descriptor_sets:
- set: 0
binding_count: 1
bindings:
- *db0 #
input_variable_count: 0,
input_variables:
output_variable_count: 0,
output_variables:
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,13 @@
uniform uint* data_ptr; // creates a ptr chain access
struct Data{
int x;
}
uniform Data* data_struct;
[numthreads(1,1,1)]
void computeMain()
{
data_ptr[0] = 1;
data_struct->x = 1;
}

View File

@@ -0,0 +1,204 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 4
op: 32
type_name:
struct_member_name:
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x40000004 # REF INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 19
op: 21
type_name:
struct_member_name:
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td2
id: 5
op: 32
type_name:
struct_member_name:
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td1
- &td3
id: 6
op: 30
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td0
- *td2
- &td4
id: 19
op: 21
type_name:
struct_member_name:
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
all_block_variables:
- &bv0
name:
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td0
- &bv1
name:
offset: 0
absolute_offset: 0
size: 4
padded_size: 16
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td4
- &bv2
name:
offset: 8
absolute_offset: 8
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv1
type_description: *td2
- &bv3
name:
offset: 0
absolute_offset: 0
size: 16
padded_size: 16
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 2
members:
- *bv0
- *bv2
type_description: *td3
all_descriptor_bindings:
- &db0
spirv_id: 3
name:
binding: 0
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 6 # VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
resource_type: 2 # CBV
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
block: *bv3 #
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td3
word_offset: { binding: 86, set: 90 }
all_interface_variables:
module:
generator: 7 # Khronos SPIR-V Tools Assembler
entry_point_name: "main"
entry_point_id: 2
source_language: 0 # Unknown
source_language_version: 0
spirv_execution_model: 5 # GLCompute
shader_stage: 0x00000020 # CS
descriptor_binding_count: 1
descriptor_bindings:
- *db0 #
descriptor_set_count: 1
descriptor_sets:
- set: 0
binding_count: 1
bindings:
- *db0 #
input_variable_count: 0,
input_variables:
output_variable_count: 0,
output_variables:
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,73 @@
# Usage:
# python tests/build_all_shaders.py
import argparse
import os
import pathlib
import shutil
import subprocess
import sys
def my_which(cmd):
if sys.hexversion >= 0x03030000:
return shutil.which(cmd)
else:
try:
subprocess.check_output([cmd], stderr=subprocess.STDOUT)
return cmd
except subprocess.CalledProcessError:
return cmd # that's fine, it exists though
except OSError:
return None
shaders = [
{'source':"glsl/built_in_format.glsl", 'entry':"main", 'stage':'vert'},
{'source':"glsl/buffer_pointer.glsl", 'entry':"main", 'stage':'frag', 'target-env':'vulkan1.3'},
{'source':"glsl/input_attachment.glsl", 'entry':"main", 'stage':'frag'},
{'source':"glsl/texel_buffer.glsl", 'entry':"main", 'stage':'vert'},
{'source':"glsl/storage_buffer.glsl", 'entry':"main", 'stage':'comp', 'target-env':'vulkan1.1'},
{'source':"glsl/runtime_array_of_array_of_struct.glsl", 'entry':"main", 'stage':'comp'},
{'source':"hlsl/append_consume.hlsl", 'entry':"main", 'profile':'ps_6_0', 'stage':'frag'},
{'source':"hlsl/binding_array.hlsl", 'entry':"main", 'profile':'ps_6_0', 'stage':'frag'},
{'source':"hlsl/binding_types.hlsl", 'entry':"main", 'profile':'ps_6_0', 'stage':'frag'},
{'source':"hlsl/cbuffer.hlsl", 'entry':"main", 'profile':'vs_6_0', 'stage':'vert'},
{'source':"hlsl/counter_buffers.hlsl", 'entry':"main", 'profile':'ps_6_0', 'stage':'frag'},
{'source':"hlsl/semantics.hlsl", 'entry':"main", 'profile':'ps_6_0', 'stage':'frag'},
{'source':"hlsl/user_type.hlsl", 'entry':"main", 'profile':'ps_6_0', 'stage':'frag'},
]
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Compile test shaders")
parser.add_argument("--glslc", help="path to glslc compiler", default=my_which("glslc"))
parser.add_argument("--dxc", help="path to dxc compiler", default=my_which("dxc"))
parser.add_argument("--verbose", "-v", help="enable verbose output", action='store_true')
args = parser.parse_args()
test_dir = pathlib.Path(__file__).parent.resolve()
root_dir = test_dir.parent.resolve()
if not args.dxc:
print("WARNING: dxc not found in PATH; HLSL shaders will be compiled with glslc.")
if not args.glslc:
print("WARNING: glslc not found in PATH. This is a bad sign.")
for shader in shaders:
src_path = os.path.join(test_dir, shader['source'])
base, ext = os.path.splitext(src_path)
spv_path = base + ".spv"
if ext.lower() == ".glsl" or (ext.lower() == ".hlsl" and not args.dxc):
compile_cmd_args = [args.glslc, "-g", "-fshader-stage=" + shader['stage'], "-fentry-point=" + shader['entry'], "-o", spv_path, src_path]
if 'target-env' in shader:
compile_cmd_args.append("--target-env=" + shader['target-env'])
elif ext.lower() == ".hlsl":
compile_cmd_args = [args.dxc, "-spirv", "-Zi", "-fspv-reflect", "-O0", "-T", shader['profile'], "-E", shader['entry'], "-Fo", spv_path, src_path]
print("%s -> %s" % (src_path, spv_path))
if args.verbose:
print(" ".join(compile_cmd_args))
try:
compile_cmd_output = subprocess.check_output(compile_cmd_args, stderr = subprocess.STDOUT)
except subprocess.CalledProcessError as error:
print("Compilation failed for %s with error code %d:\n%s" % (src_path, error.returncode, error.output.decode('utf-8')))
print("")

View File

@@ -0,0 +1,72 @@
# Usage:
# Prereq: build spirv-reflect
# Prereq: build shader SPVs
# python tests/build_golden_yaml.py
import argparse
import os
import pathlib
import platform
import subprocess
import sys
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Generate golden YAML from test shader .spv files")
parser.add_argument("--verbose", "-v", help="enable verbose output", action='store_true')
args = parser.parse_args()
print("""\
WARNING: This script regenerates the golden YAML output for all test shaders.
The new YAML will be considered the expected correct output for future test
runs. Before commiting the updated YAML to GitHub, it is therefore critical
to carefully inspect the diffs between the old and new YAML output, to ensure
that all differences can be traced back to intentional changes to either the
reflection code or the test shaders.
""")
test_dir = pathlib.Path(__file__).parent.resolve()
root_dir = test_dir.parent.resolve()
spirv_reflect_exe_paths_windows = [
os.path.join(root_dir, "bin", "Debug", "spirv-reflect.exe"),
os.path.join(root_dir, "bin", "Release", "spirv-reflect.exe"),
]
spirv_reflect_exe_paths_unix = [
os.path.join(root_dir, "bin", "spirv-reflect"),
]
spirv_reflect_exe = None
if platform.system() == "Windows":
for path in spirv_reflect_exe_paths_windows:
if os.path.isfile(path):
spirv_reflect_exe = path
break
else:
for path in spirv_reflect_exe_paths_unix:
if os.path.isfile(path):
spirv_reflect_exe = path
break
if spirv_reflect_exe is None:
exit("spirv-reflect executable not found!")
spv_paths = []
for root, dirs, files in os.walk(test_dir):
for f in files:
base, ext = os.path.splitext(f)
if ext.lower() == ".spv":
spv_paths.append(os.path.normpath(os.path.join(root, f)))
for spv_path in spv_paths:
yaml_path = spv_path + ".yaml"
try:
# TODO Replace hard-coded EXE path with something less brittle.
yaml_cmd_args = [spirv_reflect_exe, "-y", "-v", "1", spv_path]
if args.verbose:
print(" ".join(yaml_cmd_args))
subprocess.run(yaml_cmd_args, stdout=open(yaml_path, "w"))
subprocess.run(yaml_cmd_args)
print("%s -> %s" % (spv_path, yaml_path))
except NameError:
print("spirv-reflect application not found; did you build it first?")
sys.exit()
except subprocess.CalledProcessError as error:
print("YAML generation failed with error code %d:\n%s" % (error.returncode, error.output.decode('utf-8')))

View File

@@ -0,0 +1,198 @@
struct ColorDesc {
float R;
float2 RG;
float3 RGB;
float4 RGBA;
};
cbuffer MyParams : register(b0)
{
float4x4 MvpMatrix;
float4x4 NotUsedNormalMatrix;
float3 Offset;
float ScalarScale;
float2 Vector2ScaleX;
float2 Vector2ScaleY;
float2 Vector2ScaleXY;
float2 Vector2ScaleXXXX;
float2 Vector2ScaleXYXY;
float3 Vector3ScaleX;
float3 Vector3ScaleY;
float3 Vector3ScaleZ;
float3 Vector3ScaleXZ;
float3 Vector3ScaleXYZ;
float3 Vector3ScaleXX;
float3 Vector3ScaleYZX;
float3 Vector3ScaleZZZZ;
float4 Vector4ScaleX;
float4 Vector4ScaleY;
float4 Vector4ScaleZ;
float4 Vector4ScaleW;
float4 Vector4ScaleXY;
float4 Vector4ScaleXZ;
float4 Vector4ScaleYZ;
float4 Vector4ScaleXZW;
float4 Vector4ScaleYZW;
float4 Vector4ScaleXYZW;
float NotUsed1;
float2 NotUsed2;
float3 NotUsed3;
float3 MoreOffset;
float2 NotUsed4;
float3 NotUsed5;
float3 LastOffset;
float3 NotUsed6;
float ScalarArray[4];
float2 Vector2Array[4];
float3 Vector3Array[4];
float4 Vector4Array[4];
float2 Vector2ArrayX[4];
float3 Vector3ArrayX[4];
float4 Vector4ArrayX[4];
float2 NotUsedVectorArray[4];
ColorDesc ColorArray[8][7][6][5][4][3][2];
float ScalarMultiDimArray[8][7][6][5][4][3][2];
float2 Vector2MultiDimArray[8][7][6][5][4][3][2];
float3 Vector3MultiDimArray[8][7][6][5][4][3][2];
float4 Vector4MultiDimArray[8][7][6][5][4][3][2];
float2 Vector2MultiDimArrayX[8][7][6][5][4][3][2];
float3 Vector3MultiDimArrayX[8][7][6][5][4][3][2];
float4 Vector4MultiDimArrayX[8][7][6][5][4][3][2];
float2 NotUsedVector2MultiDimArrayY[8][7][6][5][4][3][2];
float3 NotUsedVector3MultiDimArrayY[8][7][6][5][4][3][2];
float4 NotUsedVector4MultiDimArrayY[8][7][6][5][4][3][2];
float3 Vector3MultiDimArrayZ[8][7][6][5][4][3][2];
float4 Vector4MultiDimArrayZ[8][7][6][5][4][3][2];
float2 Vector2MultiDimArrayXYX[8][7][6][5][4][3][2];
float3 Vector3MultiDimArrayXYX[8][7][6][5][4][3][2];
float4 Vector4MultiDimArrayXYX[8][7][6][5][4][3][2];
}
struct NestedUsedParams {
float NotUsed;
float3 Offset;
float4x4 NotUsedMatrix;
};
struct NestedNotUsedParams {
float NotUsed1;
float2 NotUsed2;
float3 NotUsed3;
};
struct UsedParams {
float3 Position;
float3 NotUsedColor;
float3 Normal;
NestedNotUsedParams NotUsedNested;
NestedUsedParams UsedNested;
float NotUsed1;
ColorDesc ColorArray[4];
};
struct NotUsedParams {
float NotUsed1;
float2 NotUsed2;
float3 NotUsed3;
NestedNotUsedParams NotUsedNested;
};
struct UsedComponents {
float3 ScaleByX;
};
struct Params2 {
float4 PostTransformOffset;
float NotUsedScale;
float3 Mask;
UsedParams Used;
NotUsedParams NotUsed;
UsedComponents Components;
};
ConstantBuffer<Params2> MyParams2 : register(b1);
float4 main(float3 Position : Position) : SV_POSITION
{
float4 result = mul(MvpMatrix, float4(Position + Offset, 1)) + MyParams2.PostTransformOffset;
//float4 result = (float4)1;
result.x *= ScalarScale;
result.y *= Vector2ScaleX.x;
result.x *= Vector2ScaleY.y;
result.yx *= Vector2ScaleXY.xy;
result.xyzw *= Vector2ScaleXXXX.xxxx;
result.xyzw *= Vector2ScaleXYXY.xyxy;
result.z *= Vector3ScaleX.x;
result.y *= Vector3ScaleY.y;
result.x *= Vector3ScaleZ.z;
result.xy *= Vector3ScaleXZ.xz;
result.xyz *= Vector3ScaleXYZ.xyz;
result.xy *= Vector3ScaleXX.xx;
result.xyz *= Vector3ScaleYZX.yzx;
result.xyzw *= Vector3ScaleZZZZ.zzzz;
result.x *= Vector4ScaleX.w;
result.y *= Vector4ScaleY.y;
result.z *= Vector4ScaleZ.z;
result.w *= Vector4ScaleW.x;
result.xy *= Vector4ScaleXY.xy;
result.xz *= Vector4ScaleXZ.xz;
result.xy *= Vector4ScaleYZ.yz;
result.xyz *= Vector4ScaleXZW.xzw;
result.yzw *= Vector4ScaleYZW.yzw;
result.xyzw *= Vector4ScaleXYZW.xyzw;
result *= ScalarArray[0];
result.xy *= Vector2Array[1];
result.xyz *= Vector3Array[2];
result.xyzw *= Vector4Array[3];
result.x *= Vector2ArrayX[1].x;
result.x *= Vector3ArrayX[2].x;
result.x *= Vector4ArrayX[3].x;
result.xyz *= ColorArray[7][6][5][4][3][2][1].RGB;
result.x *= ScalarMultiDimArray[7][6][5][4][3][2][1];
result.xy *= Vector2MultiDimArray[7][6][5][4][3][2][1];
result.xyz *= Vector3MultiDimArray[7][6][5][4][3][2][1];
result.xyzw *= Vector4MultiDimArray[7][6][5][4][3][2][1];
result.xy *= Vector2MultiDimArrayX[7][6][5][4][3][2][1].x;
result.xyz *= Vector3MultiDimArrayX[7][6][5][4][3][2][1].x;
result.xyzw *= Vector4MultiDimArrayX[7][6][5][4][3][2][1].x;
result.xyz *= Vector3MultiDimArrayZ[7][6][5][4][3][2][1].z;
result.xyzw *= Vector4MultiDimArrayZ[7][6][5][4][3][2][1].z;
result.xyz *= Vector2MultiDimArrayXYX[7][6][5][4][3][2][1].xyx;
result.xyz *= Vector3MultiDimArrayXYX[7][6][5][4][3][2][1].xyx;
result.xyz *= Vector4MultiDimArrayXYX[7][6][5][4][3][2][1].xyx;
result.xyz *= MyParams2.Mask;
result.xyz *= MyParams2.Used.Position;
result.xyz += MyParams2.Used.Normal;
result.xyz += MoreOffset;
result.xyz += LastOffset;
result.xyz += MyParams2.Used.UsedNested.Offset;
result.xyz *= MyParams2.Components.ScaleByX.x;
result.xyzw += MyParams2.Used.ColorArray[3].RGBA;
result.y *= MyParams2.Used.ColorArray[3].RGB.x;
return result;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,22 @@
import os
import sys
import argparse
import subprocess
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='run SPIRV-Database in CI')
# Main reason for passing dir in is so GitHub Actions can group things, otherwise logs get VERY long for a single action
parser.add_argument('--dir', action='store', required=True, type=str, help='path to SPIR-V files')
args = parser.parse_args()
root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
exe_path = os.path.join(root_dir, 'bin/spirv-reflect')
for currentpath, folders, files in os.walk(args.dir):
for file in files:
spirv_file = os.path.join(currentpath, file)
command = f'{exe_path} {spirv_file} -ci'
exit_code = subprocess.call(command.split())
if exit_code != 0:
print(f'ERROR for {spirv_file}')
sys.exit(1)

View File

@@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.16)
project(noncopyable)
list(APPEND SPIRV_REFLECT_FILES
${CMAKE_CURRENT_SOURCE_DIR}/../../../spirv_reflect.h
${CMAKE_CURRENT_SOURCE_DIR}/../../../spirv_reflect.c
)
add_executable(noncopyable ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp ${COMMON_FILES} ${SPIRV_REFLECT_FILES})
target_include_directories(noncopyable PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
set_target_properties(noncopyable PROPERTIES CXX_STANDARD 11)
if(WIN32)
target_compile_definitions(noncopyable PRIVATE _CRT_SECURE_NO_WARNINGS)
set_target_properties(noncopyable PROPERTIES FOLDER "tests")
endif()

View File

@@ -0,0 +1,7 @@
#include "spirv_reflect.h"
int main(int argc, char** argv) {
spv_reflect::ShaderModule shaderModule;
shaderModule = spv_reflect::ShaderModule();
return 0;
}

View File

@@ -0,0 +1,15 @@
#version 450 core
layout(set = 0, binding = 0) buffer buf
{
uint buf_Data[];
};
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main()
{
buf_Data[0] = buf_Data[32];
buf_Data[100] = buf_Data[132];
buf_Data[200] = buf_Data[232];
}

View File

@@ -0,0 +1,117 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 7
op: 29
type_name:
struct_member_name: "buf_Data"
storage_class: 0 # UniformConstant
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [0,], stride: 4 }
member_count: 0
members:
- &td1
id: 8
op: 30
type_name: "buf"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000002 # BUFFER_BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td0
all_block_variables:
- &bv0
name: "buf_Data"
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td0
- &bv1
name: ""
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv0
type_description: *td1
all_descriptor_bindings:
- &db0
spirv_id: 10
name: ""
binding: 0
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 7 # VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
resource_type: 8 # UAV
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
block: *bv1 # ""
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td1
word_offset: { binding: 65, set: 61 }
all_interface_variables:
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 5 # GLCompute
shader_stage: 0x00000020 # CS
descriptor_binding_count: 1
descriptor_bindings:
- *db0 # ""
descriptor_set_count: 1
descriptor_sets:
- set: 0
binding_count: 1
bindings:
- *db0 # ""
input_variable_count: 0,
input_variables:
output_variable_count: 0,
output_variables:
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,13 @@
#version 450 core
layout (points, invocations = 2) in;
layout (line_strip, max_vertices = 2) out;
void main() {
gl_Position = gl_in[0].gl_Position + vec4(-0.1, 0.0, 0.0, 0.0);
EmitVertex();
gl_Position = gl_in[0].gl_Position + vec4( 0.1, 0.0, 0.0, 0.0);
EmitVertex();
EndPrimitive();
}

View File

@@ -0,0 +1,395 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 7
op: 23
type_name:
struct_member_name: "gl_Position"
storage_class: 0 # UniformConstant
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 6
op: 22
type_name:
struct_member_name: "gl_PointSize"
storage_class: 0 # UniformConstant
type_flags: 0x00000008 # FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td2
id: 10
op: 28
type_name:
struct_member_name: "gl_ClipDistance"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
- &td3
id: 10
op: 28
type_name:
struct_member_name: "gl_CullDistance"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
- &td4
id: 17
op: 28
type_name: "gl_PerVertex"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x30080000 # ARRAY STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 4
members:
- *td0
- *td1
- *td2
- *td3
- &td5
id: 7
op: 23
type_name:
struct_member_name: "gl_Position"
storage_class: 0 # UniformConstant
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td6
id: 6
op: 22
type_name:
struct_member_name: "gl_PointSize"
storage_class: 0 # UniformConstant
type_flags: 0x00000008 # FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td7
id: 10
op: 28
type_name:
struct_member_name: "gl_ClipDistance"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
- &td8
id: 10
op: 28
type_name:
struct_member_name: "gl_CullDistance"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
- &td9
id: 11
op: 30
type_name: "gl_PerVertex"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 4
members:
- *td5
- *td6
- *td7
- *td8
all_block_variables:
all_descriptor_bindings:
all_interface_variables:
- &iv0
spirv_id: 0
name:
location: 0
storage_class: 0 # UniformConstant
semantic:
decoration_flags: 0x00000000 # NONE
built_in: 0 # Position
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 0 # VK_FORMAT_UNDEFINED
type_description:
word_offset: { location: 0 }
- &iv1
spirv_id: 0
name:
location: 0
storage_class: 0 # UniformConstant
semantic:
decoration_flags: 0x00000000 # NONE
built_in: 0 # Position
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 0 # VK_FORMAT_UNDEFINED
type_description:
word_offset: { location: 0 }
- &iv2
spirv_id: 0
name:
location: 0
storage_class: 0 # UniformConstant
semantic:
decoration_flags: 0x00000000 # NONE
built_in: 0 # Position
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 0 # VK_FORMAT_UNDEFINED
type_description:
word_offset: { location: 0 }
- &iv3
spirv_id: 0
name:
location: 0
storage_class: 0 # UniformConstant
semantic:
decoration_flags: 0x00000000 # NONE
built_in: 0 # Position
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 0 # VK_FORMAT_UNDEFINED
type_description:
word_offset: { location: 0 }
- &iv4
spirv_id: 19
name: "gl_in"
location: 4294967295
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 4
members:
- *iv0 #
- *iv1 #
- *iv2 #
- *iv3 #
format: 0 # VK_FORMAT_UNDEFINED
type_description: *td4
word_offset: { location: 0 }
- &iv5
spirv_id: 0
name:
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 0 # Position
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
type_description: *td5
word_offset: { location: 0 }
- &iv6
spirv_id: 0
name:
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 1 # PointSize
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 100 # VK_FORMAT_R32_SFLOAT
type_description: *td6
word_offset: { location: 0 }
- &iv7
spirv_id: 0
name:
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 3 # ClipDistance
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
format: 100 # VK_FORMAT_R32_SFLOAT
type_description: *td7
word_offset: { location: 0 }
- &iv8
spirv_id: 0
name:
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 4 # CullDistance
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
format: 100 # VK_FORMAT_R32_SFLOAT
type_description: *td8
word_offset: { location: 0 }
- &iv9
spirv_id: 13
name: ""
location: 4294967295
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000011 # BUILT_IN BLOCK
built_in: 0, 1, 3, 4 # [Position, PointSize, ClipDistance, CullDistance]
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 4
members:
- *iv5 #
- *iv6 #
- *iv7 #
- *iv8 #
format: 0 # VK_FORMAT_UNDEFINED
type_description: *td9
word_offset: { location: 0 }
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 3 # Geometry
shader_stage: 0x00000008 # GS
descriptor_binding_count: 0
descriptor_bindings:
descriptor_set_count: 0
descriptor_sets:
input_variable_count: 1,
input_variables:
- *iv4 # "gl_in"
output_variable_count: 1,
output_variables:
- *iv9 # ""
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,27 @@
%YAML 1.1
---
all_type_descriptions:
all_block_variables:
all_descriptor_bindings:
all_interface_variables:
module:
generator: 7 # Khronos SPIR-V Tools Assembler
entry_point_name: "main"
entry_point_id: 2
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 5 # GLCompute
shader_stage: 0x00000020 # CS
descriptor_binding_count: 0
descriptor_bindings:
descriptor_set_count: 0
descriptor_sets:
input_variable_count: 0,
input_variables:
output_variable_count: 0,
output_variables:
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,27 @@
%YAML 1.1
---
all_type_descriptions:
all_block_variables:
all_descriptor_bindings:
all_interface_variables:
module:
generator: 7 # Khronos SPIR-V Tools Assembler
entry_point_name: "main"
entry_point_id: 2
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 5 # GLCompute
shader_stage: 0x00000020 # CS
descriptor_binding_count: 0
descriptor_bindings:
descriptor_set_count: 0
descriptor_sets:
input_variable_count: 0,
input_variables:
output_variable_count: 0,
output_variables:
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,32 @@
#version 450
#extension GL_EXT_buffer_reference : enable
layout(buffer_reference) buffer t1;
layout(buffer_reference) buffer t2;
layout(buffer_reference) buffer t3;
layout(buffer_reference) buffer t4;
layout(buffer_reference, std430) buffer t1 {
t4 i_1;
};
layout(buffer_reference, std430) buffer t2 {
t4 i_2;
};
layout(buffer_reference, std430) buffer t3 {
t2 i_3;
};
layout(set = 1, binding = 2, buffer_reference, std430) buffer t4 {
layout(offset = 0) int j;
t1 k_1;
t2 k_2;
t3 k_3;
} x;
layout(set = 0, binding = 0, std430) buffer t5 {
t4 m;
} s5;
void main() {}

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,26 @@
#version 450
// Taken from glslang/Test/spv.bufferhandle4.frag
#extension GL_EXT_buffer_reference : enable
layout(buffer_reference) buffer t4;
layout(buffer_reference, std430) buffer t3 {
int h;
t4 i;
};
layout(set = 1, binding = 2, buffer_reference, std430) buffer t4 {
layout(offset = 0) int j;
t3 k;
} x;
layout(set = 0, binding = 0, std430) buffer t5 {
t4 m;
} s5;
void main() {
x.k.h = s5.m.k.i.k.i.k.h;
bool b = true;
s5.m = b ? s5.m : s5.m.k.i;
}

Binary file not shown.

View File

@@ -0,0 +1,706 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 6
op: 21
type_name:
struct_member_name: "j"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 6
op: 21
type_name:
struct_member_name: "h"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td2
id: 9
op: 32
type_name:
struct_member_name: "i"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- [forward pointer]
- &td3
id: 7
op: 32
type_name: "t3"
struct_member_name: "k"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td1
- *td2
- &td4
id: 9
op: 32
type_name: "t4"
struct_member_name: "m"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td0
- *td3
- &td5
id: 19
op: 30
type_name: "t5"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td4
- &td6
id: 6
op: 21
type_name:
struct_member_name: "j"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td7
id: 6
op: 21
type_name:
struct_member_name: "h"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td8
id: 6
op: 21
type_name:
struct_member_name: "j"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td9
id: 7
op: 32
type_name:
struct_member_name: "k"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- [forward pointer]
- &td10
id: 9
op: 32
type_name: "t4"
struct_member_name: "i"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td8
- *td9
- &td11
id: 7
op: 32
type_name: "t3"
struct_member_name: "k"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td7
- *td10
- &td12
id: 6
op: 21
type_name:
struct_member_name: "h"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td13
id: 6
op: 21
type_name:
struct_member_name: "j"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td14
id: 6
op: 21
type_name:
struct_member_name: "h"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td15
id: 9
op: 32
type_name:
struct_member_name: "i"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- [forward pointer]
- &td16
id: 7
op: 32
type_name: "t3"
struct_member_name: "k"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td14
- *td15
- &td17
id: 9
op: 32
type_name: "t4"
struct_member_name: "i"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td13
- *td16
- &td18
id: 6
op: 21
type_name:
struct_member_name: "j"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td19
id: 6
op: 21
type_name:
struct_member_name: "h"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td20
id: 6
op: 21
type_name:
struct_member_name: "j"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td21
id: 7
op: 32
type_name:
struct_member_name: "k"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- [forward pointer]
- &td22
id: 9
op: 32
type_name: "t4"
struct_member_name: "i"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td20
- *td21
- &td23
id: 7
op: 32
type_name: "t3"
struct_member_name: "k"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td19
- *td22
- &td24
id: 8
op: 30
type_name: "t4"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td18
- *td23
all_block_variables:
- &bv0
name: "j"
offset: 0
absolute_offset: 0
size: 4
padded_size: 4
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td6
- &bv1
name: "h"
offset: 0
absolute_offset: 0
size: 4
padded_size: 4
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td12
- &bv2
name: "k"
offset: 8
absolute_offset: 8
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 2
members:
- *bv1
- [recursive]
type_description: *td11
- &bv3
name: "m"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 2
members:
- *bv0
- *bv2
type_description: *td4
- &bv4
name: "s5"
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv3
type_description: *td5
- &bv5
name: "j"
offset: 0
absolute_offset: 0
size: 4
padded_size: 4
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td18
- &bv6
name: "h"
offset: 0
absolute_offset: 0
size: 4
padded_size: 4
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td12
- &bv7
name: "j"
offset: 0
absolute_offset: 0
size: 4
padded_size: 4
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td6
- &bv8
name: "i"
offset: 8
absolute_offset: 8
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 2
members:
- *bv7
- [recursive]
type_description: *td17
- &bv9
name: "k"
offset: 8
absolute_offset: 8
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 2
members:
- *bv6
- *bv8
type_description: *td23
- &bv10
name: "x"
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 2
members:
- *bv5
- *bv9
type_description: *td24
all_descriptor_bindings:
- &db0
spirv_id: 21
name: "s5"
binding: 0
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 7 # VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
resource_type: 8 # UAV
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
block: *bv4 # "s5"
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td5
word_offset: { binding: 171, set: 167 }
- &db1
spirv_id: 13
name: "x"
binding: 2
input_attachment_index: 0
set: 1
decoration_flags: 0x00000000 # NONE
descriptor_type: 7 # VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
resource_type: 8 # UAV
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
block: *bv10 # "x"
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td24
word_offset: { binding: 155, set: 151 }
all_interface_variables:
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 4 # Fragment
shader_stage: 0x00000010 # PS
descriptor_binding_count: 2
descriptor_bindings:
- *db0 # "s5"
- *db1 # "x"
descriptor_set_count: 2
descriptor_sets:
- set: 0
binding_count: 1
bindings:
- *db0 # "s5"
- set: 1
binding_count: 1
bindings:
- *db1 # "x"
input_variable_count: 0,
input_variables:
output_variable_count: 0,
output_variables:
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,30 @@
#version 450 core
// Taken from glslang/Test/spv.bufferhandle6.frag
#extension GL_EXT_buffer_reference : enable
layout (push_constant, std430) uniform Block { int identity[32]; } pc;
layout(r32ui, set = 3, binding = 0) uniform uimage2D image0_0;
layout(buffer_reference) buffer T1;
layout(set = 3, binding = 1, buffer_reference) buffer T1 {
layout(offset = 0) int a[2]; // stride = 4 for std430, 16 for std140
layout(offset = 32) int b;
layout(offset = 48) T1 c[2]; // stride = 8 for std430, 16 for std140
layout(offset = 80) T1 d;
} x;
void main()
{
int accum = 0, temp;
accum |= x.a[0] - 0;
accum |= x.a[pc.identity[1]] - 1;
accum |= x.b - 2;
accum |= x.c[0].a[0] - 3;
accum |= x.c[0].a[pc.identity[1]] - 4;
accum |= x.c[0].b - 5;
accum |= x.c[pc.identity[1]].a[0] - 6;
accum |= x.c[pc.identity[1]].a[pc.identity[1]] - 7;
accum |= x.c[pc.identity[1]].b - 8;
accum |= x.d.a[0] - 9;
accum |= x.d.a[pc.identity[1]] - 10;
accum |= x.d.b - 11;
uvec4 color = (accum != 0) ? uvec4(0,0,0,0) : uvec4(1,0,0,1);
imageStore(image0_0, ivec2(gl_FragCoord.x, gl_FragCoord.y), color);
}

Binary file not shown.

View File

@@ -0,0 +1,836 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 147
op: 25
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00010004 # EXTERNAL_IMAGE INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 1, depth: 0, arrayed: 0, ms: 0, sampled: 2, image_format: 33 } # dim=2D image_format=R32ui
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 12
op: 28
type_name:
struct_member_name: "a"
storage_class: 0 # UniformConstant
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 4 }
member_count: 0
members:
- &td2
id: 6
op: 21
type_name:
struct_member_name: "b"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td3
id: 16
op: 28
type_name:
struct_member_name: "a"
storage_class: 0 # UniformConstant
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 4 }
member_count: 0
members:
- &td4
id: 6
op: 21
type_name:
struct_member_name: "b"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td5
id: 16
op: 28
type_name:
struct_member_name: "a"
storage_class: 0 # UniformConstant
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 4 }
member_count: 0
members:
- &td6
id: 6
op: 21
type_name:
struct_member_name: "b"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td7
id: 17
op: 28
type_name:
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x70080000 # ARRAY STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 8 }
member_count: 4
members:
- [forward pointer]
- &td8
id: 16
op: 28
type_name:
struct_member_name: "a"
storage_class: 0 # UniformConstant
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 4 }
member_count: 0
members:
- &td9
id: 6
op: 21
type_name:
struct_member_name: "b"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td10
id: 17
op: 28
type_name:
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x70080000 # ARRAY STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 8 }
member_count: 4
members:
- [forward pointer]
- &td11
id: 13
op: 32
type_name:
struct_member_name: "d"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 4
members:
- [forward pointer]
- &td12
id: 13
op: 32
type_name: "T1"
struct_member_name: "d"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 4
members:
- *td8
- *td9
- *td10
- *td11
- &td13
id: 17
op: 28
type_name: "T1"
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x70080000 # ARRAY STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 8 }
member_count: 4
members:
- *td5
- *td6
- *td7
- *td12
- &td14
id: 13
op: 32
type_name: "T1"
struct_member_name: "d"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 4
members:
- [forward pointer]
- &td15
id: 14
op: 28
type_name: "T1"
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x70080000 # ARRAY STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 8 }
member_count: 4
members:
- *td3
- *td4
- *td13
- *td14
- &td16
id: 13
op: 32
type_name: "T1"
struct_member_name: "d"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 4
members:
- [forward pointer]
- &td17
id: 15
op: 30
type_name: "T1"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 4
members:
- *td1
- *td2
- *td15
- *td16
- &td18
id: 16
op: 28
type_name:
struct_member_name: "a"
storage_class: 0 # UniformConstant
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 4 }
member_count: 0
members:
- &td19
id: 6
op: 21
type_name:
struct_member_name: "b"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td20
id: 16
op: 28
type_name:
struct_member_name: "a"
storage_class: 0 # UniformConstant
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 4 }
member_count: 0
members:
- &td21
id: 6
op: 21
type_name:
struct_member_name: "b"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td22
id: 17
op: 28
type_name:
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x70080000 # ARRAY STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 8 }
member_count: 4
members:
- [forward pointer]
- &td23
id: 16
op: 28
type_name:
struct_member_name: "a"
storage_class: 0 # UniformConstant
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 4 }
member_count: 0
members:
- &td24
id: 6
op: 21
type_name:
struct_member_name: "b"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td25
id: 17
op: 28
type_name:
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x70080000 # ARRAY STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 8 }
member_count: 4
members:
- [forward pointer]
- &td26
id: 13
op: 32
type_name:
struct_member_name: "d"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 4
members:
- [forward pointer]
- &td27
id: 13
op: 32
type_name: "T1"
struct_member_name: "d"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 4
members:
- *td23
- *td24
- *td25
- *td26
- &td28
id: 17
op: 28
type_name: "T1"
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x70080000 # ARRAY STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 8 }
member_count: 4
members:
- *td20
- *td21
- *td22
- *td27
- &td29
id: 13
op: 32
type_name: "T1"
struct_member_name: "d"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 4
members:
- [forward pointer]
- &td30
id: 29
op: 28
type_name:
struct_member_name: "identity"
storage_class: 0 # UniformConstant
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [32,], stride: 4 }
member_count: 0
members:
- &td31
id: 30
op: 30
type_name: "Block"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td30
- &td32
id: 152
op: 23
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
all_block_variables:
- &bv0
name:
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description:
- &bv1
name: "a"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [2,], stride: 4 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td1
- &bv2
name: "b"
offset: 32
absolute_offset: 32
size: 4
padded_size: 4
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td2
- &bv3
name: "a"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [2,], stride: 4 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td18
- &bv4
name: "b"
offset: 32
absolute_offset: 0
size: 4
padded_size: 4
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td19
- &bv5
name: "c"
offset: 48
absolute_offset: 48
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 4
members:
- *bv3
- *bv4
- [recursive]
- [recursive]
type_description: *td15
- &bv6
name: "x"
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 4
members:
- *bv1
- *bv2
- *bv5
- [recursive]
type_description: *td17
- &bv7
name: "identity"
offset: 0
absolute_offset: 0
size: 128
padded_size: 128
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [32,], stride: 4 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td30
- &bv8
name: "pc"
offset: 0
absolute_offset: 0
size: 128
padded_size: 128
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv7
type_description: *td31
all_descriptor_bindings:
- &db0
spirv_id: 149
name: "image0_0"
binding: 0
input_attachment_index: 0
set: 3
decoration_flags: 0x00000000 # NONE
descriptor_type: 3 # VK_DESCRIPTOR_TYPE_STORAGE_IMAGE
resource_type: 8 # UAV
image: { dim: 1, depth: 0, arrayed: 0, ms: 0, sampled: 2, image_format: 33 } # dim=2D image_format=R32ui
block: *bv0 #
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td0
word_offset: { binding: 227, set: 223 }
- &db1
spirv_id: 21
name: "x"
binding: 1
input_attachment_index: 0
set: 3
decoration_flags: 0x00000000 # NONE
descriptor_type: 7 # VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
resource_type: 8 # UAV
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
block: *bv6 # "x"
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td17
word_offset: { binding: 207, set: 203 }
all_interface_variables:
- &iv0
spirv_id: 154
name: "gl_FragCoord"
location: 4294967295
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 15 # FragCoord
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
type_description: *td32
word_offset: { location: 0 }
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 4 # Fragment
shader_stage: 0x00000010 # PS
descriptor_binding_count: 2
descriptor_bindings:
- *db0 # "image0_0"
- *db1 # "x"
descriptor_set_count: 1
descriptor_sets:
- set: 3
binding_count: 2
bindings:
- *db0 # "image0_0"
- *db1 # "x"
input_variable_count: 1,
input_variables:
- *iv0 # "gl_FragCoord"
output_variable_count: 0,
output_variables:
push_constant_count: 1,
push_constants:
- *bv8 # "pc"
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,19 @@
#version 450
#extension GL_EXT_buffer_reference : enable
layout(buffer_reference) buffer t1;
layout(buffer_reference, std430) buffer t1 {
t1 i;
};
layout(set = 1, binding = 2, buffer_reference, std430) buffer t4 {
layout(offset = 0) int j;
t1 k;
} x;
layout(set = 0, binding = 0, std430) buffer t5 {
t4 m;
} s5;
void main() {}

Binary file not shown.

View File

@@ -0,0 +1,441 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 6
op: 21
type_name:
struct_member_name: "j"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 7
op: 32
type_name:
struct_member_name: "i"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- [forward pointer]
- &td2
id: 7
op: 32
type_name: "t1"
struct_member_name: "k"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td1
- &td3
id: 12
op: 32
type_name: "t4"
struct_member_name: "m"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td0
- *td2
- &td4
id: 13
op: 30
type_name: "t5"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td3
- &td5
id: 6
op: 21
type_name:
struct_member_name: "j"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td6
id: 7
op: 32
type_name:
struct_member_name: "i"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- [forward pointer]
- &td7
id: 7
op: 32
type_name: "t1"
struct_member_name: "k"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td6
- &td8
id: 7
op: 32
type_name:
struct_member_name: "i"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- [forward pointer]
- &td9
id: 7
op: 32
type_name: "t1"
struct_member_name: "i"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td8
- &td10
id: 6
op: 21
type_name:
struct_member_name: "j"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td11
id: 7
op: 32
type_name:
struct_member_name: "i"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- [forward pointer]
- &td12
id: 7
op: 32
type_name: "t1"
struct_member_name: "k"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td11
- &td13
id: 8
op: 30
type_name: "t4"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td10
- *td12
all_block_variables:
- &bv0
name: "j"
offset: 0
absolute_offset: 0
size: 4
padded_size: 4
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td5
- &bv1
name: "k"
offset: 8
absolute_offset: 8
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 1
members:
- [recursive]
type_description: *td7
- &bv2
name: "m"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 2
members:
- *bv0
- *bv1
type_description: *td3
- &bv3
name: "s5"
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 1
members:
- *bv2
type_description: *td4
- &bv4
name: "j"
offset: 0
absolute_offset: 0
size: 4
padded_size: 4
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td10
- &bv5
name: "k"
offset: 8
absolute_offset: 8
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 1
members:
- [recursive]
type_description: *td12
- &bv6
name: "x"
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 2
members:
- *bv4
- *bv5
type_description: *td13
all_descriptor_bindings:
- &db0
spirv_id: 16
name: "s5"
binding: 0
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 7 # VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
resource_type: 8 # UAV
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
block: *bv3 # "s5"
array: { dims_count: 0, dims: [] }
accessed: 0
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td4
word_offset: { binding: 159, set: 155 }
- &db1
spirv_id: 11
name: "x"
binding: 2
input_attachment_index: 0
set: 1
decoration_flags: 0x00000000 # NONE
descriptor_type: 7 # VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
resource_type: 8 # UAV
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
block: *bv6 # "x"
array: { dims_count: 0, dims: [] }
accessed: 0
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td13
word_offset: { binding: 130, set: 126 }
all_interface_variables:
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 4 # Fragment
shader_stage: 0x00000010 # PS
descriptor_binding_count: 2
descriptor_bindings:
- *db0 # "s5"
- *db1 # "x"
descriptor_set_count: 2
descriptor_sets:
- set: 0
binding_count: 1
bindings:
- *db0 # "s5"
- set: 1
binding_count: 1
bindings:
- *db1 # "x"
input_variable_count: 0,
input_variables:
output_variable_count: 0,
output_variables:
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,34 @@
#version 460 core
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_shader_explicit_arithmetic_types_float32 : require
#extension GL_EXT_shader_explicit_arithmetic_types_int64 : require
#extension GL_EXT_shader_explicit_arithmetic_types_int32 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
layout(buffer_reference, buffer_reference_align = 4) readonly buffer ReadVecf
{
float32_t values[];
};
layout(buffer_reference, buffer_reference_align = 4) writeonly buffer WriteVecf
{
float32_t values[];
};
layout(push_constant, std430) uniform Parameters
{
ReadVecf a;
ReadVecf b;
WriteVecf c;
uint64_t n;
} params;
void main()
{
uint32_t idx = gl_GlobalInvocationID.x;
uint32_t stride = gl_NumWorkGroups.x * gl_WorkGroupSize.x;
for (; idx < params.n; idx += stride) {
params.c.values[idx] = params.a.values[idx] + params.b.values[idx];
}
}

Binary file not shown.

View File

@@ -0,0 +1,345 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 34
op: 29
type_name:
struct_member_name: "values"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [0,], stride: 4 }
member_count: 0
members:
- &td1
id: 30
op: 32
type_name: "ReadVecf"
struct_member_name: "a"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td0
- &td2
id: 30
op: 32
type_name: "ReadVecf"
struct_member_name: "b"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- [forward pointer]
- &td3
id: 36
op: 29
type_name:
struct_member_name: "values"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [0,], stride: 4 }
member_count: 0
members:
- &td4
id: 31
op: 32
type_name: "WriteVecf"
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td3
- &td5
id: 28
op: 21
type_name:
struct_member_name: "n"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 64, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td6
id: 32
op: 30
type_name: "Parameters"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 4
members:
- *td1
- *td2
- *td4
- *td5
- &td7
id: 34
op: 29
type_name:
struct_member_name: "values"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [0,], stride: 4 }
member_count: 0
members:
- &td8
id: 36
op: 29
type_name:
struct_member_name: "values"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [0,], stride: 4 }
member_count: 0
members:
- &td9
id: 9
op: 23
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000104 # VECTOR INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
all_block_variables:
- &bv0
name: "values"
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000080 # NON_WRITABLE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td7
- &bv1
name: "a"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv0
type_description: *td1
- &bv2
name: "values"
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000200 # NON_READABLE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td8
- &bv3
name: "c"
offset: 16
absolute_offset: 16
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv2
type_description: *td4
- &bv4
name: "n"
offset: 24
absolute_offset: 24
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 64, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td5
- &bv5
name: "params"
offset: 0
absolute_offset: 0
size: 32
padded_size: 32
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 4
members:
- *bv1
- [recursive]
- *bv3
- *bv4
type_description: *td6
all_descriptor_bindings:
all_interface_variables:
- &iv0
spirv_id: 11
name: "gl_GlobalInvocationID"
location: 4294967295
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 28 # GlobalInvocationId
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 104 # VK_FORMAT_R32G32B32_UINT
type_description: *td9
word_offset: { location: 0 }
- &iv1
spirv_id: 17
name: "gl_NumWorkGroups"
location: 4294967295
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 24 # NumWorkgroups
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 104 # VK_FORMAT_R32G32B32_UINT
type_description: *td9
word_offset: { location: 0 }
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 460
spirv_execution_model: 5 # GLCompute
shader_stage: 0x00000020 # CS
descriptor_binding_count: 0
descriptor_bindings:
descriptor_set_count: 0
descriptor_sets:
input_variable_count: 2,
input_variables:
- *iv0 # "gl_GlobalInvocationID"
- *iv1 # "gl_NumWorkGroups"
output_variable_count: 0,
output_variables:
push_constant_count: 1,
push_constants:
- *bv5 # "params"
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,19 @@
#version 460 core
#extension GL_EXT_buffer_reference : require
layout(buffer_reference, buffer_reference_align = 4) readonly buffer t2 {
int values[];
};
layout(buffer_reference, buffer_reference_align = 4) readonly buffer t1 {
t2 c;
};
layout(push_constant, std430) uniform Parameters {
t1 a;
t2 b;
} params;
void main() {
params.a.c.values[0] = params.b.values[0] + 1;
}

Binary file not shown.

View File

@@ -0,0 +1,238 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 11
op: 29
type_name:
struct_member_name: "values"
storage_class: 0 # UniformConstant
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [0,], stride: 4 }
member_count: 0
members:
- &td1
id: 7
op: 32
type_name: "t2"
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td0
- &td2
id: 6
op: 32
type_name: "t1"
struct_member_name: "a"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td1
- &td3
id: 7
op: 32
type_name: "t2"
struct_member_name: "b"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- [forward pointer]
- &td4
id: 8
op: 30
type_name: "Parameters"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td2
- *td3
- &td5
id: 11
op: 29
type_name:
struct_member_name: "values"
storage_class: 0 # UniformConstant
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [0,], stride: 4 }
member_count: 0
members:
- &td6
id: 7
op: 32
type_name: "t2"
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td5
- &td7
id: 11
op: 29
type_name:
struct_member_name: "values"
storage_class: 0 # UniformConstant
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [0,], stride: 4 }
member_count: 0
members:
all_block_variables:
- &bv0
name: "values"
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000080 # NON_WRITABLE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td7
- &bv1
name: "c"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000080 # NON_WRITABLE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv0
type_description: *td6
- &bv2
name: "a"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv1
type_description: *td2
- &bv3
name: "params"
offset: 0
absolute_offset: 0
size: 16
padded_size: 16
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 2
members:
- *bv2
- [recursive]
type_description: *td4
all_descriptor_bindings:
all_interface_variables:
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 460
spirv_execution_model: 5 # GLCompute
shader_stage: 0x00000020 # CS
descriptor_binding_count: 0
descriptor_bindings:
descriptor_set_count: 0
descriptor_sets:
input_variable_count: 0,
input_variables:
output_variable_count: 0,
output_variables:
push_constant_count: 1,
push_constants:
- *bv3 # "params"
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,36 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_ARB_enhanced_layouts : require
#extension GL_EXT_nonuniform_qualifier : require
#extension GL_KHR_shader_subgroup_arithmetic : require
layout(row_major) uniform;
layout(row_major) buffer;
struct BDAGlobals_t_0 {
vec4 g_vTest;
vec4 g_vTest2;
};
layout(buffer_reference, std430, buffer_reference_align = 16) readonly buffer BufferPointer_BDAGlobals_t_0_1 {
BDAGlobals_t_0 _data;
};
struct GlobalsBDAPushConstant_t_0 {
BufferPointer_BDAGlobals_t_0_1 g_GlobalsBDAPerStage_0[6];
};
layout(push_constant)
layout(std140) uniform _S2 {
BufferPointer_BDAGlobals_t_0_1 g_GlobalsBDAPerStage_0[6];
} g_GlobalsBDAPushConstant_0;
struct PS_OUTPUT_0 {
vec4 vColor_1;
};
layout(location = 0) out vec4 _S149;
void main() {
_S149 = g_GlobalsBDAPushConstant_0.g_GlobalsBDAPerStage_0[0]._data.g_vTest;
return;
}

Binary file not shown.

View File

@@ -0,0 +1,290 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 7
op: 23
type_name:
struct_member_name: "g_vTest"
storage_class: 0 # UniformConstant
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 7
op: 23
type_name:
struct_member_name: "g_vTest2"
storage_class: 0 # UniformConstant
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td2
id: 15
op: 30
type_name: "BDAGlobals_t_0"
struct_member_name: "_data"
storage_class: 0 # UniformConstant
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td0
- *td1
- &td3
id: 13
op: 28
type_name: "BufferPointer_BDAGlobals_t_0_1"
struct_member_name: "g_GlobalsBDAPerStage_0"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x70080000 # ARRAY STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [6,], stride: 16 }
member_count: 1
members:
- *td2
- &td4
id: 14
op: 30
type_name: "_S2"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td3
- &td5
id: 7
op: 23
type_name:
struct_member_name: "g_vTest"
storage_class: 0 # UniformConstant
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td6
id: 7
op: 23
type_name:
struct_member_name: "g_vTest2"
storage_class: 0 # UniformConstant
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td7
id: 15
op: 30
type_name: "BDAGlobals_t_0"
struct_member_name: "_data"
storage_class: 0 # UniformConstant
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td5
- *td6
- &td8
id: 7
op: 23
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
all_block_variables:
- &bv0
name: "g_vTest"
offset: 0
absolute_offset: 0
size: 16
padded_size: 16
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td5
- &bv1
name: "g_vTest2"
offset: 16
absolute_offset: 0
size: 16
padded_size: 16
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td6
- &bv2
name: "_data"
offset: 0
absolute_offset: 0
size: 32
padded_size: 32
decorations: 0x00000080 # NON_WRITABLE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 2
members:
- *bv0
- *bv1
type_description: *td7
- &bv3
name: "g_GlobalsBDAPerStage_0"
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv2
type_description: *td3
- &bv4
name: "g_GlobalsBDAPushConstant_0"
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv3
type_description: *td4
all_descriptor_bindings:
all_interface_variables:
- &iv0
spirv_id: 9
name: "_S149"
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
type_description: *td8
word_offset: { location: 144 }
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 4 # Fragment
shader_stage: 0x00000010 # PS
descriptor_binding_count: 0
descriptor_bindings:
descriptor_set_count: 0
descriptor_sets:
input_variable_count: 0,
input_variables:
output_variable_count: 1,
output_variables:
- *iv0 # "_S149"
push_constant_count: 1,
push_constants:
- *bv4 # "g_GlobalsBDAPushConstant_0"
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,23 @@
#version 460 core
#extension GL_EXT_buffer_reference : require
layout(buffer_reference, buffer_reference_align = 4) readonly buffer t2 {
int values[];
};
layout(buffer_reference, buffer_reference_align = 4) readonly buffer t1 {
t2 c;
};
layout(buffer_reference, buffer_reference_align = 4) readonly buffer t0 {
t1 a;
t2 b;
};
layout(push_constant, std430) uniform Parameters {
t0 x;
} params;
void main() {
params.x.a.c.values[0] = params.x.b.values[0] + 1;
}

Binary file not shown.

View File

@@ -0,0 +1,344 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 13
op: 29
type_name:
struct_member_name: "values"
storage_class: 0 # UniformConstant
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [0,], stride: 4 }
member_count: 0
members:
- &td1
id: 9
op: 32
type_name: "t2"
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td0
- &td2
id: 8
op: 32
type_name: "t1"
struct_member_name: "a"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td1
- &td3
id: 9
op: 32
type_name: "t2"
struct_member_name: "b"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- [forward pointer]
- &td4
id: 6
op: 32
type_name: "t0"
struct_member_name: "x"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td2
- *td3
- &td5
id: 7
op: 30
type_name: "Parameters"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td4
- &td6
id: 13
op: 29
type_name:
struct_member_name: "values"
storage_class: 0 # UniformConstant
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [0,], stride: 4 }
member_count: 0
members:
- &td7
id: 9
op: 32
type_name: "t2"
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td6
- &td8
id: 8
op: 32
type_name: "t1"
struct_member_name: "a"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td7
- &td9
id: 13
op: 29
type_name:
struct_member_name: "values"
storage_class: 0 # UniformConstant
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [0,], stride: 4 }
member_count: 0
members:
- &td10
id: 9
op: 32
type_name: "t2"
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td9
- &td11
id: 13
op: 29
type_name:
struct_member_name: "values"
storage_class: 0 # UniformConstant
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [0,], stride: 4 }
member_count: 0
members:
- &td12
id: 9
op: 32
type_name: "t2"
struct_member_name: "b"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- [forward pointer]
all_block_variables:
- &bv0
name: "values"
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000080 # NON_WRITABLE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td11
- &bv1
name: "c"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000080 # NON_WRITABLE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv0
type_description: *td10
- &bv2
name: "a"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000080 # NON_WRITABLE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv1
type_description: *td8
- &bv3
name: "x"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 2
members:
- *bv2
- [recursive]
type_description: *td4
- &bv4
name: "params"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv3
type_description: *td5
all_descriptor_bindings:
all_interface_variables:
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 460
spirv_execution_model: 5 # GLCompute
shader_stage: 0x00000020 # CS
descriptor_binding_count: 0
descriptor_bindings:
descriptor_set_count: 0
descriptor_sets:
input_variable_count: 0,
input_variables:
output_variable_count: 0,
output_variables:
push_constant_count: 1,
push_constants:
- *bv4 # "params"
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,9 @@
#version 450
#extension GL_EXT_buffer_reference : enable
layout(buffer_reference) buffer T1;
layout(set = 3, binding = 1, buffer_reference) buffer T1 {
layout(offset = 48) T1 c[2]; // stride = 8 for std430, 16 for std140
} x;
void main() {}

Binary file not shown.

View File

@@ -0,0 +1,191 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 11
op: 28
type_name:
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x70080000 # ARRAY STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 8 }
member_count: 1
members:
- [forward pointer]
- &td1
id: 11
op: 28
type_name: "T1"
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x70080000 # ARRAY STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 8 }
member_count: 1
members:
- *td0
- &td2
id: 9
op: 28
type_name: "T1"
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x70080000 # ARRAY STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 8 }
member_count: 1
members:
- *td1
- &td3
id: 10
op: 30
type_name: "T1"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td2
- &td4
id: 11
op: 28
type_name:
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x70080000 # ARRAY STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 8 }
member_count: 1
members:
- [forward pointer]
- &td5
id: 11
op: 28
type_name: "T1"
struct_member_name: "c"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x70080000 # ARRAY STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 8 }
member_count: 1
members:
- *td4
all_block_variables:
- &bv0
name: "c"
offset: 48
absolute_offset: 48
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 1
members:
- [recursive]
type_description: *td2
- &bv1
name: "x"
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 1
members:
- *bv0
type_description: *td3
all_descriptor_bindings:
- &db0
spirv_id: 15
name: "x"
binding: 1
input_attachment_index: 0
set: 3
decoration_flags: 0x00000000 # NONE
descriptor_type: 7 # VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
resource_type: 8 # UAV
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
block: *bv1 # "x"
array: { dims_count: 0, dims: [] }
accessed: 0
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td3
word_offset: { binding: 115, set: 111 }
all_interface_variables:
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 5 # GLCompute
shader_stage: 0x00000020 # CS
descriptor_binding_count: 1
descriptor_bindings:
- *db0 # "x"
descriptor_set_count: 1
descriptor_sets:
- set: 3
binding_count: 1
bindings:
- *db0 # "x"
input_variable_count: 0,
input_variables:
output_variable_count: 0,
output_variables:
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,16 @@
#version 460
#extension GL_EXT_buffer_reference2: require
#extension GL_EXT_scalar_block_layout : enable
layout(buffer_reference, scalar) readonly buffer VertexBufferPtr {
vec4 v[];
};
// Has a OpTypeRuntimeArray
layout(binding = 1, set = 0, scalar) readonly buffer Vertices {
VertexBufferPtr vertex_buffers[];
};
void main() {
gl_Position = vertex_buffers[gl_VertexIndex].v[gl_VertexIndex];
}

Binary file not shown.

View File

@@ -0,0 +1,389 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 19
op: 29
type_name:
struct_member_name: "v"
storage_class: 0 # UniformConstant
type_flags: 0x20000108 # ARRAY VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [0,], stride: 16 }
member_count: 0
members:
- &td1
id: 17
op: 29
type_name: "VertexBufferPtr"
struct_member_name: "vertex_buffers"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x70080000 # ARRAY STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [0,], stride: 8 }
member_count: 1
members:
- *td0
- &td2
id: 18
op: 30
type_name: "Vertices"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td1
- &td3
id: 19
op: 29
type_name:
struct_member_name: "v"
storage_class: 0 # UniformConstant
type_flags: 0x20000108 # ARRAY VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [0,], stride: 16 }
member_count: 0
members:
- &td4
id: 14
op: 21
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td5
id: 7
op: 23
type_name:
struct_member_name: "gl_Position"
storage_class: 0 # UniformConstant
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td6
id: 6
op: 22
type_name:
struct_member_name: "gl_PointSize"
storage_class: 0 # UniformConstant
type_flags: 0x00000008 # FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td7
id: 10
op: 28
type_name:
struct_member_name: "gl_ClipDistance"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
- &td8
id: 10
op: 28
type_name:
struct_member_name: "gl_CullDistance"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
- &td9
id: 11
op: 30
type_name: "gl_PerVertex"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 4
members:
- *td5
- *td6
- *td7
- *td8
all_block_variables:
- &bv0
name: "v"
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000080 # NON_WRITABLE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td3
- &bv1
name: "vertex_buffers"
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000080 # NON_WRITABLE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv0
type_description: *td1
- &bv2
name: ""
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000080 # NON_WRITABLE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv1
type_description: *td2
all_descriptor_bindings:
- &db0
spirv_id: 23
name: ""
binding: 1
input_attachment_index: 0
set: 0
decoration_flags: 0x00000080 # NON_WRITABLE
descriptor_type: 7 # VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
resource_type: 4 # SRV
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
block: *bv2 # ""
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td2
word_offset: { binding: 191, set: 187 }
all_interface_variables:
- &iv0
spirv_id: 25
name: "gl_VertexIndex"
location: 4294967295
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 42 # VertexIndex
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 99 # VK_FORMAT_R32_SINT
type_description: *td4
word_offset: { location: 0 }
- &iv1
spirv_id: 0
name:
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 0 # Position
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
type_description: *td5
word_offset: { location: 0 }
- &iv2
spirv_id: 0
name:
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 1 # PointSize
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 100 # VK_FORMAT_R32_SFLOAT
type_description: *td6
word_offset: { location: 0 }
- &iv3
spirv_id: 0
name:
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 3 # ClipDistance
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
format: 100 # VK_FORMAT_R32_SFLOAT
type_description: *td7
word_offset: { location: 0 }
- &iv4
spirv_id: 0
name:
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 4 # CullDistance
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
format: 100 # VK_FORMAT_R32_SFLOAT
type_description: *td8
word_offset: { location: 0 }
- &iv5
spirv_id: 13
name: ""
location: 4294967295
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000011 # BUILT_IN BLOCK
built_in: 0, 1, 3, 4 # [Position, PointSize, ClipDistance, CullDistance]
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 4
members:
- *iv1 #
- *iv2 #
- *iv3 #
- *iv4 #
format: 0 # VK_FORMAT_UNDEFINED
type_description: *td9
word_offset: { location: 0 }
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 460
spirv_execution_model: 0 # Vertex
shader_stage: 0x00000001 # VS
descriptor_binding_count: 1
descriptor_bindings:
- *db0 # ""
descriptor_set_count: 1
descriptor_sets:
- set: 0
binding_count: 1
bindings:
- *db0 # ""
input_variable_count: 1,
input_variables:
- *iv0 # "gl_VertexIndex"
output_variable_count: 1,
output_variables:
- *iv5 # ""
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,16 @@
#version 460
#extension GL_EXT_buffer_reference2 : require
#extension GL_EXT_buffer_reference_uvec2 : require
layout(buffer_reference) buffer VertexBuffer;
layout(buffer_reference, buffer_reference_align = 16, std430) buffer VertexBuffer {
int x;
};
layout(push_constant, std430) uniform PerFrameData {
uvec2 bufferId;
} pc;
void main() {
VertexBuffer(pc.bufferId).x = 0;
}

View File

@@ -0,0 +1,96 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 7
op: 23
type_name:
struct_member_name: "bufferId"
storage_class: 0 # UniformConstant
type_flags: 0x00000104 # VECTOR INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 2 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 8
op: 30
type_name: "PerFrameData"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td0
all_block_variables:
- &bv0
name: "bufferId"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 2 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td0
- &bv1
name: "pc"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv0
type_description: *td1
all_descriptor_bindings:
all_interface_variables:
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 460
spirv_execution_model: 5 # GLCompute
shader_stage: 0x00000020 # CS
descriptor_binding_count: 0
descriptor_bindings:
descriptor_set_count: 0
descriptor_sets:
input_variable_count: 0,
input_variables:
output_variable_count: 0,
output_variables:
push_constant_count: 1,
push_constants:
- *bv1 # "pc"
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,16 @@
#version 460
#extension GL_EXT_buffer_reference2 : require
#extension GL_EXT_buffer_reference_uvec2 : require
layout(buffer_reference) buffer VertexBuffer;
layout(buffer_reference, buffer_reference_align = 16, std430) buffer VertexBuffer {
int x;
};
layout(set = 0, binding = 0) buffer T1 {
uvec2 bufferId;
} ssbo;
void main() {
VertexBuffer(ssbo.bufferId).x = 0;
}

View File

@@ -0,0 +1,117 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 7
op: 23
type_name:
struct_member_name: "bufferId"
storage_class: 0 # UniformConstant
type_flags: 0x00000104 # VECTOR INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 2 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 8
op: 30
type_name: "T1"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td0
all_block_variables:
- &bv0
name: "bufferId"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 2 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td0
- &bv1
name: "ssbo"
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv0
type_description: *td1
all_descriptor_bindings:
- &db0
spirv_id: 10
name: "ssbo"
binding: 0
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 7 # VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
resource_type: 8 # UAV
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
block: *bv1 # "ssbo"
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td1
word_offset: { binding: 118, set: 114 }
all_interface_variables:
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 460
spirv_execution_model: 5 # GLCompute
shader_stage: 0x00000020 # CS
descriptor_binding_count: 1
descriptor_bindings:
- *db0 # "ssbo"
descriptor_set_count: 1
descriptor_sets:
- set: 0
binding_count: 1
bindings:
- *db0 # "ssbo"
input_variable_count: 0,
input_variables:
output_variable_count: 0,
output_variables:
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,22 @@
#version 460 core
#extension GL_EXT_buffer_reference : require
layout(buffer_reference, buffer_reference_align = 16) buffer Data {
float g0;
float g1;
float g2;
};
layout(push_constant) uniform PushData {
Data data_ptr;
} push;
layout(location = 0, index = 0) out vec4 Color;
void main()
{
float f1 = push.data_ptr.g1;
Color = vec4(f1, 0.0, 0.0, 0.0);
}

Binary file not shown.

View File

@@ -0,0 +1,288 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 7
op: 22
type_name:
struct_member_name: "g0"
storage_class: 0 # UniformConstant
type_flags: 0x00000008 # FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 7
op: 22
type_name:
struct_member_name: "g1"
storage_class: 0 # UniformConstant
type_flags: 0x00000008 # FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td2
id: 7
op: 22
type_name:
struct_member_name: "g2"
storage_class: 0 # UniformConstant
type_flags: 0x00000008 # FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td3
id: 10
op: 32
type_name: "Data"
struct_member_name: "data_ptr"
storage_class: 5349 # PhysicalStorageBuffer
type_flags: 0x50080000 # STRUCT REF EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 3
members:
- *td0
- *td1
- *td2
- &td4
id: 11
op: 30
type_name: "PushData"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td3
- &td5
id: 7
op: 22
type_name:
struct_member_name: "g0"
storage_class: 0 # UniformConstant
type_flags: 0x00000008 # FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td6
id: 7
op: 22
type_name:
struct_member_name: "g1"
storage_class: 0 # UniformConstant
type_flags: 0x00000008 # FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td7
id: 7
op: 22
type_name:
struct_member_name: "g2"
storage_class: 0 # UniformConstant
type_flags: 0x00000008 # FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td8
id: 24
op: 23
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
all_block_variables:
- &bv0
name: "g0"
offset: 0
absolute_offset: 0
size: 4
padded_size: 4
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td5
- &bv1
name: "g1"
offset: 4
absolute_offset: 4
size: 4
padded_size: 4
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td6
- &bv2
name: "g2"
offset: 8
absolute_offset: 8
size: 4
padded_size: 4
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td7
- &bv3
name: "data_ptr"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 3
members:
- *bv0
- *bv1
- *bv2
type_description: *td3
- &bv4
name: "push"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv3
type_description: *td4
all_descriptor_bindings:
all_interface_variables:
- &iv0
spirv_id: 26
name: "Color"
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
type_description: *td8
word_offset: { location: 240 }
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 5
source_language: 2 # GLSL
source_language_version: 460
spirv_execution_model: 4 # Fragment
shader_stage: 0x00000010 # PS
descriptor_binding_count: 0
descriptor_bindings:
descriptor_set_count: 0
descriptor_sets:
input_variable_count: 0,
input_variables:
output_variable_count: 1,
output_variables:
- *iv0 # "Color"
push_constant_count: 1,
push_constants:
- *bv4 # "push"
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,38 @@
generator : Khronos Glslang Reference Front End
source lang : GLSL
source lang ver : 460
source file : buffer_pointer.glsl
entry point : main (stage=PS)
Output variables: 1
0:
spirv id : 26
location : 0
type : float4
semantic :
name : Color
qualifier :
Push constant blocks: 1
0:
spirv id : 14
name : push (PushData)
// size = 16, padded size = 16
struct PushData {
// abs offset = 0, rel offset = 0, size = 8, padded size = 16
ref struct Data {
float g0; // abs offset = 0, rel offset = 0, size = 4, padded
size = 4 UNUSED
float g1; // abs offset = 4, rel offset = 4, size = 4, padded
size = 4
float g2; // abs offset = 8, rel offset = 8, size = 4, padded
size = 8 UNUSED
} data_ptr;
} push;

View File

@@ -0,0 +1,9 @@
#version 450
#pragma shader_stage(vertex)
layout (location = 0) out vec3 texcoord;
void main() {
gl_Position = vec4(gl_VertexIndex, 0, 0, 1);
texcoord = vec3(0,0,0);
}

Binary file not shown.

View File

@@ -0,0 +1,283 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 14
op: 21
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 7
op: 23
type_name:
struct_member_name: "gl_Position"
storage_class: 0 # UniformConstant
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td2
id: 6
op: 22
type_name:
struct_member_name: "gl_PointSize"
storage_class: 0 # UniformConstant
type_flags: 0x00000008 # FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td3
id: 10
op: 28
type_name:
struct_member_name: "gl_ClipDistance"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
- &td4
id: 10
op: 28
type_name:
struct_member_name: "gl_CullDistance"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
- &td5
id: 11
op: 30
type_name: "gl_PerVertex"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 4
members:
- *td1
- *td2
- *td3
- *td4
- &td6
id: 25
op: 23
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
all_block_variables:
all_descriptor_bindings:
all_interface_variables:
- &iv0
spirv_id: 17
name: "gl_VertexIndex"
location: 4294967295
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 42 # VertexIndex
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 99 # VK_FORMAT_R32_SINT
type_description: *td0
word_offset: { location: 0 }
- &iv1
spirv_id: 0
name:
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 0 # Position
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
type_description: *td1
word_offset: { location: 0 }
- &iv2
spirv_id: 0
name:
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 1 # PointSize
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 100 # VK_FORMAT_R32_SFLOAT
type_description: *td2
word_offset: { location: 0 }
- &iv3
spirv_id: 0
name:
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 3 # ClipDistance
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
format: 100 # VK_FORMAT_R32_SFLOAT
type_description: *td3
word_offset: { location: 0 }
- &iv4
spirv_id: 0
name:
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 4 # CullDistance
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
format: 100 # VK_FORMAT_R32_SFLOAT
type_description: *td4
word_offset: { location: 0 }
- &iv5
spirv_id: 13
name: ""
location: 4294967295
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000011 # BUILT_IN BLOCK
built_in: 0, 1, 3, 4 # [Position, PointSize, ClipDistance, CullDistance]
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 4
members:
- *iv1 #
- *iv2 #
- *iv3 #
- *iv4 #
format: 0 # VK_FORMAT_UNDEFINED
type_description: *td5
word_offset: { location: 0 }
- &iv6
spirv_id: 27
name: "texcoord"
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 106 # VK_FORMAT_R32G32B32_SFLOAT
type_description: *td6
word_offset: { location: 126 }
module:
generator: 13 # Google Shaderc over Glslang
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 0 # Vertex
shader_stage: 0x00000001 # VS
descriptor_binding_count: 0
descriptor_bindings:
descriptor_set_count: 0
descriptor_sets:
input_variable_count: 1,
input_variables:
- *iv0 # "gl_VertexIndex"
output_variable_count: 2,
output_variables:
- *iv5 # ""
- *iv6 # "texcoord"
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,22 @@
#version 450
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable
struct B {
float a;
};
layout (binding = 0) uniform Test {
B b;
} test;
float dothing(const in B b) {
return b.a;
}
layout(location = 0) out vec4 outColor;
void main() {
outColor = vec4(0);
// this is fine
outColor.z = test.b.a;
// this line causes SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_BLOCK_MEMBER_REFERENCE
outColor.z = dothing(test.b);
}

Binary file not shown.

View File

@@ -0,0 +1,188 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 6
op: 22
type_name:
struct_member_name: "a"
storage_class: 0 # UniformConstant
type_flags: 0x00000008 # FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 22
op: 30
type_name: "B"
struct_member_name: "b"
storage_class: 0 # UniformConstant
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td0
- &td2
id: 23
op: 30
type_name: "Test"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td1
- &td3
id: 17
op: 23
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
all_block_variables:
- &bv0
name: "a"
offset: 0
absolute_offset: 0
size: 4
padded_size: 16
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td0
- &bv1
name: "b"
offset: 0
absolute_offset: 0
size: 16
padded_size: 16
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv0
type_description: *td1
- &bv2
name: "test"
offset: 0
absolute_offset: 0
size: 16
padded_size: 16
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv1
type_description: *td2
all_descriptor_bindings:
- &db0
spirv_id: 25
name: "test"
binding: 0
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 6 # VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
resource_type: 2 # CBV
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
block: *bv2 # "test"
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td2
word_offset: { binding: 126, set: 122 }
all_interface_variables:
- &iv0
spirv_id: 19
name: "outColor"
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
type_description: *td3
word_offset: { location: 105 }
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 4 # Fragment
shader_stage: 0x00000010 # PS
descriptor_binding_count: 1
descriptor_bindings:
- *db0 # "test"
descriptor_set_count: 1
descriptor_sets:
- set: 0
binding_count: 1
bindings:
- *db0 # "test"
input_variable_count: 0,
input_variables:
output_variable_count: 1,
output_variables:
- *iv0 # "outColor"
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,36 @@
#version 450 core
struct structX
{
int x1_;
int x2_;
};
struct structY
{
int y1_;
structX y2_[2];
};
struct structZ
{
structX z_[2][2];
};
layout(location = 0) flat in structY in_a;
layout(location = 5) flat in structX int_b[2];
layout(location = 10) in inC {
structX c_[2];
} in_c;
layout(location = 14) flat in structX int_d[2][2];
layout(location = 22) in inE {
structZ e_[2];
} in_e;
layout(location = 38) flat in int in_f[2][2];
void main() { }

Binary file not shown.

View File

@@ -0,0 +1,760 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 6
op: 21
type_name:
struct_member_name: "y1_"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 6
op: 21
type_name:
struct_member_name: "x1_"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td2
id: 6
op: 21
type_name:
struct_member_name: "x2_"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td3
id: 10
op: 28
type_name: "structX"
struct_member_name: "y2_"
storage_class: 0 # UniformConstant
type_flags: 0x30080000 # ARRAY STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 0 }
member_count: 2
members:
- *td1
- *td2
- &td4
id: 11
op: 30
type_name: "structY"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *td0
- *td3
- &td5
id: 6
op: 21
type_name:
struct_member_name: "x1_"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td6
id: 6
op: 21
type_name:
struct_member_name: "x2_"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td7
id: 10
op: 28
type_name: "structX"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x30080000 # ARRAY STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 0 }
member_count: 2
members:
- *td5
- *td6
- &td8
id: 6
op: 21
type_name:
struct_member_name: "x1_"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td9
id: 6
op: 21
type_name:
struct_member_name: "x2_"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td10
id: 10
op: 28
type_name: "structX"
struct_member_name: "c_"
storage_class: 0 # UniformConstant
type_flags: 0x30080000 # ARRAY STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 0 }
member_count: 2
members:
- *td8
- *td9
- &td11
id: 16
op: 30
type_name: "inC"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td10
- &td12
id: 6
op: 21
type_name:
struct_member_name: "x1_"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td13
id: 6
op: 21
type_name:
struct_member_name: "x2_"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td14
id: 19
op: 28
type_name: "structX"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x30080000 # ARRAY STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 2, dims: [2,2,], stride: 0 }
member_count: 2
members:
- *td12
- *td13
- &td15
id: 6
op: 21
type_name:
struct_member_name: "x1_"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td16
id: 6
op: 21
type_name:
struct_member_name: "x2_"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td17
id: 19
op: 28
type_name: "structX"
struct_member_name: "z_"
storage_class: 0 # UniformConstant
type_flags: 0x30080000 # ARRAY STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 2, dims: [2,2,], stride: 0 }
member_count: 2
members:
- *td15
- *td16
- &td18
id: 23
op: 28
type_name: "structZ"
struct_member_name: "e_"
storage_class: 0 # UniformConstant
type_flags: 0x30080000 # ARRAY STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [2,], stride: 0 }
member_count: 1
members:
- *td17
- &td19
id: 24
op: 30
type_name: "inE"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td18
- &td20
id: 28
op: 28
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x20000004 # ARRAY INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 2, dims: [2,2,], stride: 0 }
member_count: 0
members:
all_block_variables:
all_descriptor_bindings:
all_interface_variables:
- &iv0
spirv_id: 0
name:
location: 0
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000000 # NONE
built_in: 0 # Position
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 99 # VK_FORMAT_R32_SINT
type_description: *td0
word_offset: { location: 0 }
- &iv1
spirv_id: 0
name:
location: 0
storage_class: 0 # UniformConstant
semantic:
decoration_flags: 0x00000000 # NONE
built_in: 0 # Position
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 0 # VK_FORMAT_UNDEFINED
type_description:
word_offset: { location: 0 }
- &iv2
spirv_id: 0
name:
location: 0
storage_class: 0 # UniformConstant
semantic:
decoration_flags: 0x00000000 # NONE
built_in: 0 # Position
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 0 # VK_FORMAT_UNDEFINED
type_description:
word_offset: { location: 0 }
- &iv3
spirv_id: 0
name:
location: 0
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000000 # NONE
built_in: 0 # Position
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [2,], stride: 0 }
member_count: 2
members:
- *iv1 #
- *iv2 #
format: 0 # VK_FORMAT_UNDEFINED
type_description: *td3
word_offset: { location: 0 }
- &iv4
spirv_id: 13
name: "in_a"
location: 0
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000040 # FLAT
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 2
members:
- *iv0 #
- *iv3 #
format: 0 # VK_FORMAT_UNDEFINED
type_description: *td4
word_offset: { location: 113 }
- &iv5
spirv_id: 0
name:
location: 0
storage_class: 0 # UniformConstant
semantic:
decoration_flags: 0x00000000 # NONE
built_in: 0 # Position
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 0 # VK_FORMAT_UNDEFINED
type_description:
word_offset: { location: 0 }
- &iv6
spirv_id: 0
name:
location: 0
storage_class: 0 # UniformConstant
semantic:
decoration_flags: 0x00000000 # NONE
built_in: 0 # Position
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 0 # VK_FORMAT_UNDEFINED
type_description:
word_offset: { location: 0 }
- &iv7
spirv_id: 15
name: "int_b"
location: 5
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000040 # FLAT
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [2,], stride: 0 }
member_count: 2
members:
- *iv5 #
- *iv6 #
format: 0 # VK_FORMAT_UNDEFINED
type_description: *td7
word_offset: { location: 120 }
- &iv8
spirv_id: 0
name:
location: 0
storage_class: 0 # UniformConstant
semantic:
decoration_flags: 0x00000000 # NONE
built_in: 0 # Position
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 0 # VK_FORMAT_UNDEFINED
type_description:
word_offset: { location: 0 }
- &iv9
spirv_id: 0
name:
location: 0
storage_class: 0 # UniformConstant
semantic:
decoration_flags: 0x00000000 # NONE
built_in: 0 # Position
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 0 # VK_FORMAT_UNDEFINED
type_description:
word_offset: { location: 0 }
- &iv10
spirv_id: 0
name:
location: 0
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000000 # NONE
built_in: 0 # Position
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [2,], stride: 0 }
member_count: 2
members:
- *iv8 #
- *iv9 #
format: 0 # VK_FORMAT_UNDEFINED
type_description: *td10
word_offset: { location: 0 }
- &iv11
spirv_id: 18
name: "in_c"
location: 10
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000001 # BLOCK
built_in: 0 # [Position]
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *iv10 #
format: 0 # VK_FORMAT_UNDEFINED
type_description: *td11
word_offset: { location: 127 }
- &iv12
spirv_id: 0
name:
location: 0
storage_class: 0 # UniformConstant
semantic:
decoration_flags: 0x00000000 # NONE
built_in: 0 # Position
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 0 # VK_FORMAT_UNDEFINED
type_description:
word_offset: { location: 0 }
- &iv13
spirv_id: 0
name:
location: 0
storage_class: 0 # UniformConstant
semantic:
decoration_flags: 0x00000000 # NONE
built_in: 0 # Position
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 0 # VK_FORMAT_UNDEFINED
type_description:
word_offset: { location: 0 }
- &iv14
spirv_id: 21
name: "int_d"
location: 14
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000040 # FLAT
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 2, dims: [2,2,], stride: 0 }
member_count: 2
members:
- *iv12 #
- *iv13 #
format: 0 # VK_FORMAT_UNDEFINED
type_description: *td14
word_offset: { location: 134 }
- &iv15
spirv_id: 0
name:
location: 0
storage_class: 0 # UniformConstant
semantic:
decoration_flags: 0x00000000 # NONE
built_in: 0 # Position
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 0 # VK_FORMAT_UNDEFINED
type_description:
word_offset: { location: 0 }
- &iv16
spirv_id: 0
name:
location: 0
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000000 # NONE
built_in: 0 # Position
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [2,], stride: 0 }
member_count: 1
members:
- *iv15 #
format: 0 # VK_FORMAT_UNDEFINED
type_description: *td18
word_offset: { location: 0 }
- &iv17
spirv_id: 26
name: "in_e"
location: 22
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000001 # BLOCK
built_in: 0 # [Position]
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *iv16 #
format: 0 # VK_FORMAT_UNDEFINED
type_description: *td19
word_offset: { location: 141 }
- &iv18
spirv_id: 30
name: "in_f"
location: 38
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000040 # FLAT
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 2, dims: [2,2,], stride: 0 }
member_count: 0
members:
format: 99 # VK_FORMAT_R32_SINT
type_description: *td20
word_offset: { location: 148 }
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 4 # Fragment
shader_stage: 0x00000010 # PS
descriptor_binding_count: 0
descriptor_bindings:
descriptor_set_count: 0
descriptor_sets:
input_variable_count: 6,
input_variables:
- *iv4 # "in_a"
- *iv7 # "int_b"
- *iv11 # "in_c"
- *iv14 # "int_d"
- *iv17 # "in_e"
- *iv18 # "in_f"
output_variable_count: 0,
output_variables:
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,20 @@
#version 320 es
#extension GL_EXT_fragment_shader_barycentric : require
precision highp float;
layout(location = 0) pervertexEXT in float vertexIDs[3];
layout(location = 1) pervertexEXT in float vertexIDs2[3];
layout(location = 1) out float value;
void main () {
value = (gl_BaryCoordNoPerspEXT.x * vertexIDs[0] +
gl_BaryCoordNoPerspEXT.y * vertexIDs[1] +
gl_BaryCoordNoPerspEXT.z * vertexIDs[2]);
value += (gl_BaryCoordNoPerspEXT.x * vertexIDs2[0] +
gl_BaryCoordNoPerspEXT.y * vertexIDs2[1] +
gl_BaryCoordNoPerspEXT.z * vertexIDs2[2]);
}

Binary file not shown.

View File

@@ -0,0 +1,154 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 9
op: 23
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 18
op: 28
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [3,], stride: 0 }
member_count: 0
members:
- &td2
id: 6
op: 22
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000008 # FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
all_block_variables:
all_descriptor_bindings:
all_interface_variables:
- &iv0
spirv_id: 11
name: "gl_BaryCoordNoPerspEXT"
location: 4294967295
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 5287 # ??? (5287)
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 106 # VK_FORMAT_R32G32B32_SFLOAT
type_description: *td0
word_offset: { location: 0 }
- &iv1
spirv_id: 20
name: "vertexIDs"
location: 0
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000800 # PER_VERTEX
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [3,], stride: 0 }
member_count: 0
members:
format: 100 # VK_FORMAT_R32_SFLOAT
type_description: *td1
word_offset: { location: 90 }
- &iv2
spirv_id: 44
name: "vertexIDs2"
location: 1
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000800 # PER_VERTEX
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [3,], stride: 0 }
member_count: 0
members:
format: 100 # VK_FORMAT_R32_SFLOAT
type_description: *td1
word_offset: { location: 97 }
- &iv3
spirv_id: 8
name: "value"
location: 1
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 100 # VK_FORMAT_R32_SFLOAT
type_description: *td2
word_offset: { location: 82 }
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 1 # ESSL
source_language_version: 320
spirv_execution_model: 4 # Fragment
shader_stage: 0x00000010 # PS
descriptor_binding_count: 0
descriptor_bindings:
descriptor_set_count: 0
descriptor_sets:
input_variable_count: 3,
input_variables:
- *iv0 # "gl_BaryCoordNoPerspEXT"
- *iv1 # "vertexIDs"
- *iv2 # "vertexIDs2"
output_variable_count: 1,
output_variables:
- *iv3 # "value"
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,16 @@
#version 450
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable
layout (input_attachment_index = 0, set = 0, binding = 0) uniform subpassInput MyInputAttachment0;
layout (input_attachment_index = 1, set = 0, binding = 1) uniform subpassInput MyInputAttachment1;
layout (input_attachment_index = 4, set = 0, binding = 2) uniform subpassInput MyInputAttachment4;
layout (location = 0) out vec4 oColor;
void main() {
oColor = subpassLoad(MyInputAttachment0) +
subpassLoad(MyInputAttachment1) +
subpassLoad(MyInputAttachment4);
}

Binary file not shown.

View File

@@ -0,0 +1,188 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 10
op: 25
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00010008 # EXTERNAL_IMAGE FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 6, depth: 0, arrayed: 0, ms: 0, sampled: 2, image_format: 0 } # dim=SubpassData image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 7
op: 23
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
all_block_variables:
- &bv0
name:
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description:
- &bv1
name:
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description:
- &bv2
name:
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description:
all_descriptor_bindings:
- &db0
spirv_id: 12
name: "MyInputAttachment0"
binding: 0
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 10 # VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT
resource_type: 0 # UNDEFINED
image: { dim: 6, depth: 0, arrayed: 0, ms: 0, sampled: 2, image_format: 0 } # dim=SubpassData image_format=Unknown
block: *bv0 #
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td0
word_offset: { binding: 106, set: 102 }
- &db1
spirv_id: 19
name: "MyInputAttachment1"
binding: 1
input_attachment_index: 1
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 10 # VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT
resource_type: 0 # UNDEFINED
image: { dim: 6, depth: 0, arrayed: 0, ms: 0, sampled: 2, image_format: 0 } # dim=SubpassData image_format=Unknown
block: *bv1 #
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td0
word_offset: { binding: 118, set: 114 }
- &db2
spirv_id: 23
name: "MyInputAttachment4"
binding: 2
input_attachment_index: 4
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 10 # VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT
resource_type: 0 # UNDEFINED
image: { dim: 6, depth: 0, arrayed: 0, ms: 0, sampled: 2, image_format: 0 } # dim=SubpassData image_format=Unknown
block: *bv2 #
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td0
word_offset: { binding: 130, set: 126 }
all_interface_variables:
- &iv0
spirv_id: 9
name: "oColor"
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
type_description: *td1
word_offset: { location: 98 }
module:
generator: 13 # Google Shaderc over Glslang
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 4 # Fragment
shader_stage: 0x00000010 # PS
descriptor_binding_count: 3
descriptor_bindings:
- *db0 # "MyInputAttachment0"
- *db1 # "MyInputAttachment1"
- *db2 # "MyInputAttachment4"
descriptor_set_count: 1
descriptor_sets:
- set: 0
binding_count: 3
bindings:
- *db0 # "MyInputAttachment0"
- *db1 # "MyInputAttachment1"
- *db2 # "MyInputAttachment4"
input_variable_count: 0,
input_variables:
output_variable_count: 1,
output_variables:
- *iv0 # "oColor"
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,48 @@
generator : Google Shaderc over Glslang
entry point : main
source lang : GLSL
source lang ver : 450
source file :
shader stage : PS
Output variables: 1
0:
spirv id : 9
location : 0
type : float4
semantic :
name : oColor
qualifier :
Descriptor bindings: 3
Binding 0.0
spirv id : 12
set : 0
binding : 0
type : VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT (UNDEFINED)
count : 1
accessed : true
name : MyInputAttachment0
Binding 0.1
spirv id : 19
set : 0
binding : 1
type : VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT (UNDEFINED)
count : 1
accessed : true
name : MyInputAttachment1
Binding 0.2
spirv id : 23
set : 0
binding : 2
type : VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT (UNDEFINED)
count : 1
accessed : true
name : MyInputAttachment4

View File

@@ -0,0 +1,13 @@
#version 450
#pragma shader_stage(vertex)
layout (location = 0) out vec3 texcoord;
layout (location = 1) out vec4 colors[4];
layout (location = 6) out vec3 normals[4][3][2];
void main() {
gl_Position = vec4(gl_VertexIndex, 0, 0, 1);
texcoord = vec3(0,0,0);
colors[1] = vec4(0);
normals[3][2][1] = vec3(0);
}

Binary file not shown.

View File

@@ -0,0 +1,355 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 14
op: 21
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 7
op: 23
type_name:
struct_member_name: "gl_Position"
storage_class: 0 # UniformConstant
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td2
id: 6
op: 22
type_name:
struct_member_name: "gl_PointSize"
storage_class: 0 # UniformConstant
type_flags: 0x00000008 # FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td3
id: 10
op: 28
type_name:
struct_member_name: "gl_ClipDistance"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
- &td4
id: 10
op: 28
type_name:
struct_member_name: "gl_CullDistance"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
- &td5
id: 11
op: 30
type_name: "gl_PerVertex"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 4
members:
- *td1
- *td2
- *td3
- *td4
- &td6
id: 25
op: 23
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000108 # VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td7
id: 30
op: 28
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x20000108 # ARRAY VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [4,], stride: 0 }
member_count: 0
members:
- &td8
id: 40
op: 28
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x20000108 # ARRAY VECTOR FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 3, dims: [4,3,2,], stride: 0 }
member_count: 0
members:
all_block_variables:
all_descriptor_bindings:
all_interface_variables:
- &iv0
spirv_id: 17
name: "gl_VertexIndex"
location: 4294967295
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 42 # VertexIndex
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 99 # VK_FORMAT_R32_SINT
type_description: *td0
word_offset: { location: 0 }
- &iv1
spirv_id: 0
name:
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 0 # Position
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
type_description: *td1
word_offset: { location: 0 }
- &iv2
spirv_id: 0
name:
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 1 # PointSize
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 100 # VK_FORMAT_R32_SFLOAT
type_description: *td2
word_offset: { location: 0 }
- &iv3
spirv_id: 0
name:
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 3 # ClipDistance
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
format: 100 # VK_FORMAT_R32_SFLOAT
type_description: *td3
word_offset: { location: 0 }
- &iv4
spirv_id: 0
name:
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 4 # CullDistance
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [1,], stride: 0 }
member_count: 0
members:
format: 100 # VK_FORMAT_R32_SFLOAT
type_description: *td4
word_offset: { location: 0 }
- &iv5
spirv_id: 13
name: ""
location: 4294967295
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000011 # BUILT_IN BLOCK
built_in: 0, 1, 3, 4 # [Position, PointSize, ClipDistance, CullDistance]
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 4
members:
- *iv1 #
- *iv2 #
- *iv3 #
- *iv4 #
format: 0 # VK_FORMAT_UNDEFINED
type_description: *td5
word_offset: { location: 0 }
- &iv6
spirv_id: 27
name: "texcoord"
location: 0
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 106 # VK_FORMAT_R32G32B32_SFLOAT
type_description: *td6
word_offset: { location: 118 }
- &iv7
spirv_id: 32
name: "colors"
location: 1
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 4 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [4,], stride: 0 }
member_count: 0
members:
format: 109 # VK_FORMAT_R32G32B32A32_SFLOAT
type_description: *td7
word_offset: { location: 122 }
- &iv8
spirv_id: 42
name: "normals"
location: 6
storage_class: 3 # Output
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 3, dims: [4,3,2,], stride: 0 }
member_count: 0
members:
format: 106 # VK_FORMAT_R32G32B32_SFLOAT
type_description: *td8
word_offset: { location: 126 }
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 0 # Vertex
shader_stage: 0x00000001 # VS
descriptor_binding_count: 0
descriptor_bindings:
descriptor_set_count: 0
descriptor_sets:
input_variable_count: 1,
input_variables:
- *iv0 # "gl_VertexIndex"
output_variable_count: 4,
output_variables:
- *iv5 # ""
- *iv6 # "texcoord"
- *iv7 # "colors"
- *iv8 # "normals"
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,67 @@
/*
Build with DXC using -Od to preserve unused types:
glslangValidator.exe -Od -V -R --aml --amb -e main -S frag -o matrix_major_order_glsl.spv matrix_major_order_glsl.glsl
*/
#version 450
//
// NOTE: GLSL does not have 1xN or Nx1 matrices
//
// -----------------------------------------------------------------------------
// Matrices without row / column major decoration
// -----------------------------------------------------------------------------
uniform mat2x2 mat_2x2;
uniform mat2x3 mat_2x3;
uniform mat2x4 mat_2x4;
uniform mat3x2 mat_3x2;
uniform mat3x3 mat_3x3;
uniform mat3x4 mat_3x4;
uniform mat4x2 mat_4x2;
uniform mat4x3 mat_4x3;
uniform mat4x4 mat_4x4;
// -----------------------------------------------------------------------------
// Matrices with row major decoration
// -----------------------------------------------------------------------------
layout(row_major) uniform mat2x2 row_major_my_mat_2x2;
layout(row_major) uniform mat2x3 row_major_my_mat_2x3;
layout(row_major) uniform mat2x4 row_major_my_mat_2x4;
layout(row_major) uniform mat3x2 row_major_my_mat_3x2;
layout(row_major) uniform mat3x3 row_major_my_mat_3x3;
layout(row_major) uniform mat3x4 row_major_my_mat_3x4;
layout(row_major) uniform mat4x2 row_major_my_mat_4x2;
layout(row_major) uniform mat4x3 row_major_my_mat_4x3;
layout(row_major) uniform mat4x4 row_major_my_mat_4x4;
// -----------------------------------------------------------------------------
// Matrices with column major decoration
// -----------------------------------------------------------------------------
layout(column_major) uniform mat2x2 column_major_my_mat_2x2;
layout(column_major) uniform mat2x3 column_major_my_mat_2x3;
layout(column_major) uniform mat2x4 column_major_my_mat_2x4;
layout(column_major) uniform mat3x2 column_major_my_mat_3x2;
layout(column_major) uniform mat3x3 column_major_my_mat_3x3;
layout(column_major) uniform mat3x4 column_major_my_mat_3x4;
layout(column_major) uniform mat4x2 column_major_my_mat_4x2;
layout(column_major) uniform mat4x3 column_major_my_mat_4x3;
layout(column_major) uniform mat4x4 column_major_my_mat_4x4;
layout(location = 1) in vec4 my_input;
layout(location = 0) out vec4 my_output;
void main()
{
my_output = my_input;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
/*
Compile:
glslangValidator.exe -V -S comp -o non_writable_image.spv non_writable_image.glsl
*/
#version 450
#pragma shader_stage(compute)
layout (local_size_x = 16, local_size_y = 16, local_size_z = 1) in;
layout(set = 0, binding = 0, rgba32f) uniform readonly image2D input_image;
layout(set = 0, binding = 1, rgba32f) uniform writeonly image2D output_image;
void main() {
ivec2 p = ivec2(gl_GlobalInvocationID.xy);
imageStore(output_image, p, imageLoad(input_image, p));
}

View File

@@ -0,0 +1,153 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 19
op: 25
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00010008 # EXTERNAL_IMAGE FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 1, depth: 0, arrayed: 0, ms: 0, sampled: 2, image_format: 1 } # dim=2D image_format=Rgba32f
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 11
op: 23
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000104 # VECTOR INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
all_block_variables:
- &bv0
name:
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description:
- &bv1
name:
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description:
all_descriptor_bindings:
- &db0
spirv_id: 24
name: "input_image"
binding: 0
input_attachment_index: 0
set: 0
decoration_flags: 0x00000080 # NON_WRITABLE
descriptor_type: 3 # VK_DESCRIPTOR_TYPE_STORAGE_IMAGE
resource_type: 8 # UAV
image: { dim: 1, depth: 0, arrayed: 0, ms: 0, sampled: 2, image_format: 1 } # dim=2D image_format=Rgba32f
block: *bv0 #
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td0
word_offset: { binding: 79, set: 75 }
- &db1
spirv_id: 21
name: "output_image"
binding: 1
input_attachment_index: 0
set: 0
decoration_flags: 0x00000200 # NON_READABLE
descriptor_type: 3 # VK_DESCRIPTOR_TYPE_STORAGE_IMAGE
resource_type: 8 # UAV
image: { dim: 1, depth: 0, arrayed: 0, ms: 0, sampled: 2, image_format: 1 } # dim=2D image_format=Rgba32f
block: *bv1 #
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td0
word_offset: { binding: 68, set: 64 }
all_interface_variables:
- &iv0
spirv_id: 13
name: "gl_GlobalInvocationID"
location: 4294967295
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 28 # GlobalInvocationId
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 104 # VK_FORMAT_R32G32B32_UINT
type_description: *td1
word_offset: { location: 0 }
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 5 # GLCompute
shader_stage: 0x00000020 # CS
descriptor_binding_count: 2
descriptor_bindings:
- *db0 # "input_image"
- *db1 # "output_image"
descriptor_set_count: 1
descriptor_sets:
- set: 0
binding_count: 2
bindings:
- *db0 # "input_image"
- *db1 # "output_image"
input_variable_count: 1,
input_variables:
- *iv0 # "gl_GlobalInvocationID"
output_variable_count: 0,
output_variables:
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,21 @@
/*
Compile:
glslangValidator.exe -V -S comp -o readonly_writeonly.spv readonly_writeonly.glsl
*/
#version 450
#pragma shader_stage(compute)
layout (local_size_x = 16, local_size_y = 16, local_size_z = 1) in;
const int kArraySize = 64;
layout(set = 0, binding = 0) buffer storage_buffer {
readonly float a[kArraySize];
writeonly float b[kArraySize];
writeonly readonly float bar[kArraySize];
} foo;
void main() {
uint idx = gl_GlobalInvocationID.x;
foo.b[idx] = foo.a[idx];
}

View File

@@ -0,0 +1,223 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 18
op: 28
type_name:
struct_member_name: "a"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [64,], stride: 4 }
member_count: 0
members:
- &td1
id: 19
op: 28
type_name:
struct_member_name: "b"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [64,], stride: 4 }
member_count: 0
members:
- &td2
id: 20
op: 28
type_name:
struct_member_name: "bar"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [64,], stride: 4 }
member_count: 0
members:
- &td3
id: 21
op: 30
type_name: "storage_buffer"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000002 # BUFFER_BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 3
members:
- *td0
- *td1
- *td2
- &td4
id: 9
op: 23
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000104 # VECTOR INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
all_block_variables:
- &bv0
name: "a"
offset: 0
absolute_offset: 0
size: 256
padded_size: 256
decorations: 0x00000080 # NON_WRITABLE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [64,], stride: 4 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td0
- &bv1
name: "b"
offset: 256
absolute_offset: 256
size: 256
padded_size: 256
decorations: 0x00000200 # NON_READABLE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [64,], stride: 4 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td1
- &bv2
name: "bar"
offset: 512
absolute_offset: 512
size: 256
padded_size: 256
decorations: 0x00000280 # NON_WRITABLE NON_READABLE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [64,], stride: 4 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td2
- &bv3
name: "foo"
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000080 # NON_WRITABLE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 3
members:
- *bv0
- *bv1
- *bv2
type_description: *td3
all_descriptor_bindings:
- &db0
spirv_id: 23
name: "foo"
binding: 0
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 7 # VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
resource_type: 4 # SRV
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
block: *bv3 # "foo"
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td3
word_offset: { binding: 124, set: 120 }
all_interface_variables:
- &iv0
spirv_id: 11
name: "gl_GlobalInvocationID"
location: 4294967295
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 28 # GlobalInvocationId
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 104 # VK_FORMAT_R32G32B32_UINT
type_description: *td4
word_offset: { location: 0 }
module:
generator: 8 # Khronos Glslang Reference Front End
entry_point_name: "main"
entry_point_id: 4
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 5 # GLCompute
shader_stage: 0x00000020 # CS
descriptor_binding_count: 1
descriptor_bindings:
- *db0 # "foo"
descriptor_set_count: 1
descriptor_sets:
- set: 0
binding_count: 1
bindings:
- *db0 # "foo"
input_variable_count: 1,
input_variables:
- *iv0 # "gl_GlobalInvocationID"
output_variable_count: 0,
output_variables:
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,24 @@
#version 450
#pragma shader_stage(compute)
#extension GL_EXT_nonuniform_qualifier : enable
layout (local_size_x = 32, local_size_y = 1, local_size_z = 1) in;
struct Foo {
int a;
int b;
};
layout(set = 0, binding = 0) buffer InutBuffer {
Foo input_values[][3];
};
layout(set = 0, binding = 1) buffer OutputBuffer {
Foo output_values[][3];
};
void main() {
uint index = gl_GlobalInvocationID.x;
output_values[index] = input_values[index];
}

View File

@@ -0,0 +1,380 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 17
op: 21
type_name:
struct_member_name: "a"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 17
op: 21
type_name:
struct_member_name: "b"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td2
id: 28
op: 29
type_name: "Foo"
struct_member_name: "input_values"
storage_class: 0 # UniformConstant
type_flags: 0x30080000 # ARRAY STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 2, dims: [0,3,], stride: 8 }
member_count: 2
members:
- *td0
- *td1
- &td3
id: 29
op: 30
type_name: "InutBuffer"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000002 # BUFFER_BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td2
- &td4
id: 17
op: 21
type_name:
struct_member_name: "a"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td5
id: 17
op: 21
type_name:
struct_member_name: "b"
storage_class: 0 # UniformConstant
type_flags: 0x00000004 # INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td6
id: 21
op: 29
type_name: "Foo"
struct_member_name: "output_values"
storage_class: 0 # UniformConstant
type_flags: 0x30080000 # ARRAY STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 2, dims: [0,3,], stride: 8 }
member_count: 2
members:
- *td4
- *td5
- &td7
id: 22
op: 30
type_name: "OutputBuffer"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000002 # BUFFER_BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td6
- &td8
id: 10
op: 23
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000104 # VECTOR INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
all_block_variables:
- &bv0
name: "a"
offset: 0
absolute_offset: 0
size: 4
padded_size: 4
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td0
- &bv1
name: "b"
offset: 4
absolute_offset: 0
size: 4
padded_size: 4
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td1
- &bv2
name: "input_values"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 2
members:
- *bv0
- *bv1
type_description: *td2
- &bv3
name: ""
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv2
type_description: *td3
- &bv4
name: "a"
offset: 0
absolute_offset: 0
size: 4
padded_size: 4
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td4
- &bv5
name: "b"
offset: 4
absolute_offset: 0
size: 4
padded_size: 4
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 1 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td5
- &bv6
name: "output_values"
offset: 0
absolute_offset: 0
size: 8
padded_size: 8
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 2
members:
- *bv4
- *bv5
type_description: *td6
- &bv7
name: ""
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv6
type_description: *td7
all_descriptor_bindings:
- &db0
spirv_id: 31
name: ""
binding: 0
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 7 # VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
resource_type: 8 # UAV
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
block: *bv3 # ""
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td3
word_offset: { binding: 349, set: 345 }
- &db1
spirv_id: 24
name: ""
binding: 1
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 7 # VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
resource_type: 8 # UAV
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
block: *bv7 # ""
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td7
word_offset: { binding: 325, set: 321 }
all_interface_variables:
- &iv0
spirv_id: 12
name: "gl_GlobalInvocationID"
location: 4294967295
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 28 # GlobalInvocationId
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 104 # VK_FORMAT_R32G32B32_UINT
type_description: *td8
word_offset: { location: 0 }
module:
generator: 13 # Google Shaderc over Glslang
entry_point_name: "main"
entry_point_id: 5
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 5 # GLCompute
shader_stage: 0x00000020 # CS
descriptor_binding_count: 2
descriptor_bindings:
- *db0 # ""
- *db1 # ""
descriptor_set_count: 1
descriptor_sets:
- set: 0
binding_count: 2
bindings:
- *db0 # ""
- *db1 # ""
input_variable_count: 1,
input_variables:
- *iv0 # "gl_GlobalInvocationID"
output_variable_count: 0,
output_variables:
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,19 @@
#version 450
#pragma shader_stage(compute)
layout (local_size_x = 32, local_size_y = 1, local_size_z = 1) in;
const int kArraySize = 64;
layout(set = 0, binding = 0) buffer InputBuffer {
float input_values[kArraySize];
};
layout(set = 0, binding = 1) buffer OutputBuffer {
float output_values[kArraySize];
};
void main() {
uint index = gl_GlobalInvocationID.x;
output_values[index] = input_values[index];
}

Binary file not shown.

View File

@@ -0,0 +1,240 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 26
op: 28
type_name:
struct_member_name: "input_values"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [64,], stride: 4 }
member_count: 0
members:
- &td1
id: 27
op: 30
type_name: "InputBuffer"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td0
- &td2
id: 19
op: 28
type_name:
struct_member_name: "output_values"
storage_class: 0 # UniformConstant
type_flags: 0x20000008 # ARRAY FLOAT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 1, dims: [64,], stride: 4 }
member_count: 0
members:
- &td3
id: 20
op: 30
type_name: "OutputBuffer"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
decoration_flags: 0x00000001 # BLOCK
traits:
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 1
members:
- *td2
- &td4
id: 10
op: 23
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00000104 # VECTOR INT
decoration_flags: 0x00000000 # NONE
traits:
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
all_block_variables:
- &bv0
name: "input_values"
offset: 0
absolute_offset: 0
size: 256
padded_size: 256
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [64,], stride: 4 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td0
- &bv1
name: ""
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv0
type_description: *td1
- &bv2
name: "output_values"
offset: 0
absolute_offset: 0
size: 256
padded_size: 256
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 1, dims: [64,], stride: 4 }
flags: 0x00000000 # NONE
member_count: 0
members:
type_description: *td2
- &bv3
name: ""
offset: 0
absolute_offset: 0
size: 0
padded_size: 0
decorations: 0x00000000 # NONE
numeric:
scalar: { width: 0, signedness: 0 }
vector: { component_count: 0 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
flags: 0x00000000 # NONE
member_count: 1
members:
- *bv2
type_description: *td3
all_descriptor_bindings:
- &db0
spirv_id: 29
name: ""
binding: 0
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 7 # VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
resource_type: 8 # UAV
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
block: *bv1 # ""
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td1
word_offset: { binding: 294, set: 290 }
- &db1
spirv_id: 22
name: ""
binding: 1
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 7 # VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
resource_type: 8 # UAV
image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown
block: *bv3 # ""
array: { dims_count: 0, dims: [] }
accessed: 1
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td3
word_offset: { binding: 274, set: 270 }
all_interface_variables:
- &iv0
spirv_id: 12
name: "gl_GlobalInvocationID"
location: 4294967295
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 28 # GlobalInvocationId
numeric:
scalar: { width: 32, signedness: 0 }
vector: { component_count: 3 }
matrix: { column_count: 0, row_count: 0, stride: 0 }
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
format: 104 # VK_FORMAT_R32G32B32_UINT
type_description: *td4
word_offset: { location: 0 }
module:
generator: 13 # Google Shaderc over Glslang
entry_point_name: "main"
entry_point_id: 5
source_language: 2 # GLSL
source_language_version: 450
spirv_execution_model: 5 # GLCompute
shader_stage: 0x00000020 # CS
descriptor_binding_count: 2
descriptor_bindings:
- *db0 # ""
- *db1 # ""
descriptor_set_count: 1
descriptor_sets:
- set: 0
binding_count: 2
bindings:
- *db0 # ""
- *db1 # ""
input_variable_count: 1,
input_variables:
- *iv0 # "gl_GlobalInvocationID"
output_variable_count: 0,
output_variables:
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

Some files were not shown because too many files have changed in this diff Show More