From 86e1b24d8433ce54965a7d4fa1d67187dc4f83b5 Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Sat, 24 Feb 2024 09:23:40 -0500 Subject: [PATCH] wlr_scene: Track damage of null textures If we hit this case, we effectively failed to render something, this might be because a texture failed to upload or the texture is momentarily unavailable after a GPU reset. If we fail to render, we have to continue to track damage for the next frame in hopes that the texture becomes available then. An alternative approach would be to fail the commit completely if we find this case, but in the case of gpu resets, clients may not commit a new buffer for a while, and a frozen display does not help. This fixes damage tracking issues after a gpu reset. --- types/scene/wlr_scene.c | 1 + 1 file changed, 1 insertion(+) diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c index 858d5a54..9b7e1e98 100644 --- a/types/scene/wlr_scene.c +++ b/types/scene/wlr_scene.c @@ -1196,6 +1196,7 @@ static void scene_entry_render(struct render_list_entry *entry, const struct ren struct wlr_texture *texture = scene_buffer_get_texture(scene_buffer, data->output->output->renderer); if (texture == NULL) { + wlr_damage_ring_add(&data->output->damage_ring, &render_region); break; }