diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/render/gles2.h | 5 | ||||
-rw-r--r-- | include/wlr/render/gles2.h | 4 |
2 files changed, 8 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 diff --git a/include/wlr/render/gles2.h b/include/wlr/render/gles2.h index 66401548..740e2f2d 100644 --- a/include/wlr/render/gles2.h +++ b/include/wlr/render/gles2.h @@ -21,6 +21,10 @@ struct wlr_egl; * the current EGL is global state. The GLES2 renderer operations will save * and restore any previous EGL context when called. A render pass is seen as * a single operation. + * + * The GLES2 renderer doesn't support arbitrarily nested render passes. It + * supports a subset only: after a nested render pass is created, any parent + * render pass can't be used before the nested render pass is submitted. */ struct wlr_renderer *wlr_gles2_renderer_create_with_drm_fd(int drm_fd); |