Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPU (Radeon/NVIDIA) AA issues #304

Open
rodlie opened this issue Nov 6, 2024 · 7 comments
Open

GPU (Radeon/NVIDIA) AA issues #304

rodlie opened this issue Nov 6, 2024 · 7 comments
Labels
bug Something isn't working gpu help wanted Extra attention is needed opengl skia

Comments

@rodlie
Copy link
Member

rodlie commented Nov 6, 2024

So, this has been reported to me several times and is a known issue (see any release notes). But I never made an issue to track the progress/status.

What's the problem?

Paths are not antialiased on some GPUs, creating bad preview/renders.

How to replicate?

Add some text and zoom in, either is smooth/perfect or not ("k" is a good char to test with)

GPUs affected?

  • Modern NVIDIA cards on Windows and Linux
  • Possible Radeon on Windows(?) - need feedback as I don't test or use Radeon

GPUs that work?

  • Intel GPUs work perfectly on Windows, macOS and Linux
  • Radeon possible work on macOS/Linux (?) - need feedback from users

How to fix?

I don't know.

@rodlie rodlie added bug Something isn't working help wanted Extra attention is needed skia opengl gpu labels Nov 6, 2024
@rodlie
Copy link
Member Author

rodlie commented Nov 6, 2024

Just as a reference, Intel GPU:

Screenshot from 2024-11-06 13-11-54

On NVIDIA (and possible Radeon) you will notice jagged lines on the k.

@rodlie
Copy link
Member Author

rodlie commented Nov 10, 2024

NVIDIA status

So, wasted yesterday testing NVIDIA cards, tested all kind of cards (20+ different cards). From laptops, desktops, Quadro, Geforce, Windows 10, Windows 11, various distros and a ton of different drivers.

Conclusion

  • OS does not matter
  • Driver does not matter
  • Kepler and Maxwell works perfectly fine
  • Issue introduced in Pascal
  • Issue still present in Turing

So, what does this mean? something changed/broke in Pascal.

@kroll-j
Copy link

kroll-j commented Nov 18, 2024

image
This is on Linux with open source AMD drivers. There is antialiasing, but it looks a bit coarser to me, compared to the Intel screenshot. Maybe this driver uses a different AA method.

@rodlie
Copy link
Member Author

rodlie commented Nov 18, 2024

This is identical to NVIDIA Pascal or newer.

@rodlie rodlie changed the title GPU Path AA issues GPU (Radeon/NVIDIA) AA issues Nov 18, 2024
@rodlie rodlie removed the skia label Nov 18, 2024
@kroll-j
Copy link

kroll-j commented Nov 18, 2024

image
Again, AMD. Zoomed in. This looks to me like it could be oversampling (maybe 4x?) rather than proper antialiasing.

Reminds me of glHint(GL_LINE_SMOOTH, GL_NICEST) vs glHint(GL_LINE_SMOOTH, GL_FASTEST) in OpenGL immediate mode where the driver would be free to pick an implementation and results would vary depending on the driver and card. But that was ages ago. Not sure how the render path works in friction/skia.

@rodlie
Copy link
Member Author

rodlie commented Nov 18, 2024

On NVIDIA I tested all sorts of OpenGL versions, tweaks, settings, oversampling etc etc, nothing changed. Only a downgrade of the actual GPU did something.

So, that's all I know and nothing I can do about it (as far as I know, I hope to be corrected at some point).

@rodlie rodlie added the skia label Nov 25, 2024
@rodlie
Copy link
Member Author

rodlie commented Nov 25, 2024

Been looking through the skia src, there is a lot of workarounds etc for various GPU's and drivers... Seems like crappy drivers are the norm. So at least we know that this has to be resolved in skia (src/gpu/gl).

There are several commits in upstream skia I could backport, some Radeon related. If they actually fix anything... I don't know.

AA on Radeon does not seem to be fixable, the latest skia src has this disabled as far as I can see (we could enable and see what happens, but I assume the Chromium team has done proper testing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gpu help wanted Extra attention is needed opengl skia
Projects
None yet
Development

No branches or pull requests

2 participants