From: Flora Cui Date: Tue, 24 Mar 2015 10:34:29 +0000 (+0800) Subject: gbm: Add GBM_BO_USE_LINEAR flag X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f78b2c432f31a18794b9f62f0a0cfb8eca256151;p=mesa.git gbm: Add GBM_BO_USE_LINEAR flag Signed-off-by: Flora Cui Reviewed-by: Jammy Zhou Reviewed-by: Michel Dänzer Reviewed-by: Alex Deucher --- diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index c5136723162..62bdf891d57 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -858,6 +858,8 @@ gbm_dri_bo_create(struct gbm_device *gbm, dri_use |= __DRI_IMAGE_USE_SCANOUT; if (usage & GBM_BO_USE_CURSOR) dri_use |= __DRI_IMAGE_USE_CURSOR; + if (usage & GBM_BO_USE_LINEAR) + dri_use |= __DRI_IMAGE_USE_LINEAR; /* Gallium drivers requires shared in order to get the handle/stride */ dri_use |= __DRI_IMAGE_USE_SHARE; diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h index 7b23c2609f9..2708e50a45c 100644 --- a/src/gbm/main/gbm.h +++ b/src/gbm/main/gbm.h @@ -209,6 +209,10 @@ enum gbm_bo_flags { * with GBM_BO_USE_CURSOR. but may not work for other combinations. */ GBM_BO_USE_WRITE = (1 << 3), + /** + * Buffer is linear, i.e. not tiled. + */ + GBM_BO_USE_LINEAR = (1 << 4), }; int