Skip to content

Commit 2cf276d

Browse files
authored
[mlir][spirv] Support SPIR-V 1.6 in deserializer (#151958)
After skimming through the changes in the spec, there does not seem to be anything that will cause issues. A new roundtrip test has been added and validate with `spirv-val` just in case.
1 parent 7fb620a commit 2cf276d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ LogicalResult spirv::Deserializer::processHeader() {
138138
MIN_VERSION_CASE(3);
139139
MIN_VERSION_CASE(4);
140140
MIN_VERSION_CASE(5);
141+
MIN_VERSION_CASE(6);
141142
#undef MIN_VERSION_CASE
142143
default:
143144
return emitError(unknownLoc, "unsupported SPIR-V minor version: ")

mlir/test/Target/SPIRV/module.mlir

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ spirv.module Logical GLSL450 requires #spirv.vce<v1.5, [Shader], []> {
2020

2121
// -----
2222

23+
// CHECK: v1.6
24+
spirv.module Logical GLSL450 requires #spirv.vce<v1.6, [Shader, Linkage], []> {
25+
}
26+
27+
// -----
28+
2329
// CHECK: [Shader, Float16]
2430
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader, Float16], []> {
2531
}

0 commit comments

Comments
 (0)