Closed Bug 1803375 Opened 3 years ago Closed 2 years ago

Geometry generated by wpf-gpu-raster fails to rasterize as intended on macOS AMD

Categories

(Core :: Graphics: Canvas2D, defect, P2)

defect

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox110 --- fixed
firefox111 --- fixed

People

(Reporter: jrmuizel, Assigned: jrmuizel)

References

Details

Attachments

(3 files)

It looks like there's a precision issue when drawing long pixel high triangles

Interestingly enough, I'm not able to reproduce the problem when using the software rasterizer

The problem doesn't seem to show up on Windows either.

It renders fine for me on Ubuntu 20.04, NVIDIA GeForce GTX 950, driver 510.85.02, GNOME + X11.

Severity: -- → S3
Priority: -- → P2

This seems like it might be a shader compiler bug.

It looks like I only see this when using the AMD Radeon Pro 5300M GPU

I can reproduce this with a standalone test case.

Summary: Graphs at the top of profiler are not rasterized correctly → Geometry generated by wpf-gpu-raster fails to rasterize as intended on macOS AMD

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.

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.

Assignee: nobody → jmuizelaar
Status: NEW → ASSIGNED
Pushed by jmuizelaar@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bf51418892a8 Use different coordinates when running on AMD. r=lsalzman,jgilbert
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch

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
Attachment #9313484 - Flags: approval-mozilla-beta?

Comment on attachment 9313484 [details]
Bug 1803375. Use different coordinates when running on AMD.

Approved for 110 beta 8, thanks.

Attachment #9313484 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

This didn't actually get hooked up properly. I've filed bug 1813774 to do that.

Blocks: 1813774
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: