Has someone used Skia's Vulkan backend with a window library (ideally GLFW?)

565 views
Skip to first unread message

Joshua Olson

unread,
Jan 2, 2017, 1:51:43 PM1/2/17
to skia-discuss

I know the Vulkan backend can have problems with some drivers, but does anyone have tips to begin using Vulkan Skia, for example how to modify the GLFW test to use Vulkan (1.0)? My only alternative is OpenGL 3.0.

Joshua Olson

unread,
Jan 2, 2017, 2:03:42 PM1/2/17
to skia-discuss
P.S. samplecode/SampleApp.cpp and tools/viewer look to me to use their own window abstractions. Are they comparable in robustness and abstracted features to something like GLFW?

Jim Van Verth

unread,
Jan 3, 2017, 9:07:49 AM1/3/17
to skia-discuss
In terms of simple windowing and events (key and mouse), tools/viewer should be as robust as GLFW. However, it doesn't have the full feature set of GLFW. And Vulkan doesn't work with SampleApp.

IIRC, the GLFW code in experimental only has Xcode projects -- which platform are you using?

On Mon, Jan 2, 2017 at 2:03 PM Joshua Olson <0joshua...@gmail.com> wrote:
P.S. samplecode/SampleApp.cpp and tools/viewer look to me to use their own window abstractions. Are they comparable in robustness and abstracted features to something like GLFW?

--
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 post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.

Joshua Olson

unread,
Jan 3, 2017, 12:08:44 PM1/3/17
to skia-discuss
I'm on Linux. I can compile and link glfw_test.cpp, but the X11 viewer gives me a better head start with Vulkan.

Jim Van Verth

unread,
Jan 4, 2017, 10:21:49 AM1/4/17
to skia-discuss
Cool. That said, I remember now that there was some wonkiness with window invalidations with Vulkan on Linux with the NVIDIA driver. Occasionally an invalidation comes in and it looks like the code does the appropriate backbuffer swap, but the result in the window doesn't change. I wasn't able to track down why it happens -- the same event code works fine with OpenGL. As far as I can tell this isn't an issue with constant window updates, though I suppose it might be dropping a frame occasionally. It's also possible this has been fixed with later drivers.

Joshua Olson

unread,
Jan 4, 2017, 11:32:31 AM1/4/17
to skia-discuss
That wouldn't apply to the computer I'm using, but was that bug reported? Sometimes Nouveau drivers have fewer, or at least different, bugs.

Jim Van Verth

unread,
Jan 4, 2017, 4:39:49 PM1/4/17
to skia-discuss
I haven't reported it yet as I'm not 100% sure whether it's a driver bug or something I'm doing wrong with Xlib or XCB. The viewer code is mainly for internal use, so it hasn't been a high priority to track it down -- I just wanted to warn you in case it comes up. I've filed a bug in case you run into anything (https://bugs.chromium.org/p/skia/issues/detail?id=6091) and I'll try to take a look at it this week.

Joshua Olson

unread,
Jan 5, 2017, 12:57:46 AM1/5/17
to skia-discuss
Cool. Reminds me that Viewer.cpp comments say "Vulkan doesn't seem to handle a single refresh properly on Linux".

Jim Van Verth

unread,
Jan 5, 2017, 2:13:15 PM1/5/17
to skia-discuss
Yeah, I forgot that I "fixed" the bug with that. I checked today and single refreshes appear to work with the NVIDIA 367.57 driver, so I've removed that and cleaned up the Linux code a little.
Reply all
Reply to author
Forward
0 new messages