diff options
author | Simon Ser <contact@emersion.fr> | 2023-11-30 17:47:11 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-11-30 17:47:11 +0100 |
commit | e8b187cc92b9b039dcbb6715665ee8ba5d065c6b (patch) | |
tree | e9c125e531d740ed5c60847797fb8f79faece5e1 /include/render | |
parent | 1208ba6c285f19558b1eaf01167ec6b0ceb423a5 (diff) |
render/gles2: save/restore context when creating/submitting a render pass
This is useful for e.g. lazily blitting a texture for readback
purposes while rendering.
Diffstat (limited to 'include/render')
-rw-r--r-- | include/render/gles2.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/render/gles2.h b/include/render/gles2.h index 60bf4d17..dffd2059 100644 --- a/include/render/gles2.h +++ b/include/render/gles2.h @@ -15,6 +15,8 @@ #include <wlr/util/addon.h> #include <wlr/util/log.h> +#include "render/egl.h" + // mesa ships old GL headers that don't include this type, so for distros that use headers from // mesa we need to def it ourselves until they update. // https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23144 @@ -132,6 +134,7 @@ struct wlr_gles2_render_pass { struct wlr_render_pass base; struct wlr_gles2_buffer *buffer; float projection_matrix[9]; + struct wlr_egl_context prev_ctx; struct wlr_gles2_render_timer *timer; }; @@ -164,6 +167,6 @@ void push_gles2_debug_(struct wlr_gles2_renderer *renderer, void pop_gles2_debug(struct wlr_gles2_renderer *renderer); struct wlr_gles2_render_pass *begin_gles2_buffer_pass(struct wlr_gles2_buffer *buffer, - struct wlr_gles2_render_timer *timer); + struct wlr_egl_context *prev_ctx, struct wlr_gles2_render_timer *timer); #endif |