From 08b53ca4564d869f6e790638c04d9d75c5d13a71 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Thu, 12 Sep 2019 09:33:44 +1000 Subject: [PATCH] vulkan: fix build with older API headers The protected memory flags were only added later as was the multi-instance flag. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1081 --- gst-libs/gst/vulkan/gstvkdebug.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst-libs/gst/vulkan/gstvkdebug.c b/gst-libs/gst/vulkan/gstvkdebug.c index 8f888e2f74..e587a23632 100644 --- a/gst-libs/gst/vulkan/gstvkdebug.c +++ b/gst-libs/gst/vulkan/gstvkdebug.c @@ -56,7 +56,9 @@ static const struct {VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, "host-coherent"}, {VK_MEMORY_PROPERTY_HOST_CACHED_BIT, "host-cached"}, {VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT, "lazily-allocated"}, +#if VK_HEADER_VERSION >= 70 {VK_MEMORY_PROPERTY_PROTECTED_BIT, "protected"}, +#endif #if VK_HEADER_VERSION >= 121 {VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD, "device-coherent"}, {VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD, "device-uncached"}, @@ -70,7 +72,9 @@ static const struct const char *str; } vk_memory_heap_flags_map[] = { {VK_MEMORY_HEAP_DEVICE_LOCAL_BIT, "device-local"}, +#if VK_HEADER_VERSION >= 70 {VK_MEMORY_HEAP_MULTI_INSTANCE_BIT, "multi-instance"}, +#endif }; FLAGS_TO_STRING(memory_heap, VkMemoryHeapFlagBits); @@ -83,7 +87,9 @@ static const struct {VK_QUEUE_COMPUTE_BIT, "compute"}, {VK_QUEUE_TRANSFER_BIT, "transfer"}, {VK_QUEUE_SPARSE_BINDING_BIT, "sparse-binding"}, +#if VK_HEADER_VERSION >= 70 {VK_QUEUE_PROTECTED_BIT, "protected"}, +#endif }; FLAGS_TO_STRING(queue, VkQueueFlags);