vulkan: use VkBase{In,Out}Structure instead of a custom struct
authorEric Engestrom <eric.engestrom@intel.com>
Thu, 28 Feb 2019 14:48:09 +0000 (14:48 +0000)
committerEric Engestrom <eric.engestrom@intel.com>
Thu, 28 Feb 2019 16:25:59 +0000 (16:25 +0000)
VkBaseInStructure and VkBaseOutStructure are part of vulkan_core.h
(which is part of vulkan.h)

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/vulkan/util/vk_util.h

index cc6a36e5acc456d720fca0d571a2f69280f47a1b..e7404b0880890a5cf896ec8748feb0aa9afc529d 100644 (file)
 
 #include <vulkan/vulkan.h>
 
-struct vk_struct_common {
-    VkStructureType sType;
-    struct vk_struct_common *pNext;
-};
-
 #define vk_foreach_struct(__iter, __start) \
-   for (struct vk_struct_common *__iter = (struct vk_struct_common *)(__start); \
+   for (struct VkBaseOutStructure *__iter = (struct VkBaseOutStructure *)(__start); \
         __iter; __iter = __iter->pNext)
 
 #define vk_foreach_struct_const(__iter, __start) \
-   for (const struct vk_struct_common *__iter = (const struct vk_struct_common *)(__start); \
+   for (const struct VkBaseInStructure *__iter = (const struct VkBaseInStructure *)(__start); \
         __iter; __iter = __iter->pNext)
 
 /**