Skip to content

Commit c326df4

Browse files
committed
Fix generating invalid YAML files
YAML 1.0 demands that the separator between a YAML directive and its value is a colon. This wasn't the case for the YAML files generated by spirv-reflect, as it used a space as separator instead. This resulted in tools parsing YAML stricly not being able to process the YAML files generated by spirv-reflect. Newer YAML versions demand a space as separator between YAML directive and its value instead. To fix this, this commit increases the YAML version to 1.1. This is done instead of replacing the separator to improve compatibility with tooling, as many tools don't support YAML 1.0 and require YAML 1.1 as minimal version.
1 parent 8542f37 commit c326df4

File tree

97 files changed

+97
-97
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+97
-97
lines changed

common/output_stream.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2148,7 +2148,7 @@ void SpvReflectToYaml::Write(std::ostream& os) {
21482148
const std::string t2 = Indent(indent_level + 2);
21492149
const std::string t3 = Indent(indent_level + 3);
21502150

2151-
os << "%YAML 1.0" << std::endl;
2151+
os << "%YAML 1.1" << std::endl;
21522152
os << "---" << std::endl;
21532153

21542154
type_description_to_index_.clear();

tests/16bit/vert_in_out_16.spv.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%YAML 1.0
1+
%YAML 1.1
22
---
33
all_type_descriptions:
44
- &td0

tests/access_chains/array_length_from_access_chain.spv.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%YAML 1.0
1+
%YAML 1.1
22
---
33
all_type_descriptions:
44
- &td0

tests/cbuffer_unused/cbuffer_unused_001.spv.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%YAML 1.0
1+
%YAML 1.1
22
---
33
all_type_descriptions:
44
- &td0

tests/entry_exec_mode/comp_local_size.spv.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%YAML 1.0
1+
%YAML 1.1
22
---
33
all_type_descriptions:
44
- &td0

tests/entry_exec_mode/geom_inv_out_vert.spv.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%YAML 1.0
1+
%YAML 1.1
22
---
33
all_type_descriptions:
44
- &td0

tests/execution_mode/local_size_id.spv.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%YAML 1.0
1+
%YAML 1.1
22
---
33
all_type_descriptions:
44
all_block_variables:

tests/execution_mode/local_size_id_spec.spv.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%YAML 1.0
1+
%YAML 1.1
22
---
33
all_type_descriptions:
44
all_block_variables:

tests/glsl/buffer_handle_0.spv.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%YAML 1.0
1+
%YAML 1.1
22
---
33
all_type_descriptions:
44
- &td0

tests/glsl/buffer_handle_1.spv.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%YAML 1.0
1+
%YAML 1.1
22
---
33
all_type_descriptions:
44
- &td0

0 commit comments

Comments
 (0)