mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests: Add a test for the partial precision destination modifier.
This commit is contained in:
committed by
Henri Verbeet
parent
4da83fe83b
commit
46fac7f264
Notes:
Henri Verbeet
2025-06-19 20:51:40 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1551
@@ -6,6 +6,39 @@ float4 main() : sv_target
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[pixel shader]
|
||||||
|
float4 var;
|
||||||
|
|
||||||
|
float4 main() : sv_target
|
||||||
|
{
|
||||||
|
half4 ret = var + 0.5;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
[test]
|
||||||
|
uniform 0 float4 1.0 2.0 3.0 4.0
|
||||||
|
draw quad
|
||||||
|
probe (0, 0) f32(1.5, 2.5, 3.5, 4.5)
|
||||||
|
|
||||||
|
[require]
|
||||||
|
shader model >= 2.0
|
||||||
|
shader model < 3.0
|
||||||
|
|
||||||
|
[pixel shader d3dbc-hex]
|
||||||
|
% The same as above, but in bytecode format so we test the partial precision
|
||||||
|
% destination modifier.
|
||||||
|
0002ffff % ps_2_0
|
||||||
|
51000005 01000fa0 0000003f 00000000 00000000 00000000 % def c1, 0.5, 0, 0, 0
|
||||||
|
01000002 00000f80 0000e4a0 % mov r0, c0
|
||||||
|
02000003 00002f80 0000e480 010000a0 % add_pp r0, r0, c1.x
|
||||||
|
01000002 00082f80 0000e480 % mov_pp oC0, r0
|
||||||
|
ffff0000 % end
|
||||||
|
|
||||||
|
[test]
|
||||||
|
uniform 0 float4 1.0 2.0 3.0 4.0
|
||||||
|
draw quad
|
||||||
|
probe (0, 0) f32(1.5, 2.5, 3.5, 4.5)
|
||||||
|
|
||||||
[require]
|
[require]
|
||||||
options: backcompat
|
options: backcompat
|
||||||
|
|
||||||
|
@@ -1722,6 +1722,13 @@ static ID3D10Blob *parse_hex(const char *source)
|
|||||||
if (isspace(c))
|
if (isspace(c))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (c == '%')
|
||||||
|
{
|
||||||
|
while (source[i] != '\n')
|
||||||
|
++i;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ('0' <= c && c <= '9')
|
if ('0' <= c && c <= '9')
|
||||||
value = 16 * value + (c - '0');
|
value = 16 * value + (c - '0');
|
||||||
else if ('a' <= c && c <= 'f')
|
else if ('a' <= c && c <= 'f')
|
||||||
|
Reference in New Issue
Block a user