mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests/hlsl: Test minimum precision 16-bit unsigned integers.
This commit is contained in:
committed by
Henri Verbeet
parent
fdc173506e
commit
a477502a05
Notes:
Henri Verbeet
2025-05-24 21:47:37 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1507
@@ -109,6 +109,88 @@ uniform 0 uint4 0xccaa5533 7 1 2
|
|||||||
todo(msl) draw quad
|
todo(msl) draw quad
|
||||||
probe (0, 0) rgbaui(0xff77, 0xf, 0x407f, 0x9)
|
probe (0, 0) rgbaui(0xff77, 0xf, 0x407f, 0x9)
|
||||||
|
|
||||||
|
% Minimum precision vectors in constant buffers have inconsistent behavior with
|
||||||
|
% SM6 (see minimum-precision.shader_test), so we're reading with arrays instead.
|
||||||
|
|
||||||
|
[pixel shader]
|
||||||
|
uniform min16uint u[2];
|
||||||
|
|
||||||
|
uint4 main() : sv_target
|
||||||
|
{
|
||||||
|
min16uint i = 0xfff, j = 0x7ff;
|
||||||
|
return uint4(u[0] + i, u[1] + j, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
uniform 0 uint 0
|
||||||
|
uniform 4 uint 0
|
||||||
|
todo(msl) draw quad
|
||||||
|
probe (0, 0) rgbaui(0xfff, 0x7ff, 0, 0)
|
||||||
|
uniform 0 uint 1
|
||||||
|
uniform 4 uint 0xfff
|
||||||
|
todo(msl) draw quad
|
||||||
|
probe (0, 0) rgbaui(0x1000, 0x17fe, 0, 0)
|
||||||
|
|
||||||
|
[pixel shader]
|
||||||
|
uniform min16uint u[2];
|
||||||
|
uniform uint i;
|
||||||
|
|
||||||
|
uint4 main() : sv_target
|
||||||
|
{
|
||||||
|
min16uint arr[4] = {1, 2, 0x7ff, 0xfff};
|
||||||
|
return uint4(u[0] + arr[i], u[1] + arr[i + 1], 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
uniform 0 uint 2
|
||||||
|
uniform 4 uint 0xffe
|
||||||
|
% i is allocated differently between SM4-5 and SM6
|
||||||
|
uniform 5 uint 2
|
||||||
|
uniform 8 uint 2
|
||||||
|
todo(msl) draw quad
|
||||||
|
% In D3D12 with SM5 all reads to the array return 0
|
||||||
|
if(sm>=6 | !d3d12) probe (0, 0) rgbaui(0x801, 0x1ffd, 0, 0)
|
||||||
|
uniform 0 uint 0
|
||||||
|
uniform 4 uint 0
|
||||||
|
uniform 5 uint 0
|
||||||
|
uniform 8 uint 0
|
||||||
|
todo(msl) draw quad
|
||||||
|
if(sm>=6 | !d3d12) probe (0, 0) rgbaui(1, 2, 0, 0)
|
||||||
|
|
||||||
|
[pixel shader]
|
||||||
|
uniform min16uint u[4];
|
||||||
|
|
||||||
|
uint4 main() : sv_target
|
||||||
|
{
|
||||||
|
min16uint i = 3, j = 5;
|
||||||
|
return uint4(u[0] * i, u[1] * j, u[2] * i, u[3] * j);
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
uniform 0 uint 7
|
||||||
|
uniform 4 uint 9
|
||||||
|
uniform 8 uint 0xff9
|
||||||
|
uniform 12 uint 0xff7
|
||||||
|
todo(msl) draw quad
|
||||||
|
probe (0, 0) rgbaui(21, 45, 0x2feb, 0x4fd3)
|
||||||
|
|
||||||
|
[pixel shader]
|
||||||
|
uniform min16uint u[4];
|
||||||
|
|
||||||
|
uint4 main() : sv_target
|
||||||
|
{
|
||||||
|
min16uint i = 0xfff, j = 5;
|
||||||
|
return uint4(u[0] / i, u[1] / j, u[2] / i, u[3] / j);
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
uniform 0 uint 0xfffe
|
||||||
|
uniform 4 uint 0xb
|
||||||
|
uniform 8 uint 0xffff
|
||||||
|
uniform 12 uint 0xffff
|
||||||
|
todo(msl | glsl) draw quad
|
||||||
|
probe (0, 0) rgbaui(0x10, 2, 0x10, 0x3333)
|
||||||
|
|
||||||
[require]
|
[require]
|
||||||
shader model >= 6.2
|
shader model >= 6.2
|
||||||
native-16-bit
|
native-16-bit
|
||||||
|
Reference in New Issue
Block a user