gfxstream: host + guest: bump up version of the protocol
This reports the new host side capabilities (the ability to
make exportable color buffer blobs) back to the guest.
This feature is only used with experimental Linux guest
support in gfxstream.
BUG=349122558
TEST=compile
Change-Id: Ide5e4416cf425cb92b69f27bceabcaf39239b2a1
diff --git a/guest/platform/include/virtgpu_gfxstream_protocol.h b/guest/platform/include/virtgpu_gfxstream_protocol.h
index 285e8df..2edc2f3 100644
--- a/guest/platform/include/virtgpu_gfxstream_protocol.h
+++ b/guest/platform/include/virtgpu_gfxstream_protocol.h
@@ -41,6 +41,7 @@
#define GFXSTREAM_CREATE_EXPORT_SYNC_VK 0xa000
#define GFXSTREAM_CREATE_IMPORT_SYNC_VK 0xa001
#define GFXSTREAM_CREATE_QSRI_EXPORT_VK 0xa002
+#define GFXSTREAM_RESOURCE_CREATE_3D 0xa003
// clang-format off
// A placeholder command to ensure virtio-gpu completes
@@ -87,6 +88,22 @@
uint32_t padding;
};
+struct gfxstreamResourceCreate3d {
+ struct gfxstreamHeader hdr;
+ uint32_t target;
+ uint32_t format;
+ uint32_t bind;
+ uint32_t width;
+ uint32_t height;
+ uint32_t depth;
+ uint32_t arraySize;
+ uint32_t lastLevel;
+ uint32_t nrSamples;
+ uint32_t flags;
+ uint32_t pad;
+ uint64_t blobId;
+};
+
struct vulkanCapset {
uint32_t protocolVersion;
@@ -98,7 +115,8 @@
uint32_t deferredMapping;
uint32_t blobAlignment;
uint32_t noRenderControlEnc;
- uint32_t padding[14];
+ uint32_t alwaysBlob;
+ uint32_t padding[13];
};
struct magmaCapset {
diff --git a/host/virtgpu_gfxstream_protocol.h b/host/virtgpu_gfxstream_protocol.h
index 1e77661..19827ea 100644
--- a/host/virtgpu_gfxstream_protocol.h
+++ b/host/virtgpu_gfxstream_protocol.h
@@ -117,7 +117,8 @@
uint32_t deferredMapping;
uint32_t blobAlignment;
uint32_t noRenderControlEnc;
- uint32_t padding[14];
+ uint32_t alwaysBlob;
+ uint32_t padding[13];
};
struct magmaCapset {
diff --git a/host/virtio-gpu-gfxstream-renderer.cpp b/host/virtio-gpu-gfxstream-renderer.cpp
index b03e582..22faee6 100644
--- a/host/virtio-gpu-gfxstream-renderer.cpp
+++ b/host/virtio-gpu-gfxstream-renderer.cpp
@@ -1581,6 +1581,10 @@
if (vk_emu && vk_emu->live) {
capset->deferredMapping = 1;
}
+
+#if SUPPORT_DMABUF
+ capset->alwaysBlob = 1;
+#endif
break;
}
case VIRTGPU_CAPSET_GFXSTREAM_MAGMA: {