mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
tests: Add minimal tests for temp lifetimes within a loop.
This commit is contained in:
parent
855bb71f6d
commit
fbd2df2ad5
Notes:
Alexandre Julliard
2023-05-24 22:33:32 +02: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/208
@ -136,6 +136,7 @@ vkd3d_shader_tests = \
|
|||||||
tests/load-level.shader_test \
|
tests/load-level.shader_test \
|
||||||
tests/log.shader_test \
|
tests/log.shader_test \
|
||||||
tests/logic-operations.shader_test \
|
tests/logic-operations.shader_test \
|
||||||
|
tests/loop.shader_test \
|
||||||
tests/majority-syntax.shader_test \
|
tests/majority-syntax.shader_test \
|
||||||
tests/math.shader_test \
|
tests/math.shader_test \
|
||||||
tests/matrix-semantics.shader_test \
|
tests/matrix-semantics.shader_test \
|
||||||
|
43
tests/loop.shader_test
Normal file
43
tests/loop.shader_test
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
[pixel shader]
|
||||||
|
float a;
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
float res = 0;
|
||||||
|
|
||||||
|
for (int i = 0; i < 10; ++i)
|
||||||
|
{
|
||||||
|
res += a;
|
||||||
|
// The temp copy of 'a' must reserve its registers for the rest of the loop.
|
||||||
|
// It shall not be overwritten.
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
uniform 0 float 5.0
|
||||||
|
draw quad
|
||||||
|
todo probe all rgba (50.0, 50.0, 50.0, 50.0)
|
||||||
|
|
||||||
|
|
||||||
|
[pixel shader]
|
||||||
|
float a;
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
float res = 0;
|
||||||
|
|
||||||
|
for (int i = 0; i < 10; ++i)
|
||||||
|
{
|
||||||
|
res += a;
|
||||||
|
// The temp copy of 'a' must reserve its registers for the rest of the loop.
|
||||||
|
// It shall not be overwritten.
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
uniform 0 float 4.0
|
||||||
|
draw quad
|
||||||
|
todo probe all rgba (20.0, 20.0, 20.0, 20.0)
|
Loading…
x
Reference in New Issue
Block a user