Summary: | [llvmpipe] piglit linestipple regression | ||
---|---|---|---|
Product: | Mesa | Reporter: | Vinson Lee <vlee> |
Component: | Drivers/Gallium/llvmpipe | Assignee: | mesa-dev |
Status: | RESOLVED MOVED | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | CC: | brianp, jfonseca, sroland |
Version: | 13.0 | Keywords: | bisected, regression |
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 98471 |
Description
Vinson Lee
2016-06-14 00:09:32 UTC
I suppose I missed that when I did a piglit run... This is fairly interesting, it seems to be due to inaccurate float math. The stipple code gets for position x0,x1 10.5, 34.5 leading to a length 24. However, with the MADs used for vertex transform replaced by fmas, I get position 10.500002, 34.500000 instead. Hence length 23.999998. And subsequently patterns getting different (I think it makes no difference on the first segment, but the second due to the stipple->counter += length line). Not sure though why the results would be seemingly less accurate with fma. (And not sure there shouldn't be some different behavior wrt rounding in the line stipple code?) Althought generally FMA is more precise, it's possible that it give less precise results. Especially when dealing with things like whole integers, it's quite possible that the lower precision of a non-fused MAD ends up "snapping" things to the right values. Whereas FMA preserves any intermediate rounding error in the final result. From my POV, the issue is either: - llvmpipe/draw stipple implementation needs better rounding (eg.g, RoundToNearest as opposed to Truncate) - the linestipple piglit test needs to be updated to not rely on precise rounding of the stipple. Either way I doubt the solution is to avoid FMA. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/241. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.