Mesa (master): gbm: document that gbm_bo_map exposes a linear view

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 3 10:33:30 UTC 2020


Module: Mesa
Branch: master
Commit: 907bacea13fff7939edf67fba5b3a6eaf9f1f5dc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=907bacea13fff7939edf67fba5b3a6eaf9f1f5dc

Author: Simon Ser <contact at emersion.fr>
Date:   Thu May 28 12:27:07 2020 +0200

gbm: document that gbm_bo_map exposes a linear view

Drivers (Gallium, i965) expose a linear view of the buffer via
gbm_bo_map.

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

---

 src/gbm/main/gbm.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c
index ceeed5082e9..954b3c35b0d 100644
--- a/src/gbm/main/gbm.c
+++ b/src/gbm/main/gbm.c
@@ -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.
  *
+ * 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



More information about the mesa-commit mailing list