Mesa (master): virgl: update headers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 22 21:35:26 UTC 2021


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

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Wed Dec 23 23:04:48 2020 -0800

virgl: update headers

Signed-off-by: Chia-I Wu <olvaffe at gmail.com>
Reviewed-By: Isaac Bosompem <mrisaacb at google.com>
Acked-By: Gurchetan Singh <gurchetansingh at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8584>

---

 src/virtio/virtio-gpu/virgl_hw.h       |  1 +
 src/virtio/virtio-gpu/virgl_protocol.h | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/src/virtio/virtio-gpu/virgl_hw.h b/src/virtio/virtio-gpu/virgl_hw.h
index a0345bf0476..8310e25f96c 100644
--- a/src/virtio/virtio-gpu/virgl_hw.h
+++ b/src/virtio/virtio-gpu/virgl_hw.h
@@ -408,6 +408,7 @@ enum virgl_formats {
 
 /* These are used by the capability_bits_v2 field in virgl_caps_v2. */
 #define VIRGL_CAP_V2_BLEND_EQUATION       (1 << 0)
+#define VIRGL_CAP_V2_UNTYPED_RESOURCE     (1 << 1)
 
 /* virgl bind flags - these are compatible with mesa 10.5 gallium.
  * but are fixed, no other should be passed to virgl either.
diff --git a/src/virtio/virtio-gpu/virgl_protocol.h b/src/virtio/virtio-gpu/virgl_protocol.h
index a230898cf0d..f6c7164dafc 100644
--- a/src/virtio/virtio-gpu/virgl_protocol.h
+++ b/src/virtio/virtio-gpu/virgl_protocol.h
@@ -102,6 +102,7 @@ enum virgl_context_cmd {
    VIRGL_CCMD_SET_TWEAKS,
    VIRGL_CCMD_CLEAR_TEXTURE,
    VIRGL_CCMD_PIPE_RESOURCE_CREATE,
+   VIRGL_CCMD_PIPE_RESOURCE_SET_TYPE,
    VIRGL_MAX_COMMANDS
 };
 
@@ -636,4 +637,17 @@ enum vrend_tweak_type {
 #define VIRGL_PIPE_RES_CREATE_FLAGS 10
 #define VIRGL_PIPE_RES_CREATE_BLOB_ID 11
 
+/* VIRGL_CCMD_PIPE_RESOURCE_SET_TYPE */
+#define VIRGL_PIPE_RES_SET_TYPE_SIZE(nplanes) (8 + (nplanes) * 2)
+#define VIRGL_PIPE_RES_SET_TYPE_RES_HANDLE 1
+#define VIRGL_PIPE_RES_SET_TYPE_FORMAT 2
+#define VIRGL_PIPE_RES_SET_TYPE_BIND 3
+#define VIRGL_PIPE_RES_SET_TYPE_WIDTH 4
+#define VIRGL_PIPE_RES_SET_TYPE_HEIGHT 5
+#define VIRGL_PIPE_RES_SET_TYPE_USAGE 6
+#define VIRGL_PIPE_RES_SET_TYPE_MODIFIER_LO 7
+#define VIRGL_PIPE_RES_SET_TYPE_MODIFIER_HI 8
+#define VIRGL_PIPE_RES_SET_TYPE_PLANE_STRIDE(plane) (9 + (plane) * 2)
+#define VIRGL_PIPE_RES_SET_TYPE_PLANE_OFFSET(plane) (10 + (plane) * 2)
+
 #endif



More information about the mesa-commit mailing list