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::RasterizerOrderedStructuredBuffer" = type { target("dx.RawBuffer", i16, 1, 1) }
\r
9 // DXIL: %"class.hlsl::RasterizerOrderedStructuredBuffer.0" = type { target("dx.RawBuffer", i16, 1, 1) }
\r
10 // DXIL: %"class.hlsl::RasterizerOrderedStructuredBuffer.1" = type { target("dx.RawBuffer", i32, 1, 1) }
\r
11 // DXIL: %"class.hlsl::RasterizerOrderedStructuredBuffer.2" = type { target("dx.RawBuffer", i32, 1, 1) }
\r
12 // DXIL: %"class.hlsl::RasterizerOrderedStructuredBuffer.3" = type { target("dx.RawBuffer", i64, 1, 1) }
\r
13 // DXIL: %"class.hlsl::RasterizerOrderedStructuredBuffer.4" = type { target("dx.RawBuffer", i64, 1, 1) }
\r
14 // DXIL: %"class.hlsl::RasterizerOrderedStructuredBuffer.5" = type { target("dx.RawBuffer", half, 1, 1) }
\r
15 // DXIL: %"class.hlsl::RasterizerOrderedStructuredBuffer.6" = type { target("dx.RawBuffer", float, 1, 1) }
\r
16 // DXIL: %"class.hlsl::RasterizerOrderedStructuredBuffer.7" = type { target("dx.RawBuffer", double, 1, 1) }
\r
17 // DXIL: %"class.hlsl::RasterizerOrderedStructuredBuffer.8" = type { target("dx.RawBuffer", <4 x i16>, 1, 1) }
\r
18 // DXIL: %"class.hlsl::RasterizerOrderedStructuredBuffer.9" = type { target("dx.RawBuffer", <3 x i32>, 1, 1) }
\r
19 // DXIL: %"class.hlsl::RasterizerOrderedStructuredBuffer.10" = type { target("dx.RawBuffer", <2 x half>, 1, 1) }
\r
20 // DXIL: %"class.hlsl::RasterizerOrderedStructuredBuffer.11" = type { target("dx.RawBuffer", <3 x float>, 1, 1) }
\r
21 // DXIL: %struct.MyStruct = type { <4 x float>, <2 x i32>, [8 x i8] }
\r
23 RasterizerOrderedStructuredBuffer<int16_t> BufI16;
\r
24 RasterizerOrderedStructuredBuffer<uint16_t> BufU16;
\r
25 RasterizerOrderedStructuredBuffer<int> BufI32;
\r
26 RasterizerOrderedStructuredBuffer<uint> BufU32;
\r
27 RasterizerOrderedStructuredBuffer<int64_t> BufI64;
\r
28 RasterizerOrderedStructuredBuffer<uint64_t> BufU64;
\r
29 RasterizerOrderedStructuredBuffer<half> BufF16;
\r
30 RasterizerOrderedStructuredBuffer<float> BufF32;
\r
31 RasterizerOrderedStructuredBuffer<double> BufF64;
\r
32 RasterizerOrderedStructuredBuffer< vector<int16_t, 4> > BufI16x4;
\r
33 RasterizerOrderedStructuredBuffer< vector<uint, 3> > BufU32x3;
\r
34 RasterizerOrderedStructuredBuffer<half2> BufF16x2;
\r
35 RasterizerOrderedStructuredBuffer<float3> BufF32x3;
\r
36 // TODO: RasterizerOrderedStructuredBuffer<snorm half> BufSNormF16;
\r
37 // TODO: RasterizerOrderedStructuredBuffer<unorm half> BufUNormF16;
\r
38 // TODO: RasterizerOrderedStructuredBuffer<snorm float> BufSNormF32;
\r
39 // TODO: RasterizerOrderedStructuredBuffer<unorm float> BufUNormF32;
\r
40 // TODO: RasterizerOrderedStructuredBuffer<snorm double> BufSNormF64;
\r
41 // TODO: RasterizerOrderedStructuredBuffer<unorm double> BufUNormF64;
\r
42 RasterizerOrderedStructuredBuffer<MyStruct> BufMyStruct;
\r
45 void main(int GI : SV_GroupIndex) {
\r
59 BufMyStruct[GI] = {{0,0,0,0},{0,0}};
\r