You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: amf/public/include/core/VulkanAMF.h
+17-2Lines changed: 17 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,12 @@
41
41
namespaceamf
42
42
{
43
43
#endif
44
+
typedefenum AMF_VULKAN_EXTENSION_TYPE
45
+
{
46
+
AMF_VULKAN_EXTENSION_UNKNOWN = 0,
47
+
AMF_VARIANT_TIMELINE_SEMAPHORE = 1,
48
+
} AMF_VULKAN_EXTENSION_TYPE;
49
+
44
50
typedefstructAMFVulkanDevice
45
51
{
46
52
amf_size cbSizeof; // sizeof(AMFVulkanDevice)
@@ -55,11 +61,19 @@ namespace amf
55
61
amf_size cbSizeof; // sizeof(AMFVulkanSync)
56
62
void* pNext; // reserved for extensions
57
63
VkSemaphore hSemaphore; // VkSemaphore; can be nullptr
58
-
amf_bool bSubmitted; // if true - wait for hSemaphore. re-submit hSemaphore if not synced by other ways and set to true
64
+
amf_bool bSubmitted; // if true - wait for hSemaphore. re-submit hSemaphore if not synced by other ways and set to true, ignored if timeline
59
65
VkFence hFence; // To sync on CPU; can be nullptr. Submitted in vkQueueSubmit. If waited for hFence, null it, do not delete or reset.
60
66
} AMFVulkanSync;
61
67
62
-
typedefstructAMFVulkanBuffer
68
+
typedefstructAMFVulkanTimeline// can be attached to AMFVulkanSync::pNext
69
+
{
70
+
amf_size cbSizeof; // sizeof(AMFVulkanTimeline)
71
+
AMF_VULKAN_EXTENSION_TYPE eExtensionType;// identifies extensions to make extension chains in the future AMF_VARIANT_TIMELINE_SEMAPHORE
72
+
void* pNext; // reserved for extensions
73
+
amf_uint64 uiCount; // count for timeline semaphores
74
+
} AMFVulkanTimeline;
75
+
76
+
typedefstructAMFVulkanBuffer
63
77
{
64
78
amf_size cbSizeof; // sizeof(AMFVulkanBuffer)
65
79
void* pNext; // reserved for extensions
@@ -112,6 +126,7 @@ namespace amf
112
126
} AMFVulkanView;
113
127
114
128
#defineAMF_CONTEXT_VULKAN_COMPUTE_QUEUEL"VulkanComputeQueue"// amf_int64; default=0; Compute queue index in range [0, (VkQueueFamilyProperties.queueCount-1)] of the compute queue family.
129
+
#defineAMF_CONTEXT_VULKAN_USE_TIMELINE_SEMAPHORESL"VulkanTimelineSemaphores"// amf_bool; default=false; Use timeline semaphores in Vulkan
0 commit comments