mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
render: don't fall back to Pixman if we have a render node
If we have a render node, it means there is a GPU which could be used. We probably failed GL because of a kernel or Mesa issue. Instead of automatically falling back to Pixman, error out. This makes it more obvious to users when something goes wrong, instead of silently exposing a slow unaccelerated desktop. References: https://github.com/swaywm/sway/issues/7194
This commit is contained in:
parent
db08004c23
commit
49738406a3
1 changed files with 9 additions and 1 deletions
|
@ -314,7 +314,15 @@ struct wlr_renderer *renderer_autocreate_with_drm_fd(int drm_fd) {
|
|||
}
|
||||
#endif
|
||||
|
||||
if (!renderer && (is_auto || strcmp(renderer_name, "pixman") == 0)) {
|
||||
bool has_render_node = false;
|
||||
if (!renderer && is_auto && drm_fd >= 0) {
|
||||
char *render_node = drmGetRenderDeviceNameFromFd(drm_fd);
|
||||
has_render_node = render_node != NULL;
|
||||
free(render_node);
|
||||
}
|
||||
|
||||
if (!renderer && ((is_auto && !has_render_node) ||
|
||||
strcmp(renderer_name, "pixman") == 0)) {
|
||||
renderer = wlr_pixman_renderer_create();
|
||||
if (!renderer) {
|
||||
log_creation_failure(is_auto, "Failed to create a pixman renderer");
|
||||
|
|
Loading…
Reference in a new issue