mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
egl/wayland: Ignore invalid modifiers
If the underlying driver does not support modifiers, dmabuf will still advertise formats through the 'modifier' event, but send them with an invalid modifier. Ignore them if this is the case, rather than passing them through to the driver. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Fixes:02cc359372("egl/wayland: Use linux-dmabuf interface for buffers") (cherry picked from commitdd072cf4b1)
This commit is contained in:
parent
a2b7477603
commit
2a1792981c
1 changed files with 4 additions and 0 deletions
|
|
@ -1083,6 +1083,10 @@ dmabuf_handle_modifier(void *data, struct zwp_linux_dmabuf_v1 *dmabuf,
|
|||
struct dri2_egl_display *dri2_dpy = data;
|
||||
uint64_t *mod = NULL;
|
||||
|
||||
if (modifier_hi == (DRM_FORMAT_MOD_INVALID >> 32) &&
|
||||
modifier_lo == (DRM_FORMAT_MOD_INVALID & 0xffffffff))
|
||||
return;
|
||||
|
||||
switch (format) {
|
||||
case WL_DRM_FORMAT_ARGB8888:
|
||||
mod = u_vector_add(&dri2_dpy->wl_modifiers.argb8888);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue