Geometry generated by wpf-gpu-raster fails to rasterize as intended on macOS AMD
Categories
(Core :: Graphics: Canvas2D, defect, P2)
Tracking
()
People
(Reporter: jrmuizel, Assigned: jrmuizel)
References
Details
Attachments
(3 files)
2.07 KB,
application/json
|
Details | |
12.95 KB,
image/png
|
Details | |
48 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details | Review |
It looks like there's a precision issue when drawing long pixel high triangles
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Comment 2•3 years ago
|
||
Interestingly enough, I'm not able to reproduce the problem when using the software rasterizer
Assignee | ||
Comment 3•3 years ago
|
||
The problem doesn't seem to show up on Windows either.
Assignee | ||
Comment 4•3 years ago
|
||
Comment 5•3 years ago
|
||
It renders fine for me on Ubuntu 20.04, NVIDIA GeForce GTX 950, driver 510.85.02, GNOME + X11.
Updated•3 years ago
|
Assignee | ||
Comment 6•3 years ago
|
||
Assignee | ||
Comment 7•3 years ago
|
||
This seems like it might be a shader compiler bug.
Assignee | ||
Comment 8•3 years ago
|
||
It looks like I only see this when using the AMD Radeon Pro 5300M GPU
Assignee | ||
Comment 9•3 years ago
|
||
I can reproduce this with a standalone test case.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 10•3 years ago
•
|
||
That test case is here: https://github.com/jrmuizel/amd-rasterization-bug/. The test case seems to run fine on AMD on Linux. I changed the mesa driver to set the ROUND_MODE
which "Controls conversion of X,Y coordinates from IEEE to fixed-point" in PA_SU_VTX_CNTL
to Truncate (OGL)
instead of Round to Even (D3D)
. With that change, I reproduced a symptom very similar to what I see on macOS. My current theory is that macOS is using the Truncate
value.
Assignee | ||
Comment 11•2 years ago
|
||
This updates the version wpf-gpu-raster which adds support for
GPUs/drivers that use truncation instead of rounding when converting
vertices to fixed point.
It also adds the GL vendor to InitContextResult so that we can detect
AMD on macOS and tell wpf-gpu-raster that truncation is going to happen.
Updated•2 years ago
|
Comment 12•2 years ago
|
||
Comment 13•2 years ago
|
||
bugherder |
Assignee | ||
Comment 14•2 years ago
|
||
Comment on attachment 9313484 [details]
Bug 1803375. Use different coordinates when running on AMD.
Beta/Release Uplift Approval Request
- User impact if declined: Canvas will draw with artifacts on AMD gpus on macOS
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): The code is conditional to AMD gpus on macOS
- String changes made/needed:
- Is Android affected?: No
Comment 15•2 years ago
|
||
Comment on attachment 9313484 [details]
Bug 1803375. Use different coordinates when running on AMD.
Approved for 110 beta 8, thanks.
Comment 16•2 years ago
|
||
bugherder uplift |
Assignee | ||
Comment 17•2 years ago
|
||
This didn't actually get hooked up properly. I've filed bug 1813774 to do that.
Description
•