mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 15:20:17 +01:00
dri: fail creating DRI images that exceed hw limits
otherwise random stuff happens it probably resolves https://gitlab.freedesktop.org/mesa/mesa/-/issues/13652 Reviewed-by: Simon Ser <contact@emersion.fr> Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36566>
This commit is contained in:
parent
ae66bd1c00
commit
692206d58c
1 changed files with 4 additions and 0 deletions
|
|
@ -916,6 +916,10 @@ dri_create_image(struct dri_screen *screen,
|
|||
if (!pscreen->resource_create_with_modifiers && count > 0)
|
||||
return NULL;
|
||||
|
||||
if (width > pscreen->caps.max_texture_2d_size ||
|
||||
height > pscreen->caps.max_texture_2d_size)
|
||||
return NULL;
|
||||
|
||||
if (pscreen->is_format_supported(pscreen, map->pipe_format, screen->target,
|
||||
0, 0, PIPE_BIND_RENDER_TARGET))
|
||||
tex_usage |= PIPE_BIND_RENDER_TARGET;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue