aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Neph <ryanneph@google.com>2022-11-09 14:04:38 -0800
committerMarge Bot <emma+marge@anholt.net>2022-12-16 01:59:39 +0000
commit60d930962928a1981bade0c3471a1ce18bd0212c (patch)
tree036e0ec79d1d5af082b95356ef19daabb39d9764
parent42b0c01248707a565477cdc823580f5d8a870a99 (diff)
downloadvirglrenderer-60d930962928a1981bade0c3471a1ce18bd0212c.tar.gz
vkr: update venus-protocol for multiple timelines
Signed-off-by: Ryan Neph <ryanneph@google.com> Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/982>
-rw-r--r--src/venus/venus-protocol/vn_protocol_renderer.h2
-rw-r--r--src/venus/venus-protocol/vn_protocol_renderer_defines.h7
-rw-r--r--src/venus/venus-protocol/vn_protocol_renderer_device.h84
-rw-r--r--src/vrend_renderer.c2
4 files changed, 91 insertions, 4 deletions
diff --git a/src/venus/venus-protocol/vn_protocol_renderer.h b/src/venus/venus-protocol/vn_protocol_renderer.h
index 4a2ebe31..8c20964e 100644
--- a/src/venus/venus-protocol/vn_protocol_renderer.h
+++ b/src/venus/venus-protocol/vn_protocol_renderer.h
@@ -1,4 +1,4 @@
-/* This file is generated by venus-protocol git-1a5e9073. */
+/* This file is generated by venus-protocol git-358504e3. */
/*
* Copyright 2020 Google LLC
diff --git a/src/venus/venus-protocol/vn_protocol_renderer_defines.h b/src/venus/venus-protocol/vn_protocol_renderer_defines.h
index ace1b8cc..b95e5250 100644
--- a/src/venus/venus-protocol/vn_protocol_renderer_defines.h
+++ b/src/venus/venus-protocol/vn_protocol_renderer_defines.h
@@ -23,6 +23,7 @@
#define VK_STRUCTURE_TYPE_IMPORT_MEMORY_RESOURCE_INFO_MESA ((VkStructureType)1000384002)
#define VK_STRUCTURE_TYPE_MEMORY_RESOURCE_ALLOCATION_SIZE_PROPERTIES_100000_MESA ((VkStructureType)1000384003)
#define VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_RESOURCE_INFO_100000_MESA ((VkStructureType)1000384004)
+#define VK_STRUCTURE_TYPE_DEVICE_QUEUE_TIMELINE_INFO_MESA ((VkStructureType)1000384005)
typedef enum VkCommandTypeEXT {
VK_COMMAND_TYPE_vkCreateInstance_EXT = 0,
@@ -429,6 +430,12 @@ typedef struct VkImportSemaphoreResourceInfo100000MESA {
uint32_t resourceId;
} VkImportSemaphoreResourceInfo100000MESA;
+typedef struct VkDeviceQueueTimelineInfoMESA {
+ VkStructureType sType;
+ const void* pNext;
+ uint32_t ringIdx;
+} VkDeviceQueueTimelineInfoMESA;
+
struct vn_command_vkCreateInstance {
const VkInstanceCreateInfo* pCreateInfo;
const VkAllocationCallbacks* pAllocator;
diff --git a/src/venus/venus-protocol/vn_protocol_renderer_device.h b/src/venus/venus-protocol/vn_protocol_renderer_device.h
index 8f89ab19..15b05205 100644
--- a/src/venus/venus-protocol/vn_protocol_renderer_device.h
+++ b/src/venus/venus-protocol/vn_protocol_renderer_device.h
@@ -13656,10 +13656,10 @@ vn_decode_VkPhysicalDeviceGroupProperties_partial_temp(struct vn_cs_decoder *dec
vn_decode_VkPhysicalDeviceGroupProperties_self_partial_temp(dec, val);
}
-/* struct VkDeviceQueueInfo2 chain */
+/* struct VkDeviceQueueTimelineInfoMESA chain */
static inline void *
-vn_decode_VkDeviceQueueInfo2_pnext_temp(struct vn_cs_decoder *dec)
+vn_decode_VkDeviceQueueTimelineInfoMESA_pnext_temp(struct vn_cs_decoder *dec)
{
/* no known/supported struct */
if (vn_decode_simple_pointer(dec))
@@ -13668,6 +13668,83 @@ vn_decode_VkDeviceQueueInfo2_pnext_temp(struct vn_cs_decoder *dec)
}
static inline void
+vn_decode_VkDeviceQueueTimelineInfoMESA_self_temp(struct vn_cs_decoder *dec, VkDeviceQueueTimelineInfoMESA *val)
+{
+ /* skip val->{sType,pNext} */
+ vn_decode_uint32_t(dec, &val->ringIdx);
+}
+
+static inline void
+vn_decode_VkDeviceQueueTimelineInfoMESA_temp(struct vn_cs_decoder *dec, VkDeviceQueueTimelineInfoMESA *val)
+{
+ VkStructureType stype;
+ vn_decode_VkStructureType(dec, &stype);
+ if (stype != VK_STRUCTURE_TYPE_DEVICE_QUEUE_TIMELINE_INFO_MESA)
+ vn_cs_decoder_set_fatal(dec);
+
+ val->sType = stype;
+ val->pNext = vn_decode_VkDeviceQueueTimelineInfoMESA_pnext_temp(dec);
+ vn_decode_VkDeviceQueueTimelineInfoMESA_self_temp(dec, val);
+}
+
+static inline void
+vn_replace_VkDeviceQueueTimelineInfoMESA_handle_self(VkDeviceQueueTimelineInfoMESA *val)
+{
+ /* skip val->sType */
+ /* skip val->pNext */
+ /* skip val->ringIdx */
+}
+
+static inline void
+vn_replace_VkDeviceQueueTimelineInfoMESA_handle(VkDeviceQueueTimelineInfoMESA *val)
+{
+ struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val;
+
+ do {
+ switch ((int32_t)pnext->sType) {
+ case VK_STRUCTURE_TYPE_DEVICE_QUEUE_TIMELINE_INFO_MESA:
+ vn_replace_VkDeviceQueueTimelineInfoMESA_handle_self((VkDeviceQueueTimelineInfoMESA *)pnext);
+ break;
+ default:
+ /* ignore unknown/unsupported struct */
+ break;
+ }
+ pnext = pnext->pNext;
+ } while (pnext);
+}
+
+/* struct VkDeviceQueueInfo2 chain */
+
+static inline void *
+vn_decode_VkDeviceQueueInfo2_pnext_temp(struct vn_cs_decoder *dec)
+{
+ VkBaseOutStructure *pnext;
+ VkStructureType stype;
+
+ if (!vn_decode_simple_pointer(dec))
+ return NULL;
+
+ vn_decode_VkStructureType(dec, &stype);
+ switch ((int32_t)stype) {
+ case VK_STRUCTURE_TYPE_DEVICE_QUEUE_TIMELINE_INFO_MESA:
+ pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkDeviceQueueTimelineInfoMESA));
+ if (pnext) {
+ pnext->sType = stype;
+ pnext->pNext = vn_decode_VkDeviceQueueInfo2_pnext_temp(dec);
+ vn_decode_VkDeviceQueueTimelineInfoMESA_self_temp(dec, (VkDeviceQueueTimelineInfoMESA *)pnext);
+ }
+ break;
+ default:
+ /* unexpected struct */
+ pnext = NULL;
+ vn_cs_decoder_set_fatal(dec);
+ break;
+ }
+
+ return pnext;
+}
+
+static inline void
vn_decode_VkDeviceQueueInfo2_self_temp(struct vn_cs_decoder *dec, VkDeviceQueueInfo2 *val)
{
/* skip val->{sType,pNext} */
@@ -13709,6 +13786,9 @@ vn_replace_VkDeviceQueueInfo2_handle(VkDeviceQueueInfo2 *val)
case VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2:
vn_replace_VkDeviceQueueInfo2_handle_self((VkDeviceQueueInfo2 *)pnext);
break;
+ case VK_STRUCTURE_TYPE_DEVICE_QUEUE_TIMELINE_INFO_MESA:
+ vn_replace_VkDeviceQueueTimelineInfoMESA_handle_self((VkDeviceQueueTimelineInfoMESA *)pnext);
+ break;
default:
/* ignore unknown/unsupported struct */
break;
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index f08426f3..567455ce 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -5146,7 +5146,7 @@ static void
vrend_fill_sysval_uniform_block (struct vrend_sub_context *sub_ctx)
{
if (sub_ctx->prog->virgl_block_bind == -1)
- return;
+ return;
if (sub_ctx->sysvalue_data_cookie != sub_ctx->prog->sysvalue_data_cookie) {
glBindBuffer(GL_UNIFORM_BUFFER, sub_ctx->prog->ubo_sysval_buffer_id);