aboutsummaryrefslogtreecommitdiff
path: root/include/render
diff options
context:
space:
mode:
authorManuel Stoeckl <code@mstoeckl.com>2021-07-29 23:53:22 -0400
committerSimon Ser <contact@emersion.fr>2021-07-30 08:29:13 +0200
commit44e8451cd93ede3ebef0bab44af874c07c9fde42 (patch)
tree01d5ca1983b5792f01b68084cae43d6fbb136979 /include/render
parent4dc52bcb6ca294bd5f654dccce64d93865f67249 (diff)
render/gles2: hide shm formats without GL support
This change introduces a new function to check whether the renderer has the needed GL extensions to read a given pixel format.
Diffstat (limited to 'include/render')
-rw-r--r--include/render/gles2.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/render/gles2.h b/include/render/gles2.h
index 013270e4..68fbb40e 100644
--- a/include/render/gles2.h
+++ b/include/render/gles2.h
@@ -109,10 +109,14 @@ struct wlr_gles2_texture {
struct wl_listener buffer_destroy;
};
+
+bool is_gles2_pixel_format_supported(const struct wlr_gles2_renderer *renderer,
+ const struct wlr_gles2_pixel_format *format);
const struct wlr_gles2_pixel_format *get_gles2_format_from_drm(uint32_t fmt);
const struct wlr_gles2_pixel_format *get_gles2_format_from_gl(
GLint gl_format, GLint gl_type, bool alpha);
-const uint32_t *get_gles2_shm_formats(size_t *len);
+const uint32_t *get_gles2_shm_formats(const struct wlr_gles2_renderer *renderer,
+ size_t *len);
struct wlr_gles2_renderer *gles2_get_renderer(
struct wlr_renderer *wlr_renderer);