1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute -finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s
\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
38 void main(int GI : SV_GroupIndex) {
\r