Comments (6)
I propose an API change, that makes it possible to query supported capabilities and to initialize the GlesRenderer
with a set of requested capabilities (which fails if the requested ones aren't available).
If you are not using color transformations and you are never dealing with anything else, but 8-bit buffers, or your hardware is simply too slow, you can just drop the capability. But especially the types of buffers the compositor advertises or "too slow" implementations of set apis are nothing the renderer can figure out itself, so a user-driven approach seems to make sense here.
from smithay.
I've been able to confirm that this line causes the performance issues:
smithay/src/backend/renderer/gles/mod.rs
Line 587 in fa58fec
from smithay.
That would work fine for me. I don't care manual configuration of this.
from smithay.
@Drakulix I was hoping you'd have some time to implement this, but if this is not the case could you go into some more detail of what you'd expect the changes to look like so I can fix these performance issues?
from smithay.
@Drakulix I was hoping you'd have some time to implement this, but if this is not the case could you go into some more detail of what you'd expect the changes to look like so I can fix these performance issues?
Sure thing, so the main thing to do here is splitting up GlesRenderer::new
into two functions.
The current function is evaluating the feature-set to be used in this part of the code: https://github.com/Smithay/smithay/blob/master/src/backend/renderer/gles/mod.rs#L515-L603.
A new function (evaluate_capabilities
? possibly a method of the Capability
-type) would do essentially this and just return the capabilities array.
The new
function would take a new capabilities
-argument and compare the requested capabilities with the ones available. (So initializing the renderer in anvil
would now evaluate the capabilities twice, but I don't think that is a huge issue. If one would want to avoid that, the new argument could be an Option
, where None
essentially means the previous behaviour of enabling everything possible.)
If the requested capabilities are not available, this has to throw a new error. Compositors like catacomb
could then either hard-code as set of capabilities or dynamically drop the ColorTransformation
-cap from the listed set for better performance.
This has a few remarks for the remaining renderers, that can wrap the GlesRenderer:
- The
GlowRenderer
needs to pass-through the capability arguments. - The
MultiRenderer
sEglGlesBackend
andGbmGlesBackend
platforms initializeGlesRenderer
s internally. They would probably need to take closure on construction and store that boxed, that returns a set of capabilities for maximum flexibility. Failing to request a given set of capabilities should likely not bring the wholeMultiRenderer
down, but simply log a warning and skip over the failed device in the platformsenumerate
functions.
from smithay.
fixed by #1055
from smithay.
Related Issues (20)
- Stuck in listener.accept
- Add blurred Element support to `OutputDamageTracker`
- Initial commit of an XdgToplevel with a buffer already attached doesn't result in an error
- `DrmDevice::new` with disable_connectors = true causes vrr_capable property to get stuck at 0 HOT 3
- `prop_mapping` cache in `AtomicDrmDevice` doesn't handle connector hotplug
- Cursor and overlay elements overwrite primary plane in `RenderFrameResult::blit_frame_result` HOT 5
- Pasting images from wayland -> x11 truncates/corrupts the image HOT 1
- Reduce cloning around opaque region vectors HOT 1
- `wlr_layer`'s `pre_commit_hook` can post an error, disconnecting the client, leading to a panic later on in the `commit` handling HOT 5
- Send an event, if Xwayland exits unexpectedly HOT 1
- Crop element causes invalid rendering for buffer transforms 1, 3, 5, 7
- Build error on s390x: src/wayland/shm/pool.rs:311:15 ..mem::zeroed() field `__glibc_reserved0` is private HOT 2
- Niri fails to init display in QEMU, smithay error message HOT 7
- app_id for nested compositors HOT 4
- Pointer surface focus not checked before button press
- `KbdRc` and `SeatRc` are leaked HOT 3
- wvkbd (and other virtual keyboards) can't trigger compositor bindings
- segfault when enabling EGL hardware-acceleration and stopping the wayland loop HOT 5
- text-input-v1 support HOT 1
- Custom texture shader regression from implicit opaque check
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smithay.