mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-16 08:56:26 -05:00
backend/drm: remove special linear case for cursor plane
We now properly mark the cursor plane's formats as linear-only, and we now have a version of wlr_drm_format_intersect that handles the case of linear-only formats and implicit modifiers. We can remove the special drm_plane_init_surface flag we had for cursor planes. This also allows us to use a non-linear layout for cursor planes on drivers that support it. Tested on amdgpu GFX9.
This commit is contained in:
parent
92a0fc0435
commit
bec1e6b149
3 changed files with 26 additions and 25 deletions
|
|
@ -716,7 +716,7 @@ static bool drm_connector_init_renderer(struct wlr_drm_connector *conn,
|
|||
uint32_t format = DRM_FORMAT_ARGB8888;
|
||||
|
||||
bool modifiers = drm->addfb2_modifiers;
|
||||
if (!drm_plane_init_surface(plane, drm, width, height, format, false, modifiers) ||
|
||||
if (!drm_plane_init_surface(plane, drm, width, height, format, modifiers) ||
|
||||
!drm_connector_pageflip_renderer(conn)) {
|
||||
if (!modifiers) {
|
||||
wlr_drm_conn_log(conn, WLR_ERROR, "Failed to initialize renderer:"
|
||||
|
|
@ -736,7 +736,7 @@ static bool drm_connector_init_renderer(struct wlr_drm_connector *conn,
|
|||
crtc->pending.mode = mode;
|
||||
|
||||
if (!drm_plane_init_surface(plane, drm, width, height, format,
|
||||
false, modifiers)) {
|
||||
modifiers)) {
|
||||
return false;
|
||||
}
|
||||
if (!drm_connector_pageflip_renderer(conn)) {
|
||||
|
|
@ -889,7 +889,7 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
|
|||
h = ret ? 64 : h;
|
||||
|
||||
if (!drm_plane_init_surface(plane, drm, w, h,
|
||||
DRM_FORMAT_ARGB8888, true, false)) {
|
||||
DRM_FORMAT_ARGB8888, false)) {
|
||||
wlr_drm_conn_log(conn, WLR_ERROR, "Cannot allocate cursor resources");
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue