Make test more lenient for custom clang version strings
[llvm-project.git] / clang / test / CodeGenHLSL / builtins / RWStructuredBuffer-elementtype.hlsl
blobf2f6956ce15415a5ffd63eba4342104787ae18b9
1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute -finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s\r
2 \r
3 // CHECK: %"class.hlsl::RWStructuredBuffer" = type { target("dx.RawBuffer", i16, 1, 0) }\r
4 // CHECK: %"class.hlsl::RWStructuredBuffer.0" = type { target("dx.RawBuffer", i16, 1, 0) }\r
5 // CHECK: %"class.hlsl::RWStructuredBuffer.1" = type { target("dx.RawBuffer", i32, 1, 0) }\r
6 // CHECK: %"class.hlsl::RWStructuredBuffer.2" = type { target("dx.RawBuffer", i32, 1, 0) }\r
7 // CHECK: %"class.hlsl::RWStructuredBuffer.3" = type { target("dx.RawBuffer", i64, 1, 0) }\r
8 // CHECK: %"class.hlsl::RWStructuredBuffer.4" = type { target("dx.RawBuffer", i64, 1, 0) }\r
9 // CHECK: %"class.hlsl::RWStructuredBuffer.5" = type { target("dx.RawBuffer", half, 1, 0) }\r
10 // CHECK: %"class.hlsl::RWStructuredBuffer.6" = type { target("dx.RawBuffer", float, 1, 0) }\r
11 // CHECK: %"class.hlsl::RWStructuredBuffer.7" = type { target("dx.RawBuffer", double, 1, 0) }\r
12 // CHECK: %"class.hlsl::RWStructuredBuffer.8" = type { target("dx.RawBuffer", <4 x i16>, 1, 0) }\r
13 // CHECK: %"class.hlsl::RWStructuredBuffer.9" = type { target("dx.RawBuffer", <3 x i32>, 1, 0) }\r
14 // CHECK: %"class.hlsl::RWStructuredBuffer.10" = type { target("dx.RawBuffer", <2 x half>, 1, 0) }\r
15 // CHECK: %"class.hlsl::RWStructuredBuffer.11" = type { target("dx.RawBuffer", <3 x float>, 1, 0) }\r
17 RWStructuredBuffer<int16_t> BufI16;\r
18 RWStructuredBuffer<uint16_t> BufU16;\r
19 RWStructuredBuffer<int> BufI32;\r
20 RWStructuredBuffer<uint> BufU32;\r
21 RWStructuredBuffer<int64_t> BufI64;\r
22 RWStructuredBuffer<uint64_t> BufU64;\r
23 RWStructuredBuffer<half> BufF16;\r
24 RWStructuredBuffer<float> BufF32;\r
25 RWStructuredBuffer<double> BufF64;\r
26 RWStructuredBuffer< vector<int16_t, 4> > BufI16x4;\r
27 RWStructuredBuffer< vector<uint, 3> > BufU32x3;\r
28 RWStructuredBuffer<half2> BufF16x2;\r
29 RWStructuredBuffer<float3> BufF32x3;\r
30 // TODO: RWStructuredBuffer<snorm half> BufSNormF16;\r
31 // TODO: RWStructuredBuffer<unorm half> BufUNormF16;\r
32 // TODO: RWStructuredBuffer<snorm float> BufSNormF32;\r
33 // TODO: RWStructuredBuffer<unorm float> BufUNormF32;\r
34 // TODO: RWStructuredBuffer<snorm double> BufSNormF64;\r
35 // TODO: RWStructuredBuffer<unorm double> BufUNormF64;\r
37 [numthreads(1,1,1)]\r
38 void main(int GI : SV_GroupIndex) {\r
39   BufI16[GI] = 0;\r
40   BufU16[GI] = 0;\r
41   BufI32[GI] = 0;\r
42   BufU32[GI] = 0;\r
43   BufI64[GI] = 0;\r
44   BufU64[GI] = 0;\r
45   BufF16[GI] = 0;\r
46   BufF32[GI] = 0;\r
47   BufF64[GI] = 0;\r
48   BufI16x4[GI] = 0;\r
49   BufU32x3[GI] = 0;\r
50   BufF16x2[GI] = 0;\r
51   BufF32x3[GI] = 0;\r
52 }\r