2023-11-15 12:41:33 -08:00
|
|
|
[pixel shader todo(sm<4)]
|
2023-11-23 07:59:31 -08:00
|
|
|
float cond;
|
|
|
|
|
|
|
|
float4 main() : sv_target
|
|
|
|
{
|
|
|
|
float4 a = {1, 2, 3, 4};
|
|
|
|
float4 b;
|
|
|
|
|
|
|
|
// invalidate a
|
|
|
|
if (cond)
|
|
|
|
a = float4(-1, -2, -3, -4);
|
|
|
|
|
|
|
|
b = a;
|
|
|
|
a.y = 357;
|
|
|
|
return b.y;
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
uniform 0 float 0.0
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(sm<4 | glsl) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (2.0, 2.0, 2.0, 2.0)
|
2023-11-23 07:59:31 -08:00
|
|
|
uniform 0 float 1.0
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(sm<4 | glsl) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (-2.0, -2.0, -2.0, -2.0)
|
2023-11-21 14:48:50 -08:00
|
|
|
|
|
|
|
|
2023-11-15 12:41:33 -08:00
|
|
|
[pixel shader todo(sm<4)]
|
2023-11-21 14:48:50 -08:00
|
|
|
float cond;
|
|
|
|
|
|
|
|
float4 main() : sv_target
|
|
|
|
{
|
|
|
|
float2 r = {1, 2};
|
|
|
|
float2 tmp;
|
|
|
|
|
|
|
|
// invalidate r
|
|
|
|
if (cond)
|
|
|
|
r = float2(10, 20);
|
|
|
|
|
|
|
|
tmp = r;
|
|
|
|
r = tmp;
|
|
|
|
return r.y;
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
uniform 0 float 0.0
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(sm<4 | glsl) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (2.0, 2.0, 2.0, 2.0)
|
2023-11-21 14:48:50 -08:00
|
|
|
uniform 0 float 1.0
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(sm<4 | glsl) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (20.0, 20.0, 20.0, 20.0)
|
2023-11-21 14:48:50 -08:00
|
|
|
|
|
|
|
|
2023-11-15 12:41:33 -08:00
|
|
|
[pixel shader todo(sm<4)]
|
2023-11-21 14:48:50 -08:00
|
|
|
float cond;
|
|
|
|
|
|
|
|
float4 main() : sv_target
|
|
|
|
{
|
|
|
|
float2 r = {3, 4};
|
|
|
|
|
|
|
|
// invalidate r
|
|
|
|
if (cond)
|
|
|
|
r = float2(30, 40);
|
|
|
|
|
|
|
|
r = r;
|
|
|
|
r = float2(1, r.y);
|
|
|
|
|
|
|
|
return float4(r, 0, 0);
|
|
|
|
}
|
2023-11-15 12:41:33 -08:00
|
|
|
|
2023-11-21 14:48:50 -08:00
|
|
|
[test]
|
|
|
|
uniform 0 float 0.0
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(sm<4 | glsl) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (1.0, 4.0, 0.0, 0.0)
|
2023-11-21 14:48:50 -08:00
|
|
|
uniform 0 float 1.0
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(sm<4 | glsl) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (1.0, 40.0, 0.0, 0.0)
|