summaryrefslogtreecommitdiffstats
path: root/src/vulkan/util
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2019-03-25 15:02:47 +0000
committerLionel Landwerlin <[email protected]>2019-04-08 18:27:02 +0100
commitce790c96a958615f7d3b42635e2c4bac1fdf7543 (patch)
tree1dad4b61faefb29ed3ecfea473d18abab53465e7 /src/vulkan/util
parented91ca0629a929bd3031d0acd908f7b46b6eb80c (diff)
anv: implement VK_KHR_swapchain revision 70
This revision allows for images to be : - created by reusing image parameters from swapchain - bound to memory from a swapchain v2: Add color attachment flag Use same implicit WSI parameters (tiling, samples, usage) v3: Fix missing break in vk_foreach_struct_const() switch (Lionel) v4: Fix accessing image aspects before android resolve (Tapani) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src/vulkan/util')
-rw-r--r--src/vulkan/util/vk_util.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/vulkan/util/vk_util.h b/src/vulkan/util/vk_util.h
index 89b90a60d20..8ae384b9fb5 100644
--- a/src/vulkan/util/vk_util.h
+++ b/src/vulkan/util/vk_util.h
@@ -196,6 +196,18 @@ __vk_find_struct(void *start, VkStructureType sType)
#define vk_find_struct_const(__start, __sType) \
(const void *)__vk_find_struct((void *)(__start), VK_STRUCTURE_TYPE_##__sType)
+static inline void
+__vk_append_struct(void *start, void *element)
+{
+ vk_foreach_struct(s, start) {
+ if (s->pNext)
+ continue;
+
+ s->pNext = (struct VkBaseOutStructure *) element;
+ break;
+ }
+}
+
uint32_t vk_get_driver_version(void);
uint32_t vk_get_version_override(void);