New D3D11/D3D12 shader linkage tests for float3 packing/not packing

Packing float with a float3

float TEXCOORD0
int   TEXCOORD1
float3 COLOR

Packing float with a float3[1]

float TEXCOORD0
int   TEXCOORD1
float3[1] COLOR

Not packing float with a float3[2]

float TEXCOORD0
int   TEXCOORD1
float3[2] COLOR
This commit is contained in:
Jake Turner
2025-11-12 11:42:19 +13:00
parent 95a6f13730
commit a9edce59ea
2 changed files with 36 additions and 0 deletions
@@ -341,6 +341,21 @@ float4 main(v2f IN) : SV_Target0
tests.push_back(BuildTestCase({{true, VarType::Float, 1, 0, "TEXCOORD0", true},
{false, VarType::UInt, 1, 0, "TEXCOORD1", true}}));
// Packing float with a float3
tests.push_back(BuildTestCase({{false, VarType::Float, 1, 0, "TEXCOORD0", true},
{true, VarType::UInt, 1, 0, "TEXCOORD1", true},
{false, VarType::Float, 3, 0, "COLOR", true}}));
// Packing float with a float3[1]
tests.push_back(BuildTestCase({{false, VarType::Float, 1, 0, "TEXCOORD0", true},
{true, VarType::UInt, 1, 0, "TEXCOORD1", true},
{false, VarType::Float, 3, 1, "COLOR", true}}));
// Not packing float with a float3[2]
tests.push_back(BuildTestCase({{false, VarType::Float, 1, 0, "TEXCOORD0", true},
{true, VarType::UInt, 1, 0, "TEXCOORD1", true},
{false, VarType::Float, 3, 2, "COLOR", true}}));
// Bespoke tests for broken scenarios discovered through bug reports:
// These semantics live in v1.xy, v2.x, and v3.xyz due to each being an array. If any of them
@@ -380,6 +380,27 @@ float4 main(v2f IN) : SV_Target0
{false, VarType::UInt, 1, 0, "TEXCOORD1", true}},
sm6));
// Packing float with a float3
psos.push_back(BuildPSO(sig,
{{false, VarType::Float, 1, 0, "TEXCOORD0", true},
{true, VarType::UInt, 1, 0, "TEXCOORD1", true},
{false, VarType::Float, 3, 0, "COLOR0", true}},
sm6));
// Packing float with a float3[1]
psos.push_back(BuildPSO(sig,
{{false, VarType::Float, 1, 0, "TEXCOORD0", true},
{true, VarType::UInt, 1, 0, "TEXCOORD1", true},
{false, VarType::Float, 3, 1, "COLOR0", true}},
sm6));
// Not packing float with a float3[2]
psos.push_back(BuildPSO(sig,
{{false, VarType::Float, 1, 0, "TEXCOORD0", true},
{true, VarType::UInt, 1, 0, "TEXCOORD1", true},
{false, VarType::Float, 3, 2, "COLOR0", true}},
sm6));
// Bespoke tests for broken scenarios discovered through bug reports:
// These semantics live in v1.xy, v2.x, and v3.xyz due to each being an array. If any of them