1 // RUN: mlir-translate -split-input-file -test-spirv-roundtrip %s | FileCheck %s
3 spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader], []> {
4 // CHECK: location = 0 : i32
5 spv.globalVariable @var {location = 0 : i32} : !spv.ptr<vector<4xf32>, Input>
10 spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader], []> {
11 // CHECK: no_perspective
12 spv.globalVariable @var {no_perspective} : !spv.ptr<vector<4xf32>, Input>
17 spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader], []> {
19 spv.globalVariable @var {flat} : !spv.ptr<si32, Input>
24 spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader], []> {
27 spv.globalVariable @var1 bind(0, 0) {aliased} : !spv.ptr<!spv.struct<(!spv.array<4xf32, stride=4>[0])>, StorageBuffer>
28 spv.globalVariable @var2 bind(0, 0) {aliased} : !spv.ptr<!spv.struct<(vector<4xf32>[0])>, StorageBuffer>
33 spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader], []> {
34 // CHECK: non_readable
35 spv.globalVariable @var bind(0, 0) {non_readable} : !spv.ptr<!spv.struct<(!spv.array<4xf32, stride=4>[0])>, StorageBuffer>
40 spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader], []> {
41 // CHECK: non_writable
42 spv.globalVariable @var bind(0, 0) {non_writable} : !spv.ptr<!spv.struct<(!spv.array<4xf32, stride=4>[0])>, StorageBuffer>
47 spv.module Logical GLSL450 requires #spv.vce<v1.0, [Shader], []> {
49 spv.globalVariable @var bind(0, 0) {restrict} : !spv.ptr<!spv.struct<(!spv.array<4xf32, stride=4>[0])>, StorageBuffer>