Why does Skia think my gpu doesn't support MSAA?

138 views
Skip to first unread message

Jeru Sanders

unread,
Nov 23, 2021, 11:59:48 AM11/23/21
to skia-discuss
I've been having issues with SkSurface::MakeFromBackendRenderTarget returning me NULL when giving more than 1 sample on Intel iGPUs.

I finally got Skia to build with symbols and see that the issue is here:
skiaSamples.png

This table array only contains a single value, and it's 1. But I think this is impossible because the minimum for OpenGL is 4 samples. Querying GL_MAX_SAMPLES myself correctly returns 16.

It seems to work correctly on my NVIDIA GPUs, but on my Surface Pro 6 (i5 8250U iGPU) and my ASUS E403N (Celeron N3350 iGPU), I'm unable to create an MSAA surface with more than one sample.

I'm currently testing on the chrome/m92 branch for other reasons, but the current main branch build return NULL as well.

I also see:
---- glGetError 0x500(Invalid Enum) at
        C:\_tools\_sdks\skia\skia\src\gpu\gl\GrGLUtil.cpp(108) :
                GetString(0x1F02)

Which could be related (GL_VERSION).

I see there's workaround max_msaa_sample_count_4, but how can I set this in my application without hacking it into my custom version of the library?

Greg Daniel

unread,
Nov 23, 2021, 12:07:03 PM11/23/21
to skia-d...@googlegroups.com
We currently disable MSAA on all intel device due to poor performance or driver issues. See https://source.chromium.org/chromium/chromium/src/+/main:third_party/skia/src/gpu/gl/GrGLCaps.cpp;l=4230.

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/e27c56ac-13b8-492e-9ddc-f5c0ea68e7e5n%40googlegroups.com.

Jeru Sanders

unread,
Nov 23, 2021, 12:16:50 PM11/23/21
to skia-discuss
Ouch, that's pretty brutal, I guess I can super sample since my content is pretty simple. Any advice on how to do that easily? (Without making a 2x bigger SkCanvas, scaling all my content up, then scaling down the resulting texture)
Reply all
Reply to author
Forward
0 new messages