mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-06 01:40:52 -05:00
wl-drm: only advertise formats supporting implicit modifiers
With the Vulkan renderer we don't support implicit modifiers. However wl_drm only supports implicit modifiers. Stop advertising wl_drm formats when implicit modifiers are unsupported.
This commit is contained in:
parent
f36a5915da
commit
d92f92f2d3
1 changed files with 4 additions and 1 deletions
|
|
@ -161,7 +161,10 @@ static void drm_bind(struct wl_client *client, void *data,
|
||||||
wl_drm_send_capabilities(resource, WL_DRM_CAPABILITY_PRIME);
|
wl_drm_send_capabilities(resource, WL_DRM_CAPABILITY_PRIME);
|
||||||
|
|
||||||
for (size_t i = 0; i < drm->formats.len; i++) {
|
for (size_t i = 0; i < drm->formats.len; i++) {
|
||||||
wl_drm_send_format(resource, drm->formats.formats[i]->format);
|
const struct wlr_drm_format *fmt = drm->formats.formats[i];
|
||||||
|
if (wlr_drm_format_has(fmt, DRM_FORMAT_MOD_INVALID)) {
|
||||||
|
wl_drm_send_format(resource, fmt->format);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue