1
- // RUN: mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file %s | FileCheck %s
1
+ // RUN: mlir-translate --no-implicit-module --test-spirv-roundtrip --split-input-file %s | FileCheck %s
2
+
3
+ // REQUIRES: shell
4
+ // RUN: %if spirv-tools %{ rm -rf %t %}
5
+ // RUN: %if spirv-tools %{ mkdir %t %}
6
+ // RUN: %if spirv-tools %{ mlir-translate --no-implicit-module --serialize-spirv --split-input-file --spirv-save-validation-files-with-prefix=%t/module %s %}
7
+ // RUN: %if spirv-tools %{ ls %t/module*.spv | xargs -I{} spirv-val {} %}
2
8
3
9
// CHECK: spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
4
10
// CHECK-NEXT: spirv.func @foo() "Inline" {
5
11
// CHECK-NEXT: spirv.Return
6
12
// CHECK-NEXT: }
13
+ // CHECK-NEXT: spirv.EntryPoint "Vertex" @foo
7
14
// CHECK-NEXT: }
8
15
9
16
spirv.module Logical GLSL450 requires #spirv.vce <v1.0 , [Shader ], []> {
10
17
spirv.func @foo () -> () " Inline" {
11
18
spirv.Return
12
19
}
20
+ spirv.EntryPoint " Vertex" @foo
13
21
}
14
22
15
23
// -----
16
24
17
25
// CHECK: v1.5
18
- spirv.module Logical GLSL450 requires #spirv.vce <v1.5 , [Shader ], []> {
26
+ spirv.module Logical GLSL450 requires #spirv.vce <v1.5 , [Shader , Linkage ], []> {
19
27
}
20
28
21
29
// -----
@@ -26,13 +34,13 @@ spirv.module Logical GLSL450 requires #spirv.vce<v1.6, [Shader, Linkage], []> {
26
34
27
35
// -----
28
36
29
- // CHECK: [Shader, Float16]
30
- spirv.module Logical GLSL450 requires #spirv.vce <v1.0 , [Shader , Float16 ], []> {
37
+ // CHECK: [Shader, Float16, Linkage ]
38
+ spirv.module Logical GLSL450 requires #spirv.vce <v1.0 , [Shader , Float16 , Linkage ], []> {
31
39
}
32
40
33
41
// -----
34
42
35
43
// CHECK: [SPV_KHR_float_controls, SPV_KHR_subgroup_vote]
36
- spirv.module Logical GLSL450 requires #spirv.vce <v1.0 , [Shader ], [SPV_KHR_float_controls , SPV_KHR_subgroup_vote ]> {
44
+ spirv.module Logical GLSL450 requires #spirv.vce <v1.0 , [Shader , Linkage ], [SPV_KHR_float_controls , SPV_KHR_subgroup_vote ]> {
37
45
}
38
46
0 commit comments