Codebase list wlroots / e05a853
render: gles2: Fix y-inversion in gles2_blit_dmabuf() Andri Yngvason authored 3 years ago Simon Ser committed 3 years ago
1 changed file(s) with 3 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
383383 bool dst_inverted_y =
384384 !!(dst_attr->flags & WLR_DMABUF_ATTRIBUTES_FLAGS_Y_INVERT);
385385 struct wlr_gles2_texture *gles2_src_tex = gles2_get_texture(src_tex);
386 gles2_src_tex->inverted_y = src_inverted_y ^ dst_inverted_y;
386 // The result is negated because wlr_matrix_projection y-inverts the
387 // texture.
388 gles2_src_tex->inverted_y = !(src_inverted_y ^ dst_inverted_y);
387389
388390 struct wlr_egl *egl = wlr_gles2_renderer_get_egl(wlr_renderer);
389391 if (!wlr_egl_make_current(egl, EGL_NO_SURFACE, NULL)) {