mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
tests: Adjust array-parameters.shader_test to pass with 1.x.
Pixel shader 1.x constants must be between -1 and 1, or they will be clamped, even constants defined in the shader. Also mark 1.x-specific features if any.
This commit is contained in:
parent
e40b191943
commit
e5ec52d63b
Notes:
Henri Verbeet
2025-01-22 15:03:30 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1324
@ -6,14 +6,14 @@ float fun(float a[2])
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
float f[2] = {2, 5};
|
||||
float f[2] = {0.02, 0.05};
|
||||
|
||||
return fun(f);
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe (0, 0) rgba (25.0, 25.0, 25.0, 25.0)
|
||||
probe (0, 0) rgba (0.25, 0.25, 0.25, 0.25) 1
|
||||
|
||||
|
||||
[pixel shader fail]
|
||||
@ -63,10 +63,10 @@ float4 fun(float a[2][4])
|
||||
{
|
||||
float4 res;
|
||||
|
||||
res.x = 10 * a[0][0] + a[1][0];
|
||||
res.y = 10 * a[0][1] + a[1][1];
|
||||
res.z = 10 * a[0][2] + a[1][2];
|
||||
res.w = 10 * a[0][3] + a[1][3];
|
||||
res.x = 0.1 * a[0][0] + 0.01 * a[1][0];
|
||||
res.y = 0.1 * a[0][1] + 0.01 * a[1][1];
|
||||
res.z = 0.1 * a[0][2] + 0.01 * a[1][2];
|
||||
res.w = 0.1 * a[0][3] + 0.01 * a[1][3];
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe (0, 0) rgba (15.0, 26.0, 37.0, 48.0)
|
||||
probe (0, 0) rgba (0.15, 0.26, 0.37, 0.48) 1
|
||||
|
||||
|
||||
[pixel shader fail]
|
||||
@ -142,7 +142,7 @@ float4 main() : sv_target
|
||||
[pixel shader]
|
||||
float fun(float a[2][3])
|
||||
{
|
||||
return 100*a[0][0] + 10*a[0][2] + a[1][2];
|
||||
return 0.1*a[0][0] + 0.01*a[0][2] + 0.001*a[1][2];
|
||||
}
|
||||
|
||||
float4 main() : sv_target
|
||||
@ -154,13 +154,13 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe (0, 0) rgba (136.0, 136.0, 136.0, 136.0)
|
||||
probe (0, 0) rgba (0.136, 0.136, 0.136, 0.136) 1
|
||||
|
||||
|
||||
[pixel shader]
|
||||
float fun(float a[2][3])
|
||||
{
|
||||
return 100*a[0][0] + 10*a[1][0] + a[1][2];
|
||||
return 0.1*a[0][0] + 0.01*a[1][0] + 0.001*a[1][2];
|
||||
}
|
||||
|
||||
float4 main() : sv_target
|
||||
@ -172,4 +172,4 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe (0, 0) rgba (702.0, 702.0, 702.0, 702.0)
|
||||
probe (0, 0) rgba (0.702, 0.702, 0.702, 0.702) 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user