Merge pull request #2891 from dneto0/hlsl-namespace
[platform/upstream/glslang.git] / Test / hlsl.format.rwtexture.frag
1 SamplerState       g_sSamp : register(s0);
2
3 [[spv::format_rgba32f]]    RWTexture1D <float4> g_tTex1df4 : register(t0);
4 [[spv::format_rg32f]]      RWTexture1D <int4>   g_tTex1di4;
5 [[spv::format_rgba8snorm]] RWTexture1D <uint4>  g_tTex1du4;
6
7 [[spv::format_rgba8i]]       RWTexture2D <float4> g_tTex2df4;
8 [[spv::format_r11fg11fb10f]] RWTexture2D <int4>   g_tTex2di4;
9 [[spv::format_r8snorm]]      RWTexture2D <uint4>  g_tTex2du4;
10
11 [[spv::format_rg8]] [[spv::nonwritable]]     RWTexture3D <float4> g_tTex3df4;
12 [[spv::format_rgba16i]] [[spv::nonreadable]] RWTexture3D <int4>   g_tTex3di4;
13 [[spv::format_r8i]] [[spv::nonwritable]] [[spv::nonreadable]] RWTexture3D <uint4>  g_tTex3du4;
14
15 [[spv::format_rgba8ui]] RWTexture1DArray <float4> g_tTex1df4a;
16 [[spv::format_rg32ui]]  RWTexture1DArray <int4>   g_tTex1di4a;
17 [[spv::format_r16ui]]   RWTexture1DArray <uint4>  g_tTex1du4a;
18
19 [[spv::format_rgb10a2ui]] RWTexture2DArray <float4> g_tTex2df4a;
20 [[spv::format_r8ui]]      RWTexture2DArray <int4>   g_tTex2di4a;
21 [[spv::format_rgba16f]]   RWTexture2DArray <uint4>  g_tTex2du4a;
22
23 [[spv::format_rgba8         ]] RWTexture2DArray<int4> g_tTex01;
24 [[spv::format_rg16f         ]] RWTexture2DArray<int4> g_tTex02;
25 [[spv::format_r16f          ]] RWTexture2DArray<int4> g_tTex03;
26 [[spv::format_rgb10a2       ]] RWTexture2DArray<int4> g_tTex04;
27 [[spv::format_rg16          ]] RWTexture2DArray<int4> g_tTex05;
28 [[spv::format_r32f          ]] RWTexture2DArray<int4> g_tTex06;
29 [[spv::format_rgba16        ]] RWTexture2DArray<int4> g_tTex07;
30 [[spv::format_r16           ]] RWTexture2DArray<int4> g_tTex08;
31 [[spv::format_r8            ]] RWTexture2DArray<int4> g_tTex09;
32 [[spv::format_rgba16snorm   ]] RWTexture2DArray<int4> g_tTex10;
33 [[spv::format_rg16snorm     ]] RWTexture2DArray<int4> g_tTex11;
34 [[spv::format_r16snorm      ]] RWTexture2DArray<int4> g_tTex12;
35 [[spv::format_r8snorm       ]] RWTexture2DArray<int4> g_tTex13;
36 [[spv::format_rgba32i       ]] RWTexture2DArray<int4> g_tTex14;
37 [[spv::format_r32i          ]] RWTexture2DArray<int4> g_tTex15;
38 [[spv::format_r32ui         ]] RWTexture2DArray<int4> g_tTex16;
39 [[spv::format_rg16i         ]] RWTexture2DArray<int4> g_tTex17;
40 [[spv::format_r16i          ]] RWTexture2DArray<int4> g_tTex18;
41 [[spv::format_rg32i         ]] RWTexture2DArray<int4> g_tTex19;
42 [[spv::format_rg8i          ]] RWTexture2DArray<int4> g_tTex20;
43 [[spv::format_rg8ui         ]] RWTexture2DArray<int4> g_tTex21;
44 [[spv::format_rgba32ui      ]] RWTexture2DArray<int4> g_tTex22;
45 [[spv::format_rgba16ui      ]] RWTexture2DArray<int4> g_tTex23;
46 [[spv::format_rg32ui        ]] RWTexture2DArray<int4> g_tTex24;
47 [[spv::format_rg16ui        ]] RWTexture2DArray<int4> g_tTex25;
48
49 struct PS_OUTPUT
50 {
51     float4 Color : SV_Target0;
52     float  Depth : SV_Depth;
53 };
54
55 PS_OUTPUT main()
56 {
57    PS_OUTPUT psout;
58
59    psout.Color = 1.0;
60    psout.Depth = 1.0;
61
62    return psout;
63 }