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.
This commit is contained in:
Simon Ser 2021-04-29 10:55:51 +02:00
parent e7f68ba081
commit 69d4cf19b5

View file

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