• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1float ComputeShaderFunctionS(float inF0, float inF1, float inF2, int inI0)
2{
3    uint out_u1;
4
5    // AllMemoryBarrier();              // invalid in fragment stage  TODO: parser currently crashes on empty arg list
6    // AllMemoryBarrierWithGroupSync(); // invalid in fragment stage  TODO: parser currently crashes on empty arg list
7    // asdouble(inF0, inF1);                     // expected error: only integer inputs
8    // CheckAccessFullyMapped(3.0);              // expected error: only valid on integers
9    // clip(inF0);                               // expected error: only valid in pixel stage
10    // countbits(inF0);                          // expected error: only integer inputs
11    // cross(inF0, inF1);                        // expected error: only on float3 inputs
12    // D3DCOLORtoUBYTE4(inF0);                   // expected error: only on float4 inputs
13    // ddx(inF0);                                // expected error: only valid in pixel stage
14    // ddx_coarse(inF0);                         // expected error: only valid in pixel stage
15    // ddx_fine(inF0);                           // expected error: only valid in pixel stage
16    // ddy(inF0);                                // expected error: only valid in pixel stage
17    // ddy_coarse(inF0);                         // expected error: only valid in pixel stage
18    // ddy_fine(inF0);                           // expected error: only valid in pixel stage
19    // determinant(inF0);                        // expected error: only valid on mats
20    // EvaluateAttributeAtCentroid(inF0);        // expected error: only interpolant
21    // EvaluateAttributeAtSample(inF0, 2);       // expected error: only interpolant
22    // EvaluateAttributeSnapped(inF0, int2(2));  // expected error: only interpolant
23    // f16tof32(inF0);                           // expected error: only integer inputs
24    // firstbithigh(inF0);                       // expected error: only integer inputs
25    // firstbitlow(inF0);                        // expected error: only integer inputs
26    // fma(inF0, inF1, inF2); // TODO: this might auto-promote: need to check against FXC
27    // fwidth(inF0);                             // expected error: only valid in pixel stage
28    // InterlockedAdd(gs_ua, gs_ub);             // expected error: only valid in pixel stage
29    // InterlockedAdd(gs_ua, gs_ub, out_u1);     // expected error: only valid in pixel stage
30    // InterlockedAnd(gs_ua, gs_ub);             // expected error: only valid in pixel stage
31    // InterlockedAnd(gs_ua, gs_ub, out_u1);     // expected error: only valid in pixel stage
32    // InterlockedCompareExchange(gs_ua, gs_ub, gs_uc, out_u1); // expected error: only valid in pixel stage
33    // InterlockedExchange(gs_ua, gs_ub, out_u1);// expected error: only valid in pixel stage
34    // InterlockedMax(gs_ua, gs_ub);             // expected error: only valid in pixel stage
35    // InterlockedMax(gs_ua, gs_ub, out_u1);     // expected error: only valid in pixel stage
36    // InterlockedMin(gs_ua, gs_ub);             // expected error: only valid in pixel stage
37    // InterlockedMin(gs_ua, gs_ub, out_u1);     // expected error: only valid in pixel stage
38    // InterlockedOr(gs_ua, gs_ub);              // expected error: only valid in pixel stage
39    // InterlockedOr(gs_ua, gs_ub, out_u1);      // expected error: only valid in pixel stage
40    // InterlockedXor(gs_ua, gs_ub);             // expected error: only valid in pixel stage
41    // InterlockedXor(gs_ua, gs_ub, out_u1);     // expected error: only valid in pixel stage
42    // length(inF0);                             // expect error: invalid on scalars
43    // msad4(inF0, float2(0), float4(0));        // expected error: only integer inputs
44    // normalize(inF0);                          // expect error: invalid on scalars
45    // reflect(inF0, inF1);                      // expect error: invalid on scalars
46    // refract(inF0, inF1, inF2);                // expect error: invalid on scalars
47    // refract(float2(0), float2(0), float2(0)); // expected error: last parameter only scalar
48    // reversebits(inF0);                        // expected error: only integer inputs
49    // transpose(inF0);                          // expect error: only valid on mats
50
51    // TODO: texture intrinsics, when we can declare samplers.
52
53    return 0.0;
54}
55
56float1 ComputeShaderFunction1(float1 inF0, float1 inF1, float1 inF2, int1 inI0)
57{
58    // TODO: ... add when float1 prototypes are generated
59
60    // GetRenderTargetSamplePosition(inF0); // expected error: only integer inputs
61
62    return 0.0;
63}
64
65float2 ComputeShaderFunction2(float2 inF0, float2 inF1, float2 inF2, int2 inI0)
66{
67    uint2 out_u2;
68
69    // asdouble(inF0, inF1);         // expected error: only integer inputs
70    // CheckAccessFullyMapped(inF0); // expect error: only valid on scalars
71    // countbits(inF0);              // expected error: only integer inputs
72    // cross(inF0, inF1);            // expected error: only on float3 inputs
73    // D3DCOLORtoUBYTE4(inF0);       // expected error: only on float4 inputs
74    // ddx(inF0);                                // only valid in pixel stage
75    // ddx_coarse(inF0);                         // only valid in pixel stage
76    // ddx_fine(inF0);                           // only valid in pixel stage
77    // ddy(inF0);                                // only valid in pixel stage
78    // ddy_coarse(inF0);                         // only valid in pixel stage
79    // ddy_fine(inF0);                           // only valid in pixel stage
80    // determinant(inF0);            // expect error: only valid on mats
81    // EvaluateAttributeAtCentroid(inF0);        // expected error: only interpolant
82    // EvaluateAttributeAtSample(inF0, 2);       // expected error: only interpolant
83    // EvaluateAttributeSnapped(inF0, int2(2));  // expected error: only interpolant
84    // f16tof32(inF0);               // expected error: only integer inputs
85    // firstbithigh(inF0);           // expected error: only integer inputs
86    // firstbitlow(inF0);            // expected error: only integer inputs
87    // fma(inF0, inF1, inF2); // TODO: this might auto-promote: need to check against FXC
88    // fwidth(inF0);                 // expected error: only valid in pixel stage
89    // InterlockedAdd(gs_ua2, gs_ub2);         // expected error: only valid in pixel stage
90    // InterlockedAdd(gs_ua2, gs_ub2, out_u2); // expected error: only valid in pixel stage
91    // InterlockedAnd(gs_ua2, gs_ub2);         // expected error: only valid in pixel stage
92    // InterlockedAnd(gs_ua2, gs_ub2, out_u2); // expected error: only valid in pixel stage
93    // InterlockedCompareExchange(gs_ua2, gs_ub2, gs_uc2, out_u2); // expected error: only valid in pixel stage
94    // InterlockedExchange(gs_ua2, gs_ub2, out_u2);// expected error: only valid in pixel stage
95    // InterlockedMax(gs_ua2, gs_ub2);         // expected error: only valid in pixel stage
96    // InterlockedMax(gs_ua2, gs_ub2, out_u2); // expected error: only valid in pixel stage
97    // InterlockedMin(gs_ua2, gs_ub2);         // expected error: only valid in pixel stage
98    // InterlockedMin(gs_ua2, gs_ub2, out_u2); // expected error: only valid in pixel stage
99    // InterlockedOr(gs_ua2, gs_ub2);          // expected error: only valid in pixel stage
100    // InterlockedOr(gs_ua2, gs_ub2, out_u2);  // expected error: only valid in pixel stage
101    // InterlockedXor(gs_ua2, gs_ub2);         // expected error: only valid in pixel stage
102    // InterlockedXor(gs_ua2, gs_ub2, out_u2); // expected error: only valid in pixel stage
103    // noise(inF0);                  // expected error: only valid in pixel stage
104    // reversebits(inF0);            // expected error: only integer inputs
105    // transpose(inF0);              // expect error: only valid on mats
106
107    // TODO: texture intrinsics, when we can declare samplers.
108
109    return float2(1,2);
110}
111
112float3 ComputeShaderFunction3(float3 inF0, float3 inF1, float3 inF2, int3 inI0)
113{
114    uint3 out_u3;
115
116    // CheckAccessFullyMapped(inF0);                               // expect error: only valid on scalars
117    // countbits(inF0);                                            // expected error: only integer inputs
118    // ddx(inF0);                                                  // only valid in pixel stage
119    // ddx_coarse(inF0);                                           // only valid in pixel stage
120    // ddx_fine(inF0);                                             // only valid in pixel stage
121    // ddy(inF0);                                                  // only valid in pixel stage
122    // ddy_coarse(inF0);                                           // only valid in pixel stage
123    // ddy_fine(inF0);                                             // only valid in pixel stage
124    // D3DCOLORtoUBYTE4(inF0);                                     // expected error: only on float4 inputs
125    // determinant(inF0);                                          // expect error: only valid on mats
126    // EvaluateAttributeAtCentroid(inF0);                          // expected error: only interpolant
127    // EvaluateAttributeAtSample(inF0, 2);                         // expected error: only interpolant
128    // EvaluateAttributeSnapped(inF0, int2(2));                    // expected error: only interpolant
129    // f16tof32(inF0);                                             // expected error: only integer inputs
130    // firstbithigh(inF0);                                         // expected error: only integer inputs
131    // firstbitlow(inF0);                                          // expected error: only integer inputs
132    // fma(inF0, inF1, inF2); // TODO: this might auto-promote: need to check against FXC
133    // fwidth(inF0);                                               // expected error: only valid in pixel stage
134    // InterlockedAdd(gs_ua3, gs_ub3);                             // expected error: only valid in pixel stage
135    // InterlockedAdd(gs_ua3, gs_ub3, out_u3);                     // expected error: only valid in pixel stage
136    // InterlockedAnd(gs_ua3, gs_ub3);                             // expected error: only valid in pixel stage
137    // InterlockedAnd(gs_ua3, gs_ub3, out_u3);                     // expected error: only valid in pixel stage
138    // InterlockedCompareExchange(gs_ua3, gs_ub3, gs_uc3, out_u3); // expected error: only valid in pixel stage
139    // InterlockedExchange(gs_ua3, gs_ub3, out_u3);                // expected error: only valid in pixel stage
140    // InterlockedMax(gs_ua3, gs_ub3);                             // expected error: only valid in pixel stage
141    // InterlockedMax(gs_ua3, gs_ub3, out_u3);                     // expected error: only valid in pixel stage
142    // InterlockedMin(gs_ua3, gs_ub3);                             // expected error: only valid in pixel stage
143    // InterlockedMin(gs_ua3, gs_ub3, out_u3);                     // expected error: only valid in pixel stage
144    // InterlockedOr(gs_ua3, gs_ub3);                              // expected error: only valid in pixel stage
145    // InterlockedOr(gs_ua3, gs_ub3, out_u3);                      // expected error: only valid in pixel stage
146    // InterlockedXor(gs_ua3, gs_ub3);                             // expected error: only valid in pixel stage
147    // InterlockedXor(gs_ua3, gs_ub3, out_u3);                     // expected error: only valid in pixel stage
148    // noise(inF0);                                                // expected error: only valid in pixel stage
149    // reversebits(inF0);                                          // expected error: only integer inputs
150    // transpose(inF0);                                            // expect error: only valid on mats
151
152    // TODO: texture intrinsics, when we can declare samplers.
153
154    return float3(1,2,3);
155}
156
157float4 ComputeShaderFunction(float4 inF0, float4 inF1, float4 inF2, int4 inI0)
158{
159    uint4 out_u4;
160
161    // CheckAccessFullyMapped(inF0);                               // expect error: only valid on scalars
162    // countbits(inF0);                                            // expected error: only integer inputs
163    // cross(inF0, inF1);                                          // expected error: only on float3 inputs
164    // determinant(inF0);                                          // expect error: only valid on mats
165    // ddx(inF0);                                                  // only valid in pixel stage
166    // ddx_coarse(inF0);                                           // only valid in pixel stage
167    // ddx_fine(inF0);                                             // only valid in pixel stage
168    // ddy(inF0);                                                  // only valid in pixel stage
169    // ddy_coarse(inF0);                                           // only valid in pixel stage
170    // ddy_fine(inF0);                                             // only valid in pixel stage
171    // EvaluateAttributeAtCentroid(inF0);                          // expected error: only valid in pixel stage
172    // EvaluateAttributeAtSample(inF0, 2);                         // expected error: only valid in pixel stage
173    // EvaluateAttributeSnapped(inF0, int2(2));                    // expected error: only valid in pixel stage
174    // f16tof32(inF0);                                             // expected error: only integer inputs
175    // firstbithigh(inF0);                                         // expected error: only integer inputs
176    // firstbitlow(inF0);                                          // expected error: only integer inputs
177    // fma(inF0, inF1, inF2); // TODO: this might auto-promote: need to check against FXC
178    // fwidth(inF0);                                               // expected error: only valid in pixel stage
179    // InterlockedAdd(gs_ua4, gs_ub4);                             // expected error: only valid in pixel stage
180    // InterlockedAdd(gs_ua4, gs_ub4, out_u4);                     // expected error: only valid in pixel stage
181    // InterlockedAnd(gs_ua4, gs_ub4);                             // expected error: only valid in pixel stage
182    // InterlockedAnd(gs_ua4, gs_ub4, out_u4);                     // expected error: only valid in pixel stage
183    // InterlockedCompareExchange(gs_ua4, gs_ub4, gs_uc4, out_u4); // expected error: only valid in pixel stage
184    // InterlockedExchange(gs_ua4, gs_ub4, out_u4);                // expected error: only valid in pixel stage
185    // InterlockedMax(gs_ua4, gs_ub4);                             // expected error: only valid in pixel stage
186    // InterlockedMax(gs_ua4, gs_ub4, out_u4);                     // expected error: only valid in pixel stage
187    // InterlockedMin(gs_ua4, gs_ub4);                             // expected error: only valid in pixel stage
188    // InterlockedMin(gs_ua4, gs_ub4, out_u4);                     // expected error: only valid in pixel stage
189    // InterlockedOr(gs_ua4, gs_ub4);                              // expected error: only valid in pixel stage
190    // InterlockedOr(gs_ua4, gs_ub4, out_u4);                      // expected error: only valid in pixel stage
191    // InterlockedXor(gs_ua4, gs_ub4);                             // expected error: only valid in pixel stage
192    // InterlockedXor(gs_ua4, gs_ub4, out_u4);                     // expected error: only valid in pixel stage
193    // noise(inF0);                                                // expected error: only valid in pixel stage
194    // reversebits(inF0);                                          // expected error: only integer inputs
195    // transpose(inF0);                                            // expect error: only valid on mats
196
197    // TODO: texture intrinsics, when we can declare samplers.
198
199    return float4(1,2,3,4);
200}
201
202