frontend/dri: don't call set_damage_region with a null resource

This can happen if texture allocation failed.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34668>
(cherry picked from commit 103a16e4fa)
This commit is contained in:
Iago Toral Quiroga 2025-04-29 07:26:13 +02:00 committed by Eric Engestrom
parent 5423643b87
commit 3bc1756734
3 changed files with 8 additions and 6 deletions

View file

@ -45584,7 +45584,7 @@
"description": "frontend/dri: don't call set_damage_region with a null resource",
"nominated": false,
"nomination_type": 0,
"resolution": 4,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -96,9 +96,11 @@ dri_st_framebuffer_validate(struct st_context *st,
pscreen->set_damage_region) {
struct pipe_resource *resource = textures[ST_ATTACHMENT_BACK_LEFT];
pscreen->set_damage_region(pscreen, resource,
drawable->num_damage_rects,
drawable->damage_rects);
if (resource) {
pscreen->set_damage_region(pscreen, resource,
drawable->num_damage_rects,
drawable->damage_rects);
}
}
if (!out)

View file

@ -10,8 +10,8 @@ glx@glx-swap-pixmap-bad,Fail
# Value in failed request: 0x1e
# Serial number of failed request: 1177
# Current serial number in output stream: 1181
glx@glx-visuals-depth -pixmap,Crash
glx@glx-visuals-stencil -pixmap,Crash
glx@glx-visuals-depth -pixmap,Fail
glx@glx-visuals-stencil -pixmap,Fail
spec@!opengl 1.0@rasterpos,Fail