2022-04-28 06:31:59 -07:00
|
|
|
[pixel shader]
|
2022-10-14 07:09:36 -07:00
|
|
|
struct apple
|
2022-04-28 06:31:59 -07:00
|
|
|
{
|
|
|
|
float3 aa;
|
|
|
|
float4 bb;
|
|
|
|
};
|
|
|
|
|
2022-10-14 07:09:36 -07:00
|
|
|
struct banana
|
2022-04-28 06:31:59 -07:00
|
|
|
{
|
2022-10-14 07:09:36 -07:00
|
|
|
struct apple aa;
|
2022-04-28 06:31:59 -07:00
|
|
|
int2 bb;
|
|
|
|
int4 cc[8];
|
|
|
|
};
|
|
|
|
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
2022-10-14 07:09:36 -07:00
|
|
|
struct banana p = (struct banana)42;
|
2022-04-28 06:31:59 -07:00
|
|
|
return p.aa.bb + p.cc[5];
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2021-08-19 13:00:58 -07:00
|
|
|
draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (84.0, 84.0, 84.0, 84.0)
|
2022-10-10 15:23:00 -07:00
|
|
|
|
|
|
|
|
2022-10-12 10:43:26 -07:00
|
|
|
[pixel shader fail]
|
2022-10-10 15:23:00 -07:00
|
|
|
struct apple
|
|
|
|
{
|
|
|
|
float3 aa;
|
|
|
|
float4 bb;
|
|
|
|
};
|
|
|
|
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
struct apple f = 31;
|
|
|
|
return f.bb;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[pixel shader fail]
|
|
|
|
struct apple
|
|
|
|
{
|
|
|
|
float3 aa;
|
|
|
|
float4 bb;
|
|
|
|
};
|
|
|
|
|
|
|
|
float4 fun(struct apple f)
|
|
|
|
{
|
|
|
|
return f.bb;
|
|
|
|
}
|
|
|
|
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
return fun(31);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-01-23 13:27:26 -08:00
|
|
|
[pixel shader fail]
|
|
|
|
float4 fun(float f[7])
|
|
|
|
{
|
|
|
|
return f[1];
|
|
|
|
}
|
|
|
|
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
return fun(32);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-10-10 15:23:00 -07:00
|
|
|
[pixel shader fail]
|
|
|
|
struct apple
|
|
|
|
{
|
|
|
|
float4 foo;
|
|
|
|
Texture2D tex;
|
|
|
|
};
|
|
|
|
|
|
|
|
float4 PSMain() : SV_TARGET
|
|
|
|
{
|
|
|
|
struct apple a1;
|
|
|
|
a1 = (struct apple)1;
|
|
|
|
return a1.foo;
|
|
|
|
}
|
2023-01-23 13:27:26 -08:00
|
|
|
|
|
|
|
|
2023-01-23 12:02:40 -08:00
|
|
|
[pixel shader]
|
2023-01-23 13:27:26 -08:00
|
|
|
float4 fun(float3 f)
|
|
|
|
{
|
|
|
|
return f.xyxy;
|
|
|
|
}
|
|
|
|
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
return fun(33);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2021-08-19 13:00:58 -07:00
|
|
|
draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (33.0, 33.0, 33.0, 33.0)
|