tests/hlsl: Avoid sampling on texel edges in ps1-projection.shader_test.

In the projected case, (1.2, 0.5) divided by 2.0 results in (0.6, 0.25) as
effective coordinates. The 0.25 y-coordinate is well within the second row of
texels; that's fine. On the other hand, the 0.6 x-coordinate falls right
between the third and fourth column of texels. The test expects the fourth
column to be selected, but that's very fragile: neither 1.2 nor 0.6 can be
exactly represented as a 32-bit floating-point value, and it only takes a
single ulp to push things to the other side of the edge.
This commit is contained in:
Henri Verbeet
2025-11-20 20:31:48 +01:00
parent a5ac959cf5
commit 3431c006ae
Notes: Henri Verbeet 2025-11-24 19:13:06 +01:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1838

View File

@@ -18,7 +18,7 @@ size (2d, 5, 5)
[vertex shader] [vertex shader]
void main(inout float4 pos : position, out float4 tex : texcoord) void main(inout float4 pos : position, out float4 tex : texcoord)
{ {
tex = float4(1.2, 0.5, 4.0, 2.0); tex = float4(1.4, 0.5, 4.0, 2.0);
} }
[pixel shader d3dbc-hex] [pixel shader d3dbc-hex]