diff --git a/spirv_reflect.c b/spirv_reflect.c index 50986b5..980baac 100644 --- a/spirv_reflect.c +++ b/spirv_reflect.c @@ -3001,7 +3001,19 @@ static SpvReflectResult ParseDescriptorBlocks(SpvReflectPrvParser* p_parser, Spv p_descriptor->block.name = p_descriptor->name; - bool is_parent_rta = (p_descriptor->descriptor_type == SPV_REFLECT_DESCRIPTOR_TYPE_STORAGE_BUFFER); + // We quick find if there is a runtime array in the top level of the struct (they can't be nested) + // Would be ideal to have this integrated into ParseDescriptorBlockVariableSizes() itself, but might need to re-work size logic + bool is_parent_rta = false; + if (p_descriptor->block.member_count != 0) { + for (uint32_t member_index = 0; member_index < p_descriptor->block.member_count; ++member_index) { + SpvReflectBlockVariable* p_member_var = &p_descriptor->block.members[member_index]; + SpvReflectTypeDescription* p_member_type = p_member_var->type_description; + if (p_member_type && p_member_type->op == SpvOpTypeRuntimeArray) { + is_parent_rta = true; + } + } + } + result = ParseDescriptorBlockVariableSizes(p_parser, p_module, true, false, is_parent_rta, &p_descriptor->block); if (result != SPV_REFLECT_RESULT_SUCCESS) { return result; diff --git a/tests/glsl/buffer_handle_0.spv.yaml b/tests/glsl/buffer_handle_0.spv.yaml index 2eb538a..dafee2a 100644 --- a/tests/glsl/buffer_handle_0.spv.yaml +++ b/tests/glsl/buffer_handle_0.spv.yaml @@ -1028,7 +1028,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 8 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -1095,7 +1095,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 8 - padded_size: 8 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1114,8 +1114,8 @@ all_block_variables: name: "s5" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1132,7 +1132,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 8 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -1148,7 +1148,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 8 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -1198,7 +1198,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 8 - padded_size: 8 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1234,8 +1234,8 @@ all_block_variables: name: "x" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 32 + padded_size: 32 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/glsl/buffer_handle_1.spv.yaml b/tests/glsl/buffer_handle_1.spv.yaml index fa05b2f..c5dfc94 100644 --- a/tests/glsl/buffer_handle_1.spv.yaml +++ b/tests/glsl/buffer_handle_1.spv.yaml @@ -455,7 +455,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 8 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -471,7 +471,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 8 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -505,7 +505,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 8 - padded_size: 8 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -522,8 +522,8 @@ all_block_variables: name: "s5" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -540,7 +540,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 8 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -556,7 +556,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 8 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -572,7 +572,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 8 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -623,8 +623,8 @@ all_block_variables: name: "x" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/glsl/buffer_handle_2.spv.yaml b/tests/glsl/buffer_handle_2.spv.yaml index 6cb52cd..3b566d7 100644 --- a/tests/glsl/buffer_handle_2.spv.yaml +++ b/tests/glsl/buffer_handle_2.spv.yaml @@ -618,7 +618,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 8 - padded_size: 8 + padded_size: 32 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -634,7 +634,7 @@ all_block_variables: offset: 32 absolute_offset: 32 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -650,7 +650,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 8 - padded_size: 8 + padded_size: 32 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -666,7 +666,7 @@ all_block_variables: offset: 32 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -682,7 +682,7 @@ all_block_variables: offset: 48 absolute_offset: 48 size: 0 - padded_size: 0 + padded_size: 32 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -701,8 +701,8 @@ all_block_variables: name: "x" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 80 + padded_size: 80 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/glsl/buffer_handle_3.spv.yaml b/tests/glsl/buffer_handle_3.spv.yaml index 7084090..6b35c59 100644 --- a/tests/glsl/buffer_handle_3.spv.yaml +++ b/tests/glsl/buffer_handle_3.spv.yaml @@ -258,7 +258,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 8 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -291,7 +291,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 8 - padded_size: 8 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -308,8 +308,8 @@ all_block_variables: name: "s5" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -326,7 +326,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 8 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -358,8 +358,8 @@ all_block_variables: name: "x" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/glsl/buffer_handle_8.spv.yaml b/tests/glsl/buffer_handle_8.spv.yaml index 53d8de2..cb83d25 100644 --- a/tests/glsl/buffer_handle_8.spv.yaml +++ b/tests/glsl/buffer_handle_8.spv.yaml @@ -131,8 +131,8 @@ all_block_variables: name: "x" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 48 + padded_size: 48 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/glsl/buffer_handle_uvec2_ssbo.spv.yaml b/tests/glsl/buffer_handle_uvec2_ssbo.spv.yaml index 4d5da4b..59a4aef 100644 --- a/tests/glsl/buffer_handle_uvec2_ssbo.spv.yaml +++ b/tests/glsl/buffer_handle_uvec2_ssbo.spv.yaml @@ -42,7 +42,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 8 - padded_size: 8 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -57,8 +57,8 @@ all_block_variables: name: "ssbo" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/glsl/readonly_writeonly.spv.yaml b/tests/glsl/readonly_writeonly.spv.yaml index 8c4f94e..d9b0241 100644 --- a/tests/glsl/readonly_writeonly.spv.yaml +++ b/tests/glsl/readonly_writeonly.spv.yaml @@ -142,8 +142,8 @@ all_block_variables: name: "foo" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 768 + padded_size: 768 decorations: 0x00000080 # NON_WRITABLE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/glsl/storage_buffer.spv.yaml b/tests/glsl/storage_buffer.spv.yaml index 25c98f7..fd00fdb 100644 --- a/tests/glsl/storage_buffer.spv.yaml +++ b/tests/glsl/storage_buffer.spv.yaml @@ -109,8 +109,8 @@ all_block_variables: name: "" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 256 + padded_size: 256 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -142,8 +142,8 @@ all_block_variables: name: "" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 256 + padded_size: 256 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/glsl/storage_buffer_runtime.glsl b/tests/glsl/storage_buffer_runtime.glsl new file mode 100644 index 0000000..ba7f84b --- /dev/null +++ b/tests/glsl/storage_buffer_runtime.glsl @@ -0,0 +1,25 @@ +#version 450 +#extension GL_EXT_scalar_block_layout : enable + +// 16 byte large storage buffer +// (Note: In HLSL/Slang all storage buffers are runtime array so there is no size) +layout(set = 0, binding = 0, scalar) buffer D0 { + int a; + int b[3]; +} ssbo; + +// runtime storage buffer - no known length +layout(set = 2, binding = 0, scalar) buffer D1 { + int x; + int y[]; +} ssbo_runtime; + +// 16 byte large uniform buffer +layout(set = 1, binding = 0, scalar) uniform D2 { + int s; + int t[3]; +} ubo; + +void main() { + ssbo.b[1] = ubo.t[1] + ssbo_runtime.y[ubo.s]; +} diff --git a/tests/glsl/storage_buffer_runtime.spv b/tests/glsl/storage_buffer_runtime.spv new file mode 100644 index 0000000..50ffd56 Binary files /dev/null and b/tests/glsl/storage_buffer_runtime.spv differ diff --git a/tests/glsl/storage_buffer_runtime.spv.yaml b/tests/glsl/storage_buffer_runtime.spv.yaml new file mode 100644 index 0000000..963ead0 --- /dev/null +++ b/tests/glsl/storage_buffer_runtime.spv.yaml @@ -0,0 +1,402 @@ +%YAML 1.1 +--- +all_type_descriptions: + - &td0 + id: 6 + 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: 9 + op: 28 + type_name: + struct_member_name: "b" + 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: [3,], stride: 4 } + member_count: 0 + members: + - &td2 + id: 10 + op: 30 + type_name: "D0" + struct_member_name: + storage_class: -1 # NOT APPLICABLE + type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK + decoration_flags: 0x00000001 # BLOCK + traits: + numeric: + scalar: { width: 0, signedness: 0 } + vector: { component_count: 0 } + matrix: { column_count: 0, row_count: 0, stride: 0 } + image: { dim: 0, depth: 0, arrayed: 0, ms: 0, sampled: 0, image_format: 0 } # dim=1D image_format=Unknown + array: { dims_count: 0, dims: [], stride: 0 } + member_count: 2 + members: + - *td0 + - *td1 + - &td3 + id: 6 + op: 21 + type_name: + struct_member_name: "s" + 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: + - &td4 + id: 14 + op: 28 + type_name: + struct_member_name: "t" + 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: [3,], stride: 4 } + member_count: 0 + members: + - &td5 + id: 15 + op: 30 + type_name: "D2" + 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: + - *td3 + - *td4 + - &td6 + id: 6 + op: 21 + type_name: + struct_member_name: "x" + 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: 21 + op: 29 + type_name: + struct_member_name: "y" + 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: + - &td8 + id: 22 + op: 30 + type_name: "D1" + 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: + - *td6 + - *td7 +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: 4 + size: 12 + padded_size: 12 + 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: [3,], stride: 4 } + flags: 0x00000000 # NONE + member_count: 0 + members: + type_description: *td1 + - &bv2 + name: "ssbo" + offset: 0 + absolute_offset: 0 + size: 16 + padded_size: 16 + decorations: 0x00000000 # NONE + numeric: + scalar: { width: 0, signedness: 0 } + vector: { component_count: 0 } + matrix: { column_count: 0, row_count: 0, stride: 0 } + array: { dims_count: 0, dims: [], stride: 0 } + flags: 0x00000000 # NONE + member_count: 2 + members: + - *bv0 + - *bv1 + type_description: *td2 + - &bv3 + name: "s" + 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: 0x00000000 # NONE + member_count: 0 + members: + type_description: *td3 + - &bv4 + name: "t" + offset: 4 + absolute_offset: 4 + size: 12 + padded_size: 12 + 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: [3,], stride: 4 } + flags: 0x00000000 # NONE + member_count: 0 + members: + type_description: *td4 + - &bv5 + name: "ubo" + 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: + - *bv3 + - *bv4 + type_description: *td5 + - &bv6 + name: "x" + 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 + - &bv7 + name: "y" + offset: 4 + absolute_offset: 4 + size: 0 + padded_size: 0 + 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: *td7 + - &bv8 + name: "ssbo_runtime" + 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: + - *bv6 + - *bv7 + type_description: *td8 +all_descriptor_bindings: + - &db0 + spirv_id: 12 + 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: *bv2 # "ssbo" + array: { dims_count: 0, dims: [] } + accessed: 1 + uav_counter_id: 4294967295 + uav_counter_binding: + type_description: *td2 + word_offset: { binding: 111, set: 115 } + - &db1 + spirv_id: 17 + name: "ubo" + binding: 0 + input_attachment_index: 0 + set: 1 + 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: *bv5 # "ubo" + array: { dims_count: 0, dims: [] } + accessed: 1 + uav_counter_id: 4294967295 + uav_counter_binding: + type_description: *td5 + word_offset: { binding: 136, set: 140 } + - &db2 + spirv_id: 24 + name: "ssbo_runtime" + binding: 0 + input_attachment_index: 0 + set: 2 + 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: *bv8 # "ssbo_runtime" + array: { dims_count: 0, dims: [] } + accessed: 1 + uav_counter_id: 4294967295 + uav_counter_binding: + type_description: *td8 + word_offset: { binding: 161, set: 165 } +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: 3 + descriptor_bindings: + - *db0 # "ssbo" + - *db1 # "ubo" + - *db2 # "ssbo_runtime" + descriptor_set_count: 3 + descriptor_sets: + - set: 0 + binding_count: 1 + bindings: + - *db0 # "ssbo" + - set: 1 + binding_count: 1 + bindings: + - *db1 # "ubo" + - set: 2 + binding_count: 1 + bindings: + - *db2 # "ssbo_runtime" + input_variable_count: 0, + input_variables: + output_variable_count: 0, + output_variables: + push_constant_count: 0, + push_constants: + specialization_constant_count: 0, + specialization_constants: +... diff --git a/tests/hlsl/append_consume.spv.yaml b/tests/hlsl/append_consume.spv.yaml index 6cddd99..b327b05 100644 --- a/tests/hlsl/append_consume.spv.yaml +++ b/tests/hlsl/append_consume.spv.yaml @@ -215,7 +215,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -230,8 +230,8 @@ all_block_variables: name: "counter.var.BufferOut" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -248,7 +248,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -263,8 +263,8 @@ all_block_variables: name: "counter.var.BufferIn" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/hlsl/binding_types.spv.yaml b/tests/hlsl/binding_types.spv.yaml index 65c727d..4f28402 100644 --- a/tests/hlsl/binding_types.spv.yaml +++ b/tests/hlsl/binding_types.spv.yaml @@ -971,7 +971,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000080 # NON_WRITABLE numeric: scalar: { width: 32, signedness: 0 } @@ -986,8 +986,8 @@ all_block_variables: name: "MyTBuffer" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000080 # NON_WRITABLE numeric: scalar: { width: 0, signedness: 0 } @@ -1019,8 +1019,8 @@ all_block_variables: name: "MyTextureBuffer" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000080 # NON_WRITABLE numeric: scalar: { width: 0, signedness: 0 } @@ -1135,7 +1135,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -1150,8 +1150,8 @@ all_block_variables: name: "counter.var.MyRWStructuredBuffer" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1201,7 +1201,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -1216,8 +1216,8 @@ all_block_variables: name: "counter.var.MyAppendStructuredBuffer" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1267,7 +1267,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -1282,8 +1282,8 @@ all_block_variables: name: "counter.var.MyConsumeStructuredBuffer" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/hlsl/counter_buffers.spv.yaml b/tests/hlsl/counter_buffers.spv.yaml index b27ec44..146cbf6 100644 --- a/tests/hlsl/counter_buffers.spv.yaml +++ b/tests/hlsl/counter_buffers.spv.yaml @@ -201,7 +201,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -216,8 +216,8 @@ all_block_variables: name: "counter.var.MyBufferIn" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -234,7 +234,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -249,8 +249,8 @@ all_block_variables: name: "counter.var.MyBufferOut" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/hlsl/user_type.spv.yaml b/tests/hlsl/user_type.spv.yaml index 9017494..5818a61 100644 --- a/tests/hlsl/user_type.spv.yaml +++ b/tests/hlsl/user_type.spv.yaml @@ -1088,7 +1088,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -1103,8 +1103,8 @@ all_block_variables: name: "counter.var.c" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1154,7 +1154,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 1 } @@ -1169,8 +1169,8 @@ all_block_variables: name: "counter.var.d" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1796,7 +1796,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000080 # NON_WRITABLE numeric: scalar: { width: 32, signedness: 0 } @@ -1811,8 +1811,8 @@ all_block_variables: name: "MyTBuffer" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000080 # NON_WRITABLE numeric: scalar: { width: 0, signedness: 0 } @@ -1992,8 +1992,8 @@ all_block_variables: name: "tb" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000080 # NON_WRITABLE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/push_constants/push_constant_basic_0.spv.yaml b/tests/push_constants/push_constant_basic_0.spv.yaml index f8647d3..e5e0045 100644 --- a/tests/push_constants/push_constant_basic_0.spv.yaml +++ b/tests/push_constants/push_constant_basic_0.spv.yaml @@ -202,7 +202,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -217,8 +217,8 @@ all_block_variables: name: "" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/push_constants/push_constant_basic_1.spv.yaml b/tests/push_constants/push_constant_basic_1.spv.yaml index c2fdd17..61bd943 100644 --- a/tests/push_constants/push_constant_basic_1.spv.yaml +++ b/tests/push_constants/push_constant_basic_1.spv.yaml @@ -202,7 +202,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -217,8 +217,8 @@ all_block_variables: name: "" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/spec_constants/basic.spv.yaml b/tests/spec_constants/basic.spv.yaml index f15705c..f7f58de 100644 --- a/tests/spec_constants/basic.spv.yaml +++ b/tests/spec_constants/basic.spv.yaml @@ -76,7 +76,7 @@ all_block_variables: offset: 8 absolute_offset: 8 size: 4 - padded_size: 4 + padded_size: 8 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -91,8 +91,8 @@ all_block_variables: name: "ssbo" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/spec_constants/convert.spv.yaml b/tests/spec_constants/convert.spv.yaml index 8615964..f68e2aa 100644 --- a/tests/spec_constants/convert.spv.yaml +++ b/tests/spec_constants/convert.spv.yaml @@ -235,7 +235,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -250,8 +250,8 @@ all_block_variables: name: "U_Sone" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -285,7 +285,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -300,8 +300,8 @@ all_block_variables: name: "U_Uone" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -335,7 +335,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -350,8 +350,8 @@ all_block_variables: name: "S_Sone" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -385,7 +385,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -400,8 +400,8 @@ all_block_variables: name: "S_Uone" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/spec_constants/ssbo_array.spv.yaml b/tests/spec_constants/ssbo_array.spv.yaml index 20bc96f..f89b9b5 100644 --- a/tests/spec_constants/ssbo_array.spv.yaml +++ b/tests/spec_constants/ssbo_array.spv.yaml @@ -76,7 +76,7 @@ all_block_variables: offset: 16 absolute_offset: 16 size: 12 - padded_size: 12 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -91,8 +91,8 @@ all_block_variables: name: "ssbo" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 32 + padded_size: 32 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/spec_constants/test_32bit.spv.yaml b/tests/spec_constants/test_32bit.spv.yaml index 058be88..1315a69 100644 --- a/tests/spec_constants/test_32bit.spv.yaml +++ b/tests/spec_constants/test_32bit.spv.yaml @@ -1666,7 +1666,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -1681,8 +1681,8 @@ all_block_variables: name: "IAdd" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1716,7 +1716,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -1731,8 +1731,8 @@ all_block_variables: name: "ISub" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1766,7 +1766,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -1781,8 +1781,8 @@ all_block_variables: name: "IMul" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1816,7 +1816,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -1831,8 +1831,8 @@ all_block_variables: name: "UDiv" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1866,7 +1866,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -1881,8 +1881,8 @@ all_block_variables: name: "SDiv" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1916,7 +1916,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -1931,8 +1931,8 @@ all_block_variables: name: "SRem" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1966,7 +1966,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -1981,8 +1981,8 @@ all_block_variables: name: "SMod" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2016,7 +2016,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2031,8 +2031,8 @@ all_block_variables: name: "UMod" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2066,7 +2066,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2081,8 +2081,8 @@ all_block_variables: name: "LShl" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2116,7 +2116,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2131,8 +2131,8 @@ all_block_variables: name: "RShl" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2166,7 +2166,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2181,8 +2181,8 @@ all_block_variables: name: "RSha" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2216,7 +2216,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2231,8 +2231,8 @@ all_block_variables: name: "IEq" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2266,7 +2266,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2281,8 +2281,8 @@ all_block_variables: name: "INeq" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2316,7 +2316,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2331,8 +2331,8 @@ all_block_variables: name: "Ult" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2366,7 +2366,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2381,8 +2381,8 @@ all_block_variables: name: "Ule" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2416,7 +2416,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2431,8 +2431,8 @@ all_block_variables: name: "Ugt" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2466,7 +2466,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2481,8 +2481,8 @@ all_block_variables: name: "Uge" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2516,7 +2516,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2531,8 +2531,8 @@ all_block_variables: name: "Slt" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2566,7 +2566,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2581,8 +2581,8 @@ all_block_variables: name: "Sle" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2616,7 +2616,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2631,8 +2631,8 @@ all_block_variables: name: "Sgt" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2666,7 +2666,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2681,8 +2681,8 @@ all_block_variables: name: "Sge" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2716,7 +2716,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2731,8 +2731,8 @@ all_block_variables: name: "Lor" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2766,7 +2766,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2781,8 +2781,8 @@ all_block_variables: name: "Land" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2816,7 +2816,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2831,8 +2831,8 @@ all_block_variables: name: "Lnot" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2866,7 +2866,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2881,8 +2881,8 @@ all_block_variables: name: "And" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2916,7 +2916,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2931,8 +2931,8 @@ all_block_variables: name: "Or" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2966,7 +2966,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2981,8 +2981,8 @@ all_block_variables: name: "Xor" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -3016,7 +3016,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -3031,8 +3031,8 @@ all_block_variables: name: "Not" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -3066,7 +3066,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -3081,8 +3081,8 @@ all_block_variables: name: "Leq" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -3116,7 +3116,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -3131,8 +3131,8 @@ all_block_variables: name: "Lneq" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -3166,7 +3166,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -3181,8 +3181,8 @@ all_block_variables: name: "Sel" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/spec_constants/test_64bit.spv.yaml b/tests/spec_constants/test_64bit.spv.yaml index 7fad803..f0d5ae0 100644 --- a/tests/spec_constants/test_64bit.spv.yaml +++ b/tests/spec_constants/test_64bit.spv.yaml @@ -1666,7 +1666,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -1681,8 +1681,8 @@ all_block_variables: name: "IAdd" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1716,7 +1716,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -1731,8 +1731,8 @@ all_block_variables: name: "ISub" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1766,7 +1766,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -1781,8 +1781,8 @@ all_block_variables: name: "IMul" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1816,7 +1816,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -1831,8 +1831,8 @@ all_block_variables: name: "UDiv" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1866,7 +1866,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -1881,8 +1881,8 @@ all_block_variables: name: "SDiv" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1916,7 +1916,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -1931,8 +1931,8 @@ all_block_variables: name: "SRem" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -1966,7 +1966,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -1981,8 +1981,8 @@ all_block_variables: name: "SMod" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2016,7 +2016,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2031,8 +2031,8 @@ all_block_variables: name: "UMod" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2066,7 +2066,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2081,8 +2081,8 @@ all_block_variables: name: "LShl" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2116,7 +2116,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2131,8 +2131,8 @@ all_block_variables: name: "RShl" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2166,7 +2166,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2181,8 +2181,8 @@ all_block_variables: name: "RSha" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2216,7 +2216,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2231,8 +2231,8 @@ all_block_variables: name: "IEq" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2266,7 +2266,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2281,8 +2281,8 @@ all_block_variables: name: "INeq" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2316,7 +2316,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2331,8 +2331,8 @@ all_block_variables: name: "Ult" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2366,7 +2366,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2381,8 +2381,8 @@ all_block_variables: name: "Ule" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2416,7 +2416,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2431,8 +2431,8 @@ all_block_variables: name: "Ugt" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2466,7 +2466,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2481,8 +2481,8 @@ all_block_variables: name: "Uge" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2516,7 +2516,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2531,8 +2531,8 @@ all_block_variables: name: "Slt" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2566,7 +2566,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2581,8 +2581,8 @@ all_block_variables: name: "Sle" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2616,7 +2616,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2631,8 +2631,8 @@ all_block_variables: name: "Sgt" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2666,7 +2666,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2681,8 +2681,8 @@ all_block_variables: name: "Sge" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2716,7 +2716,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2731,8 +2731,8 @@ all_block_variables: name: "Lor" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2766,7 +2766,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2781,8 +2781,8 @@ all_block_variables: name: "Land" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2816,7 +2816,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2831,8 +2831,8 @@ all_block_variables: name: "Lnot" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2866,7 +2866,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2881,8 +2881,8 @@ all_block_variables: name: "And" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2916,7 +2916,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2931,8 +2931,8 @@ all_block_variables: name: "Or" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -2966,7 +2966,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -2981,8 +2981,8 @@ all_block_variables: name: "Xor" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -3016,7 +3016,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -3031,8 +3031,8 @@ all_block_variables: name: "Not" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -3066,7 +3066,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -3081,8 +3081,8 @@ all_block_variables: name: "Leq" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -3116,7 +3116,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -3131,8 +3131,8 @@ all_block_variables: name: "Lneq" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -3166,7 +3166,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -3181,8 +3181,8 @@ all_block_variables: name: "Sel" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/test-spirv-reflect.cpp b/tests/test-spirv-reflect.cpp index 0d1c765..7e1ee63 100644 --- a/tests/test-spirv-reflect.cpp +++ b/tests/test-spirv-reflect.cpp @@ -828,6 +828,7 @@ const std::vector all_spirv_paths = { "../tests/glsl/readonly_writeonly.spv", "../tests/glsl/runtime_array_of_array_of_struct.spv", "../tests/glsl/storage_buffer.spv", + "../tests/glsl/storage_buffer_runtime.spv", "../tests/glsl/texel_buffer.spv", "../tests/hlsl/append_consume.spv", "../tests/hlsl/array_of_structured_buffer.spv", diff --git a/tests/variable_access/atomics_0.spv.yaml b/tests/variable_access/atomics_0.spv.yaml index f5182b7..775deba 100644 --- a/tests/variable_access/atomics_0.spv.yaml +++ b/tests/variable_access/atomics_0.spv.yaml @@ -212,7 +212,7 @@ all_block_variables: offset: 20 absolute_offset: 20 size: 4 - padded_size: 4 + padded_size: 12 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -227,8 +227,8 @@ all_block_variables: name: "" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 32 + padded_size: 32 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/variable_access/copy_array_0.spv.yaml b/tests/variable_access/copy_array_0.spv.yaml index 638d068..6a0f037 100644 --- a/tests/variable_access/copy_array_0.spv.yaml +++ b/tests/variable_access/copy_array_0.spv.yaml @@ -110,7 +110,7 @@ all_block_variables: offset: 32 absolute_offset: 32 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -125,8 +125,8 @@ all_block_variables: name: offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 48 + padded_size: 48 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/variable_access/copy_array_2.spv.yaml b/tests/variable_access/copy_array_2.spv.yaml index 4ff64d4..1eebf6c 100644 --- a/tests/variable_access/copy_array_2.spv.yaml +++ b/tests/variable_access/copy_array_2.spv.yaml @@ -181,7 +181,7 @@ all_block_variables: offset: 32 absolute_offset: 32 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -196,8 +196,8 @@ all_block_variables: name: "" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 48 + padded_size: 48 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -232,7 +232,7 @@ all_block_variables: offset: 4 absolute_offset: 4 size: 16 - padded_size: 16 + padded_size: 20 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -263,8 +263,8 @@ all_block_variables: name: "" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 32 + padded_size: 32 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/variable_access/copy_memory.spv.yaml b/tests/variable_access/copy_memory.spv.yaml index 9e88367..f83dc7f 100644 --- a/tests/variable_access/copy_memory.spv.yaml +++ b/tests/variable_access/copy_memory.spv.yaml @@ -57,8 +57,8 @@ all_block_variables: name: offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 128 + padded_size: 128 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -90,8 +90,8 @@ all_block_variables: name: offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 128 + padded_size: 128 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/variable_access/copy_struct_0.spv.yaml b/tests/variable_access/copy_struct_0.spv.yaml index 0855b58..3a839af 100644 --- a/tests/variable_access/copy_struct_0.spv.yaml +++ b/tests/variable_access/copy_struct_0.spv.yaml @@ -340,7 +340,7 @@ all_block_variables: offset: 32 absolute_offset: 32 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -355,8 +355,8 @@ all_block_variables: name: offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 48 + padded_size: 48 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } @@ -458,7 +458,7 @@ all_block_variables: offset: 32 absolute_offset: 32 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -473,8 +473,8 @@ all_block_variables: name: offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 48 + padded_size: 48 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/variable_access/descriptor_indexing_0.spv.yaml b/tests/variable_access/descriptor_indexing_0.spv.yaml index aa373e9..09bcab5 100644 --- a/tests/variable_access/descriptor_indexing_0.spv.yaml +++ b/tests/variable_access/descriptor_indexing_0.spv.yaml @@ -159,8 +159,8 @@ all_block_variables: name: "bar" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 16 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/variable_access/phy_storage_buffer_used_0.spv.yaml b/tests/variable_access/phy_storage_buffer_used_0.spv.yaml index 10a887f..0d061e0 100644 --- a/tests/variable_access/phy_storage_buffer_used_0.spv.yaml +++ b/tests/variable_access/phy_storage_buffer_used_0.spv.yaml @@ -148,7 +148,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -181,7 +181,7 @@ all_block_variables: offset: 0 absolute_offset: 0 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -214,7 +214,7 @@ all_block_variables: offset: 16 absolute_offset: 16 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -229,8 +229,8 @@ all_block_variables: name: "x" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 32 + padded_size: 32 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 } diff --git a/tests/variable_access/phy_storage_buffer_used_1.spv.yaml b/tests/variable_access/phy_storage_buffer_used_1.spv.yaml index 79eebe6..f85f093 100644 --- a/tests/variable_access/phy_storage_buffer_used_1.spv.yaml +++ b/tests/variable_access/phy_storage_buffer_used_1.spv.yaml @@ -294,7 +294,7 @@ all_block_variables: offset: 8 absolute_offset: 8 size: 4 - padded_size: 4 + padded_size: 8 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -328,7 +328,7 @@ all_block_variables: offset: 8 absolute_offset: 8 size: 4 - padded_size: 4 + padded_size: 8 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -362,7 +362,7 @@ all_block_variables: offset: 16 absolute_offset: 16 size: 4 - padded_size: 4 + padded_size: 16 decorations: 0x00000000 # NONE numeric: scalar: { width: 32, signedness: 0 } @@ -377,8 +377,8 @@ all_block_variables: name: "x" offset: 0 absolute_offset: 0 - size: 0 - padded_size: 0 + size: 32 + padded_size: 32 decorations: 0x00000000 # NONE numeric: scalar: { width: 0, signedness: 0 }