diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-19 16:36:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-19 16:36:17 -0400 |
commit | a76cef475b6da9d4953e7b3503a35f01aa7c824e (patch) | |
tree | 153daa6a73982424c1e68aaac91b88ef9c67d4d6 /backend/drm | |
parent | 8d490fdb34ad4374b3ab144f1b46296eb81ad316 (diff) | |
parent | 6ecb0eefcba21d923bd01fce688dbd6bd399fbae (diff) |
Merge pull request #733 from emersion/fix-matrix-transpose
Don't use OpenGL matrix transposition
Diffstat (limited to 'backend/drm')
-rw-r--r-- | backend/drm/renderer.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c index f700dd59..97fba95a 100644 --- a/backend/drm/renderer.c +++ b/backend/drm/renderer.c @@ -178,7 +178,8 @@ static void free_eglimage(struct gbm_bo *bo, void *data) { free(tex); } -static struct wlr_texture *get_tex_for_bo(struct wlr_drm_renderer *renderer, struct gbm_bo *bo) { +static struct wlr_texture *get_tex_for_bo(struct wlr_drm_renderer *renderer, + struct gbm_bo *bo) { struct tex *tex = gbm_bo_get_user_data(bo); if (tex) { return tex->tex; @@ -231,13 +232,8 @@ struct gbm_bo *wlr_drm_surface_mgpu_copy(struct wlr_drm_surface *dest, static const float color[] = {0.0, 0.0, 0.0, 1.0}; - static const float mat[9] = { - [0] = 2.0f, - [2] = -1.0f, - [4] = 2.0f, - [5] = -1.0f, - [8] = 1.0f, - }; + float mat[9]; + wlr_matrix_projection(mat, 1, 1, WL_OUTPUT_TRANSFORM_FLIPPED_180); glViewport(0, 0, dest->width, dest->height); wlr_renderer_clear(dest->renderer->wlr_rend, color); @@ -246,8 +242,9 @@ struct gbm_bo *wlr_drm_surface_mgpu_copy(struct wlr_drm_surface *dest, return wlr_drm_surface_swap_buffers(dest, NULL); } -bool wlr_drm_plane_surfaces_init(struct wlr_drm_plane *plane, struct wlr_drm_backend *drm, - int32_t width, uint32_t height, uint32_t format) { +bool wlr_drm_plane_surfaces_init(struct wlr_drm_plane *plane, + struct wlr_drm_backend *drm, int32_t width, uint32_t height, + uint32_t format) { if (!drm->parent) { return wlr_drm_surface_init(&plane->surf, &drm->renderer, width, height, format, GBM_BO_USE_SCANOUT); |