aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-03-26 12:00:08 -0400
committeremersion <contact@emersion.fr>2018-03-26 12:00:08 -0400
commit3bda7e2ef8db955bb56e9dbf700974de06a2836b (patch)
tree3fb6d1d6870b19f409d4239ad65d6903fd85b4a9 /backend
parentc63d94483b1e52817ca01ca82a867a78ebd39fa6 (diff)
Use DRM_FORMAT_MOD_LINEAR instead of a hardcoded constant
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/renderer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c
index 2b50bb79..c1531ce3 100644
--- a/backend/drm/renderer.c
+++ b/backend/drm/renderer.c
@@ -14,6 +14,10 @@
#include "backend/drm/drm.h"
#include "glapi.h"
+#ifndef DRM_FORMAT_MOD_LINEAR
+#define DRM_FORMAT_MOD_LINEAR 0
+#endif
+
bool wlr_drm_renderer_init(struct wlr_drm_backend *drm,
struct wlr_drm_renderer *renderer) {
renderer->gbm = gbm_create_device(drm->fd);
@@ -195,7 +199,7 @@ static struct wlr_texture *get_tex_for_bo(struct wlr_drm_renderer *renderer,
};
attribs.offset[0] = 0;
attribs.stride[0] = gbm_bo_get_stride_for_plane(bo, 0);
- attribs.modifier[0] = 0;
+ attribs.modifier[0] = DRM_FORMAT_MOD_LINEAR;
attribs.fd[0] = gbm_bo_get_fd(bo);
tex->tex = wlr_texture_from_dmabuf(renderer->wlr_rend, &attribs);