aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-07-05 13:08:55 -0400
committerAlexander Orzechowski <alex@ozal.ski>2023-11-30 10:13:18 -0500
commit665055a1a04610c1464567d1d2eebe7fb7cfe633 (patch)
treef3157bf24681d7ca46d963e8245bff2b46fec35e
parent484e2484469178e1a0e3628296093a4f934ccd68 (diff)
render/gles2: Destroy textures first
Since imported textures will be based off of gles2_buffer we have to destroy textures first or else they will have an invalid reference to the buffers they are imported from.
-rw-r--r--render/gles2/renderer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
index fce0906d..d5a57184 100644
--- a/render/gles2/renderer.c
+++ b/render/gles2/renderer.c
@@ -397,16 +397,16 @@ static void gles2_destroy(struct wlr_renderer *wlr_renderer) {
wlr_egl_make_current(renderer->egl);
- struct wlr_gles2_buffer *buffer, *buffer_tmp;
- wl_list_for_each_safe(buffer, buffer_tmp, &renderer->buffers, link) {
- destroy_buffer(buffer);
- }
-
struct wlr_gles2_texture *tex, *tex_tmp;
wl_list_for_each_safe(tex, tex_tmp, &renderer->textures, link) {
gles2_texture_destroy(tex);
}
+ struct wlr_gles2_buffer *buffer, *buffer_tmp;
+ wl_list_for_each_safe(buffer, buffer_tmp, &renderer->buffers, link) {
+ destroy_buffer(buffer);
+ }
+
push_gles2_debug(renderer);
glDeleteProgram(renderer->shaders.quad.program);
glDeleteProgram(renderer->shaders.tex_rgba.program);