3 groupshared uint gs_ua;
4 groupshared uint gs_ub;
5 groupshared uint gs_uc;
6 groupshared uint2 gs_ua2;
7 groupshared uint2 gs_ub2;
8 groupshared uint2 gs_uc2;
9 groupshared uint3 gs_ua3;
10 groupshared uint3 gs_ub3;
11 groupshared uint3 gs_uc3;
12 groupshared uint4 gs_ua4;
13 groupshared uint4 gs_ub4;
14 groupshared uint4 gs_uc4;
16 float PixelShaderFunctionS(float inF0, float inF1, float inF2, uint inU0, int inU1)
20 bool r000 = all(inF0);
21 float r001 = abs(inF0);
22 float r002 = acos(inF0);
23 bool r003 = any(inF0);
24 float r004 = asin(inF0);
25 int r005 = asint(inF0);
26 uint r006 = asuint(inU1);
27 float r007 = asfloat(inU0);
28 // asdouble(inU0, inU1); // TODO: enable when HLSL parser used for intrinsics
29 float r009 = atan(inF0);
30 float r010 = atan2(inF0, inF1);
31 float r011 = ceil(inF0);
32 float r012 = clamp(inF0, inF1, inF2);
35 float r014 = cos(inF0);
36 float r015 = cosh(inF0);
37 int r016 = countbits(7);
38 float r017 = ddx(inF0);
39 float r018 = ddx_coarse(inF0);
40 float r019 = ddx_fine(inF0);
41 float r020 = ddy(inF0);
42 float r021 = ddy_coarse(inF0);
43 float r022 = ddy_fine(inF0);
44 float r023 = degrees(inF0);
45 float r024 = distance(inF0, inF1);
46 // EvaluateAttributeAtCentroid(inF0);
47 // EvaluateAttributeAtSample(inF0, 0);
48 // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
49 float r027 = exp(inF0);
50 float r028 = exp2(inF0);
51 uint r029 = firstbithigh(7);
52 uint r030 = firstbitlow(7);
53 float r031 = floor(inF0);
54 // TODO: fma(inD0, inD1, inD2);
55 float r033 = fmod(inF0, inF1);
56 float r033i = fmod(inF0, 2);
57 float r034 = frac(inF0);
58 float r036 = fwidth(inF0);
59 bool r037 = isinf(inF0);
60 bool r038 = isnan(inF0);
61 float r039 = ldexp(inF0, inF1);
62 float r039a = lerp(inF0, inF1, inF2);
63 float r040 = log(inF0);
64 float r041 = log10(inF0);
65 float r042 = log2(inF0);
66 float r043 = max(inF0, inF1);
67 float r044 = min(inF0, inF1);
68 float r045 = pow(inF0, inF1);
69 float r046 = radians(inF0);
70 float r047 = rcp(inF0);
71 uint r048 = reversebits(2);
72 float r049 = round(inF0);
73 float r050 = rsqrt(inF0);
74 float r051 = saturate(inF0);
75 float r052 = sign(inF0);
76 float r053 = sin(inF0);
77 sincos(inF0, inF1, inF2);
78 float r055 = sinh(inF0);
79 float r056 = smoothstep(inF0, inF1, inF2);
80 float r057 = sqrt(inF0);
81 float r058 = step(inF0, inF1);
82 float r059 = tan(inF0);
83 float r060 = tanh(inF0);
84 // TODO: sampler intrinsics, when we can declare the types.
85 float r061 = trunc(inF0);
90 float1 PixelShaderFunction1(float1 inF0, float1 inF1, float1 inF2)
92 // TODO: ... add when float1 prototypes are generated
96 float2 PixelShaderFunction2(float2 inF0, float2 inF1, float2 inF2, uint2 inU0, uint2 inU1)
100 bool r000 = all(inF0);
101 float2 r001 = abs(inF0);
102 float2 r002 = acos(inF0);
103 bool r003 = any(inF0);
104 float2 r004 = asin(inF0);
105 int2 r005 = asint(inF0);
106 uint2 r006 = asuint(inF0);
107 float2 r007 = asfloat(inU0);
108 // asdouble(inU0, inU1); // TODO: enable when HLSL parser used for intrinsics
109 float2 r009 = atan(inF0);
110 float2 r010 = atan2(inF0, inF1);
111 float2 r011 = ceil(inF0);
112 float2 r012 = clamp(inF0, inF1, inF2);
115 float2 r013 = cos(inF0);
116 float2 r015 = cosh(inF0);
117 int2 r016 = countbits(int2(7,3));
118 float2 r017 = ddx(inF0);
119 float2 r018 = ddx_coarse(inF0);
120 float2 r019 = ddx_fine(inF0);
121 float2 r020 = ddy(inF0);
122 float2 r021 = ddy_coarse(inF0);
123 float2 r022 = ddy_fine(inF0);
124 float2 r023 = degrees(inF0);
125 // EvaluateAttributeAtCentroid(inF0);
126 // EvaluateAttributeAtSample(inF0, 0);
127 // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
128 float r026 = distance(inF0, inF1);
129 float r027 = dot(inF0, inF1);
130 // EvaluateAttributeAtCentroid(inF0);
131 // EvaluateAttributeAtSample(inF0, 0);
132 // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
133 float2 r028 = exp(inF0);
134 float2 r029 = exp2(inF0);
135 float2 r030 = faceforward(inF0, inF1, inF2);
136 uint2 r031 = firstbithigh(uint2(7,8));
137 uint2 r032 = firstbitlow(uint2(7,8));
138 float2 r033 = floor(inF0);
139 // TODO: fma(inD0, inD1, inD2);
140 float2 r035 = fmod(inF0, inF1);
141 float2 r036 = frac(inF0);
142 float2 r038 = fwidth(inF0);
143 bool2 r039 = isinf(inF0);
144 bool2 r040 = isnan(inF0);
145 float2 r041 = ldexp(inF0, inF1);
146 float2 r039a = lerp(inF0, inF1, inF2);
147 float r042 = length(inF0);
148 float2 r043 = log(inF0);
149 float2 r044 = log10(inF0);
150 float2 r045 = log2(inF0);
151 float2 r046 = max(inF0, inF1);
152 float2 r047 = min(inF0, inF1);
153 float2 r048 = normalize(inF0);
154 float2 r049 = pow(inF0, inF1);
155 float2 r050 = radians(inF0);
156 float2 r051 = rcp(inF0);
157 float2 r052 = reflect(inF0, inF1);
158 float2 r053 = refract(inF0, inF1, 2.0);
159 uint2 r054 = reversebits(uint2(1,2));
160 float2 r055 = round(inF0);
161 float2 r056 = rsqrt(inF0);
162 float2 r057 = saturate(inF0);
163 float2 r058 = sign(inF0);
164 float2 r059 = sin(inF0);
165 sincos(inF0, inF1, inF2);
166 float2 r060 = sinh(inF0);
167 float2 r061 = smoothstep(inF0, inF1, inF2);
168 float2 r062 = sqrt(inF0);
169 float2 r063 = step(inF0, inF1);
170 float2 r064 = tan(inF0);
171 float2 r065 = tanh(inF0);
172 // TODO: sampler intrinsics, when we can declare the types.
173 float2 r066 = trunc(inF0);
175 // TODO: ... add when float1 prototypes are generated
179 float3 PixelShaderFunction3(float3 inF0, float3 inF1, float3 inF2, uint3 inU0, uint3 inU1)
183 bool r000 = all(inF0);
184 float3 r001 = abs(inF0);
185 float3 r002 = acos(inF0);
186 bool r003 = any(inF0);
187 float3 r004 = asin(inF0);
188 int3 r005 = asint(inF0);
189 uint3 r006 = asuint(inF0);
190 float3 r007 = asfloat(inU0);
191 // asdouble(inU0, inU1); // TODO: enable when HLSL parser used for intrinsics
192 float3 r009 = atan(inF0);
193 float3 r010 = atan2(inF0, inF1);
194 float3 r011 = ceil(inF0);
195 float3 r012 = clamp(inF0, inF1, inF2);
198 float3 r013 = cos(inF0);
199 float3 r014 = cosh(inF0);
200 uint3 r015 = countbits(uint3(7,3,5));
201 float3 r016 = cross(inF0, inF1);
202 float3 r017 = ddx(inF0);
203 float3 r018 = ddx_coarse(inF0);
204 float3 r019 = ddx_fine(inF0);
205 float3 r020 = ddy(inF0);
206 float3 r021 = ddy_coarse(inF0);
207 float3 r022 = ddy_fine(inF0);
208 float3 r023 = degrees(inF0);
209 float r024 = distance(inF0, inF1);
210 float r025 = dot(inF0, inF1);
211 // EvaluateAttributeAtCentroid(inF0);
212 // EvaluateAttributeAtSample(inF0, 0);
213 // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
214 float3 r029 = exp(inF0);
215 float3 r030 = exp2(inF0);
216 float3 r031 = faceforward(inF0, inF1, inF2);
217 uint3 r032 = firstbithigh(uint3(2,3,4));
218 uint3 r033 = firstbitlow(uint3(2,3,4));
219 float3 r034 = floor(inF0);
220 // TODO: fma(inD0, inD1, inD2);
221 float3 r036 = fmod(inF0, inF1);
222 float3 r037 = frac(inF0);
223 float3 r039 = fwidth(inF0);
224 bool3 r040 = isinf(inF0);
225 bool3 r041 = isnan(inF0);
226 float3 r042 = ldexp(inF0, inF1);
227 float3 r039a = lerp(inF0, inF1, inF2);
228 float3 r039b = lerp(inF0, inF1, 0.3); // test vec,vec,scalar lerp
229 float r043 = length(inF0);
230 float3 r044 = log(inF0);
231 float3 r045 = log10(inF0);
232 float3 r046 = log2(inF0);
233 float3 r047 = max(inF0, inF1);
234 float3 r048 = min(inF0, inF1);
235 float3 r049 = normalize(inF0);
236 float3 r050 = pow(inF0, inF1);
237 float3 r051 = radians(inF0);
238 float3 r052 = rcp(inF0);
239 float3 r053 = reflect(inF0, inF1);
240 float3 r054 = refract(inF0, inF1, 2.0);
241 uint3 r055 = reversebits(uint3(1,2,3));
242 float3 r056 = round(inF0);
243 float3 r057 = rsqrt(inF0);
244 float3 r058 = saturate(inF0);
245 float3 r059 = sign(inF0);
246 float3 r060 = sin(inF0);
247 sincos(inF0, inF1, inF2);
248 float3 r061 = sinh(inF0);
249 float3 r062 = smoothstep(inF0, inF1, inF2);
250 float3 r063 = sqrt(inF0);
251 float3 r064 = step(inF0, inF1);
252 float3 r065 = tan(inF0);
253 float3 r066 = tanh(inF0);
254 // TODO: sampler intrinsics, when we can declare the types.
255 float3 r067 = trunc(inF0);
257 // TODO: ... add when float1 prototypes are generated
258 return float3(1,2,3);
261 float4 PixelShaderFunction(float4 inF0, float4 inF1, float4 inF2, uint4 inU0, uint4 inU1)
265 bool r000 = all(inF0);
266 float4 r001 = abs(inF0);
267 float4 r002 = acos(inF0);
268 bool r003 = any(inF0);
269 float4 r004 = asin(inF0);
270 int4 r005 = asint(inF0);
271 uint4 r006 = asuint(inF0);
272 float4 r007 = asfloat(inU0);
273 // asdouble(inU0, inU1); // TODO: enable when HLSL parser used for intrinsics
274 float4 r009 = atan(inF0);
275 float4 r010 = atan2(inF0, inF1);
276 float4 r011 = ceil(inF0);
277 float4 r012 = clamp(inF0, inF1, inF2);
280 float4 r013 = cos(inF0);
281 float4 r014 = cosh(inF0);
282 uint4 r015 = countbits(uint4(7,3,5,2));
283 float4 r016 = ddx(inF0);
284 float4 r017 = ddx_coarse(inF0);
285 float4 r018 = ddx_fine(inF0);
286 float4 r019 = ddy(inF0);
287 float4 r020 = ddy_coarse(inF0);
288 float4 r021 = ddy_fine(inF0);
289 float4 r022 = degrees(inF0);
290 float r023 = distance(inF0, inF1);
291 float r024 = dot(inF0, inF1);
292 float4 r025 = dst(inF0, inF1);
293 // EvaluateAttributeAtCentroid(inF0);
294 // EvaluateAttributeAtSample(inF0, 0);
295 // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
296 float4 r029 = exp(inF0);
297 float4 r030 = exp2(inF0);
298 float4 r031 = faceforward(inF0, inF1, inF2);
299 uint4 r032 = firstbithigh(uint4(7,8,9,10));
300 uint4 r033 = firstbitlow(uint4(7,8,9,10));
301 float4 r034 = floor(inF0);
302 // TODO: fma(inD0, inD1, inD2);
303 float4 r036 = fmod(inF0, inF1);
304 float4 r037 = frac(inF0);
305 float4 r039 = fwidth(inF0);
306 bool4 r040 = isinf(inF0);
307 bool4 r041 = isnan(inF0);
308 float4 r042 = ldexp(inF0, inF1);
309 float4 r039a = lerp(inF0, inF1, inF2);
310 float r043 = length(inF0);
311 float4 r044 = log(inF0);
312 float4 r045 = log10(inF0);
313 float4 r046 = log2(inF0);
314 float4 r047 = max(inF0, inF1);
315 float4 r048 = min(inF0, inF1);
316 float4 r049 = normalize(inF0);
317 float4 r050 = pow(inF0, inF1);
318 float4 r051 = radians(inF0);
319 float4 r052 = rcp(inF0);
320 float4 r053 = reflect(inF0, inF1);
321 float4 r054 = refract(inF0, inF1, 2.0);
322 uint4 r055 = reversebits(uint4(1,2,3,4));
323 float4 r056 = round(inF0);
324 float4 r057 = rsqrt(inF0);
325 float4 r058 = saturate(inF0);
326 float4 r059 = sign(inF0);
327 float4 r060 = sin(inF0);
328 sincos(inF0, inF1, inF2);
329 float4 r061 = sinh(inF0);
330 float4 r062 = smoothstep(inF0, inF1, inF2);
331 float4 r063 = sqrt(inF0);
332 float4 r064 = step(inF0, inF1);
333 float4 r065 = tan(inF0);
334 float4 r066 = tanh(inF0);
335 // TODO: sampler intrinsics, when we can declare the types.
336 float4 r067 = trunc(inF0);
338 // TODO: ... add when float1 prototypes are generated
339 return float4(1,2,3,4);
347 // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
349 bool r000 = all(inF0); \
350 MT r001 = abs(inF0); \
352 bool r003 = any(inF0); \
353 MT r004 = asin(inF0); \
354 MT r005 = atan(inF0); \
355 MT r006 = atan2(inF0, inF1); \
356 MT r007 = ceil(inF0); \
358 MT r008 = clamp(inF0, inF1, inF2); \
359 MT r009 = cos(inF0); \
360 MT r010 = cosh(inF0); \
361 MT r011 = ddx(inF0); \
362 MT r012 = ddx_coarse(inF0); \
363 MT r013 = ddx_fine(inF0); \
364 MT r014 = ddy(inF0); \
365 MT r015 = ddy_coarse(inF0); \
366 MT r016 = ddy_fine(inF0); \
367 MT r017 = degrees(inF0); \
368 float r018 = determinant(inF0); \
369 MT r019 = exp(inF0); \
370 MT R020 = exp2(inF0); \
371 MT r021 = floor(inF0); \
372 MT r022 = fmod(inF0, inF1); \
373 MT r023 = frac(inF0); \
374 MT r025 = fwidth(inF0); \
375 MT r026 = ldexp(inF0, inF1); \
376 MT r026a = lerp(inF0, inF1, inF2); \
377 MT r027 = log(inF0); \
378 MT r028 = log10(inF0); \
379 MT r029 = log2(inF0); \
380 MT r030 = max(inF0, inF1); \
381 MT r031 = min(inF0, inF1); \
382 MT r032 = pow(inF0, inF1); \
383 MT r033 = radians(inF0); \
384 MT r034 = round(inF0); \
385 MT r035 = rsqrt(inF0); \
386 MT r036 = saturate(inF0); \
387 MT r037 = sign(inF0); \
388 MT r038 = sin(inF0); \
389 sincos(inF0, inF1, inF2); \
390 MT r039 = sinh(inF0); \
391 MT r049 = smoothstep(inF0, inF1, inF2); \
392 MT r041 = sqrt(inF0); \
393 MT r042 = step(inF0, inF1); \
394 MT r043 = tan(inF0); \
395 MT r044 = tanh(inF0); \
397 MT r046 = trunc(inF0);
399 // TODO: turn on non-square matrix tests when protos are available.
401 float2x2 PixelShaderFunction2x2(float2x2 inF0, float2x2 inF1, float2x2 inF2)
403 // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
406 // TODO: ... add when float1 prototypes are generated
407 return float2x2(2,2,2,2);
410 float3x3 PixelShaderFunction3x3(float3x3 inF0, float3x3 inF1, float3x3 inF2)
412 // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
415 // TODO: ... add when float1 prototypes are generated
416 return float3x3(3,3,3,3,3,3,3,3,3);
419 float4x4 PixelShaderFunction4x4(float4x4 inF0, float4x4 inF1, float4x4 inF2)
421 // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
424 // TODO: ... add when float1 prototypes are generated
425 return float4x4(4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4);
428 #define TESTGENMUL(ST, VT, MT) \
429 ST r0 = mul(inF0, inF1); \
430 VT r1 = mul(inFV0, inF0); \
431 VT r2 = mul(inF0, inFV0); \
432 ST r3 = mul(inFV0, inFV1); \
433 VT r4 = mul(inFM0, inFV0); \
434 VT r5 = mul(inFV0, inFM0); \
435 MT r6 = mul(inFM0, inF0); \
436 MT r7 = mul(inF0, inFM0); \
437 MT r8 = mul(inFM0, inFM1);
440 void TestGenMul2(float inF0, float inF1,
441 float2 inFV0, float2 inFV1,
442 float2x2 inFM0, float2x2 inFM1)
444 TESTGENMUL(float, float2, float2x2);
447 void TestGenMul3(float inF0, float inF1,
448 float3 inFV0, float3 inFV1,
449 float3x3 inFM0, float3x3 inFM1)
451 TESTGENMUL(float, float3, float3x3);
454 void TestGenMul4(float inF0, float inF1,
455 float4 inFV0, float4 inFV1,
456 float4x4 inFM0, float4x4 inFM1)
458 TESTGENMUL(float, float4, float4x4);
461 // Test some non-square mats
462 void TestGenMulNxM(float inF0, float inF1,
463 float2 inFV2, float3 inFV3,
464 float2x3 inFM2x3, float3x2 inFM3x2,
465 float3x3 inFM3x3, float3x4 inFM3x4,
468 float r00 = mul(inF0, inF1); // S=S*S
469 float2 r01 = mul(inFV2, inF0); // V=V*S
470 float3 r02 = mul(inFV3, inF0); // V=V*S
471 float2 r03 = mul(inF0, inFV2); // V=S*V
472 float3 r04 = mul(inF0, inFV3); // V=S*V
473 float r05 = mul(inFV2, inFV2); // S=V*V
474 float r06 = mul(inFV3, inFV3); // S=V*V
475 float3 r07 = mul(inFV2, inFM2x3); // V=V*M (return V dim is Mcols)
476 float2 r08 = mul(inFV3, inFM3x2); // V=V*M (return V dim is Mcols)
477 float2 r09 = mul(inFM2x3, inFV3); // V=M*V (return V dim is Mrows)
478 float3 r10 = mul(inFM3x2, inFV2); // V=M*V (return V dim is Mrows)
479 float2x3 r11 = mul(inFM2x3, inF0);
480 float3x2 r12 = mul(inFM3x2, inF0);
481 float2x2 r13 = mul(inFM2x3, inFM3x2);
482 float2x3 r14 = mul(inFM2x3, inFM3x3);
483 float2x4 r15 = mul(inFM2x3, inFM3x4);
484 float3x4 r16 = mul(inFM3x2, inFM2x4);
487 struct PS_OUTPUT { float4 color : SV_Target0; };
492 ps_output.color = 1.0;