2022-03-07 17:55:44 -08:00
|
|
|
[require]
|
|
|
|
shader model >= 4.0
|
|
|
|
|
2022-03-07 17:55:40 -08:00
|
|
|
[pixel shader]
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
uint x = 5;
|
|
|
|
uint y = 15;
|
|
|
|
|
|
|
|
return float4(x + y, x - y, x * y, x / y);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2021-08-19 13:00:58 -07:00
|
|
|
draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (20.0, 4294967296.0, 75.0, 0.0)
|
2022-03-07 17:55:40 -08:00
|
|
|
|
|
|
|
[pixel shader]
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
uint x = 5;
|
|
|
|
uint y = 15;
|
|
|
|
|
|
|
|
return float4(x % y, +x, -x, y / x);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2021-08-19 13:00:58 -07:00
|
|
|
draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (5.0, 5.0, 4294967296.0, 3.0)
|
2022-04-14 03:52:39 -07:00
|
|
|
|
2023-09-14 02:29:24 -07:00
|
|
|
[pixel shader fail(sm<6)]
|
2022-04-14 03:52:39 -07:00
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
uint x = 1;
|
|
|
|
uint y = 0;
|
|
|
|
|
|
|
|
return x / y;
|
|
|
|
}
|
2022-04-14 03:52:40 -07:00
|
|
|
|
2023-09-14 02:29:24 -07:00
|
|
|
[test]
|
2021-08-19 13:00:58 -07:00
|
|
|
draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (0.0, 0.0, 0.0, 0.0)
|
2023-09-14 02:29:24 -07:00
|
|
|
|
|
|
|
[pixel shader fail(sm<6)]
|
2022-04-14 03:52:40 -07:00
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
uint x = 1;
|
|
|
|
uint y = 0;
|
|
|
|
|
|
|
|
return x % y;
|
|
|
|
}
|
2023-09-14 02:29:24 -07:00
|
|
|
|
|
|
|
[test]
|
2021-08-19 13:00:58 -07:00
|
|
|
draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (0.0, 0.0, 0.0, 0.0)
|