blob: 7287fe48e661ebf9aa6910f405ad319fe4b2539b [file] [log] [blame]
steve-lunarg7dfcf4d2016-07-31 10:37:02 -06001SamplerComparisonState g_sSampCmp : register(s0);
2
3Texture1D g_tTex1df4a : register(t1);
4
5uniform Texture1D <float4> g_tTex1df4 : register(t0);
6Texture1D <int4> g_tTex1di4;
7Texture1D <uint4> g_tTex1du4;
8
9Texture2D <float4> g_tTex2df4;
10Texture2D <int4> g_tTex2di4;
11Texture2D <uint4> g_tTex2du4;
12
13Texture3D <float4> g_tTex3df4;
14Texture3D <int4> g_tTex3di4;
15Texture3D <uint4> g_tTex3du4;
16
17TextureCube <float4> g_tTexcdf4;
18TextureCube <int4> g_tTexcdi4;
19TextureCube <uint4> g_tTexcdu4;
20
21struct PS_OUTPUT
22{
23 float4 Color : SV_Target0;
24 float Depth : SV_Depth;
25};
26
27uniform float c1;
28uniform float2 c2;
29uniform float3 c3;
30uniform float4 c4;
31
steve-lunargd00b0262017-03-09 08:59:45 -070032
33
34
35
steve-lunarg7dfcf4d2016-07-31 10:37:02 -060036
37PS_OUTPUT main()
38{
39 PS_OUTPUT psout;
40
41 uint status;
42
43 // no 1D gathers
44
steve-lunargd00b0262017-03-09 08:59:45 -070045 float4 txval001 = g_tTex2df4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0));
46 int4 txval011 = g_tTex2di4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,-1));
47 uint4 txval021 = g_tTex2du4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,1));
steve-lunarg7dfcf4d2016-07-31 10:37:02 -060048
steve-lunargd00b0262017-03-09 08:59:45 -070049 float4 txval004 = g_tTex2df4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
50 int4 txval014 = g_tTex2di4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,-1), int2(1,-1), int2(1,-1), int2(1,-1));
51 uint4 txval024 = g_tTex2du4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,1), int2(1,1), int2(1,1), int2(1,1));
steve-lunarg7dfcf4d2016-07-31 10:37:02 -060052
steve-lunarg6817f812017-05-01 21:59:34 -060053 float4 txval401 = g_tTex2df4 . GatherCmp(g_sSampCmp, c2, 0.75, int2(1,0));
54 int4 txval411 = g_tTex2di4 . GatherCmp(g_sSampCmp, c2, 0.75, int2(1,-1));
55 uint4 txval421 = g_tTex2du4 . GatherCmp(g_sSampCmp, c2, 0.75, int2(1,1));
steve-lunarg7dfcf4d2016-07-31 10:37:02 -060056
steve-lunargd00b0262017-03-09 08:59:45 -070057 // GatherCmpGreen not implemented pending OpImageDrefGather component input
58 // float4 txval101 = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0));
59 // int4 txval111 = g_tTex2di4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0));
60 // uint4 txval121 = g_tTex2du4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0));
steve-lunarg7dfcf4d2016-07-31 10:37:02 -060061
steve-lunargd00b0262017-03-09 08:59:45 -070062 // float4 txval104 = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
63 // int4 txval114 = g_tTex2di4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
64 // uint4 txval124 = g_tTex2du4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
steve-lunarg7dfcf4d2016-07-31 10:37:02 -060065
steve-lunargd00b0262017-03-09 08:59:45 -070066 // float4 txval10s = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), status);
67 // int4 txval11s = g_tTex2di4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), status);
68 // uint4 txval12s = g_tTex2du4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), status);
steve-lunarg7dfcf4d2016-07-31 10:37:02 -060069
steve-lunargd00b0262017-03-09 08:59:45 -070070 // float4 txval104 = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
71 // int4 txval114 = g_tTex2di4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
72 // uint4 txval124 = g_tTex2du4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
steve-lunarg7dfcf4d2016-07-31 10:37:02 -060073
steve-lunargd00b0262017-03-09 08:59:45 -070074 // GatherCmpBlue not implemented pending OpImageDrefGather component input
75 // float4 txval201 = g_tTex2df4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0));
76 // int4 txval211 = g_tTex2di4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0));
77 // uint4 txval221 = g_tTex2du4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0));
steve-lunarg7dfcf4d2016-07-31 10:37:02 -060078
steve-lunargd00b0262017-03-09 08:59:45 -070079 // float4 txval204 = g_tTex2df4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
80 // int4 txval214 = g_tTex2di4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
81 // uint4 txval224 = g_tTex2du4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
steve-lunarg7dfcf4d2016-07-31 10:37:02 -060082
steve-lunargd00b0262017-03-09 08:59:45 -070083 // float4 txval204s = g_tTex2df4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
84 // int4 txval214s = g_tTex2di4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
85 // uint4 txval224s = g_tTex2du4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
steve-lunarg7dfcf4d2016-07-31 10:37:02 -060086
steve-lunargd00b0262017-03-09 08:59:45 -070087 // float4 txval20s = g_tTex2df4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), status);
88 // int4 txval21s = g_tTex2di4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), status);
89 // uint4 txval22s = g_tTex2du4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), status);
steve-lunarg7dfcf4d2016-07-31 10:37:02 -060090
steve-lunargd00b0262017-03-09 08:59:45 -070091 // GatherCmpAlpha not implemented pending OpImageDrefGather component input
92 // float4 txval301 = g_tTex2df4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0));
93 // int4 txval311 = g_tTex2di4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0));
94 // uint4 txval321 = g_tTex2du4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0));
steve-lunarg7dfcf4d2016-07-31 10:37:02 -060095
steve-lunargd00b0262017-03-09 08:59:45 -070096 // float4 txval304 = g_tTex2df4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
97 // int4 txval314 = g_tTex2di4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
98 // uint4 txval324 = g_tTex2du4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0));
steve-lunarg7dfcf4d2016-07-31 10:37:02 -060099
steve-lunargd00b0262017-03-09 08:59:45 -0700100 // float4 txval304s = g_tTex2df4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
101 // int4 txval314s = g_tTex2di4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
102 // uint4 txval324s = g_tTex2du4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status);
steve-lunarg7dfcf4d2016-07-31 10:37:02 -0600103
steve-lunargd00b0262017-03-09 08:59:45 -0700104 // float4 txval30s = g_tTex2df4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), status);
105 // int4 txval31s = g_tTex2di4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), status);
106 // uint4 txval32s = g_tTex2du4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), status);
steve-lunarg7dfcf4d2016-07-31 10:37:02 -0600107
108 // no 3D gathers with offset
109
110 psout.Color = 1.0;
111 psout.Depth = 1.0;
112
113 return psout;
114}