2023-02-18 16:44:20 -08:00
|
|
|
[pixel shader]
|
|
|
|
typedef float2 Dword;
|
|
|
|
typedef float3 dWord;
|
2023-02-21 14:59:04 -08:00
|
|
|
typedef float2 fLoat;
|
2023-02-18 16:44:20 -08:00
|
|
|
|
|
|
|
float4 f()
|
|
|
|
{
|
|
|
|
typedef Dword dword;
|
2023-02-21 14:59:04 -08:00
|
|
|
typedef fLoat float;
|
2023-02-18 16:44:20 -08:00
|
|
|
dword v1 = {1, 2};
|
2023-02-21 14:59:04 -08:00
|
|
|
float v2 = {2, 3};
|
2023-02-18 16:44:20 -08:00
|
|
|
DWORD v4 = 4;
|
2023-02-21 14:59:04 -08:00
|
|
|
return float4(v1.x, v2.x, v2.y, v4);
|
2023-02-18 16:44:20 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
float4 f2()
|
|
|
|
{
|
|
|
|
typedef dword dword;
|
2023-02-21 14:59:04 -08:00
|
|
|
typedef float float;
|
|
|
|
dword v1 = 1;
|
|
|
|
float v2 = 1;
|
|
|
|
return float4(v1, v2, v1, v1);
|
2023-02-18 16:44:20 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
return f() + f2();
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
draw quad
|
|
|
|
probe all rgba (2.0, 3.0, 4.0, 5.0)
|
|
|
|
|
|
|
|
% The "dword" alias is pre-defined as lowercase
|
|
|
|
[pixel shader fail]
|
|
|
|
typedef float2 dword;
|
|
|
|
|
|
|
|
float4 main() : sv_target
|
|
|
|
{
|
|
|
|
return float4(0, 0, 0, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
[pixel shader fail]
|
|
|
|
struct DWORD s;
|
|
|
|
|
|
|
|
float4 main() : sv_target
|
|
|
|
{
|
|
|
|
return float4(0, 0, 0, 0);
|
|
|
|
}
|
2023-02-21 14:59:04 -08:00
|
|
|
|
|
|
|
[pixel shader fail]
|
|
|
|
typedef float2 float;
|
|
|
|
|
|
|
|
float4 main() : sv_target
|
|
|
|
{
|
|
|
|
return float4(0, 0, 0, 0);
|
|
|
|
}
|