1 float VertexShaderFunction(float inF0, float inF1, float inF2, uint inU0, uint inU1)
11 // asdouble(inU0, inU1); // TODO: enable when HLSL parser used for intrinsics
15 clamp(inF0, inF1, inF2);
20 // EvaluateAttributeAtCentroid(inF0);
21 // EvaluateAttributeAtSample(inF0, 0);
22 // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
28 // TODO: fma(inD0, inD1, inD2);
40 // TODO: mul(inF0, inF1);
49 sincos(inF0, inF1, inF2);
51 smoothstep(inF0, inF1, inF2);
56 // TODO: sampler intrinsics, when we can declare the types.
62 float1 VertexShaderFunction(float1 inF0, float1 inF1, float1 inF2)
64 // TODO: ... add when float1 prototypes are generated
68 float2 VertexShaderFunction(float2 inF0, float2 inF1, float2 inF2, uint2 inU0, uint2 inU1)
78 // asdouble(inU0, inU1); // TODO: enable when HLSL parser used for intrinsics
82 clamp(inF0, inF1, inF2);
89 // EvaluateAttributeAtCentroid(inF0);
90 // EvaluateAttributeAtSample(inF0, 0);
91 // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
94 faceforward(inF0, inF1, inF2);
98 // TODO: fma(inD0, inD1, inD2);
111 // TODO: mul(inF0, inF1);
116 refract(inF0, inF1, 2.0);
117 reversebits(int2(1,2));
123 sincos(inF0, inF1, inF2);
125 smoothstep(inF0, inF1, inF2);
130 // TODO: sampler intrinsics, when we can declare the types.
133 // TODO: ... add when float1 prototypes are generated
137 float3 VertexShaderFunction(float3 inF0, float3 inF1, float3 inF2, uint3 inU0, uint3 inU1)
147 // asdouble(inU0, inU1); // TODO: enable when HLSL parser used for intrinsics
151 clamp(inF0, inF1, inF2);
154 countbits(int3(7,3,5));
157 distance(inF0, inF1);
159 // EvaluateAttributeAtCentroid(inF0);
160 // EvaluateAttributeAtSample(inF0, 0);
161 // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
164 faceforward(inF0, inF1, inF2);
168 // TODO: fma(inD0, inD1, inD2);
181 // TODO: mul(inF0, inF1);
186 refract(inF0, inF1, 2.0);
187 reversebits(int3(1,2,3));
193 sincos(inF0, inF1, inF2);
195 smoothstep(inF0, inF1, inF2);
200 // TODO: sampler intrinsics, when we can declare the types.
203 // TODO: ... add when float1 prototypes are generated
204 return float3(1,2,3);
207 float4 VertexShaderFunction(float4 inF0, float4 inF1, float4 inF2, uint4 inU0, uint4 inU1)
217 // asdouble(inU0, inU1); // TODO: enable when HLSL parser used for intrinsics
221 clamp(inF0, inF1, inF2);
224 countbits(int4(7,3,5,2));
226 distance(inF0, inF1);
229 // EvaluateAttributeAtCentroid(inF0);
230 // EvaluateAttributeAtSample(inF0, 0);
231 // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
234 faceforward(inF0, inF1, inF2);
238 // TODO: fma(inD0, inD1, inD2);
251 // TODO: mul(inF0, inF1);
256 refract(inF0, inF1, 2.0);
257 reversebits(int4(1,2,3,4));
263 sincos(inF0, inF1, inF2);
265 smoothstep(inF0, inF1, inF2);
270 // TODO: sampler intrinsics, when we can declare the types.
273 // TODO: ... add when float1 prototypes are generated
274 return float4(1,2,3,4);
282 // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
292 clamp(inF0, inF1, inF2); \
318 sincos(inF0, inF1, inF2); \
320 smoothstep(inF0, inF1, inF2); \
328 // TODO: turn on non-square matrix tests when protos are available.
330 float2x2 VertexShaderFunction(float2x2 inF0, float2x2 inF1, float2x2 inF2)
332 // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
335 // TODO: ... add when float1 prototypes are generated
336 return float2x2(2,2,2,2);
339 float3x3 VertexShaderFunction(float3x3 inF0, float3x3 inF1, float3x3 inF2)
341 // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
344 // TODO: ... add when float1 prototypes are generated
345 return float3x3(3,3,3,3,3,3,3,3,3);
348 float4x4 VertexShaderFunction(float4x4 inF0, float4x4 inF1, float4x4 inF2)
350 // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
353 // TODO: ... add when float1 prototypes are generated
354 return float4x4(4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4);
357 #define TESTGENMUL(ST, VT, MT) \
358 ST r0 = mul(inF0, inF1); \
359 VT r1 = mul(inFV0, inF0); \
360 VT r2 = mul(inF0, inFV0); \
361 ST r3 = mul(inFV0, inFV1); \
362 VT r4 = mul(inFM0, inFV0); \
363 VT r5 = mul(inFV0, inFM0); \
364 MT r6 = mul(inFM0, inF0); \
365 MT r7 = mul(inF0, inFM0); \
366 MT r8 = mul(inFM0, inFM1);
369 void TestGenMul(float inF0, float inF1,
370 float2 inFV0, float2 inFV1,
371 float2x2 inFM0, float2x2 inFM1)
373 TESTGENMUL(float, float2, float2x2);
376 void TestGenMul(float inF0, float inF1,
377 float3 inFV0, float3 inFV1,
378 float3x3 inFM0, float3x3 inFM1)
380 TESTGENMUL(float, float3, float3x3);
383 void TestGenMul(float inF0, float inF1,
384 float4 inFV0, float4 inFV1,
385 float4x4 inFM0, float4x4 inFM1)
387 TESTGENMUL(float, float4, float4x4);