[Mesa-dev] [PATCH v2 04/18] util/vk: Add helpers for finding an extension struct
Chad Versace
chadversary at chromium.org
Tue Mar 28 23:37:16 UTC 2017
Already upstream.
On Mon 13 Mar 2017, Jason Ekstrand wrote:
> ---
> src/util/vk_util.h | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/src/util/vk_util.h b/src/util/vk_util.h
> index e0b5d0b..0b9cb47 100644
> --- a/src/util/vk_util.h
> +++ b/src/util/vk_util.h
> @@ -40,4 +40,21 @@ struct vk_struct_common {
> for (const struct vk_struct_common *__iter = (const struct vk_struct_common *)(__start); \
> __iter; __iter = __iter->pNext)
>
> +static inline void *
> +__vk_find_struct(void *start, VkStructureType sType)
> +{
> + vk_foreach_struct(s, start) {
> + if (s->sType == sType)
> + return s;
> + }
> +
> + return NULL;
> +}
> +
> +#define vk_find_struct(__start, __sType) \
> + __vk_find_struct((__start), VK_STRUCTURE_TYPE_##__sType)
> +
> +#define vk_find_struct_const(__start, __sType) \
> + (const void *)__vk_find_struct((void *)(__start), VK_STRUCTURE_TYPE_##__sType)
> +
> #endif /* VK_UTIL_H */
> --
> 2.5.0.400.gff86faf
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list