You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
shader/execution/shader_io/fragment_builtins expects more interpolation precision than specs guarantee #4657
In the test for perspective interpolation of gl_FragCoord.w only 4 ULP of error is allowed. However, both the Vulkan and OpenGL ES specs only require precision to 1 part in 10^5, and Direct X specifies that:
Post-clipped vertex positions in the rasterizer are snapped to fixed point, to uniformly distribute precision across the RenderTarget area. Many rasterizer operations, including face culling as one example, occur on fixed point snapped positions, while other operations, such as attribute interpolator setup, use positions that have been converted back to floating point from the fixed point snapped positions.
(Direct 3D 11.3 Functional Specification, section 3.2.4 "Fixed Point Integers")
This means that in practice the interpolated and perspective corrected W coordinate may have less than 4 ULP of precision compared to an ideal 32 bit floating point interpolation. It appears that many desktop GPUs do pass the current tests, but lower powered GPUs on phones and embedded systems may not (and indeed I've observed this errors of up to 14 ULP on a Rock 5b SoC).
Thanks for the report - when writing the tests we defaulted to being "optimistic" about precision with the intent to increase the threshold it when we found issues on real devices. Would you be willing to look into increasing it to something that either should pass theoretically, or passes on the devices you've tried?
Right, that's Mali v10, though it's common to essentially all Mali. We can come up with a list of what to expect across various GPU families that we have in Mesa (which is all of them), though realistically the future-proof baseline would be what Vulkan demands. If DX has more stringent demands, those would be met by most but by no means all GPUs.
Activity
kainino0x commentedon Jun 5, 2026
Thanks for the report - when writing the tests we defaulted to being "optimistic" about precision with the intent to increase the threshold it when we found issues on real devices. Would you be willing to look into increasing it to something that either should pass theoretically, or passes on the devices you've tried?
dneto0 commentedon Oct 5, 2026
+1 thanks for the report.
Search suggests the Rock 5b SoC has a "Arm Mali-G610 MP4"
fooishbar commentedon Oct 7, 2026
Right, that's Mali v10, though it's common to essentially all Mali. We can come up with a list of what to expect across various GPU families that we have in Mesa (which is all of them), though realistically the future-proof baseline would be what Vulkan demands. If DX has more stringent demands, those would be met by most but by no means all GPUs.