Windows only, release only MSAA issue.

19 views
Skip to first unread message

Ian Waters

unread,
Sep 26, 2024, 10:01:33 AMSep 26
to skia-discuss
Hi all,
I’ve tried setting MSAA up via MakeFromBackendTexture and MakeRenderTarget (OpenGL Ganesh backed).

Via both methods, MSAA works fine on macOS (debug/release) and on Windows debug but there is no MSAA on Windows release builds.

Does anyone have any idea what kind of craziness could cause this, or even where to look? It is not a class of bug I’ve come across before.

I’m happy to share code, but it’s very boiler plate and we’re doing nothing special.
Best,
Ian

Greg Daniel

unread,
Sep 26, 2024, 10:57:53 AMSep 26
to skia-d...@googlegroups.com
I am assuming by no MSAA you mean there is just no anti-aliasing happening at all? It is very strange for such a behavior to be different from debug vs release.

Are you able to share your code where you are setting up the SkSurfaces and BackendTextures, and where you are making the draw calls?

--
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/C284E5A4-60AF-4DAB-A24B-51E6262A0AB5%40gmail.com.

Ian Waters

unread,
Sep 26, 2024, 11:11:29 AMSep 26
to skia-discuss
Sure, I’ve attached a version with most of the error checking removed. There’s a base/subclass in here, but the bit you’re after (hopefully) is the ContextGLOffScreen constructor.
I should point out that this is used for offscreen rendering, I haven’t tried onscreen MSAA yet 😅

And yes, we’re adding MSAA so that we get anti-aliasing on SkVertices (and hopefully SkMesh when we adopt that) calls. We’re rendering via drawVertices. Would you like to see an example of how we call that specifically?

Worth noting that I am calling resolveMSAA() on the surface before I use makeImageSnapshot() to get the pixel data. I don’t actually know if that’s necessary here.

Best,
Ian

ContextGL.cpp

Ian Waters

unread,
Sep 26, 2024, 11:14:42 AMSep 26
to skia-discuss
I somehow managed not to answer your question properly.

There is normal AA on everything that isn’t rendered via SkVertices (normal AA is turned on via SkPaint). There is no anti-aliasing of any kind on the SkVertices rendered elements.
Reply all
Reply to author
Forward
0 new messages