mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
tests: Combine all the swizzle tests in a single file.
This commit is contained in:
parent
d2f8a576a8
commit
dd2168754d
Notes:
Alexandre Julliard
2023-01-26 23:11:28 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/70
@ -135,15 +135,8 @@ vkd3d_shader_tests = \
|
|||||||
tests/shader-interstage-interface.shader_test \
|
tests/shader-interstage-interface.shader_test \
|
||||||
tests/sqrt.shader_test \
|
tests/sqrt.shader_test \
|
||||||
tests/step.shader_test \
|
tests/step.shader_test \
|
||||||
tests/swizzle-0.shader_test \
|
|
||||||
tests/swizzle-1.shader_test \
|
|
||||||
tests/swizzle-2.shader_test \
|
|
||||||
tests/swizzle-3.shader_test \
|
|
||||||
tests/swizzle-4.shader_test \
|
|
||||||
tests/swizzle-5.shader_test \
|
|
||||||
tests/swizzle-6.shader_test \
|
|
||||||
tests/swizzle-7.shader_test \
|
|
||||||
tests/swizzle-constant-prop.shader_test \
|
tests/swizzle-constant-prop.shader_test \
|
||||||
|
tests/swizzles.shader_test \
|
||||||
tests/texture-load.shader_test \
|
tests/texture-load.shader_test \
|
||||||
tests/texture-load-offset.shader_test \
|
tests/texture-load-offset.shader_test \
|
||||||
tests/texture-load-typed.shader_test \
|
tests/texture-load-typed.shader_test \
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
[pixel shader]
|
|
||||||
uniform float4 color;
|
|
||||||
|
|
||||||
float4 main() : sv_target
|
|
||||||
{
|
|
||||||
float4 ret = color;
|
|
||||||
ret.gb = ret.ra;
|
|
||||||
ret.ra = float2(0.0101, 0.0404);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
[test]
|
|
||||||
uniform 0 float4 0.0303 0.08 0.07 0.0202
|
|
||||||
draw quad
|
|
||||||
probe all rgba (0.0101, 0.0303, 0.0202, 0.0404)
|
|
@ -1,11 +0,0 @@
|
|||||||
[pixel shader]
|
|
||||||
float4 main() : SV_target
|
|
||||||
{
|
|
||||||
float4 ret = float4(0.1, 0.2, 0.3, 0.4);
|
|
||||||
ret.wyz.yx = float2(0.5, 0.6).yx;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
[test]
|
|
||||||
draw quad
|
|
||||||
probe all rgba (0.1, 0.6, 0.3, 0.5)
|
|
@ -1,11 +0,0 @@
|
|||||||
[pixel shader]
|
|
||||||
float4 main() : SV_target
|
|
||||||
{
|
|
||||||
float4 ret;
|
|
||||||
ret.zwyx = float4(0.1, 0.2, 0.3, 0.4);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
[test]
|
|
||||||
draw quad
|
|
||||||
probe all rgba (0.4, 0.3, 0.1, 0.2)
|
|
@ -1,14 +0,0 @@
|
|||||||
[pixel shader]
|
|
||||||
float4 main() : SV_target
|
|
||||||
{
|
|
||||||
float4 ret;
|
|
||||||
ret.yw.y = 0.1;
|
|
||||||
ret.xzy.yz.y.x = 0.2;
|
|
||||||
ret.yzwx.yzwx.wz.y = 0.3;
|
|
||||||
ret.zxy.xyz.zxy.xy.y = 0.4;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
[test]
|
|
||||||
draw quad
|
|
||||||
probe all rgba (0.3, 0.2, 0.4, 0.1)
|
|
@ -1,13 +0,0 @@
|
|||||||
[pixel shader]
|
|
||||||
float4 main() : SV_target
|
|
||||||
{
|
|
||||||
float4 ret;
|
|
||||||
ret.yxz.yx = float2(0.1, 0.2);
|
|
||||||
ret.w.x = 0.3;
|
|
||||||
ret.wzyx.zyx.yx.x = 0.4;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
[test]
|
|
||||||
draw quad
|
|
||||||
probe all rgba (0.1, 0.2, 0.4, 0.3)
|
|
@ -1,10 +0,0 @@
|
|||||||
[pixel shader]
|
|
||||||
float4 main() : SV_target
|
|
||||||
{
|
|
||||||
float4 ret = float4(0.1, 0.2, 0.3, 0.4).ywxz.zyyz;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
[test]
|
|
||||||
draw quad
|
|
||||||
probe all rgba (0.1, 0.4, 0.4, 0.1)
|
|
@ -1,12 +0,0 @@
|
|||||||
[pixel shader]
|
|
||||||
float4 main() : SV_target
|
|
||||||
{
|
|
||||||
float4 ret = float4(0.1, 0.2, 0.3, 0.4);
|
|
||||||
ret.yxwz = ret;
|
|
||||||
ret = ret.wyzx;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
[test]
|
|
||||||
draw quad
|
|
||||||
probe all rgba (0.3, 0.1, 0.4, 0.2)
|
|
@ -1,11 +0,0 @@
|
|||||||
[pixel shader]
|
|
||||||
float4 main() : SV_target
|
|
||||||
{
|
|
||||||
float4 ret;
|
|
||||||
ret.xyzw.xyzw = float4(0.1, 0.2, 0.3, 0.4);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
[test]
|
|
||||||
draw quad
|
|
||||||
probe all rgba (0.1, 0.2, 0.3, 0.4)
|
|
111
tests/swizzles.shader_test
Normal file
111
tests/swizzles.shader_test
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
[pixel shader]
|
||||||
|
uniform float4 color;
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
float4 ret = color;
|
||||||
|
ret.gb = ret.ra;
|
||||||
|
ret.ra = float2(0.0101, 0.0404);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
uniform 0 float4 0.0303 0.08 0.07 0.0202
|
||||||
|
draw quad
|
||||||
|
probe all rgba (0.0101, 0.0303, 0.0202, 0.0404)
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader]
|
||||||
|
float4 main() : SV_target
|
||||||
|
{
|
||||||
|
float4 ret = float4(0.1, 0.2, 0.3, 0.4);
|
||||||
|
ret.wyz.yx = float2(0.5, 0.6).yx;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
draw quad
|
||||||
|
probe all rgba (0.1, 0.6, 0.3, 0.5)
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader]
|
||||||
|
float4 main() : SV_target
|
||||||
|
{
|
||||||
|
float4 ret;
|
||||||
|
ret.zwyx = float4(0.1, 0.2, 0.3, 0.4);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
draw quad
|
||||||
|
probe all rgba (0.4, 0.3, 0.1, 0.2)
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader]
|
||||||
|
float4 main() : SV_target
|
||||||
|
{
|
||||||
|
float4 ret;
|
||||||
|
ret.yw.y = 0.1;
|
||||||
|
ret.xzy.yz.y.x = 0.2;
|
||||||
|
ret.yzwx.yzwx.wz.y = 0.3;
|
||||||
|
ret.zxy.xyz.zxy.xy.y = 0.4;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
draw quad
|
||||||
|
probe all rgba (0.3, 0.2, 0.4, 0.1)
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader]
|
||||||
|
float4 main() : SV_target
|
||||||
|
{
|
||||||
|
float4 ret;
|
||||||
|
ret.yxz.yx = float2(0.1, 0.2);
|
||||||
|
ret.w.x = 0.3;
|
||||||
|
ret.wzyx.zyx.yx.x = 0.4;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
draw quad
|
||||||
|
probe all rgba (0.1, 0.2, 0.4, 0.3)
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader]
|
||||||
|
float4 main() : SV_target
|
||||||
|
{
|
||||||
|
float4 ret = float4(0.1, 0.2, 0.3, 0.4).ywxz.zyyz;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
draw quad
|
||||||
|
probe all rgba (0.1, 0.4, 0.4, 0.1)
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader]
|
||||||
|
float4 main() : SV_target
|
||||||
|
{
|
||||||
|
float4 ret = float4(0.1, 0.2, 0.3, 0.4);
|
||||||
|
ret.yxwz = ret;
|
||||||
|
ret = ret.wyzx;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
draw quad
|
||||||
|
probe all rgba (0.3, 0.1, 0.4, 0.2)
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader]
|
||||||
|
float4 main() : SV_target
|
||||||
|
{
|
||||||
|
float4 ret;
|
||||||
|
ret.xyzw.xyzw = float4(0.1, 0.2, 0.3, 0.4);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
draw quad
|
||||||
|
probe all rgba (0.1, 0.2, 0.3, 0.4)
|
Loading…
x
Reference in New Issue
Block a user