mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
egl/wayland: validate dri_screen_display_gpu before use
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12370
Fixes: d795b4712c ("egl/wayland: only supply LINEAR modifier when supported")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33036>
This commit is contained in:
parent
1021d6fe62
commit
40308ef6e5
1 changed files with 5 additions and 4 deletions
|
|
@ -1224,12 +1224,13 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
|
|||
render_modifiers = &linear_mod;
|
||||
render_num_modifiers = 1;
|
||||
}
|
||||
if (dri2_dpy->dri_screen_display_gpu->base.screen->resource_create_with_modifiers) {
|
||||
display_modifiers = &linear_mod;
|
||||
display_num_modifiers = 1;
|
||||
}
|
||||
|
||||
if (dri2_dpy->dri_screen_display_gpu) {
|
||||
if (dri2_dpy->dri_screen_display_gpu->base.screen->resource_create_with_modifiers) {
|
||||
display_modifiers = &linear_mod;
|
||||
display_num_modifiers = 1;
|
||||
}
|
||||
|
||||
linear_copy_display_gpu_image = dri_create_image_with_modifiers(
|
||||
dri2_dpy->dri_screen_display_gpu,
|
||||
dri2_surf->base.Width, dri2_surf->base.Height,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue