diff options
author | Simon Ser <contact@emersion.fr> | 2021-04-29 10:55:51 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-04-29 15:59:13 +0200 |
commit | 69d4cf19b54e81111ef68ff46cfe2e23ff122a80 (patch) | |
tree | 5ffb63baf0882984e7f0698e9b0d062d0d342c0a | |
parent | e7f68ba0811f975faa8ce06d3caf4d2e5cb87be5 (diff) |
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.
-rw-r--r-- | render/gles2/renderer.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |