| 1 | /* |
| 2 | * GStreamer |
| 3 | * Copyright (C) 2019 Matthew Waters <[email protected]> |
| 4 | * |
| 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Library General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This library is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Library General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU Library General Public |
| 16 | * License along with this library; if not, write to the |
| 17 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, |
| 18 | * Boston, MA 02110-1301, USA. |
| 19 | */ |
| 20 | |
| 21 | #ifndef __GST_VULKAN_BARRIER_H__ |
| 22 | #define __GST_VULKAN_BARRIER_H__ |
| 23 | |
| 24 | #include <gst/vulkan/vulkan_fwd.h> |
| 25 | #include <gst/vulkan/gstvkapi.h> |
| 26 | |
| 27 | G_BEGIN_DECLS |
| 28 | |
| 29 | /** |
| 30 | * GstVulkanBarrierType: |
| 31 | * @GST_VULKAN_BARRIER_NONE: no barrier type |
| 32 | * @GST_VULKAN_BARRIER_MEMORY: memory barrier |
| 33 | * @GST_VULKAN_BARRIER_BUFFER: buffer barrier |
| 34 | * @GST_VULKAN_BARRIER_IMAGE: image barrier |
| 35 | * |
| 36 | * Since: 1.18 |
| 37 | */ |
| 38 | typedef enum |
| 39 | { |
| 40 | GST_VULKAN_BARRIER_NONE = 0, |
| 41 | GST_VULKAN_BARRIER_TYPE_MEMORY = 1, |
| 42 | GST_VULKAN_BARRIER_TYPE_BUFFER = 2, |
| 43 | GST_VULKAN_BARRIER_TYPE_IMAGE = 3, |
| 44 | } GstVulkanBarrierType; |
| 45 | |
| 46 | /** |
| 47 | * GstVulkanBarrierFlags: |
| 48 | * @GST_VULKAN_BARRIER_FLAGS_NONE: no flags |
| 49 | * |
| 50 | * Since: 1.18 |
| 51 | */ |
| 52 | typedef enum |
| 53 | { |
| 54 | GST_VULKAN_BARRIER_FLAG_NONE = 0, |
| 55 | } GstVulkanBarrierFlags; |
| 56 | |
| 57 | /** |
| 58 | * GstVulkanBarrierMemoryInfo: |
| 59 | * @type: the #GstVulkanBarrierType of the barrier |
| 60 | * @flags the #GstVulkanBarrierFlags of the barrier |
| 61 | * @queue: the #GstVulkanQueue this barrier is to execute with |
| 62 | * @pipeline_stages: the stages in the graphics pipeline to execute the barrier |
| 63 | * @access_flags: access flags |
| 64 | * @semaphore: timeline semaphore |
| 65 | * @semaphore_value: current value of the timeline semaphore |
| 66 | * |
| 67 | * Since: 1.18 |
| 68 | */ |
| 69 | struct _GstVulkanBarrierMemoryInfo |
| 70 | { |
| 71 | GstVulkanBarrierType type; |
| 72 | GstVulkanBarrierFlags flags; |
| 73 | GstVulkanQueue * queue; |
| 74 | guint64 pipeline_stages; |
| 75 | guint64 access_flags; |
| 76 | |
| 77 | /** |
| 78 | * GstVulkanBarrierMemoryInfo.semaphore: |
| 79 | * |
| 80 | * Timeline semaphore |
| 81 | * |
| 82 | * Since: 1.24 |
| 83 | */ |
| 84 | VkSemaphore semaphore; |
| 85 | /** |
| 86 | * GstVulkanBarrierMemoryInfo.semaphore_value: |
| 87 | * |
| 88 | * Current value of the timeline semaphore |
| 89 | * |
| 90 | * Since: 1.24 |
| 91 | */ |
| 92 | guint64 semaphore_value; |
| 93 | |
| 94 | /* <private> */ |
| 95 | gpointer _reserved [GST_PADDING]; |
| 96 | }; |
| 97 | |
| 98 | G_END_DECLS |
| 99 | |
| 100 | #endif /* __GST_VULKAN_BARRIER_H__ */ |