Update venus-protocol to add extension `VK_VALVE_mutable_descriptor_type`

Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/855>
diff --git a/src/venus/venus-protocol/vn_protocol_renderer.h b/src/venus/venus-protocol/vn_protocol_renderer.h
index f9ecff0..85d5ee5 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-6c35d9f3. */
+/* This file is generated by venus-protocol git-78c39b98. */
 
 /*
  * Copyright 2020 Google LLC
diff --git a/src/venus/venus-protocol/vn_protocol_renderer_descriptor_pool.h b/src/venus/venus-protocol/vn_protocol_renderer_descriptor_pool.h
index 73fd4e0..78a0570 100644
--- a/src/venus/venus-protocol/vn_protocol_renderer_descriptor_pool.h
+++ b/src/venus/venus-protocol/vn_protocol_renderer_descriptor_pool.h
@@ -108,6 +108,14 @@
             vn_decode_VkDescriptorPoolInlineUniformBlockCreateInfo_self_temp(dec, (VkDescriptorPoolInlineUniformBlockCreateInfo *)pnext);
         }
         break;
+    case VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE:
+        pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkMutableDescriptorTypeCreateInfoVALVE));
+        if (pnext) {
+            pnext->sType = stype;
+            pnext->pNext = vn_decode_VkDescriptorPoolCreateInfo_pnext_temp(dec);
+            vn_decode_VkMutableDescriptorTypeCreateInfoVALVE_self_temp(dec, (VkMutableDescriptorTypeCreateInfoVALVE *)pnext);
+        }
+        break;
     default:
         /* unexpected struct */
         pnext = NULL;
@@ -177,6 +185,9 @@
         case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO:
             vn_replace_VkDescriptorPoolInlineUniformBlockCreateInfo_handle_self((VkDescriptorPoolInlineUniformBlockCreateInfo *)pnext);
             break;
+        case VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE:
+            vn_replace_VkMutableDescriptorTypeCreateInfoVALVE_handle_self((VkMutableDescriptorTypeCreateInfoVALVE *)pnext);
+            break;
         default:
             /* ignore unknown/unsupported struct */
             break;
diff --git a/src/venus/venus-protocol/vn_protocol_renderer_descriptor_set_layout.h b/src/venus/venus-protocol/vn_protocol_renderer_descriptor_set_layout.h
index da976cb..387de8d 100644
--- a/src/venus/venus-protocol/vn_protocol_renderer_descriptor_set_layout.h
+++ b/src/venus/venus-protocol/vn_protocol_renderer_descriptor_set_layout.h
@@ -137,6 +137,14 @@
             vn_decode_VkDescriptorSetLayoutBindingFlagsCreateInfo_self_temp(dec, (VkDescriptorSetLayoutBindingFlagsCreateInfo *)pnext);
         }
         break;
+    case VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE:
+        pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkMutableDescriptorTypeCreateInfoVALVE));
+        if (pnext) {
+            pnext->sType = stype;
+            pnext->pNext = vn_decode_VkDescriptorSetLayoutCreateInfo_pnext_temp(dec);
+            vn_decode_VkMutableDescriptorTypeCreateInfoVALVE_self_temp(dec, (VkMutableDescriptorTypeCreateInfoVALVE *)pnext);
+        }
+        break;
     default:
         /* unexpected struct */
         pnext = NULL;
@@ -204,6 +212,9 @@
         case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO:
             vn_replace_VkDescriptorSetLayoutBindingFlagsCreateInfo_handle_self((VkDescriptorSetLayoutBindingFlagsCreateInfo *)pnext);
             break;
+        case VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE:
+            vn_replace_VkMutableDescriptorTypeCreateInfoVALVE_handle_self((VkMutableDescriptorTypeCreateInfoVALVE *)pnext);
+            break;
         default:
             /* ignore unknown/unsupported struct */
             break;
diff --git a/src/venus/venus-protocol/vn_protocol_renderer_device.h b/src/venus/venus-protocol/vn_protocol_renderer_device.h
index 4514514..19675e1 100644
--- a/src/venus/venus-protocol/vn_protocol_renderer_device.h
+++ b/src/venus/venus-protocol/vn_protocol_renderer_device.h
@@ -6074,6 +6074,115 @@
     } while (pnext);
 }
 
+/* struct VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE chain */
+
+static inline void
+vn_encode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_pnext(struct vn_cs_encoder *enc, const void *val)
+{
+    /* no known/supported struct */
+    vn_encode_simple_pointer(enc, NULL);
+}
+
+static inline void
+vn_encode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_self(struct vn_cs_encoder *enc, const VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *val)
+{
+    /* skip val->{sType,pNext} */
+    vn_encode_VkBool32(enc, &val->mutableDescriptorType);
+}
+
+static inline void
+vn_encode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE(struct vn_cs_encoder *enc, const VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *val)
+{
+    assert(val->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE);
+    vn_encode_VkStructureType(enc, &(VkStructureType){ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE });
+    vn_encode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_pnext(enc, val->pNext);
+    vn_encode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_self(enc, val);
+}
+
+static inline void *
+vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_pnext_temp(struct vn_cs_decoder *dec)
+{
+    /* no known/supported struct */
+    if (vn_decode_simple_pointer(dec))
+        vn_cs_decoder_set_fatal(dec);
+    return NULL;
+}
+
+static inline void
+vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_self_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *val)
+{
+    /* skip val->{sType,pNext} */
+    vn_decode_VkBool32(dec, &val->mutableDescriptorType);
+}
+
+static inline void
+vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *val)
+{
+    VkStructureType stype;
+    vn_decode_VkStructureType(dec, &stype);
+    if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE)
+        vn_cs_decoder_set_fatal(dec);
+
+    val->sType = stype;
+    val->pNext = vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_pnext_temp(dec);
+    vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_self_temp(dec, val);
+}
+
+static inline void *
+vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_pnext_partial_temp(struct vn_cs_decoder *dec)
+{
+    /* no known/supported struct */
+    if (vn_decode_simple_pointer(dec))
+        vn_cs_decoder_set_fatal(dec);
+    return NULL;
+}
+
+static inline void
+vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_self_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *val)
+{
+    /* skip val->{sType,pNext} */
+    /* skip val->mutableDescriptorType */
+}
+
+static inline void
+vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_partial_temp(struct vn_cs_decoder *dec, VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *val)
+{
+    VkStructureType stype;
+    vn_decode_VkStructureType(dec, &stype);
+    if (stype != VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE)
+        vn_cs_decoder_set_fatal(dec);
+
+    val->sType = stype;
+    val->pNext = vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_pnext_partial_temp(dec);
+    vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_self_partial_temp(dec, val);
+}
+
+static inline void
+vn_replace_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_handle_self(VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *val)
+{
+    /* skip val->sType */
+    /* skip val->pNext */
+    /* skip val->mutableDescriptorType */
+}
+
+static inline void
+vn_replace_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_handle(VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *val)
+{
+    struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val;
+
+    do {
+        switch ((int32_t)pnext->sType) {
+        case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE:
+            vn_replace_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_handle_self((VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *)pnext);
+            break;
+        default:
+            /* ignore unknown/unsupported struct */
+            break;
+        }
+        pnext = pnext->pNext;
+    } while (pnext);
+}
+
 /* struct VkPhysicalDeviceSynchronization2Features chain */
 
 static inline void
@@ -7005,6 +7114,12 @@
             vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, pnext->pNext);
             vn_encode_VkPhysicalDeviceShaderTerminateInvocationFeatures_self(enc, (const VkPhysicalDeviceShaderTerminateInvocationFeatures *)pnext);
             return;
+        case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE:
+            vn_encode_simple_pointer(enc, pnext);
+            vn_encode_VkStructureType(enc, &pnext->sType);
+            vn_encode_VkPhysicalDeviceFeatures2_pnext(enc, pnext->pNext);
+            vn_encode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_self(enc, (const VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *)pnext);
+            return;
         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES:
             vn_encode_simple_pointer(enc, pnext);
             vn_encode_VkStructureType(enc, &pnext->sType);
@@ -7430,6 +7545,14 @@
             vn_decode_VkPhysicalDeviceShaderTerminateInvocationFeatures_self_temp(dec, (VkPhysicalDeviceShaderTerminateInvocationFeatures *)pnext);
         }
         break;
+    case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE:
+        pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE));
+        if (pnext) {
+            pnext->sType = stype;
+            pnext->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_temp(dec);
+            vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_self_temp(dec, (VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *)pnext);
+        }
+        break;
     case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES:
         pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSynchronization2Features));
         if (pnext) {
@@ -7871,6 +7994,14 @@
             vn_decode_VkPhysicalDeviceShaderTerminateInvocationFeatures_self_partial_temp(dec, (VkPhysicalDeviceShaderTerminateInvocationFeatures *)pnext);
         }
         break;
+    case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE:
+        pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE));
+        if (pnext) {
+            pnext->sType = stype;
+            pnext->pNext = vn_decode_VkPhysicalDeviceFeatures2_pnext_partial_temp(dec);
+            vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_self_partial_temp(dec, (VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *)pnext);
+        }
+        break;
     case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES:
         pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSynchronization2Features));
         if (pnext) {
@@ -8099,6 +8230,9 @@
         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES:
             vn_replace_VkPhysicalDeviceShaderTerminateInvocationFeatures_handle_self((VkPhysicalDeviceShaderTerminateInvocationFeatures *)pnext);
             break;
+        case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE:
+            vn_replace_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_handle_self((VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *)pnext);
+            break;
         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES:
             vn_replace_VkPhysicalDeviceSynchronization2Features_handle_self((VkPhysicalDeviceSynchronization2Features *)pnext);
             break;
@@ -8585,6 +8719,14 @@
             vn_decode_VkPhysicalDeviceShaderTerminateInvocationFeatures_self_temp(dec, (VkPhysicalDeviceShaderTerminateInvocationFeatures *)pnext);
         }
         break;
+    case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE:
+        pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE));
+        if (pnext) {
+            pnext->sType = stype;
+            pnext->pNext = vn_decode_VkDeviceCreateInfo_pnext_temp(dec);
+            vn_decode_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_self_temp(dec, (VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *)pnext);
+        }
+        break;
     case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES:
         pnext = vn_cs_decoder_alloc_temp(dec, sizeof(VkPhysicalDeviceSynchronization2Features));
         if (pnext) {
@@ -8881,6 +9023,9 @@
         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES:
             vn_replace_VkPhysicalDeviceShaderTerminateInvocationFeatures_handle_self((VkPhysicalDeviceShaderTerminateInvocationFeatures *)pnext);
             break;
+        case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE:
+            vn_replace_VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE_handle_self((VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *)pnext);
+            break;
         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES:
             vn_replace_VkPhysicalDeviceSynchronization2Features_handle_self((VkPhysicalDeviceSynchronization2Features *)pnext);
             break;
diff --git a/src/venus/venus-protocol/vn_protocol_renderer_info.h b/src/venus/venus-protocol/vn_protocol_renderer_info.h
index f319c31..25c9f43 100644
--- a/src/venus/venus-protocol/vn_protocol_renderer_info.h
+++ b/src/venus/venus-protocol/vn_protocol_renderer_info.h
@@ -12,7 +12,7 @@
 
 struct vn_info_extension_table {
    union {
-      bool enabled[90];
+      bool enabled[91];
       struct {
          bool EXT_4444_formats;
          bool EXT_calibrated_timestamps;
@@ -104,6 +104,7 @@
          bool KHR_vulkan_memory_model;
          bool KHR_zero_initialize_workgroup_memory;
          bool MESA_venus_protocol;
+         bool VALVE_mutable_descriptor_type;
       };
    };
 };
@@ -117,8 +118,8 @@
 };
 
 /* sorted by extension names for bsearch */
-static const uint32_t _vn_info_extension_count = 90;
-static const struct vn_info_extension _vn_info_extensions[90] = {
+static const uint32_t _vn_info_extension_count = 91;
+static const struct vn_info_extension _vn_info_extensions[91] = {
    { "VK_EXT_4444_formats", 341, 1 },
    { "VK_EXT_calibrated_timestamps", 185, 2 },
    { "VK_EXT_command_serialization", 384, 0 },
@@ -209,6 +210,7 @@
    { "VK_KHR_vulkan_memory_model", 212, 3 },
    { "VK_KHR_zero_initialize_workgroup_memory", 326, 1 },
    { "VK_MESA_venus_protocol", 385, 100000 },
+   { "VK_VALVE_mutable_descriptor_type", 352, 1 },
 };
 
 static inline uint32_t
diff --git a/src/venus/venus-protocol/vn_protocol_renderer_structs.h b/src/venus/venus-protocol/vn_protocol_renderer_structs.h
index 99f978b..e00974c 100644
--- a/src/venus/venus-protocol/vn_protocol_renderer_structs.h
+++ b/src/venus/venus-protocol/vn_protocol_renderer_structs.h
@@ -628,6 +628,101 @@
     }
 }
 
+/* struct VkMutableDescriptorTypeListVALVE */
+
+static inline void
+vn_decode_VkMutableDescriptorTypeListVALVE_temp(struct vn_cs_decoder *dec, VkMutableDescriptorTypeListVALVE *val)
+{
+    vn_decode_uint32_t(dec, &val->descriptorTypeCount);
+    if (vn_peek_array_size(dec)) {
+        const size_t array_size = vn_decode_array_size(dec, val->descriptorTypeCount);
+        val->pDescriptorTypes = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pDescriptorTypes) * array_size);
+        if (!val->pDescriptorTypes) return;
+        vn_decode_VkDescriptorType_array(dec, (VkDescriptorType *)val->pDescriptorTypes, array_size);
+    } else {
+        vn_decode_array_size(dec, val->descriptorTypeCount);
+        val->pDescriptorTypes = NULL;
+    }
+}
+
+static inline void
+vn_replace_VkMutableDescriptorTypeListVALVE_handle(VkMutableDescriptorTypeListVALVE *val)
+{
+    /* skip val->descriptorTypeCount */
+    /* skip val->pDescriptorTypes */
+}
+
+/* struct VkMutableDescriptorTypeCreateInfoVALVE chain */
+
+static inline void *
+vn_decode_VkMutableDescriptorTypeCreateInfoVALVE_pnext_temp(struct vn_cs_decoder *dec)
+{
+    /* no known/supported struct */
+    if (vn_decode_simple_pointer(dec))
+        vn_cs_decoder_set_fatal(dec);
+    return NULL;
+}
+
+static inline void
+vn_decode_VkMutableDescriptorTypeCreateInfoVALVE_self_temp(struct vn_cs_decoder *dec, VkMutableDescriptorTypeCreateInfoVALVE *val)
+{
+    /* skip val->{sType,pNext} */
+    vn_decode_uint32_t(dec, &val->mutableDescriptorTypeListCount);
+    if (vn_peek_array_size(dec)) {
+        const uint32_t iter_count = vn_decode_array_size(dec, val->mutableDescriptorTypeListCount);
+        val->pMutableDescriptorTypeLists = vn_cs_decoder_alloc_temp(dec, sizeof(*val->pMutableDescriptorTypeLists) * iter_count);
+        if (!val->pMutableDescriptorTypeLists) return;
+        for (uint32_t i = 0; i < iter_count; i++)
+            vn_decode_VkMutableDescriptorTypeListVALVE_temp(dec, &((VkMutableDescriptorTypeListVALVE *)val->pMutableDescriptorTypeLists)[i]);
+    } else {
+        vn_decode_array_size(dec, val->mutableDescriptorTypeListCount);
+        val->pMutableDescriptorTypeLists = NULL;
+    }
+}
+
+static inline void
+vn_decode_VkMutableDescriptorTypeCreateInfoVALVE_temp(struct vn_cs_decoder *dec, VkMutableDescriptorTypeCreateInfoVALVE *val)
+{
+    VkStructureType stype;
+    vn_decode_VkStructureType(dec, &stype);
+    if (stype != VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE)
+        vn_cs_decoder_set_fatal(dec);
+
+    val->sType = stype;
+    val->pNext = vn_decode_VkMutableDescriptorTypeCreateInfoVALVE_pnext_temp(dec);
+    vn_decode_VkMutableDescriptorTypeCreateInfoVALVE_self_temp(dec, val);
+}
+
+static inline void
+vn_replace_VkMutableDescriptorTypeCreateInfoVALVE_handle_self(VkMutableDescriptorTypeCreateInfoVALVE *val)
+{
+    /* skip val->sType */
+    /* skip val->pNext */
+    /* skip val->mutableDescriptorTypeListCount */
+    if (val->pMutableDescriptorTypeLists) {
+       for (uint32_t i = 0; i < val->mutableDescriptorTypeListCount; i++)
+            vn_replace_VkMutableDescriptorTypeListVALVE_handle(&((VkMutableDescriptorTypeListVALVE *)val->pMutableDescriptorTypeLists)[i]);
+    }
+}
+
+static inline void
+vn_replace_VkMutableDescriptorTypeCreateInfoVALVE_handle(VkMutableDescriptorTypeCreateInfoVALVE *val)
+{
+    struct VkBaseOutStructure *pnext = (struct VkBaseOutStructure *)val;
+
+    do {
+        switch ((int32_t)pnext->sType) {
+        case VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE:
+            vn_replace_VkMutableDescriptorTypeCreateInfoVALVE_handle_self((VkMutableDescriptorTypeCreateInfoVALVE *)pnext);
+            break;
+        default:
+            /* ignore unknown/unsupported struct */
+            break;
+        }
+        pnext = pnext->pNext;
+    } while (pnext);
+}
+
 /* struct VkMemoryDedicatedRequirements chain */
 
 static inline void