tests: Test entry point semantics on function declarations.

This commit is contained in:
Zebediah Figura 2021-09-11 19:19:37 -05:00 committed by Alexandre Julliard
parent 4954c36347
commit 68c232cfab
Notes: Alexandre Julliard 2023-01-31 22:50:33 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
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/65
2 changed files with 53 additions and 0 deletions

View File

@ -59,6 +59,7 @@ vkd3d_shader_tests = \
tests/cbuffer.shader_test \
tests/compute.shader_test \
tests/conditional.shader_test \
tests/entry-point-semantics.shader_test \
tests/exp.shader_test \
tests/floor.shader_test \
tests/frac.shader_test \

View File

@ -0,0 +1,52 @@
% Test how semantics are determined when spread across the entry point's
% definition and its declarations.
[vertex shader]
void main(out float tex : texcoord, inout float4 pos : sv_position)
{
tex = 0.2;
}
[pixel shader fail]
float4 main(float tex : texcoord) : sv_target;
float4 main(float tex)
{
return tex;
}
[pixel shader fail]
float4 main(float tex)
{
return tex;
}
float4 main(float tex : texcoord) : sv_target;
[pixel shader]
float4 main(float tex : bogus) : bogus;
float4 main(float tex : texcoord) : sv_target
{
return tex;
}
[test]
draw quad
probe (0, 0) rgba (0.2, 0.2, 0.2, 0.2)
[pixel shader]
float4 main(float tex : texcoord) : sv_target
{
return tex;
}
float4 main(float tex : bogus) : bogus;
[test]
draw quad
probe (0, 0) rgba (0.2, 0.2, 0.2, 0.2)