-
Notifications
You must be signed in to change notification settings - Fork 189
Vulkan & Pixman support #2613
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
base: master
Are you sure you want to change the base?
Vulkan & Pixman support #2613
Conversation
45d46cb
to
167140c
Compare
~ ❯❯❯ wayfire --version ✘ 127 vulkan branch: wayfire: symbol lookup error: /usr/lib/wayfire/libworkspace-names.so: undefined symbol: _ZN6OpenGL12render_beginEv |
@killown Wayfire-plugins-extra plugins need to be updated to work with the new renderer API, that's why you're getting that error |
Since you marked it as ready for review, I’m leaving this issue I found during testing here in case you find a solution before merging
|
Disabled |
I am testing here: Note: This code isn’t a fix, it actually breaks Wayfire. Just pointing out where the issue might be.
this won't crash wayfire but the graphical part exit while spamming: Not sure how far along you are with this, but you might want to validate the formats first, before -> get_texture(data.target.scale); |
Pattern to reach the crash: start view → scale activated → grab and move → scale deactivated → close view → repeat.
|
No need for code, just toggle scale manually. Grab a view, disable scale while it's grabbed, and wayfire will crash. |
vulkan backend doesn’t advertise formats correctly, the topic is about
gamescope works without WLR_RENDERER=vulkan |
wayfire_view_shot crashing wayfire:
|
Reproduce that with:
Maybe you should make any plugin, regardless of its source, gracefully handle non-gles renderer. |
git pull and "Failed to allocate auxiliary buffer!" is fixed for regular users and light IPC usage, but still exist. |
3 seconds to produce this crash with less than 10 views so your fix for increase maximum number of open files for the compositor does not fix this
if you remove gbm_bo_create_with_modifiers from the code to test, it would give hints from which location the crash is comming from |
No worries, it only happens under specific IPC conditions and doesn’t affect normal use. Vulkan’s still new, so users can always fall back to OpenGL for rock-solid stability. You can’t just drop a massive new feature and expect it to be 100% stable, all you did is more than enough in my opinion. Your PR looks solid. Ignore the Gamescope issue for now since it doesn't crash anything. Once Wayfire upgrades to wlroots 0.19, you can experiment with new approaches using |
ignore the gamescope issue, tested in sway and the same issue gamescope::CWaylandBackend::GetPreferredOutputFormat(uint32_t*, uint32_t*) const: Assertion `u8BitFormat != DRM_FORMAT_INVALID' failed. seems like the app is broken when using vulkan |
This makes sure that PCH works well with ccache.
Example: ``` [output:WL-1] icc_profile = /path/to/profile.icc ```
These buffers are actually better for performance in vulkan.
We cannot allocate a buffer of size 0 (which makes it easier for plugins) so instead we set minimum buffer size to 1.
We may need many open files as we now allocate buffers via GBM and each buffer is a file. So running something like scale with many views results in many buffers being allocated and this could lead to wayfire crashes.
This way, we avoid errors at startup where we try to map keyboard devices or similar.
This PR aims to make Wayfire use
wlr_renderer
andwlr_allocator
to do as much of the rendering and buffer management as possible. The end result should be that Wayfire is able to work with all of GLES2, Vulkan and Pixman renderers provided by wlroots.Why this? Wlroots seems to be implementing many new features on the vulkan renderer like color management. Also, vulkan is getting more and more popular. While GLES2 is here to say, we can expect that the wlroots' vulkan renderer may evolve even more in the future, so going in that direction would be beneficial.
The one big downside is that special effects like Cube, Wobbly, Wrot and Blur still require custom rendering code to work. Currently, this PR aims to make the introduction of
wlr_renderer
gradual so that plugins can still use GLES2 rendering only. A future PR might try to make these plugins work with Vulkan as well, but that will require adding even more abstractions to manage Vulkan shaders, pipelines, etc, as well as figuring out how to mix our rendering with wlroots'.Steps for this PR:
wlr_renderer
supportwlr_allocator
and invert(invert can be done with vulkan and color management)Fixes #1672
Fixes #483