1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute -finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s -check-prefixes=DXIL
\r
8 // DXIL: %"class.hlsl::ConsumeStructuredBuffer" = type { target("dx.RawBuffer", i16, 1, 0)
\r
9 // DXIL: %"class.hlsl::ConsumeStructuredBuffer.0" = type { target("dx.RawBuffer", i16, 1, 0)
\r
10 // DXIL: %"class.hlsl::ConsumeStructuredBuffer.1" = type { target("dx.RawBuffer", i32, 1, 0)
\r
11 // DXIL: %"class.hlsl::ConsumeStructuredBuffer.2" = type { target("dx.RawBuffer", i32, 1, 0)
\r
12 // DXIL: %"class.hlsl::ConsumeStructuredBuffer.3" = type { target("dx.RawBuffer", i64, 1, 0)
\r
13 // DXIL: %"class.hlsl::ConsumeStructuredBuffer.4" = type { target("dx.RawBuffer", i64, 1, 0)
\r
14 // DXIL: %"class.hlsl::ConsumeStructuredBuffer.5" = type { target("dx.RawBuffer", half, 1, 0)
\r
15 // DXIL: %"class.hlsl::ConsumeStructuredBuffer.6" = type { target("dx.RawBuffer", float, 1, 0)
\r
16 // DXIL: %"class.hlsl::ConsumeStructuredBuffer.7" = type { target("dx.RawBuffer", double, 1, 0)
\r
17 // DXIL: %"class.hlsl::ConsumeStructuredBuffer.8" = type { target("dx.RawBuffer", <4 x i16>, 1, 0)
\r
18 // DXIL: %"class.hlsl::ConsumeStructuredBuffer.9" = type { target("dx.RawBuffer", <3 x i32>, 1, 0)
\r
19 // DXIL: %"class.hlsl::ConsumeStructuredBuffer.10" = type { target("dx.RawBuffer", <2 x half>, 1, 0)
\r
20 // DXIL: %"class.hlsl::ConsumeStructuredBuffer.11" = type { target("dx.RawBuffer", <3 x float>, 1, 0)
\r
21 // DXIL: %"class.hlsl::ConsumeStructuredBuffer.12" = type { target("dx.RawBuffer", %struct.MyStruct, 1, 0)
\r
22 // DXIL: %struct.MyStruct = type { <4 x float>, <2 x i32>, [8 x i8] }
\r
24 ConsumeStructuredBuffer<int16_t> BufI16;
\r
25 ConsumeStructuredBuffer<uint16_t> BufU16;
\r
26 ConsumeStructuredBuffer<int> BufI32;
\r
27 ConsumeStructuredBuffer<uint> BufU32;
\r
28 ConsumeStructuredBuffer<int64_t> BufI64;
\r
29 ConsumeStructuredBuffer<uint64_t> BufU64;
\r
30 ConsumeStructuredBuffer<half> BufF16;
\r
31 ConsumeStructuredBuffer<float> BufF32;
\r
32 ConsumeStructuredBuffer<double> BufF64;
\r
33 ConsumeStructuredBuffer< vector<int16_t, 4> > BufI16x4;
\r
34 ConsumeStructuredBuffer< vector<uint, 3> > BufU32x3;
\r
35 ConsumeStructuredBuffer<half2> BufF16x2;
\r
36 ConsumeStructuredBuffer<float3> BufF32x3;
\r
37 // TODO: ConsumeStructuredBuffer<snorm half> BufSNormF16;
\r
38 // TODO: ConsumeStructuredBuffer<unorm half> BufUNormF16;
\r
39 // TODO: ConsumeStructuredBuffer<snorm float> BufSNormF32;
\r
40 // TODO: ConsumeStructuredBuffer<unorm float> BufUNormF32;
\r
41 // TODO: ConsumeStructuredBuffer<snorm double> BufSNormF64;
\r
42 // TODO: ConsumeStructuredBuffer<unorm double> BufUNormF64;
\r
43 ConsumeStructuredBuffer<MyStruct> BufMyStruct;
\r
46 void main(int GI : SV_GroupIndex) {
\r