Mesa (staging/22.1): gallium: add size attribute to winsys_handle

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 8 16:15:07 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: d4c1b9a5e6320edf1bd8384f1aaeab8ea61dfba1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d4c1b9a5e6320edf1bd8384f1aaeab8ea61dfba1

Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date:   Wed Jun  1 10:45:09 2022 +0200

gallium: add size attribute to winsys_handle

This is needed at least for the VA-API frontend where the exporter
needs to know the total size of the object.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16813>
(cherry picked from commit 8c07d7cbdd2cfc09246d625246bacf8c9c4ecc57)

---

 .pick_status.json                            | 2 +-
 src/gallium/include/frontend/winsys_handle.h | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 613e1fb951d..d41ae3bded1 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -625,7 +625,7 @@
         "description": "gallium: add size attribute to winsys_handle",
         "nominated": false,
         "nomination_type": null,
-        "resolution": 4,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/include/frontend/winsys_handle.h b/src/gallium/include/frontend/winsys_handle.h
index 5f0be627fcc..0c0631de63c 100644
--- a/src/gallium/include/frontend/winsys_handle.h
+++ b/src/gallium/include/frontend/winsys_handle.h
@@ -77,6 +77,12 @@ struct winsys_handle
     * Output for resource_get_handle.
     */
    void *com_obj;
+
+   /**
+    * Total size of the object.
+    * Output for resource_get_handle.
+    */
+   uint64_t size;
 };
 
 #ifdef __cplusplus



More information about the mesa-commit mailing list