minigbm: #define MINIGBM_HAS_GBM_BO_GET_MAP_INFO
Mark the availability of minigbm's newer gbm_bo_get_map_info() API. Virglrenderer (and others) can test for its existence at build-time and conditionally use it. BUG=b:338254311 TEST=emerge minigbm TEST=virglrenderer can conditionally build with gbm_bo_get_map_info() Change-Id: I2685813fa99b73316477bef7edfd96e5dd9699a9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5636516 Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Tested-by: Ryan Neph <ryanneph@google.com> Reviewed-by: Dawn Han <dawnhan@google.com> Commit-Queue: Ryan Neph <ryanneph@google.com>
This commit is contained in:
parent
de65652cfb
commit
698c5e9e8d
1 changed files with 12 additions and 0 deletions
12
gbm.h
12
gbm.h
|
|
@ -413,6 +413,18 @@ gbm_bo_map(struct gbm_bo *bo,
|
|||
uint32_t x, uint32_t y, uint32_t width, uint32_t height,
|
||||
uint32_t flags, uint32_t *stride, void **map_data);
|
||||
|
||||
/* Neither gbm_bo_map_cache_mode nor gbm_bo_get_map_info are defined in mesa's gbm.h, or older
|
||||
* versions of minigbm. For backwards-compatibility, users should first test for availability and
|
||||
* provide a fallback implementation with:
|
||||
*
|
||||
* #if defined(MINIGBM) && defined(MINIGBM_HAS_GBM_BO_GET_MAP_INFO)
|
||||
* // use gbm_bo_get_map_info()
|
||||
* #else
|
||||
* // fallback
|
||||
* #endif
|
||||
*/
|
||||
#define MINIGBM_HAS_GBM_BO_GET_MAP_INFO
|
||||
|
||||
/**
|
||||
* Enum to indicate the cache attributes of CPU mapping returned by
|
||||
* gbm_bo_map()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue