HLSL: Change intrinsics tests to not use overloaded entry points

This commit is contained in:
LoopDawg
2016-06-30 14:13:03 -06:00
parent af151f964f
commit e903ab5f04
14 changed files with 4635 additions and 2344 deletions

View File

@@ -1,4 +1,4 @@
float VertexShaderFunction(float inF0, float inF1, float inF2, uint inU0, uint inU1)
float VertexShaderFunctionS(float inF0, float inF1, float inF2, uint inU0, uint inU1)
{
all(inF0);
abs(inF0);
@@ -60,13 +60,13 @@ float VertexShaderFunction(float inF0, float inF1, float inF2, uint inU0, uint i
return 0.0;
}
float1 VertexShaderFunction(float1 inF0, float1 inF1, float1 inF2)
float1 VertexShaderFunction1(float1 inF0, float1 inF1, float1 inF2)
{
// TODO: ... add when float1 prototypes are generated
return 0.0;
}
float2 VertexShaderFunction(float2 inF0, float2 inF1, float2 inF2, uint2 inU0, uint2 inU1)
float2 VertexShaderFunction2(float2 inF0, float2 inF1, float2 inF2, uint2 inU0, uint2 inU1)
{
all(inF0);
abs(inF0);
@@ -136,7 +136,7 @@ float2 VertexShaderFunction(float2 inF0, float2 inF1, float2 inF2, uint2 inU0, u
return float2(1,2);
}
float3 VertexShaderFunction(float3 inF0, float3 inF1, float3 inF2, uint3 inU0, uint3 inU1)
float3 VertexShaderFunction3(float3 inF0, float3 inF1, float3 inF2, uint3 inU0, uint3 inU1)
{
all(inF0);
abs(inF0);
@@ -207,7 +207,7 @@ float3 VertexShaderFunction(float3 inF0, float3 inF1, float3 inF2, uint3 inU0, u
return float3(1,2,3);
}
float4 VertexShaderFunction(float4 inF0, float4 inF1, float4 inF2, uint4 inU0, uint4 inU1)
float4 VertexShaderFunction4(float4 inF0, float4 inF1, float4 inF2, uint4 inU0, uint4 inU1)
{
all(inF0);
abs(inF0);
@@ -332,7 +332,7 @@ float4 VertexShaderFunction(float4 inF0, float4 inF1, float4 inF2, uint4 inU0, u
// TODO: turn on non-square matrix tests when protos are available.
float2x2 VertexShaderFunction(float2x2 inF0, float2x2 inF1, float2x2 inF2)
float2x2 VertexShaderFunction2x2(float2x2 inF0, float2x2 inF1, float2x2 inF2)
{
// TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
MATFNS();
@@ -341,7 +341,7 @@ float2x2 VertexShaderFunction(float2x2 inF0, float2x2 inF1, float2x2 inF2)
return float2x2(2,2,2,2);
}
float3x3 VertexShaderFunction(float3x3 inF0, float3x3 inF1, float3x3 inF2)
float3x3 VertexShaderFunction3x3(float3x3 inF0, float3x3 inF1, float3x3 inF2)
{
// TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
MATFNS();
@@ -350,7 +350,7 @@ float3x3 VertexShaderFunction(float3x3 inF0, float3x3 inF1, float3x3 inF2)
return float3x3(3,3,3,3,3,3,3,3,3);
}
float4x4 VertexShaderFunction(float4x4 inF0, float4x4 inF1, float4x4 inF2)
float4x4 VertexShaderFunction4x4(float4x4 inF0, float4x4 inF1, float4x4 inF2)
{
// TODO: FXC doesn't accept this with (), but glslang doesn't accept it without.
MATFNS();
@@ -371,33 +371,33 @@ float4x4 VertexShaderFunction(float4x4 inF0, float4x4 inF1, float4x4 inF2)
MT r8 = mul(inFM0, inFM1);
void TestGenMul(float inF0, float inF1,
float2 inFV0, float2 inFV1,
float2x2 inFM0, float2x2 inFM1)
void TestGenMul2(float inF0, float inF1,
float2 inFV0, float2 inFV1,
float2x2 inFM0, float2x2 inFM1)
{
TESTGENMUL(float, float2, float2x2);
}
void TestGenMul(float inF0, float inF1,
float3 inFV0, float3 inFV1,
float3x3 inFM0, float3x3 inFM1)
void TestGenMul3(float inF0, float inF1,
float3 inFV0, float3 inFV1,
float3x3 inFM0, float3x3 inFM1)
{
TESTGENMUL(float, float3, float3x3);
}
void TestGenMul(float inF0, float inF1,
float4 inFV0, float4 inFV1,
float4x4 inFM0, float4x4 inFM1)
void TestGenMul4(float inF0, float inF1,
float4 inFV0, float4 inFV1,
float4x4 inFM0, float4x4 inFM1)
{
TESTGENMUL(float, float4, float4x4);
}
// Test some non-square mats
void TestGenMul(float inF0, float inF1,
float2 inFV2, float3 inFV3,
float2x3 inFM2x3, float3x2 inFM3x2,
float3x3 inFM3x3, float3x4 inFM3x4,
float2x4 inFM2x4)
void TestGenMulNxM(float inF0, float inF1,
float2 inFV2, float3 inFV3,
float2x3 inFM2x3, float3x2 inFM3x2,
float3x3 inFM3x3, float3x4 inFM3x4,
float2x4 inFM2x4)
{
float r00 = mul(inF0, inF1); // S=S*S
float2 r01 = mul(inFV2, inF0); // V=V*S