From 69d4cf19b54e81111ef68ff46cfe2e23ff122a80 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 29 Apr 2021 10:55:51 +0200 Subject: render/gles2: assert texture comes from the same renderer Rendering a wlr_texture with a different wlr_renderer is invalid. Add an assert to make sure this doesn't happen. --- render/gles2/renderer.c | 1 + 1 file changed, 1 insertion(+) (limited to 'render/gles2/renderer.c') diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index d81aed5a..59a2875f 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -253,6 +253,7 @@ static bool gles2_render_subtexture_with_matrix( gles2_get_renderer_in_context(wlr_renderer); struct wlr_gles2_texture *texture = gles2_get_texture(wlr_texture); + assert(texture->renderer == renderer); struct wlr_gles2_tex_shader *shader = NULL; -- cgit v1.2.3