mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
d3ba810c98
This is simply unnecessary and wastes time. As part of this, simply remove the "all" directive. Only for a couple of tests is it even potentially interesting to validate all pixels (e.g. nointerpolation.shader_test), and for those "all" is replaced with an explicit (0, 0, 640, 480) rect. In all other cases we just probe (0, 0).
176 lines
2.2 KiB
Plaintext
176 lines
2.2 KiB
Plaintext
[pixel shader]
|
|
float fun(float a[2])
|
|
{
|
|
return 10 * a[0] + a[1];
|
|
}
|
|
|
|
float4 main() : sv_target
|
|
{
|
|
float f[2] = {2, 5};
|
|
|
|
return fun(f);
|
|
}
|
|
|
|
[test]
|
|
todo(glsl) draw quad
|
|
probe (0, 0) rgba (25.0, 25.0, 25.0, 25.0)
|
|
|
|
|
|
[pixel shader fail]
|
|
float fun(float a[2])
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
float4 main() : sv_target
|
|
{
|
|
int f[2] = {2, 5};
|
|
|
|
return fun(f);
|
|
}
|
|
|
|
|
|
[pixel shader fail]
|
|
float fun(float a[1])
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
float4 main() : sv_target
|
|
{
|
|
float f = 4;
|
|
|
|
return fun(f);
|
|
}
|
|
|
|
|
|
[pixel shader fail]
|
|
float fun(int a[2])
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
float4 main() : sv_target
|
|
{
|
|
float f[2] = {1, 2};
|
|
|
|
return fun(f);
|
|
}
|
|
|
|
|
|
[pixel shader]
|
|
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];
|
|
return res;
|
|
}
|
|
|
|
float4 main() : sv_target
|
|
{
|
|
float f[2][4] = {1, 2, 3, 4, 5, 6, 7, 8};
|
|
|
|
return fun(f);
|
|
}
|
|
|
|
[test]
|
|
todo(glsl) draw quad
|
|
probe (0, 0) rgba (15.0, 26.0, 37.0, 48.0)
|
|
|
|
|
|
[pixel shader fail]
|
|
float fun(float a[2])
|
|
{
|
|
return a[2]; // out of bounds.
|
|
}
|
|
|
|
float4 main() : sv_target
|
|
{
|
|
float f[2] = {1, 2};
|
|
|
|
return fun(f);
|
|
}
|
|
|
|
|
|
[pixel shader fail]
|
|
float fun(float a[2])
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
float4 main() : sv_target
|
|
{
|
|
float f[3] = {1, 2, 3};
|
|
|
|
return fun(f);
|
|
}
|
|
|
|
|
|
% Implicit size arrays are not allowed.
|
|
[pixel shader fail(sm<6)]
|
|
float fun(float a[])
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
float4 main() : sv_target
|
|
{
|
|
float f[2] = {1, 2};
|
|
|
|
return fun(f);
|
|
}
|
|
|
|
[pixel shader fail]
|
|
float4 fun(float a[4])
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
float4 main() : sv_target
|
|
{
|
|
float4 v = {1, 2, 3, 4};
|
|
|
|
return fun(v);
|
|
}
|
|
|
|
|
|
% Arrays with the same number of components are allowed.
|
|
[pixel shader]
|
|
float fun(float a[2][3])
|
|
{
|
|
return 100*a[0][0] + 10*a[0][2] + a[1][2];
|
|
}
|
|
|
|
float4 main() : sv_target
|
|
{
|
|
float f[3][2] = {1, 2, 3, 4, 5, 6};
|
|
|
|
return fun(f);
|
|
}
|
|
|
|
[test]
|
|
todo(glsl) draw quad
|
|
probe (0, 0) rgba (136.0, 136.0, 136.0, 136.0)
|
|
|
|
|
|
[pixel shader]
|
|
float fun(float a[2][3])
|
|
{
|
|
return 100*a[0][0] + 10*a[1][0] + a[1][2];
|
|
}
|
|
|
|
float4 main() : sv_target
|
|
{
|
|
float f[6] = {7, 8, 9, 0, 1, 2};
|
|
|
|
return fun(f);
|
|
}
|
|
|
|
[test]
|
|
todo(glsl) draw quad
|
|
probe (0, 0) rgba (702.0, 702.0, 702.0, 702.0)
|