1 float VertexShaderFunction(float inF0, float inF1, float inF2)
11 clamp(inF0, inF1, inF2);
16 // EvaluateAttributeAtCentroid(inF0);
17 // EvaluateAttributeAtSample(inF0, 0);
18 // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
24 // TODO: fma(inD0, inD1, inD2);
37 // TODO: mul(inF0, inF1);
46 sincos(inF0, inF1, inF2);
48 smoothstep(inF0, inF1, inF2);
53 // TODO: sampler intrinsics, when we can declare the types.
59 float1 VertexShaderFunction(float1 inF0, float1 inF1, float1 inF2)
61 // TODO: ... add when float1 prototypes are generated
65 float2 VertexShaderFunction(float2 inF0, float2 inF1, float2 inF2)
75 clamp(inF0, inF1, inF2);
82 // EvaluateAttributeAtCentroid(inF0);
83 // EvaluateAttributeAtSample(inF0, 0);
84 // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
87 faceforward(inF0, inF1, inF2);
91 // TODO: fma(inD0, inD1, inD2);
105 // TODO: mul(inF0, inF1);
110 refract(inF0, inF1, 2.0);
111 reversebits(int2(1,2));
117 sincos(inF0, inF1, inF2);
119 smoothstep(inF0, inF1, inF2);
124 // TODO: sampler intrinsics, when we can declare the types.
127 // TODO: ... add when float1 prototypes are generated
131 float3 VertexShaderFunction(float3 inF0, float3 inF1, float3 inF2)
141 clamp(inF0, inF1, inF2);
144 countbits(int3(7,3,5));
147 distance(inF0, inF1);
149 // EvaluateAttributeAtCentroid(inF0);
150 // EvaluateAttributeAtSample(inF0, 0);
151 // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
154 faceforward(inF0, inF1, inF2);
158 // TODO: fma(inD0, inD1, inD2);
172 // TODO: mul(inF0, inF1);
177 refract(inF0, inF1, 2.0);
178 reversebits(int3(1,2,3));
184 sincos(inF0, inF1, inF2);
186 smoothstep(inF0, inF1, inF2);
191 // TODO: sampler intrinsics, when we can declare the types.
194 // TODO: ... add when float1 prototypes are generated
195 return float3(1,2,3);
198 float4 VertexShaderFunction(float4 inF0, float4 inF1, float4 inF2)
208 clamp(inF0, inF1, inF2);
211 countbits(int4(7,3,5,2));
213 distance(inF0, inF1);
216 // EvaluateAttributeAtCentroid(inF0);
217 // EvaluateAttributeAtSample(inF0, 0);
218 // TODO: EvaluateAttributeSnapped(inF0, int2(1,2));
221 faceforward(inF0, inF1, inF2);
225 // TODO: fma(inD0, inD1, inD2);
239 // TODO: mul(inF0, inF1);
244 refract(inF0, inF1, 2.0);
245 reversebits(int4(1,2,3,4));
251 sincos(inF0, inF1, inF2);
253 smoothstep(inF0, inF1, inF2);
258 // TODO: sampler intrinsics, when we can declare the types.
261 // TODO: ... add when float1 prototypes are generated
262 return float4(1,2,3,4);
265 // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
275 clamp(inF0, inF1, inF2); \
302 sincos(inF0, inF1, inF2); \
304 smoothstep(inF0, inF1, inF2); \
312 // TODO: turn on non-square matrix tests when protos are available.
314 float2x2 VertexShaderFunction(float2x2 inF0, float2x2 inF1, float2x2 inF2)
316 // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
319 // TODO: ... add when float1 prototypes are generated
320 return float2x2(2,2,2,2);
323 float3x3 VertexShaderFunction(float3x3 inF0, float3x3 inF1, float3x3 inF2)
325 // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
328 // TODO: ... add when float1 prototypes are generated
329 return float3x3(3,3,3,3,3,3,3,3,3);
332 float4x4 VertexShaderFunction(float4x4 inF0, float4x4 inF1, float4x4 inF2)
334 // TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
337 // TODO: ... add when float1 prototypes are generated
338 return float4x4(4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4);
341 #define TESTGENMUL(ST, VT, MT) \
342 ST r0 = mul(inF0, inF1); \
343 VT r1 = mul(inFV0, inF0); \
344 VT r2 = mul(inF0, inFV0); \
345 ST r3 = mul(inFV0, inFV1); \
346 VT r4 = mul(inFM0, inFV0); \
347 VT r5 = mul(inFV0, inFM0); \
348 MT r6 = mul(inFM0, inF0); \
349 MT r7 = mul(inF0, inFM0); \
350 MT r8 = mul(inFM0, inFM1);
353 void TestGenMul(float inF0, float inF1,
354 float2 inFV0, float2 inFV1,
355 float2x2 inFM0, float2x2 inFM1)
357 TESTGENMUL(float, float2, float2x2);
360 void TestGenMul(float inF0, float inF1,
361 float3 inFV0, float3 inFV1,
362 float3x3 inFM0, float3x3 inFM1)
364 TESTGENMUL(float, float3, float3x3);
367 void TestGenMul(float inF0, float inF1,
368 float4 inFV0, float4 inFV1,
369 float4x4 inFM0, float4x4 inFM1)
371 TESTGENMUL(float, float4, float4x4);