Skip to content
Snippets Groups Projects
Commit 581939f1 authored by Conor McCarthy's avatar Conor McCarthy Committed by Alexandre Julliard
Browse files

tests/shader-runner: Add tests for minimum-precision constants.

Values in DXIL have no signedness, so it is ambiguous whether 16-bit
constants should or should not be sign-extended when 16-bit execution
is not supported.
parent 25d353db
No related branches found
Tags wine-0.1.0
1 merge request!519vkd3d-shader/dxil: Support minimum precision.
......@@ -19,3 +19,44 @@ float4 main() : sv_target
[test]
draw quad
probe all rgba (197.0, 218.0, 238.0, 257.0)
[pixel shader]
uniform min16uint2 u;
uint4 main() : sv_target
{
min16uint i = 0x7fff, j = 0xffff;
return uint4(u.x + i, u.y + j, 0, 0);
}
[test]
uniform 0 uint4 0 0 0 0
draw quad
probe all rgbaui (0x7fff, 0xffff, 0, 0)
% The code d3dcompiler_47 produces for this appears correct, but the result
% is still zero in Windows.
[require]
shader model >= 6.0
[pixel shader]
uniform min16uint4 u;
uniform uint i;
uint4 main() : sv_target
{
min16uint arr[4] = {1, 2, 0x7fff, 0xffff};
return uint4(u.x + arr[i], u.y + arr[i + 1], 0, 0);
}
[test]
uniform 0 uint4 0 0 0 0
uniform 4 uint 2
draw quad
probe all rgbaui (0x7fff, 0xffff, 0, 0)
uniform 0 uint4 0 0 0 0
uniform 4 uint 0
draw quad
probe all rgbaui (1, 2, 0, 0)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment