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.
This commit is contained in:
Alexander Orzechowski 2024-02-24 09:23:40 -05:00 committed by Kirill Primak
parent 2aebb8e444
commit 86e1b24d84
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}