using System.Runtime.Versioning; namespace Brutal.VulkanApi.Win32 { /// /// VkWin32KeyedMutexAcquireReleaseInfoKHR - Use the Windows keyed mutex mechanism to synchronize work /// /// /// /// When submitting work that operates on memory imported from a Direct3D 11 /// resource to a queue, the keyed mutex mechanism may: be used in addition to /// Vulkan semaphores to synchronize the work. /// Keyed mutexes are a property of a properly created shareable Direct3D 11 /// resource. /// They can only be used if the imported resource was created with the /// etext:D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX flag. /// /// /// To acquire keyed mutexes before submitted work and/or release them after, /// add a VkWin32KeyedMutexAcquireReleaseInfoKHR structure to the /// pNext chain of the VkSubmitInfo structure. /// /// /// The VkWin32KeyedMutexAcquireReleaseInfoKHR structure is defined as: /// /// /// // Provided by VK_KHR_win32_keyed_mutex /// typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR { /// VkStructureType sType; /// const void* pNext; /// uint32_t acquireCount; /// const VkDeviceMemory* pAcquireSyncs; /// const uint64_t* pAcquireKeys; /// const uint32_t* pAcquireTimeouts; /// uint32_t releaseCount; /// const VkDeviceMemory* pReleaseSyncs; /// const uint64_t* pReleaseKeys; /// } VkWin32KeyedMutexAcquireReleaseInfoKHR; /// /// [StructLayout(LayoutKind.Explicit, Size = 72)] [SupportedOSPlatform("windows")] public unsafe partial struct VkWin32KeyedMutexAcquireReleaseInfoKHR() { /// /// sType is a VkStructureType value identifying this structure. /// [FieldOffset(0)] internal readonly VkStructureType sType = VkStructureType.Win32KeyedMutexAcquireReleaseInfoKHR; /// /// Next is `NULL` or a pointer to a structure extending this structure. /// [FieldOffset(8)] public void* Next; /// /// AcquireCount is the number of entries in the pAcquireSyncs, pAcquireKeys, and pAcquireTimeouts arrays. /// [FieldOffset(16)] public int AcquireCount; /// /// AcquireSyncs is a pointer to an array of VkDeviceMemory objects which were imported from Direct3D 11 resources. /// [FieldOffset(24)] public VkDeviceMemory* AcquireSyncs; /// /// AcquireKeys is a pointer to an array of mutex key values to wait for prior to beginning the submitted work. Entries refer to the keyed mutex associated with the corresponding entries in pAcquireSyncs. /// [FieldOffset(32)] public nint* AcquireKeys; /// /// AcquireTimeouts is a pointer to an array of timeout values, in millisecond units, for each acquire specified in pAcquireKeys. /// [FieldOffset(40)] public int* AcquireTimeouts; /// /// ReleaseCount is the number of entries in the pReleaseSyncs and pReleaseKeys arrays. /// [FieldOffset(48)] public int ReleaseCount; /// /// ReleaseSyncs is a pointer to an array of VkDeviceMemory objects which were imported from Direct3D 11 resources. /// [FieldOffset(56)] public VkDeviceMemory* ReleaseSyncs; /// /// ReleaseKeys is a pointer to an array of mutex key values to set when the submitted work has completed. Entries refer to the keyed mutex associated with the corresponding entries in pReleaseSyncs. /// [FieldOffset(64)] public nint* ReleaseKeys; } }