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

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:
...

View File

@@ -0,0 +1,49 @@
generator : Google Shaderc over Glslang
source lang : GLSL
source lang ver : 450
source file : glsl/storage_buffer.glsl
entry point : main
local size : (32, 1, 1)
Input variables: 1
0:
spirv id : 12
location : (built-in) GlobalInvocationId
type : uint3
semantic :
name : gl_GlobalInvocationID
qualifier :
Descriptor bindings: 2
Binding 0.0
spirv id : 29
set : 0
binding : 0
type : VK_DESCRIPTOR_TYPE_STORAGE_BUFFER (UAV)
count : 1
accessed : true
name : (InputBuffer)
// size = 0, padded size = 0
struct InputBuffer {
float input_values[64]; // abs offset = 0, rel offset = 0, size = 256, padded size = 256, array stride = 4
} ;
Binding 0.1
spirv id : 22
set : 0
binding : 1
type : VK_DESCRIPTOR_TYPE_STORAGE_BUFFER (UAV)
count : 1
accessed : true
name : (OutputBuffer)
// size = 0, padded size = 0
struct OutputBuffer {
float output_values[64]; // abs offset = 0, rel offset = 0, size = 256, padded size = 256, array stride = 4
} ;

View File

@@ -0,0 +1,17 @@
#version 460
layout(binding = 0, std430) uniform UniformBufferObject {
layout(offset = 0) float a;
layout(offset = 4) float b;
layout(offset = 8) float c;
layout(offset = 16) float d;
} ubo;
layout(binding = 0, std430) uniform UniformBufferObject2 {
layout(offset = 4) float b;
layout(offset = 0) float a;
layout(offset = 16) float c;
layout(offset = 8) float d;
} ubo2;
void main() {}

View File

@@ -0,0 +1,414 @@
%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: 6
op: 22
type_name:
struct_member_name: "b"
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: 6
op: 22
type_name:
struct_member_name: "c"
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: 6
op: 22
type_name:
struct_member_name: "d"
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:
- &td4
id: 7
op: 30
type_name: "UniformBufferObject"
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:
- *td0
- *td1
- *td2
- *td3
- &td5
id: 6
op: 22
type_name:
struct_member_name: "b"
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: 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:
- &td7
id: 6
op: 22
type_name:
struct_member_name: "c"
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: 6
op: 22
type_name:
struct_member_name: "d"
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:
- &td9
id: 10
op: 30
type_name: "UniformBufferObject2"
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: "a"
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: "b"
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: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td1
- &bv2
name: "c"
offset: 8
absolute_offset: 8
size: 4
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: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td2
- &bv3
name: "d"
offset: 16
absolute_offset: 16
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: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td3
- &bv4
name: "ubo"
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: 0x00000001 # UNUSED
member_count: 4
members:
- *bv0
- *bv1
- *bv2
- *bv3
type_description: *td4
- &bv5
name: "b"
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: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td5
- &bv6
name: "a"
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: *td6
- &bv7
name: "c"
offset: 16
absolute_offset: 16
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: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td7
- &bv8
name: "d"
offset: 8
absolute_offset: 8
size: 4
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: 0x00000001 # UNUSED
member_count: 0
members:
type_description: *td8
- &bv9
name: "ubo2"
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: 0x00000001 # UNUSED
member_count: 4
members:
- *bv5
- *bv6
- *bv7
- *bv8
type_description: *td9
all_descriptor_bindings:
- &db0
spirv_id: 9
name: "ubo"
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: *bv4 # "ubo"
array: { dims_count: 0, dims: [] }
accessed: 0
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td4
word_offset: { binding: 126, set: 122 }
- &db1
spirv_id: 12
name: "ubo2"
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: *bv9 # "ubo2"
array: { dims_count: 0, dims: [] }
accessed: 0
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td9
word_offset: { binding: 157, set: 153 }
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: 2
descriptor_bindings:
- *db0 # "ubo"
- *db1 # "ubo2"
descriptor_set_count: 1
descriptor_sets:
- set: 0
binding_count: 2
bindings:
- *db0 # "ubo"
- *db1 # "ubo2"
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,12 @@
#version 450
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable
#pragma shader_stage(vertex)
layout (set = 0, binding = 1) uniform isamplerBuffer texel_buffer_i;
layout (set = 0, binding = 2) uniform samplerBuffer texel_buffer_f;
void main() {
int i = texelFetch(texel_buffer_i, gl_InstanceIndex).x;
float f = texelFetch(texel_buffer_f, gl_InstanceIndex).x;
gl_Position = vec4(i, f, 0, 1);
}

Binary file not shown.

View File

@@ -0,0 +1,354 @@
%YAML 1.1
---
all_type_descriptions:
- &td0
id: 10
op: 27
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00050004 # EXTERNAL_SAMPLED_IMAGE EXTERNAL_IMAGE 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: 5, depth: 0, arrayed: 0, ms: 0, sampled: 1, image_format: 0 } # dim=Buffer image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 27
op: 27
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00050008 # EXTERNAL_SAMPLED_IMAGE 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: 5, depth: 0, arrayed: 0, ms: 0, sampled: 1, image_format: 0 } # dim=Buffer image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td2
id: 6
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:
- &td3
id: 33
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:
- &td4
id: 23
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:
- &td5
id: 37
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:
- &td6
id: 37
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:
- &td7
id: 38
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:
- *td3
- *td4
- *td5
- *td6
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: 12
name: "texel_buffer_i"
binding: 1
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 4 # VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
resource_type: 4 # SRV
image: { dim: 5, depth: 0, arrayed: 0, ms: 0, sampled: 1, image_format: 0 } # dim=Buffer 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: 136, set: 132 }
- &db1
spirv_id: 29
name: "texel_buffer_f"
binding: 2
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 4 # VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
resource_type: 4 # SRV
image: { dim: 5, depth: 0, arrayed: 0, ms: 0, sampled: 1, image_format: 0 } # dim=Buffer 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: 148, set: 144 }
all_interface_variables:
- &iv0
spirv_id: 15
name: "gl_InstanceIndex"
location: 4294967295
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000010 # BUILT_IN
built_in: 43 # InstanceIndex
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: *td2
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: *td3
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: *td4
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: *td5
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: *td6
word_offset: { location: 0 }
- &iv5
spirv_id: 40
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: *td7
word_offset: { location: 0 }
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: 2
descriptor_bindings:
- *db0 # "texel_buffer_i"
- *db1 # "texel_buffer_f"
descriptor_set_count: 1
descriptor_sets:
- set: 0
binding_count: 2
bindings:
- *db0 # "texel_buffer_i"
- *db1 # "texel_buffer_f"
input_variable_count: 1,
input_variables:
- *iv0 # "gl_InstanceIndex"
output_variable_count: 1,
output_variables:
- *iv5 # ""
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...

View File

@@ -0,0 +1,50 @@
generator : Google Shaderc over Glslang
entry point : main
source lang : GLSL
source lang ver : 450
source file :
shader stage : VS
Input variables: 1
0:
spirv id : 15
location : (built-in) InstanceIndex
type : int
semantic :
name : gl_InstanceIndex
qualifier :
Output variables: 1
0:
spirv id : 40
location : (built-in) ???
type :
semantic :
name :
qualifier :
Descriptor bindings: 2
Binding 0.1
spirv id : 12
set : 0
binding : 1
type : VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER (SRV)
count : 1
accessed : true
name : texel_buffer_i
Binding 0.2
spirv id : 29
set : 0
binding : 2
type : VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER (SRV)
count : 1
accessed : true
name : texel_buffer_f

View File

@@ -0,0 +1,17 @@
#version 450
#extension GL_QCOM_image_processing : require
layout(set = 0, binding = 0) uniform texture2D inTex;
layout(set = 0, binding = 3) uniform sampler linearSampler;
layout(set = 0, binding = 1) uniform texture2DArray kernelTex;
layout(set = 0, binding = 4) uniform sampler weightSampler;
layout(location = 0) out vec4 fragColor;
layout(location = 0) in vec2 uv;
void main()
{
vec4 _32 = textureWeightedQCOM(sampler2D(inTex, linearSampler), uv, sampler2DArray(kernelTex, weightSampler));
fragColor = _32;
}

View File

@@ -0,0 +1,293 @@
%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: 1, depth: 0, arrayed: 0, ms: 0, sampled: 1, image_format: 0 } # dim=2D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td1
id: 24
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: 1, ms: 0, sampled: 1, image_format: 0 } # dim=2D image_format=Unknown
array: { dims_count: 0, dims: [], stride: 0 }
member_count: 0
members:
- &td2
id: 14
op: 26
type_name:
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x00020000 # EXTERNAL_SAMPLER
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: 0
members:
- &td3
id: 20
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: 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:
- &td4
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:
- &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: 0
members:
type_description:
all_descriptor_bindings:
- &db0
spirv_id: 12
name: "inTex"
binding: 0
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 2 # VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
resource_type: 4 # SRV
image: { dim: 1, depth: 0, arrayed: 0, ms: 0, sampled: 1, image_format: 0 } # dim=2D 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: 91, set: 87 }
- &db1
spirv_id: 26
name: "kernelTex"
binding: 1
input_attachment_index: 0
set: 0
decoration_flags: 0x00002000 # WEIGHT_TEXTURE
descriptor_type: 2 # VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
resource_type: 4 # SRV
image: { dim: 1, depth: 0, arrayed: 1, ms: 0, sampled: 1, image_format: 0 } # dim=2D 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: 111, set: 107 }
- &db2
spirv_id: 16
name: "linearSampler"
binding: 3
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 0 # VK_DESCRIPTOR_TYPE_SAMPLER
resource_type: 1 # SAMPLER
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: 99, set: 95 }
- &db3
spirv_id: 28
name: "weightSampler"
binding: 4
input_attachment_index: 0
set: 0
decoration_flags: 0x00000000 # NONE
descriptor_type: 0 # VK_DESCRIPTOR_TYPE_SAMPLER
resource_type: 1 # SAMPLER
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: *td2
word_offset: { binding: 119, set: 115 }
all_interface_variables:
- &iv0
spirv_id: 22
name: "uv"
location: 0
storage_class: 1 # Input
semantic:
decoration_flags: 0x00000000 # NONE
built_in: -1 # ??? (-1)
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 }
member_count: 0
members:
format: 103 # VK_FORMAT_R32G32_SFLOAT
type_description: *td3
word_offset: { location: 103 }
- &iv1
spirv_id: 9
name: "fragColor"
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: *td4
word_offset: { location: 83 }
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: 4
descriptor_bindings:
- *db0 # "inTex"
- *db1 # "kernelTex"
- *db2 # "linearSampler"
- *db3 # "weightSampler"
descriptor_set_count: 1
descriptor_sets:
- set: 0
binding_count: 4
bindings:
- *db0 # "inTex"
- *db1 # "kernelTex"
- *db2 # "linearSampler"
- *db3 # "weightSampler"
input_variable_count: 1,
input_variables:
- *iv0 # "uv"
output_variable_count: 1,
output_variables:
- *iv1 # "fragColor"
push_constant_count: 0,
push_constants:
specialization_constant_count: 0,
specialization_constants:
...