1// RUN: mlir-translate -test-spirv-roundtrip -split-input-file %s | FileCheck %s
2
3spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader], []> {
4  spv.func @noop() -> () "None" {
5    spv.Return
6  }
7  // CHECK:      spv.EntryPoint "GLCompute" @noop
8  // CHECK-NEXT: spv.ExecutionMode @noop "ContractionOff"
9  spv.EntryPoint "GLCompute" @noop
10  spv.ExecutionMode @noop "ContractionOff"
11}
12
13// -----
14
15spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader], []> {
16  // CHECK:       spv.globalVariable @var2 : !spv.ptr<f32, Input>
17  // CHECK-NEXT:  spv.globalVariable @var3 : !spv.ptr<f32, Output>
18  // CHECK-NEXT:  spv.func @noop({{%.*}}: !spv.ptr<f32, Input>, {{%.*}}: !spv.ptr<f32, Output>) "None"
19  // CHECK:       spv.EntryPoint "GLCompute" @noop, @var2, @var3
20  spv.globalVariable @var2 : !spv.ptr<f32, Input>
21  spv.globalVariable @var3 : !spv.ptr<f32, Output>
22  spv.func @noop(%arg0 : !spv.ptr<f32, Input>, %arg1 : !spv.ptr<f32, Output>) -> () "None" {
23    spv.Return
24  }
25  spv.EntryPoint "GLCompute" @noop, @var2, @var3
26  spv.ExecutionMode @noop "ContractionOff"
27}
28