mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-06-13 14:32:57 -04:00
Merge branch 'gles2-nv12-render-target' into 'master'
render: gles2: NV12 render buffers See merge request wlroots/wlroots!5344
This commit is contained in:
commit
d3d2d0f668
13 changed files with 394 additions and 63 deletions
|
|
@ -28,12 +28,21 @@ struct wlr_gles2_pixel_format {
|
|||
GLint gl_format, gl_type;
|
||||
};
|
||||
|
||||
struct wlr_gles2_quad_shader {
|
||||
GLuint program;
|
||||
GLint proj;
|
||||
GLint color;
|
||||
GLint color_matrix;
|
||||
GLint pos_attrib;
|
||||
};
|
||||
|
||||
struct wlr_gles2_tex_shader {
|
||||
GLuint program;
|
||||
GLint proj;
|
||||
GLint tex_proj;
|
||||
GLint tex;
|
||||
GLint alpha;
|
||||
GLint color_matrix;
|
||||
GLint pos_attrib;
|
||||
};
|
||||
|
||||
|
|
@ -44,6 +53,7 @@ struct wlr_gles2_renderer {
|
|||
int drm_fd;
|
||||
|
||||
struct wlr_drm_format_set shm_texture_formats;
|
||||
struct wlr_drm_format_set dmabuf_render_formats;
|
||||
|
||||
const char *exts_str;
|
||||
struct {
|
||||
|
|
@ -74,12 +84,7 @@ struct wlr_gles2_renderer {
|
|||
} procs;
|
||||
|
||||
struct {
|
||||
struct {
|
||||
GLuint program;
|
||||
GLint proj;
|
||||
GLint color;
|
||||
GLint pos_attrib;
|
||||
} quad;
|
||||
struct wlr_gles2_quad_shader quad;
|
||||
struct wlr_gles2_tex_shader tex_rgba;
|
||||
struct wlr_gles2_tex_shader tex_rgbx;
|
||||
struct wlr_gles2_tex_shader tex_ext;
|
||||
|
|
@ -104,9 +109,11 @@ struct wlr_gles2_buffer {
|
|||
struct wl_list link; // wlr_gles2_renderer.buffers
|
||||
bool external_only;
|
||||
|
||||
EGLImageKHR image;
|
||||
GLuint rbo;
|
||||
GLuint fbo;
|
||||
int n_images;
|
||||
EGLImageKHR image[4];
|
||||
GLuint rbo[4];
|
||||
GLuint fbo[4];
|
||||
|
||||
GLuint tex;
|
||||
|
||||
struct wlr_addon addon;
|
||||
|
|
@ -139,6 +146,8 @@ struct wlr_gles2_render_pass {
|
|||
struct wlr_gles2_render_timer *timer;
|
||||
struct wlr_drm_syncobj_timeline *signal_timeline;
|
||||
uint64_t signal_point;
|
||||
float color_matrix[16];
|
||||
float color_matrix_nv12_chroma[16];
|
||||
};
|
||||
|
||||
bool is_gles2_pixel_format_supported(const struct wlr_gles2_renderer *renderer,
|
||||
|
|
@ -149,7 +158,7 @@ const struct wlr_gles2_pixel_format *get_gles2_format_from_gl(
|
|||
void get_gles2_shm_formats(const struct wlr_gles2_renderer *renderer,
|
||||
struct wlr_drm_format_set *out);
|
||||
|
||||
GLuint gles2_buffer_get_fbo(struct wlr_gles2_buffer *buffer);
|
||||
GLuint gles2_buffer_get_fbo(struct wlr_gles2_buffer *buffer, int index);
|
||||
|
||||
struct wlr_gles2_renderer *gles2_get_renderer(
|
||||
struct wlr_renderer *wlr_renderer);
|
||||
|
|
@ -171,6 +180,7 @@ 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_egl_context *prev_ctx, struct wlr_gles2_render_timer *timer,
|
||||
struct wlr_drm_syncobj_timeline *signal_timeline, uint64_t signal_point);
|
||||
struct wlr_drm_syncobj_timeline *signal_timeline, uint64_t signal_point,
|
||||
enum wlr_color_encoding color_encoding, enum wlr_color_range color_range);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue