tests: Add some tests for a 'const' modifier.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2023-08-09 13:09:07 +02:00 committed by Alexandre Julliard
parent 240b9424fb
commit 7fd10bb6bc
Notes: Alexandre Julliard 2023-08-15 22:06:39 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/302
2 changed files with 22 additions and 0 deletions

View File

@ -74,6 +74,7 @@ vkd3d_shader_tests = \
tests/hlsl/comma.shader_test \
tests/hlsl/compute.shader_test \
tests/hlsl/conditional.shader_test \
tests/hlsl/const.shader_test \
tests/hlsl/cross.shader_test \
tests/hlsl/d3dcolor-to-ubyte4.shader_test \
tests/hlsl/ddxddy.shader_test \

View File

@ -0,0 +1,21 @@
[pixel shader todo]
const float4 f1;
const uniform float4 f2;
float4 main() : sv_target
{
return f1 + f2;
}
[test]
uniform 0 float4 1.0 2.0 3.0 4.0
uniform 4 float4 0.1 0.2 0.3 0.4
todo draw quad
todo probe all rgba (1.1, 2.2, 3.3, 4.4)
[pixel shader fail]
float4 main() : sv_target
{
const float f;
return 0;
}