Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions common/output_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ std::string ToStringGenerator(SpvReflectGenerator generator) {
case SPV_REFLECT_GENERATOR_CLAY_CLAY_SHADER_COMPILER:
return "Clay Clay Shader Compiler";
break;
case SPV_REFLECT_GENERATOR_SLANG_SHADER_COMPILER:
return "Slang Shader Compiler";
break;
}
// unhandled SpvReflectGenerator enum value
return "???";
Expand Down
1 change: 1 addition & 0 deletions spirv_reflect.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ typedef enum SpvReflectGenerator {
SPV_REFLECT_GENERATOR_KHRONOS_SPIRV_TOOLS_LINKER = 17,
SPV_REFLECT_GENERATOR_WINE_VKD3D_SHADER_COMPILER = 18,
SPV_REFLECT_GENERATOR_CLAY_CLAY_SHADER_COMPILER = 19,
SPV_REFLECT_GENERATOR_SLANG_SHADER_COMPILER = 40,
} SpvReflectGenerator;

enum {
Expand Down
Binary file modified tests/push_constants/pointer_in_struct.spv
Binary file not shown.
6 changes: 3 additions & 3 deletions tests/push_constants/pointer_in_struct.spv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ all_type_descriptions:
- &td5
id: 13
op: 30
type_name: "Data_std140"
type_name: "Data_std430"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
Expand Down Expand Up @@ -225,10 +225,10 @@ all_descriptor_bindings:
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td1
word_offset: { binding: 109, set: 113 }
word_offset: { binding: 103, set: 107 }
all_interface_variables:
module:
generator: 0 # ???
generator: 40 # Slang Shader Compiler
entry_point_name: "main"
entry_point_id: 2
source_language: 11 # Slang
Expand Down
Binary file modified tests/push_constants/pointer_in_struct_2.spv
Binary file not shown.
6 changes: 3 additions & 3 deletions tests/push_constants/pointer_in_struct_2.spv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ all_type_descriptions:
- &td7
id: 13
op: 30
type_name: "Data_std140"
type_name: "Data_std430"
struct_member_name:
storage_class: -1 # NOT APPLICABLE
type_flags: 0x10080000 # STRUCT EXTERNAL_BLOCK
Expand Down Expand Up @@ -329,10 +329,10 @@ all_descriptor_bindings:
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td1
word_offset: { binding: 123, set: 127 }
word_offset: { binding: 117, set: 121 }
all_interface_variables:
module:
generator: 0 # ???
generator: 40 # Slang Shader Compiler
entry_point_name: "main"
entry_point_id: 2
source_language: 11 # Slang
Expand Down
Binary file modified tests/push_constants/push_constant_basic_2.spv
Binary file not shown.
28 changes: 14 additions & 14 deletions tests/push_constants/push_constant_basic_2.spv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
---
all_type_descriptions:
- &td0
id: 8
id: 11
op: 29
type_name:
struct_member_name:
Expand All @@ -19,7 +19,7 @@ all_type_descriptions:
member_count: 0
members:
- &td1
id: 4
id: 10
op: 30
type_name: "RWStructuredBuffer"
struct_member_name:
Expand All @@ -37,7 +37,7 @@ all_type_descriptions:
members:
- *td0
- &td2
id: 15
id: 7
op: 21
type_name:
struct_member_name: "a"
Expand All @@ -54,7 +54,7 @@ all_type_descriptions:
member_count: 0
members:
- &td3
id: 9
id: 16
op: 28
type_name:
struct_member_name: "data"
Expand All @@ -71,7 +71,7 @@ all_type_descriptions:
member_count: 0
members:
- &td4
id: 5
id: 15
op: 30
type_name: "_Array_std430_uint4"
struct_member_name: "b"
Expand All @@ -89,7 +89,7 @@ all_type_descriptions:
members:
- *td3
- &td5
id: 15
id: 7
op: 21
type_name:
struct_member_name: "t"
Expand All @@ -106,7 +106,7 @@ all_type_descriptions:
member_count: 0
members:
- &td6
id: 15
id: 7
op: 21
type_name:
struct_member_name: "s"
Expand All @@ -123,7 +123,7 @@ all_type_descriptions:
member_count: 0
members:
- &td7
id: 6
id: 18
op: 30
type_name: "Bar_std430"
struct_member_name: "bar"
Expand All @@ -142,7 +142,7 @@ all_type_descriptions:
- *td5
- *td6
- &td8
id: 10
id: 19
op: 32
type_name:
struct_member_name: "node"
Expand All @@ -159,7 +159,7 @@ all_type_descriptions:
member_count: 0
members:
- &td9
id: 7
id: 14
op: 30
type_name: "Data_std430"
struct_member_name:
Expand Down Expand Up @@ -350,7 +350,7 @@ all_block_variables:
type_description: *td9
all_descriptor_bindings:
- &db0
spirv_id: 2
spirv_id: 13
name: "result"
binding: 0
input_attachment_index: 0
Expand All @@ -365,12 +365,12 @@ all_descriptor_bindings:
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td1
word_offset: { binding: 129, set: 133 }
word_offset: { binding: 133, set: 137 }
all_interface_variables:
module:
generator: 7 # Khronos SPIR-V Tools Assembler
generator: 40 # Slang Shader Compiler
entry_point_name: "main"
entry_point_id: 1
entry_point_id: 2
source_language: 11 # Slang
source_language_version: 1
spirv_execution_model: 5 # GLCompute
Expand Down
Binary file modified tests/push_constants/push_constant_basic_3.spv
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/push_constants/push_constant_basic_3.spv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -608,10 +608,10 @@ all_descriptor_bindings:
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td1
word_offset: { binding: 157, set: 161 }
word_offset: { binding: 161, set: 165 }
all_interface_variables:
module:
generator: 0 # ???
generator: 40 # Slang Shader Compiler
entry_point_name: "main"
entry_point_id: 2
source_language: 11 # Slang
Expand Down
Binary file modified tests/variable_access/copy_array_1.spv
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/variable_access/copy_array_1.spv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ all_descriptor_bindings:
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td5
word_offset: { binding: 118, set: 122 }
word_offset: { binding: 122, set: 126 }
all_interface_variables:
module:
generator: 0 # ???
generator: 40 # Slang Shader Compiler
entry_point_name: "main"
entry_point_id: 2
source_language: 11 # Slang
Expand Down
Binary file modified tests/variable_access/copy_array_3.spv
Binary file not shown.
34 changes: 17 additions & 17 deletions tests/variable_access/copy_array_3.spv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
---
all_type_descriptions:
- &td0
id: 13
id: 9
op: 23
type_name:
struct_member_name: "a"
Expand All @@ -19,7 +19,7 @@ all_type_descriptions:
member_count: 0
members:
- &td1
id: 15
id: 11
op: 28
type_name:
struct_member_name: "data"
Expand All @@ -36,7 +36,7 @@ all_type_descriptions:
member_count: 0
members:
- &td2
id: 14
id: 10
op: 30
type_name: "_Array_std430_uint4"
struct_member_name: "b"
Expand All @@ -54,7 +54,7 @@ all_type_descriptions:
members:
- *td1
- &td3
id: 6
id: 8
op: 21
type_name:
struct_member_name: "c"
Expand All @@ -71,7 +71,7 @@ all_type_descriptions:
member_count: 0
members:
- &td4
id: 19
id: 16
op: 29
type_name: "Bar1_std430"
struct_member_name:
Expand All @@ -91,7 +91,7 @@ all_type_descriptions:
- *td2
- *td3
- &td5
id: 18
id: 15
op: 30
type_name: "RWStructuredBuffer"
struct_member_name:
Expand All @@ -109,7 +109,7 @@ all_type_descriptions:
members:
- *td4
- &td6
id: 13
id: 9
op: 23
type_name:
struct_member_name: "d"
Expand All @@ -126,7 +126,7 @@ all_type_descriptions:
member_count: 0
members:
- &td7
id: 15
id: 11
op: 28
type_name:
struct_member_name: "data"
Expand All @@ -143,7 +143,7 @@ all_type_descriptions:
member_count: 0
members:
- &td8
id: 14
id: 10
op: 30
type_name: "_Array_std430_uint4"
struct_member_name: "e"
Expand All @@ -161,7 +161,7 @@ all_type_descriptions:
members:
- *td7
- &td9
id: 6
id: 8
op: 21
type_name:
struct_member_name: "f"
Expand All @@ -178,7 +178,7 @@ all_type_descriptions:
member_count: 0
members:
- &td10
id: 29
id: 26
op: 29
type_name: "Bar2_std430"
struct_member_name:
Expand All @@ -198,7 +198,7 @@ all_type_descriptions:
- *td8
- *td9
- &td11
id: 28
id: 25
op: 30
type_name: "RWStructuredBuffer"
struct_member_name:
Expand Down Expand Up @@ -420,7 +420,7 @@ all_block_variables:
type_description: *td11
all_descriptor_bindings:
- &db0
spirv_id: 21
spirv_id: 18
name: "foo1"
binding: 0
input_attachment_index: 0
Expand All @@ -435,9 +435,9 @@ all_descriptor_bindings:
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td5
word_offset: { binding: 148, set: 152 }
word_offset: { binding: 152, set: 156 }
- &db1
spirv_id: 31
spirv_id: 28
name: "foo2"
binding: 0
input_attachment_index: 0
Expand All @@ -452,10 +452,10 @@ all_descriptor_bindings:
uav_counter_id: 4294967295
uav_counter_binding:
type_description: *td11
word_offset: { binding: 183, set: 187 }
word_offset: { binding: 195, set: 199 }
all_interface_variables:
module:
generator: 0 # ???
generator: 40 # Slang Shader Compiler
entry_point_name: "main"
entry_point_id: 2
source_language: 11 # Slang
Expand Down
Binary file modified tests/variable_access/phy_storage_buffer_used_2.spv
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/variable_access/phy_storage_buffer_used_2.spv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ all_descriptor_bindings:
word_offset: { binding: 120, set: 124 }
all_interface_variables:
module:
generator: 0 # ???
generator: 40 # Slang Shader Compiler
entry_point_name: "main"
entry_point_id: 2
source_language: 11 # Slang
Expand Down
Binary file modified tests/variable_access/phy_storage_buffer_used_3.spv
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/variable_access/phy_storage_buffer_used_3.spv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ all_descriptor_bindings:
word_offset: { binding: 128, set: 132 }
all_interface_variables:
module:
generator: 0 # ???
generator: 40 # Slang Shader Compiler
entry_point_name: "main"
entry_point_id: 2
source_language: 11 # Slang
Expand Down
Loading