From 3431c006ae906ee2a0265e715b05ffc0476e5c40 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 20 Nov 2025 20:31:48 +0100 Subject: [PATCH] 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. --- tests/hlsl/ps1-projection.shader_test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/hlsl/ps1-projection.shader_test b/tests/hlsl/ps1-projection.shader_test index 0a1643211..1d423438c 100644 --- a/tests/hlsl/ps1-projection.shader_test +++ b/tests/hlsl/ps1-projection.shader_test @@ -18,7 +18,7 @@ size (2d, 5, 5) [vertex shader] 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]