gbm: document that gbm_bo_map exposes a linear view
authorSimon Ser <contact@emersion.fr>
Thu, 28 May 2020 10:27:07 +0000 (12:27 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 3 Jun 2020 10:09:52 +0000 (10:09 +0000)
Drivers (Gallium, i965) expose a linear view of the buffer via
gbm_bo_map.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5238>

src/gbm/main/gbm.c

index ceeed5082e9c08bdda52028ca80093713f74a4e9..954b3c35b0d339aa97d6736ae4cf9120b6efbb63 100644 (file)
@@ -534,6 +534,11 @@ gbm_bo_import(struct gbm_device *gbm,
  * This function maps a region of a gbm bo for cpu read and/or write
  * access.
  *
  * This function maps a region of a gbm bo for cpu read and/or write
  * access.
  *
+ * The mapping exposes a linear view of the buffer object even if the buffer
+ * has a non-linear modifier.
+ *
+ * This function may require intermediate buffer copies (ie. it may be slow).
+ *
  * \param bo The buffer object
  * \param x The X (top left origin) starting position of the mapped region for
  * the buffer
  * \param bo The buffer object
  * \param x The X (top left origin) starting position of the mapped region for
  * the buffer