namespace Brutal.VulkanApi { public static unsafe partial class VkDeviceExtensions { /// /// vkGetDeviceProcAddr - Return a function pointer for a command /// /// /// /// In order to support systems with multiple Vulkan implementations, the /// function pointers returned by vkGetInstanceProcAddr may: point to /// dispatch code that calls a different real implementation for different /// VkDevice objects or their child objects. /// The overhead of the internal dispatch for VkDevice objects can be /// avoided by obtaining device-specific function pointers for any commands that /// use a device or device-child object as their dispatchable object. /// Such function pointers can be obtained by calling: /// /// /// // Provided by VK_VERSION_1_0 /// PFN_vkVoidFunction vkGetDeviceProcAddr( /// VkDevice device, /// const char* pName); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe PfnVkVoidFunction GetProcAddr( this VulkanHandleWrapper handle, scoped ReadOnlySpan pName ) { fixed (byte* pNameFixed = pName) { return handle.PInvoke.vkGetDeviceProcAddr.Invoke(handle.Handle, pNameFixed); } } /// /// vkDestroyDevice - Destroy a logical device /// /// /// /// To destroy a device, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroyDevice( /// VkDevice device, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe void DestroyDeviceInternal( this VulkanHandleWrapper handle, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyDevice.Invoke(handle.Handle, pAllocator); } /// /// vkGetDeviceQueue - Get a queue handle from a device /// /// /// /// To retrieve a handle to a VkQueue object, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkGetDeviceQueue( /// VkDevice device, /// uint32_t queueFamilyIndex, /// uint32_t queueIndex, /// VkQueue* pQueue); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe VkQueue GetQueueInternal( this VulkanHandleWrapper handle, int queueFamilyIndex, int queueIndex ) { VkQueue pQueueLocal = default; handle.PInvoke.vkGetDeviceQueue.Invoke(handle.Handle, queueFamilyIndex, queueIndex, &pQueueLocal); return pQueueLocal; } /// /// vkQueueSubmit - Submits a sequence of semaphores or command buffers to a queue /// /// /// /// :refpage: vkQueueSubmit /// /// /// To submit command buffers to a queue, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkQueueSubmit( /// VkQueue queue, /// uint32_t submitCount, /// const VkSubmitInfo* pSubmits, /// VkFence fence); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe void SubmitInternal( this VulkanHandleWrapper handle, scoped ReadOnlySpan pSubmits, VkFence fence ) { fixed (VkSubmitInfo* pSubmitsFixed = pSubmits) { VkResult result = handle.PInvoke.vkQueueSubmit.Invoke( handle.Handle, pSubmits.Length, pSubmitsFixed, fence ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkQueueSubmit failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkQueueSubmit failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkQueueSubmit failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkQueueSubmit failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkQueueSubmit failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkQueueWaitIdle - Wait for a queue to become idle /// /// /// /// :refpage: vkQueueWaitIdle /// /// /// To wait on the host for the completion of outstanding queue operations for a /// given queue, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkQueueWaitIdle( /// VkQueue queue); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void WaitIdleInternal(this VulkanHandleWrapper handle) { VkResult result = handle.PInvoke.vkQueueWaitIdle.Invoke(handle.Handle); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkQueueWaitIdle failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkQueueWaitIdle failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkQueueWaitIdle failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkQueueWaitIdle failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkQueueWaitIdle failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkDeviceWaitIdle - Wait for a device to become idle /// /// /// /// :refpage: vkDeviceWaitIdle /// /// /// To wait on the host for the completion of outstanding queue operations for /// all queues on a given logical device, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkDeviceWaitIdle( /// VkDevice device); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WaitIdle(this VulkanHandleWrapper handle) { VkResult result = handle.PInvoke.vkDeviceWaitIdle.Invoke(handle.Handle); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkDeviceWaitIdle failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkDeviceWaitIdle failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkDeviceWaitIdle failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkDeviceWaitIdle failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkDeviceWaitIdle failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkAllocateMemory - Allocate device memory /// /// /// /// :refpage: vkAllocateMemory /// :objectnameplural: device memory objects /// :objectnamecamelcase: deviceMemory /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To allocate memory objects, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkAllocateMemory( /// VkDevice device, /// const VkMemoryAllocateInfo* pAllocateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkDeviceMemory* pMemory); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkDeviceMemory AllocateMemory( this VulkanHandleWrapper handle, in VkMemoryAllocateInfo pAllocateInfo, VkAllocator? pAllocator ) { fixed (VkMemoryAllocateInfo* pAllocateInfoFixed = &pAllocateInfo) { VkDeviceMemory pMemoryLocal = default; VkResult result = handle.PInvoke.vkAllocateMemory.Invoke( handle.Handle, pAllocateInfoFixed, pAllocator, &pMemoryLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkAllocateMemory failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkAllocateMemory failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorInvalidExternalHandle: throw new VkResultError( VkResult.ErrorInvalidExternalHandle, "Vulkan call to vkAllocateMemory failed with error: VK_ERROR_INVALID_EXTERNAL_HANDLE" ); case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: throw new VkResultError( VkResult.ErrorInvalidOpaqueCaptureAddressKHR, "Vulkan call to vkAllocateMemory failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkAllocateMemory failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkAllocateMemory failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pMemoryLocal; } } /// /// vkFreeMemory - Free device memory /// /// /// /// To free a memory object, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkFreeMemory( /// VkDevice device, /// VkDeviceMemory memory, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void FreeMemory( this VulkanHandleWrapper handle, VkDeviceMemory memory, VkAllocator? pAllocator ) { handle.PInvoke.vkFreeMemory.Invoke(handle.Handle, memory, pAllocator); } /// /// vkMapMemory - Map a memory object into application address space /// /// /// /// :refpage: vkMapMemory /// /// /// To retrieve a host virtual address pointer to a region of a mappable memory /// object, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkMapMemory( /// VkDevice device, /// VkDeviceMemory memory, /// VkDeviceSize offset, /// VkDeviceSize size, /// VkMemoryMapFlags flags, /// void** ppData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe void* MapMemory( this VulkanHandleWrapper handle, VkDeviceMemory memory, ByteSize64 offset, ByteSize64 size, VkMemoryMapFlags flags ) { void* ppDataLocal = default; VkResult result = handle.PInvoke.vkMapMemory.Invoke( handle.Handle, memory, offset, size, flags, &ppDataLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkMapMemory failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkMapMemory failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorMemoryMapFailed: throw new VkResultError( VkResult.ErrorMemoryMapFailed, "Vulkan call to vkMapMemory failed with error: VK_ERROR_MEMORY_MAP_FAILED" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkMapMemory failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkMapMemory failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return ppDataLocal; } /// /// vkUnmapMemory - Unmap a previously mapped memory object /// /// /// /// To unmap a memory object once host access to it is no longer needed by the /// application, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkUnmapMemory( /// VkDevice device, /// VkDeviceMemory memory); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void UnmapMemory( this VulkanHandleWrapper handle, VkDeviceMemory memory ) { handle.PInvoke.vkUnmapMemory.Invoke(handle.Handle, memory); } /// /// vkFlushMappedMemoryRanges - Flush mapped memory ranges /// /// /// /// :refpage: vkFlushMappedMemoryRanges /// /// /// To flush ranges of non-coherent memory from the host caches, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkFlushMappedMemoryRanges( /// VkDevice device, /// uint32_t memoryRangeCount, /// const VkMappedMemoryRange* pMemoryRanges); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void FlushMappedMemoryRanges( this VulkanHandleWrapper handle, scoped ReadOnlySpan pMemoryRanges ) { fixed (VkMappedMemoryRange* pMemoryRangesFixed = pMemoryRanges) { VkResult result = handle.PInvoke.vkFlushMappedMemoryRanges.Invoke( handle.Handle, pMemoryRanges.Length, pMemoryRangesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkFlushMappedMemoryRanges failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkFlushMappedMemoryRanges failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkFlushMappedMemoryRanges failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkFlushMappedMemoryRanges failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkInvalidateMappedMemoryRanges - Invalidate ranges of mapped memory objects /// /// /// /// :refpage: vkInvalidateMappedMemoryRanges /// /// /// To invalidate ranges of non-coherent memory from the host caches, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkInvalidateMappedMemoryRanges( /// VkDevice device, /// uint32_t memoryRangeCount, /// const VkMappedMemoryRange* pMemoryRanges); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void InvalidateMappedMemoryRanges( this VulkanHandleWrapper handle, scoped ReadOnlySpan pMemoryRanges ) { fixed (VkMappedMemoryRange* pMemoryRangesFixed = pMemoryRanges) { VkResult result = handle.PInvoke.vkInvalidateMappedMemoryRanges.Invoke( handle.Handle, pMemoryRanges.Length, pMemoryRangesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkInvalidateMappedMemoryRanges failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkInvalidateMappedMemoryRanges failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkInvalidateMappedMemoryRanges failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkInvalidateMappedMemoryRanges failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkGetDeviceMemoryCommitment - Query the current commitment for a VkDeviceMemory /// /// /// /// To determine the amount of lazily-allocated memory that is currently /// committed for a memory object, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkGetDeviceMemoryCommitment( /// VkDevice device, /// VkDeviceMemory memory, /// VkDeviceSize* pCommittedMemoryInBytes); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe ByteSize64 GetMemoryCommitment( this VulkanHandleWrapper handle, VkDeviceMemory memory ) { ByteSize64 pCommittedMemoryInBytesLocal = default; handle.PInvoke.vkGetDeviceMemoryCommitment.Invoke(handle.Handle, memory, &pCommittedMemoryInBytesLocal); return pCommittedMemoryInBytesLocal; } /// /// vkBindBufferMemory - Bind device memory to a buffer object /// /// /// /// :refpage: vkBindBufferMemory /// /// /// To attach memory to a buffer object, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkBindBufferMemory( /// VkDevice device, /// VkBuffer buffer, /// VkDeviceMemory memory, /// VkDeviceSize memoryOffset); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void BindBufferMemory( this VulkanHandleWrapper handle, VkBuffer buffer, VkDeviceMemory memory, ByteSize64 memoryOffset ) { VkResult result = handle.PInvoke.vkBindBufferMemory.Invoke(handle.Handle, buffer, memory, memoryOffset); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkBindBufferMemory failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkBindBufferMemory failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: throw new VkResultError( VkResult.ErrorInvalidOpaqueCaptureAddressKHR, "Vulkan call to vkBindBufferMemory failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkBindBufferMemory failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkBindBufferMemory failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkBindImageMemory - Bind device memory to an image object /// /// /// /// :refpage: vkBindImageMemory /// /// /// To attach memory to an image object, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkBindImageMemory( /// VkDevice device, /// VkImage image, /// VkDeviceMemory memory, /// VkDeviceSize memoryOffset); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void BindImageMemory( this VulkanHandleWrapper handle, VkImage image, VkDeviceMemory memory, ByteSize64 memoryOffset ) { VkResult result = handle.PInvoke.vkBindImageMemory.Invoke(handle.Handle, image, memory, memoryOffset); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkBindImageMemory failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkBindImageMemory failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkBindImageMemory failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkBindImageMemory failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkGetBufferMemoryRequirements - Returns the memory requirements for specified Vulkan object /// /// /// /// To determine the memory requirements for a buffer resource, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkGetBufferMemoryRequirements( /// VkDevice device, /// VkBuffer buffer, /// VkMemoryRequirements* pMemoryRequirements); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetBufferMemoryRequirements( this VulkanHandleWrapper handle, VkBuffer buffer, ref VkMemoryRequirements pMemoryRequirements ) { fixed (VkMemoryRequirements* pMemoryRequirementsFixed = &pMemoryRequirements) { handle.PInvoke.vkGetBufferMemoryRequirements.Invoke(handle.Handle, buffer, pMemoryRequirementsFixed); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryRequirements. public static VkMemoryRequirements GetBufferMemoryRequirements( this VulkanHandleWrapper handle, VkBuffer buffer ) { VkMemoryRequirements outValue = new(); GetBufferMemoryRequirements(handle, buffer, ref outValue); return outValue; } /// /// vkGetImageMemoryRequirements - Returns the memory requirements for specified Vulkan object /// /// /// /// To determine the memory requirements for an image resource, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkGetImageMemoryRequirements( /// VkDevice device, /// VkImage image, /// VkMemoryRequirements* pMemoryRequirements); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetImageMemoryRequirements( this VulkanHandleWrapper handle, VkImage image, ref VkMemoryRequirements pMemoryRequirements ) { fixed (VkMemoryRequirements* pMemoryRequirementsFixed = &pMemoryRequirements) { handle.PInvoke.vkGetImageMemoryRequirements.Invoke(handle.Handle, image, pMemoryRequirementsFixed); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryRequirements. public static VkMemoryRequirements GetImageMemoryRequirements( this VulkanHandleWrapper handle, VkImage image ) { VkMemoryRequirements outValue = new(); GetImageMemoryRequirements(handle, image, ref outValue); return outValue; } /// /// vkGetImageSparseMemoryRequirements - Query the memory requirements for a sparse image /// /// /// /// To query sparse memory requirements for an image, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkGetImageSparseMemoryRequirements( /// VkDevice device, /// VkImage image, /// uint32_t* pSparseMemoryRequirementCount, /// VkSparseImageMemoryRequirements* pSparseMemoryRequirements); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe void GetImageSparseMemoryRequirements( this VulkanHandleWrapper handle, VkImage image, ref int pSparseMemoryRequirementCount, scoped ReadOnlySpan pSparseMemoryRequirements ) { fixed (VkSparseImageMemoryRequirements* pSparseMemoryRequirementsFixed = pSparseMemoryRequirements) fixed (int* pSparseMemoryRequirementCountFixed = &pSparseMemoryRequirementCount) { handle.PInvoke.vkGetImageSparseMemoryRequirements.Invoke( handle.Handle, image, pSparseMemoryRequirementCountFixed, pSparseMemoryRequirementsFixed ); } } /// Queries the required length. /// The required length. public static int GetImageSparseMemoryRequirements_Count( this VulkanHandleWrapper handle, VkImage image ) { int pSparseMemoryRequirementCount = default; GetImageSparseMemoryRequirements(handle, image, ref pSparseMemoryRequirementCount, null); return pSparseMemoryRequirementCount; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static void GetImageSparseMemoryRequirements_Write( this VulkanHandleWrapper handle, VkImage image, scoped ReadOnlySpan pSparseMemoryRequirements ) { int pSparseMemoryRequirementCount = pSparseMemoryRequirements.Length; GetImageSparseMemoryRequirements( handle, image, ref pSparseMemoryRequirementCount, pSparseMemoryRequirements ); } /// /// vkQueueBindSparse - Bind device memory to a sparse resource object /// /// /// /// To submit sparse binding operations to a queue, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkQueueBindSparse( /// VkQueue queue, /// uint32_t bindInfoCount, /// const VkBindSparseInfo* pBindInfo, /// VkFence fence); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe void BindSparseInternal( this VulkanHandleWrapper handle, scoped ReadOnlySpan pBindInfo, VkFence fence ) { fixed (VkBindSparseInfo* pBindInfoFixed = pBindInfo) { VkResult result = handle.PInvoke.vkQueueBindSparse.Invoke( handle.Handle, pBindInfo.Length, pBindInfoFixed, fence ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkQueueBindSparse failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkQueueBindSparse failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkQueueBindSparse failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkQueueBindSparse failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkQueueBindSparse failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCreateFence - Create a new fence object /// /// /// /// :refpage: vkCreateFence /// :objectnameplural: fences /// :objectnamecamelcase: fence /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create a fence, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreateFence( /// VkDevice device, /// const VkFenceCreateInfo* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkFence* pFence); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkFence CreateFence( this VulkanHandleWrapper handle, in VkFenceCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkFenceCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkFence pFenceLocal = default; VkResult result = handle.PInvoke.vkCreateFence.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pFenceLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateFence failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateFence failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateFence failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateFence failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pFenceLocal; } } /// /// vkDestroyFence - Destroy a fence object /// /// /// /// To destroy a fence, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroyFence( /// VkDevice device, /// VkFence fence, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyFence( this VulkanHandleWrapper handle, VkFence fence, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyFence.Invoke(handle.Handle, fence, pAllocator); } /// /// vkResetFences - Resets one or more fence objects /// /// /// /// To set the state of fences to unsignaled from the host, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkResetFences( /// VkDevice device, /// uint32_t fenceCount, /// const VkFence* pFences); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void ResetFences( this VulkanHandleWrapper handle, scoped ReadOnlySpan pFences ) { fixed (VkFence* pFencesFixed = pFences) { VkResult result = handle.PInvoke.vkResetFences.Invoke(handle.Handle, pFences.Length, pFencesFixed); switch (result) { case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkResetFences failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkResetFences failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkResetFences failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkGetFenceStatus - Return the status of a fence /// /// /// /// :refpage: vkGetFenceStatus /// /// /// To query the status of a fence from the host, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkGetFenceStatus( /// VkDevice device, /// VkFence fence); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static VkResult GetFenceStatus( this VulkanHandleWrapper handle, VkFence fence ) { VkResult result = handle.PInvoke.vkGetFenceStatus.Invoke(handle.Handle, fence); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetFenceStatus failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetFenceStatus failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkGetFenceStatus failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetFenceStatus failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetFenceStatus failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.NotReady: default: break; } return result; } /// /// vkWaitForFences - Wait for one or more fences to become signaled /// /// /// /// :refpage: vkWaitForFences /// /// /// To wait for one or more fences to enter the signaled state on the host, /// call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkWaitForFences( /// VkDevice device, /// uint32_t fenceCount, /// const VkFence* pFences, /// VkBool32 waitAll, /// uint64_t timeout); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult WaitForFences( this VulkanHandleWrapper handle, scoped ReadOnlySpan pFences, Brutal.Bool32 waitAll, nint timeout ) { fixed (VkFence* pFencesFixed = pFences) { VkResult result = handle.PInvoke.vkWaitForFences.Invoke( handle.Handle, pFences.Length, pFencesFixed, waitAll, timeout ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkWaitForFences failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkWaitForFences failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkWaitForFences failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkWaitForFences failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkWaitForFences failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Timeout: default: break; } return result; } } /// /// vkCreateSemaphore - Create a new queue semaphore object /// /// /// /// :refpage: vkCreateSemaphore /// :objectnameplural: semaphores /// :objectnamecamelcase: semaphore /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create a semaphore, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreateSemaphore( /// VkDevice device, /// const VkSemaphoreCreateInfo* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkSemaphore* pSemaphore); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkSemaphore CreateSemaphore( this VulkanHandleWrapper handle, in VkSemaphoreCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkSemaphoreCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkSemaphore pSemaphoreLocal = default; VkResult result = handle.PInvoke.vkCreateSemaphore.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pSemaphoreLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateSemaphore failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateSemaphore failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateSemaphore failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateSemaphore failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pSemaphoreLocal; } } /// /// vkDestroySemaphore - Destroy a semaphore object /// /// /// /// To destroy a semaphore, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroySemaphore( /// VkDevice device, /// VkSemaphore semaphore, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroySemaphore( this VulkanHandleWrapper handle, VkSemaphore semaphore, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroySemaphore.Invoke(handle.Handle, semaphore, pAllocator); } /// /// vkCreateQueryPool - Create a new query pool object /// /// /// /// :refpage: vkCreateQueryPool /// :objectnameplural: query pools /// :objectnamecamelcase: queryPool /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create a query pool, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreateQueryPool( /// VkDevice device, /// const VkQueryPoolCreateInfo* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkQueryPool* pQueryPool); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkQueryPool CreateQueryPool( this VulkanHandleWrapper handle, in VkQueryPoolCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkQueryPoolCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkQueryPool pQueryPoolLocal = default; VkResult result = handle.PInvoke.vkCreateQueryPool.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pQueryPoolLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateQueryPool failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateQueryPool failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateQueryPool failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateQueryPool failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pQueryPoolLocal; } } /// /// vkDestroyQueryPool - Destroy a query pool object /// /// /// /// To destroy a query pool, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroyQueryPool( /// VkDevice device, /// VkQueryPool queryPool, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyQueryPool( this VulkanHandleWrapper handle, VkQueryPool queryPool, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyQueryPool.Invoke(handle.Handle, queryPool, pAllocator); } /// /// vkGetQueryPoolResults - Copy results of queries in a query pool to a host memory region /// /// /// /// :refpage: vkGetQueryPoolResults /// /// /// To retrieve status and results for a set of queries, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkGetQueryPoolResults( /// VkDevice device, /// VkQueryPool queryPool, /// uint32_t firstQuery, /// uint32_t queryCount, /// size_t dataSize, /// void* pData, /// VkDeviceSize stride, /// VkQueryResultFlags flags); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult GetQueryPoolResults( this VulkanHandleWrapper handle, VkQueryPool queryPool, int firstQuery, int queryCount, scoped ReadOnlySpan pData, ByteSize64 stride, VkQueryResultFlags flags ) { fixed (byte* pDataFixed = pData) { VkResult result = handle.PInvoke.vkGetQueryPoolResults.Invoke( handle.Handle, queryPool, firstQuery, queryCount, (nuint)pData.Length, pDataFixed, stride, flags ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetQueryPoolResults failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetQueryPoolResults failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkGetQueryPoolResults failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetQueryPoolResults failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetQueryPoolResults failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.NotReady: default: break; } return result; } } /// /// vkCreateBuffer - Create a new buffer object /// /// /// /// :refpage: vkCreateBuffer /// :objectnameplural: buffers /// :objectnamecamelcase: buffer /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create buffers, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreateBuffer( /// VkDevice device, /// const VkBufferCreateInfo* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkBuffer* pBuffer); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkBuffer CreateBuffer( this VulkanHandleWrapper handle, in VkBufferCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkBufferCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkBuffer pBufferLocal = default; VkResult result = handle.PInvoke.vkCreateBuffer.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pBufferLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateBuffer failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateBuffer failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: throw new VkResultError( VkResult.ErrorInvalidOpaqueCaptureAddressKHR, "Vulkan call to vkCreateBuffer failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateBuffer failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateBuffer failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pBufferLocal; } } /// /// vkDestroyBuffer - Destroy a buffer object /// /// /// /// To destroy a buffer, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroyBuffer( /// VkDevice device, /// VkBuffer buffer, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyBuffer( this VulkanHandleWrapper handle, VkBuffer buffer, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyBuffer.Invoke(handle.Handle, buffer, pAllocator); } /// /// vkCreateImage - Create a new image object /// /// /// /// :refpage: vkCreateImage /// :objectnameplural: images /// :objectnamecamelcase: image /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create images, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreateImage( /// VkDevice device, /// const VkImageCreateInfo* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkImage* pImage); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkImage CreateImage( this VulkanHandleWrapper handle, in VkImageCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkImageCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkImage pImageLocal = default; VkResult result = handle.PInvoke.vkCreateImage.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pImageLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateImage failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateImage failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorCompressionExhaustedEXT: throw new VkResultError( VkResult.ErrorCompressionExhaustedEXT, "Vulkan call to vkCreateImage failed with error: VK_ERROR_COMPRESSION_EXHAUSTED_EXT" ); case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: throw new VkResultError( VkResult.ErrorInvalidOpaqueCaptureAddressKHR, "Vulkan call to vkCreateImage failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateImage failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateImage failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pImageLocal; } } /// /// vkDestroyImage - Destroy an image object /// /// /// /// To destroy an image, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroyImage( /// VkDevice device, /// VkImage image, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyImage( this VulkanHandleWrapper handle, VkImage image, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyImage.Invoke(handle.Handle, image, pAllocator); } /// /// vkGetImageSubresourceLayout - Retrieve information about an image subresource /// /// /// /// :refpage: vkGetImageSubresourceLayout /// /// /// To query the memory layout of an image subresource, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkGetImageSubresourceLayout( /// VkDevice device, /// VkImage image, /// const VkImageSubresource* pSubresource, /// VkSubresourceLayout* pLayout); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetImageSubresourceLayout( this VulkanHandleWrapper handle, VkImage image, VkImageSubresource* pSubresource, ref VkSubresourceLayout pLayout ) { fixed (VkSubresourceLayout* pLayoutFixed = &pLayout) { handle.PInvoke.vkGetImageSubresourceLayout.Invoke(handle.Handle, image, pSubresource, pLayoutFixed); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkSubresourceLayout. public static unsafe VkSubresourceLayout GetImageSubresourceLayout( this VulkanHandleWrapper handle, VkImage image, VkImageSubresource* pSubresource ) { VkSubresourceLayout outValue = new(); GetImageSubresourceLayout(handle, image, pSubresource, ref outValue); return outValue; } /// /// vkCreateImageView - Create an image view from an existing image /// /// /// /// :refpage: vkCreateImageView /// :objectnameplural: image views /// :objectnamecamelcase: imageView /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create an image view, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreateImageView( /// VkDevice device, /// const VkImageViewCreateInfo* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkImageView* pView); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkImageView CreateImageView( this VulkanHandleWrapper handle, in VkImageViewCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkImageViewCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkImageView pViewLocal = default; VkResult result = handle.PInvoke.vkCreateImageView.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pViewLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateImageView failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateImageView failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: throw new VkResultError( VkResult.ErrorInvalidOpaqueCaptureAddressKHR, "Vulkan call to vkCreateImageView failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateImageView failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateImageView failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pViewLocal; } } /// /// vkDestroyImageView - Destroy an image view object /// /// /// /// To destroy an image view, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroyImageView( /// VkDevice device, /// VkImageView imageView, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyImageView( this VulkanHandleWrapper handle, VkImageView imageView, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyImageView.Invoke(handle.Handle, imageView, pAllocator); } /// /// vkCreateCommandPool - Create a new command pool object /// /// /// /// :refpage: vkCreateCommandPool /// :objectnameplural: command pools /// :objectnamecamelcase: commandPool /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create a command pool, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreateCommandPool( /// VkDevice device, /// const VkCommandPoolCreateInfo* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkCommandPool* pCommandPool); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkCommandPool CreateCommandPool( this VulkanHandleWrapper handle, in VkCommandPoolCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkCommandPoolCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkCommandPool pCommandPoolLocal = default; VkResult result = handle.PInvoke.vkCreateCommandPool.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pCommandPoolLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateCommandPool failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateCommandPool failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateCommandPool failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateCommandPool failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pCommandPoolLocal; } } /// /// vkDestroyCommandPool - Destroy a command pool object /// /// /// /// To destroy a command pool, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroyCommandPool( /// VkDevice device, /// VkCommandPool commandPool, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyCommandPool( this VulkanHandleWrapper handle, VkCommandPool commandPool, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyCommandPool.Invoke(handle.Handle, commandPool, pAllocator); } /// /// vkResetCommandPool - Reset a command pool /// /// /// /// To reset a command pool, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkResetCommandPool( /// VkDevice device, /// VkCommandPool commandPool, /// VkCommandPoolResetFlags flags); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ResetCommandPool( this VulkanHandleWrapper handle, VkCommandPool commandPool, VkCommandPoolResetFlags flags ) { VkResult result = handle.PInvoke.vkResetCommandPool.Invoke(handle.Handle, commandPool, flags); switch (result) { case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkResetCommandPool failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkResetCommandPool failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkResetCommandPool failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkAllocateCommandBuffers - Allocate command buffers from an existing command pool /// /// /// /// :refpage: vkAllocateCommandBuffers /// /// /// To allocate command buffers, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkAllocateCommandBuffers( /// VkDevice device, /// const VkCommandBufferAllocateInfo* pAllocateInfo, /// VkCommandBuffer* pCommandBuffers); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe void AllocateCommandBuffersInternal( this VulkanHandleWrapper handle, in VkCommandBufferAllocateInfo pAllocateInfo, scoped ReadOnlySpan pCommandBuffers ) { fixed (VkCommandBuffer* pCommandBuffersFixed = pCommandBuffers) fixed (VkCommandBufferAllocateInfo* pAllocateInfoFixed = &pAllocateInfo) { VkResult result = handle.PInvoke.vkAllocateCommandBuffers.Invoke( handle.Handle, pAllocateInfoFixed, pCommandBuffersFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkAllocateCommandBuffers failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkAllocateCommandBuffers failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkAllocateCommandBuffers failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkAllocateCommandBuffers failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkFreeCommandBuffers - Free command buffers /// /// /// /// To free command buffers, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkFreeCommandBuffers( /// VkDevice device, /// VkCommandPool commandPool, /// uint32_t commandBufferCount, /// const VkCommandBuffer* pCommandBuffers); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe void FreeCommandBuffersInternal( this VulkanHandleWrapper handle, VkCommandPool commandPool, scoped ReadOnlySpan pCommandBuffers ) { fixed (VkCommandBuffer* pCommandBuffersFixed = pCommandBuffers) { handle.PInvoke.vkFreeCommandBuffers.Invoke( handle.Handle, commandPool, pCommandBuffers.Length, pCommandBuffersFixed ); } } /// /// vkBeginCommandBuffer - Start recording a command buffer /// /// /// /// :refpage: vkBeginCommandBuffer /// /// /// To begin recording a command buffer, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkBeginCommandBuffer( /// VkCommandBuffer commandBuffer, /// const VkCommandBufferBeginInfo* pBeginInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void Begin(this T handle, in VkCommandBufferBeginInfo pBeginInfo) where T : VulkanHandleWrapper { fixed (VkCommandBufferBeginInfo* pBeginInfoFixed = &pBeginInfo) { VkResult result = handle.PInvoke.vkBeginCommandBuffer.Invoke(handle.Handle, pBeginInfoFixed); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkBeginCommandBuffer failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkBeginCommandBuffer failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkBeginCommandBuffer failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkBeginCommandBuffer failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkEndCommandBuffer - Finish recording a command buffer /// /// /// /// :refpage: vkEndCommandBuffer /// /// /// To complete recording of a command buffer, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkEndCommandBuffer( /// VkCommandBuffer commandBuffer); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void End(this T handle) where T : VulkanHandleWrapper { VkResult result = handle.PInvoke.vkEndCommandBuffer.Invoke(handle.Handle); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkEndCommandBuffer failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkEndCommandBuffer failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorInvalidVideoStdParametersKHR: throw new VkResultError( VkResult.ErrorInvalidVideoStdParametersKHR, "Vulkan call to vkEndCommandBuffer failed with error: VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkEndCommandBuffer failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkEndCommandBuffer failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkResetCommandBuffer - Reset a command buffer to the initial state /// /// /// /// To reset a command buffer, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkResetCommandBuffer( /// VkCommandBuffer commandBuffer, /// VkCommandBufferResetFlags flags); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Reset(this T handle, VkCommandBufferResetFlags flags) where T : VulkanHandleWrapper { VkResult result = handle.PInvoke.vkResetCommandBuffer.Invoke(handle.Handle, flags); switch (result) { case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkResetCommandBuffer failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkResetCommandBuffer failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkResetCommandBuffer failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkCmdCopyBuffer - Copy data between buffer regions /// /// /// /// :refpage: vkCmdCopyBuffer /// /// /// To copy data between buffer objects, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdCopyBuffer( /// VkCommandBuffer commandBuffer, /// VkBuffer srcBuffer, /// VkBuffer dstBuffer, /// uint32_t regionCount, /// const VkBufferCopy* pRegions); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyBuffer( this T handle, VkBuffer srcBuffer, VkBuffer dstBuffer, scoped ReadOnlySpan pRegions ) where T : VulkanHandleWrapper { fixed (VkBufferCopy* pRegionsFixed = pRegions) { handle.PInvoke.vkCmdCopyBuffer.Invoke( handle.Handle, srcBuffer, dstBuffer, pRegions.Length, pRegionsFixed ); } } /// /// vkCmdCopyImage - Copy data between images /// /// /// /// :refpage: vkCmdCopyImage /// /// /// To copy data between image objects, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdCopyImage( /// VkCommandBuffer commandBuffer, /// VkImage srcImage, /// VkImageLayout srcImageLayout, /// VkImage dstImage, /// VkImageLayout dstImageLayout, /// uint32_t regionCount, /// const VkImageCopy* pRegions); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyImage( this T handle, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, scoped ReadOnlySpan pRegions ) where T : VulkanHandleWrapper { fixed (VkImageCopy* pRegionsFixed = pRegions) { handle.PInvoke.vkCmdCopyImage.Invoke( handle.Handle, srcImage, srcImageLayout, dstImage, dstImageLayout, pRegions.Length, pRegionsFixed ); } } /// /// vkCmdCopyBufferToImage - Copy data from a buffer into an image /// /// /// /// :refpage: vkCmdCopyBufferToImage /// /// /// To copy data from a buffer object to an image object, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdCopyBufferToImage( /// VkCommandBuffer commandBuffer, /// VkBuffer srcBuffer, /// VkImage dstImage, /// VkImageLayout dstImageLayout, /// uint32_t regionCount, /// const VkBufferImageCopy* pRegions); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyBufferToImage( this T handle, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, scoped ReadOnlySpan pRegions ) where T : VulkanHandleWrapper { fixed (VkBufferImageCopy* pRegionsFixed = pRegions) { handle.PInvoke.vkCmdCopyBufferToImage.Invoke( handle.Handle, srcBuffer, dstImage, dstImageLayout, pRegions.Length, pRegionsFixed ); } } /// /// vkCmdCopyImageToBuffer - Copy image data into a buffer /// /// /// /// :refpage: vkCmdCopyImageToBuffer /// /// /// To copy data from an image object to a buffer object, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdCopyImageToBuffer( /// VkCommandBuffer commandBuffer, /// VkImage srcImage, /// VkImageLayout srcImageLayout, /// VkBuffer dstBuffer, /// uint32_t regionCount, /// const VkBufferImageCopy* pRegions); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyImageToBuffer( this T handle, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, scoped ReadOnlySpan pRegions ) where T : VulkanHandleWrapper { fixed (VkBufferImageCopy* pRegionsFixed = pRegions) { handle.PInvoke.vkCmdCopyImageToBuffer.Invoke( handle.Handle, srcImage, srcImageLayout, dstBuffer, pRegions.Length, pRegionsFixed ); } } /// /// vkCmdUpdateBuffer - Update a buffer&apos;s contents from host memory /// /// /// /// To update buffer data inline in a command buffer, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdUpdateBuffer( /// VkCommandBuffer commandBuffer, /// VkBuffer dstBuffer, /// VkDeviceSize dstOffset, /// VkDeviceSize dataSize, /// const void* pData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void UpdateBuffer( this T handle, VkBuffer dstBuffer, ByteSize64 dstOffset, scoped ReadOnlySpan pData ) where T : VulkanHandleWrapper { fixed (byte* pDataFixed = pData) { handle.PInvoke.vkCmdUpdateBuffer.Invoke( handle.Handle, dstBuffer, dstOffset, (ByteSize64)pData.Length, pDataFixed ); } } /// /// vkCmdFillBuffer - Fill a region of a buffer with a fixed value /// /// /// /// To clear buffer data, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdFillBuffer( /// VkCommandBuffer commandBuffer, /// VkBuffer dstBuffer, /// VkDeviceSize dstOffset, /// VkDeviceSize size, /// uint32_t data); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void FillBuffer( this T handle, VkBuffer dstBuffer, ByteSize64 dstOffset, ByteSize64 size, int data ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdFillBuffer.Invoke(handle.Handle, dstBuffer, dstOffset, size, data); } /// /// vkCmdPipelineBarrier - Insert a memory dependency /// /// /// /// :refpage: vkCmdPipelineBarrier /// /// /// To record a pipeline barrier, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdPipelineBarrier( /// VkCommandBuffer commandBuffer, /// VkPipelineStageFlags srcStageMask, /// VkPipelineStageFlags dstStageMask, /// VkDependencyFlags dependencyFlags, /// uint32_t memoryBarrierCount, /// const VkMemoryBarrier* pMemoryBarriers, /// uint32_t bufferMemoryBarrierCount, /// const VkBufferMemoryBarrier* pBufferMemoryBarriers, /// uint32_t imageMemoryBarrierCount, /// const VkImageMemoryBarrier* pImageMemoryBarriers); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void PipelineBarrier( this T handle, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, scoped ReadOnlySpan pMemoryBarriers, scoped ReadOnlySpan pBufferMemoryBarriers, scoped ReadOnlySpan pImageMemoryBarriers ) where T : VulkanHandleWrapper { fixed (VkImageMemoryBarrier* pImageMemoryBarriersFixed = pImageMemoryBarriers) fixed (VkBufferMemoryBarrier* pBufferMemoryBarriersFixed = pBufferMemoryBarriers) fixed (VkMemoryBarrier* pMemoryBarriersFixed = pMemoryBarriers) { handle.PInvoke.vkCmdPipelineBarrier.Invoke( handle.Handle, srcStageMask, dstStageMask, dependencyFlags, pMemoryBarriers.Length, pMemoryBarriersFixed, pBufferMemoryBarriers.Length, pBufferMemoryBarriersFixed, pImageMemoryBarriers.Length, pImageMemoryBarriersFixed ); } } /// /// vkCmdBeginQuery - Begin a query /// /// /// /// :refpage: vkCmdBeginQuery /// /// /// To begin a query, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdBeginQuery( /// VkCommandBuffer commandBuffer, /// VkQueryPool queryPool, /// uint32_t query, /// VkQueryControlFlags flags); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void BeginQuery(this T handle, VkQueryPool queryPool, int query, VkQueryControlFlags flags) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdBeginQuery.Invoke(handle.Handle, queryPool, query, flags); } /// /// vkCmdEndQuery - Ends a query /// /// /// /// :refpage: vkCmdEndQuery /// /// /// To end a query after the set of desired commands is recorded, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdEndQuery( /// VkCommandBuffer commandBuffer, /// VkQueryPool queryPool, /// uint32_t query); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void EndQuery(this T handle, VkQueryPool queryPool, int query) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdEndQuery.Invoke(handle.Handle, queryPool, query); } /// /// vkCmdResetQueryPool - Reset queries in a query pool /// /// /// /// :refpage: vkCmdResetQueryPool /// /// /// To reset a range of queries in a query pool on a queue, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdResetQueryPool( /// VkCommandBuffer commandBuffer, /// VkQueryPool queryPool, /// uint32_t firstQuery, /// uint32_t queryCount); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ResetQueryPool(this T handle, VkQueryPool queryPool, int firstQuery, int queryCount) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdResetQueryPool.Invoke(handle.Handle, queryPool, firstQuery, queryCount); } /// /// vkCmdWriteTimestamp - Write a device timestamp into a query object /// /// /// /// :refpage: vkCmdWriteTimestamp /// /// /// To request a timestamp and write the value to memory, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdWriteTimestamp( /// VkCommandBuffer commandBuffer, /// VkPipelineStageFlagBits pipelineStage, /// VkQueryPool queryPool, /// uint32_t query); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteTimestamp( this T handle, VkPipelineStageFlags pipelineStage, VkQueryPool queryPool, int query ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdWriteTimestamp.Invoke(handle.Handle, pipelineStage, queryPool, query); } /// /// vkCmdCopyQueryPoolResults - Copy the results of queries in a query pool to a buffer object /// /// /// /// :refpage: vkCmdCopyQueryPoolResults /// /// /// To copy query statuses and numerical results directly to buffer memory, /// call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdCopyQueryPoolResults( /// VkCommandBuffer commandBuffer, /// VkQueryPool queryPool, /// uint32_t firstQuery, /// uint32_t queryCount, /// VkBuffer dstBuffer, /// VkDeviceSize dstOffset, /// VkDeviceSize stride, /// VkQueryResultFlags flags); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void CopyQueryPoolResults( this T handle, VkQueryPool queryPool, int firstQuery, int queryCount, VkBuffer dstBuffer, ByteSize64 dstOffset, ByteSize64 stride, VkQueryResultFlags flags ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdCopyQueryPoolResults.Invoke( handle.Handle, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags ); } /// /// vkCmdExecuteCommands - Execute a secondary command buffer from a primary command buffer /// /// /// /// Secondary command buffers must not be directly submitted to a queue. /// To record a secondary command buffer to execute as part of a primary command /// buffer, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdExecuteCommands( /// VkCommandBuffer commandBuffer, /// uint32_t commandBufferCount, /// const VkCommandBuffer* pCommandBuffers); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe void CmdExecuteCommandsInternal( this T handle, scoped ReadOnlySpan pCommandBuffers ) where T : VulkanHandleWrapper { fixed (VkCommandBuffer* pCommandBuffersFixed = pCommandBuffers) { handle.PInvoke.vkCmdExecuteCommands.Invoke(handle.Handle, pCommandBuffers.Length, pCommandBuffersFixed); } } /// /// vkCreateEvent - Create a new event object /// /// /// /// :refpage: vkCreateEvent /// :objectnameplural: events /// :objectnamecamelcase: event /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create an event, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreateEvent( /// VkDevice device, /// const VkEventCreateInfo* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkEvent* pEvent); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkEvent CreateEvent( this VulkanHandleWrapper handle, in VkEventCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkEventCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkEvent pEventLocal = default; VkResult result = handle.PInvoke.vkCreateEvent.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pEventLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateEvent failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateEvent failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateEvent failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateEvent failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pEventLocal; } } /// /// vkDestroyEvent - Destroy an event object /// /// /// /// To destroy an event, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroyEvent( /// VkDevice device, /// VkEvent event, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyEvent( this VulkanHandleWrapper handle, VkEvent @event, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyEvent.Invoke(handle.Handle, @event, pAllocator); } /// /// vkGetEventStatus - Retrieve the status of an event object /// /// /// /// :refpage: vkGetEventStatus /// /// /// To query the state of an event from the host, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkGetEventStatus( /// VkDevice device, /// VkEvent event); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static VkResult GetEventStatus( this VulkanHandleWrapper handle, VkEvent @event ) { VkResult result = handle.PInvoke.vkGetEventStatus.Invoke(handle.Handle, @event); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetEventStatus failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetEventStatus failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkGetEventStatus failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetEventStatus failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetEventStatus failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.EventSet: case VkResult.EventReset: default: break; } return result; } /// /// vkSetEvent - Set an event to signaled state /// /// /// /// :refpage: vkSetEvent /// /// /// To set the state of an event to signaled from the host, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkSetEvent( /// VkDevice device, /// VkEvent event); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetEvent(this VulkanHandleWrapper handle, VkEvent @event) { VkResult result = handle.PInvoke.vkSetEvent.Invoke(handle.Handle, @event); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkSetEvent failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkSetEvent failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkSetEvent failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkSetEvent failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkResetEvent - Reset an event to non-signaled state /// /// /// /// To set the state of an event to unsignaled from the host, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkResetEvent( /// VkDevice device, /// VkEvent event); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ResetEvent(this VulkanHandleWrapper handle, VkEvent @event) { VkResult result = handle.PInvoke.vkResetEvent.Invoke(handle.Handle, @event); switch (result) { case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkResetEvent failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkResetEvent failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkResetEvent failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkCreateBufferView - Create a new buffer view object /// /// /// /// :refpage: vkCreateBufferView /// :objectnameplural: buffer views /// :objectnamecamelcase: bufferView /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create a buffer view, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreateBufferView( /// VkDevice device, /// const VkBufferViewCreateInfo* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkBufferView* pView); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkBufferView CreateBufferView( this VulkanHandleWrapper handle, in VkBufferViewCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkBufferViewCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkBufferView pViewLocal = default; VkResult result = handle.PInvoke.vkCreateBufferView.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pViewLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateBufferView failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateBufferView failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateBufferView failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateBufferView failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pViewLocal; } } /// /// vkDestroyBufferView - Destroy a buffer view object /// /// /// /// To destroy a buffer view, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroyBufferView( /// VkDevice device, /// VkBufferView bufferView, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyBufferView( this VulkanHandleWrapper handle, VkBufferView bufferView, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyBufferView.Invoke(handle.Handle, bufferView, pAllocator); } /// /// vkCreateShaderModule - Creates a new shader module object /// /// /// /// To create a shader module, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreateShaderModule( /// VkDevice device, /// const VkShaderModuleCreateInfo* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkShaderModule* pShaderModule); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkShaderModule CreateShaderModule( this VulkanHandleWrapper handle, in VkShaderModuleCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkShaderModuleCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkShaderModule pShaderModuleLocal = default; VkResult result = handle.PInvoke.vkCreateShaderModule.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pShaderModuleLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateShaderModule failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateShaderModule failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorInvalidShaderNV: throw new VkResultError( VkResult.ErrorInvalidShaderNV, "Vulkan call to vkCreateShaderModule failed with error: VK_ERROR_INVALID_SHADER_NV" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateShaderModule failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateShaderModule failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pShaderModuleLocal; } } /// /// vkDestroyShaderModule - Destroy a shader module /// /// /// /// To destroy a shader module, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroyShaderModule( /// VkDevice device, /// VkShaderModule shaderModule, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyShaderModule( this VulkanHandleWrapper handle, VkShaderModule shaderModule, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyShaderModule.Invoke(handle.Handle, shaderModule, pAllocator); } /// /// vkCreatePipelineCache - Creates a new pipeline cache /// /// /// /// :refpage: vkCreatePipelineCache /// :objectnameplural: pipeline caches /// :objectnamecamelcase: pipelineCache /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create pipeline cache objects, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreatePipelineCache( /// VkDevice device, /// const VkPipelineCacheCreateInfo* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkPipelineCache* pPipelineCache); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkPipelineCache CreatePipelineCache( this VulkanHandleWrapper handle, in VkPipelineCacheCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkPipelineCacheCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkPipelineCache pPipelineCacheLocal = default; VkResult result = handle.PInvoke.vkCreatePipelineCache.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pPipelineCacheLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreatePipelineCache failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreatePipelineCache failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreatePipelineCache failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreatePipelineCache failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pPipelineCacheLocal; } } /// /// vkDestroyPipelineCache - Destroy a pipeline cache object /// /// /// /// To destroy a pipeline cache, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroyPipelineCache( /// VkDevice device, /// VkPipelineCache pipelineCache, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyPipelineCache( this VulkanHandleWrapper handle, VkPipelineCache pipelineCache, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyPipelineCache.Invoke(handle.Handle, pipelineCache, pAllocator); } /// /// vkGetPipelineCacheData - Get the data store from a pipeline cache /// /// /// /// Data can be retrieved from a pipeline cache object using the command: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkGetPipelineCacheData( /// VkDevice device, /// VkPipelineCache pipelineCache, /// size_t* pDataSize, /// void* pData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe VkResult GetPipelineCacheData( this VulkanHandleWrapper handle, VkPipelineCache pipelineCache, ref nuint pDataSize, scoped ReadOnlySpan pData ) { fixed (byte* pDataFixed = pData) fixed (nuint* pDataSizeFixed = &pDataSize) { VkResult result = handle.PInvoke.vkGetPipelineCacheData.Invoke( handle.Handle, pipelineCache, pDataSizeFixed, pDataFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetPipelineCacheData failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetPipelineCacheData failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetPipelineCacheData failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetPipelineCacheData failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// Queries the required length. /// The required length. public static nuint GetPipelineCacheData_Count( this VulkanHandleWrapper handle, VkPipelineCache pipelineCache ) { nuint pDataSize = default; GetPipelineCacheData(handle, pipelineCache, ref pDataSize, null); return pDataSize; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static VkResult GetPipelineCacheData_Write( this VulkanHandleWrapper handle, VkPipelineCache pipelineCache, scoped ReadOnlySpan pData ) { nuint pDataSize = (nuint)pData.Length; return GetPipelineCacheData(handle, pipelineCache, ref pDataSize, pData); } /// /// vkMergePipelineCaches - Combine the data stores of pipeline caches /// /// /// /// Pipeline cache objects can be merged using the command: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkMergePipelineCaches( /// VkDevice device, /// VkPipelineCache dstCache, /// uint32_t srcCacheCount, /// const VkPipelineCache* pSrcCaches); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void MergePipelineCaches( this VulkanHandleWrapper handle, VkPipelineCache dstCache, scoped ReadOnlySpan pSrcCaches ) { fixed (VkPipelineCache* pSrcCachesFixed = pSrcCaches) { VkResult result = handle.PInvoke.vkMergePipelineCaches.Invoke( handle.Handle, dstCache, pSrcCaches.Length, pSrcCachesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkMergePipelineCaches failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkMergePipelineCaches failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkMergePipelineCaches failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkMergePipelineCaches failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCreateComputePipelines - Creates a new compute pipeline object /// /// /// /// :refpage: vkCreateComputePipelines /// :objectnameplural: compute pipelines /// :objectnamecamelcase: computePipeline /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: createInfoCount /// /// /// To create compute pipelines, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreateComputePipelines( /// VkDevice device, /// VkPipelineCache pipelineCache, /// uint32_t createInfoCount, /// const VkComputePipelineCreateInfo* pCreateInfos, /// const VkAllocationCallbacks* pAllocator, /// VkPipeline* pPipelines); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CreateComputePipelines( this VulkanHandleWrapper handle, VkPipelineCache pipelineCache, scoped ReadOnlySpan pCreateInfos, VkAllocator? pAllocator, scoped ReadOnlySpan pPipelines ) { fixed (VkPipeline* pPipelinesFixed = pPipelines) fixed (VkComputePipelineCreateInfo* pCreateInfosFixed = pCreateInfos) { VkResult result = handle.PInvoke.vkCreateComputePipelines.Invoke( handle.Handle, pipelineCache, pCreateInfos.Length, pCreateInfosFixed, pAllocator, pPipelinesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateComputePipelines failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateComputePipelines failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorInvalidShaderNV: throw new VkResultError( VkResult.ErrorInvalidShaderNV, "Vulkan call to vkCreateComputePipelines failed with error: VK_ERROR_INVALID_SHADER_NV" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateComputePipelines failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateComputePipelines failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.PipelineCompileRequiredEXT: default: break; } return result; } } /// /// vkDestroyPipeline - Destroy a pipeline object /// /// /// /// To destroy a pipeline, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroyPipeline( /// VkDevice device, /// VkPipeline pipeline, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyPipeline( this VulkanHandleWrapper handle, VkPipeline pipeline, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyPipeline.Invoke(handle.Handle, pipeline, pAllocator); } /// /// vkCreatePipelineLayout - Creates a new pipeline layout object /// /// /// /// :refpage: vkCreatePipelineLayout /// :objectnameplural: pipeline layouts /// :objectnamecamelcase: pipelineLayout /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create a pipeline layout, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreatePipelineLayout( /// VkDevice device, /// const VkPipelineLayoutCreateInfo* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkPipelineLayout* pPipelineLayout); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkPipelineLayout CreatePipelineLayout( this VulkanHandleWrapper handle, in VkPipelineLayoutCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkPipelineLayoutCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkPipelineLayout pPipelineLayoutLocal = default; VkResult result = handle.PInvoke.vkCreatePipelineLayout.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pPipelineLayoutLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreatePipelineLayout failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreatePipelineLayout failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreatePipelineLayout failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreatePipelineLayout failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pPipelineLayoutLocal; } } /// /// vkDestroyPipelineLayout - Destroy a pipeline layout object /// /// /// /// To destroy a pipeline layout, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroyPipelineLayout( /// VkDevice device, /// VkPipelineLayout pipelineLayout, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyPipelineLayout( this VulkanHandleWrapper handle, VkPipelineLayout pipelineLayout, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyPipelineLayout.Invoke(handle.Handle, pipelineLayout, pAllocator); } /// /// vkCreateSampler - Create a new sampler object /// /// /// /// :refpage: vkCreateSampler /// :objectnameplural: samplers /// :objectnamecamelcase: sampler /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create a sampler object, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreateSampler( /// VkDevice device, /// const VkSamplerCreateInfo* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkSampler* pSampler); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkSampler CreateSampler( this VulkanHandleWrapper handle, in VkSamplerCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkSamplerCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkSampler pSamplerLocal = default; VkResult result = handle.PInvoke.vkCreateSampler.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pSamplerLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateSampler failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateSampler failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: throw new VkResultError( VkResult.ErrorInvalidOpaqueCaptureAddressKHR, "Vulkan call to vkCreateSampler failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateSampler failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateSampler failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pSamplerLocal; } } /// /// vkDestroySampler - Destroy a sampler object /// /// /// /// To destroy a sampler, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroySampler( /// VkDevice device, /// VkSampler sampler, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroySampler( this VulkanHandleWrapper handle, VkSampler sampler, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroySampler.Invoke(handle.Handle, sampler, pAllocator); } /// /// vkCreateDescriptorSetLayout - Create a new descriptor set layout /// /// /// /// :refpage: vkCreateDescriptorSetLayout /// :objectnameplural: descriptor set layouts /// :objectnamecamelcase: descriptorSetLayout /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create descriptor set layout objects, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreateDescriptorSetLayout( /// VkDevice device, /// const VkDescriptorSetLayoutCreateInfo* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkDescriptorSetLayout* pSetLayout); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkDescriptorSetLayout CreateDescriptorSetLayout( this VulkanHandleWrapper handle, in VkDescriptorSetLayoutCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkDescriptorSetLayoutCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkDescriptorSetLayout pSetLayoutLocal = default; VkResult result = handle.PInvoke.vkCreateDescriptorSetLayout.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pSetLayoutLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateDescriptorSetLayout failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateDescriptorSetLayout failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateDescriptorSetLayout failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateDescriptorSetLayout failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pSetLayoutLocal; } } /// /// vkDestroyDescriptorSetLayout - Destroy a descriptor set layout object /// /// /// /// To destroy a descriptor set layout, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroyDescriptorSetLayout( /// VkDevice device, /// VkDescriptorSetLayout descriptorSetLayout, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyDescriptorSetLayout( this VulkanHandleWrapper handle, VkDescriptorSetLayout descriptorSetLayout, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyDescriptorSetLayout.Invoke(handle.Handle, descriptorSetLayout, pAllocator); } /// /// vkCreateDescriptorPool - Creates a descriptor pool object /// /// /// /// :refpage: vkCreateDescriptorPool /// :objectnameplural: descriptor pools /// :objectnamecamelcase: descriptorPool /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create a descriptor pool object, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreateDescriptorPool( /// VkDevice device, /// const VkDescriptorPoolCreateInfo* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkDescriptorPool* pDescriptorPool); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkDescriptorPool CreateDescriptorPool( this VulkanHandleWrapper handle, in VkDescriptorPoolCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkDescriptorPoolCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkDescriptorPool pDescriptorPoolLocal = default; VkResult result = handle.PInvoke.vkCreateDescriptorPool.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pDescriptorPoolLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateDescriptorPool failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateDescriptorPool failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorFragmentationEXT: throw new VkResultError( VkResult.ErrorFragmentationEXT, "Vulkan call to vkCreateDescriptorPool failed with error: VK_ERROR_FRAGMENTATION_EXT" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateDescriptorPool failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateDescriptorPool failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pDescriptorPoolLocal; } } /// /// vkDestroyDescriptorPool - Destroy a descriptor pool object /// /// /// /// To destroy a descriptor pool, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroyDescriptorPool( /// VkDevice device, /// VkDescriptorPool descriptorPool, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyDescriptorPool( this VulkanHandleWrapper handle, VkDescriptorPool descriptorPool, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyDescriptorPool.Invoke(handle.Handle, descriptorPool, pAllocator); } /// /// vkResetDescriptorPool - Resets a descriptor pool object /// /// /// /// To return all descriptor sets allocated from a given pool to the pool, /// rather than freeing individual descriptor sets, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkResetDescriptorPool( /// VkDevice device, /// VkDescriptorPool descriptorPool, /// VkDescriptorPoolResetFlags flags); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ResetDescriptorPool( this VulkanHandleWrapper handle, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags ) { VkResult result = handle.PInvoke.vkResetDescriptorPool.Invoke(handle.Handle, descriptorPool, flags); switch (result) { case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkResetDescriptorPool failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkResetDescriptorPool failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkAllocateDescriptorSets - Allocate one or more descriptor sets /// /// /// /// :refpage: vkAllocateDescriptorSets /// :objectnameplural: descriptor sets /// :objectnamecamelcase: descriptorSet /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: VkDescriptorSetAllocateInfo::descriptorSetCount /// /// /// To allocate descriptor sets from a descriptor pool, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkAllocateDescriptorSets( /// VkDevice device, /// const VkDescriptorSetAllocateInfo* pAllocateInfo, /// VkDescriptorSet* pDescriptorSets); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void AllocateDescriptorSets( this VulkanHandleWrapper handle, in VkDescriptorSetAllocateInfo pAllocateInfo, scoped ReadOnlySpan pDescriptorSets ) { fixed (VkDescriptorSet* pDescriptorSetsFixed = pDescriptorSets) fixed (VkDescriptorSetAllocateInfo* pAllocateInfoFixed = &pAllocateInfo) { VkResult result = handle.PInvoke.vkAllocateDescriptorSets.Invoke( handle.Handle, pAllocateInfoFixed, pDescriptorSetsFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkAllocateDescriptorSets failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkAllocateDescriptorSets failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorFragmentedPool: throw new VkResultError( VkResult.ErrorFragmentedPool, "Vulkan call to vkAllocateDescriptorSets failed with error: VK_ERROR_FRAGMENTED_POOL" ); case VkResult.ErrorOutOfPoolMemory: throw new VkResultError( VkResult.ErrorOutOfPoolMemory, "Vulkan call to vkAllocateDescriptorSets failed with error: VK_ERROR_OUT_OF_POOL_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkAllocateDescriptorSets failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkAllocateDescriptorSets failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkFreeDescriptorSets - Free one or more descriptor sets /// /// /// /// To free allocated descriptor sets, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkFreeDescriptorSets( /// VkDevice device, /// VkDescriptorPool descriptorPool, /// uint32_t descriptorSetCount, /// const VkDescriptorSet* pDescriptorSets); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe void FreeDescriptorSetsInternal( this VulkanHandleWrapper handle, VkDescriptorPool descriptorPool, scoped ReadOnlySpan pDescriptorSets ) { fixed (VkDescriptorSet* pDescriptorSetsFixed = pDescriptorSets) { VkResult result = handle.PInvoke.vkFreeDescriptorSets.Invoke( handle.Handle, descriptorPool, pDescriptorSets.Length, pDescriptorSetsFixed ); switch (result) { case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkFreeDescriptorSets failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkFreeDescriptorSets failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkUpdateDescriptorSets - Update the contents of a descriptor set object /// /// /// /// Once allocated, descriptor sets can be updated with a combination of write /// and copy operations. /// To update descriptor sets, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkUpdateDescriptorSets( /// VkDevice device, /// uint32_t descriptorWriteCount, /// const VkWriteDescriptorSet* pDescriptorWrites, /// uint32_t descriptorCopyCount, /// const VkCopyDescriptorSet* pDescriptorCopies); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void UpdateDescriptorSets( this VulkanHandleWrapper handle, scoped ReadOnlySpan pDescriptorWrites, scoped ReadOnlySpan pDescriptorCopies ) { fixed (VkCopyDescriptorSet* pDescriptorCopiesFixed = pDescriptorCopies) fixed (VkWriteDescriptorSet* pDescriptorWritesFixed = pDescriptorWrites) { handle.PInvoke.vkUpdateDescriptorSets.Invoke( handle.Handle, pDescriptorWrites.Length, pDescriptorWritesFixed, pDescriptorCopies.Length, pDescriptorCopiesFixed ); } } /// /// vkCmdBindPipeline - Bind a pipeline object to a command buffer /// /// /// /// Once a pipeline has been created, it can be bound to the command buffer /// using the command: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdBindPipeline( /// VkCommandBuffer commandBuffer, /// VkPipelineBindPoint pipelineBindPoint, /// VkPipeline pipeline); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void BindPipeline(this T handle, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdBindPipeline.Invoke(handle.Handle, pipelineBindPoint, pipeline); } /// /// vkCmdBindDescriptorSets - Binds descriptor sets to a command buffer /// /// /// /// :refpage: vkCmdBindDescriptorSets /// /// /// To bind one or more descriptor sets to a command buffer, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdBindDescriptorSets( /// VkCommandBuffer commandBuffer, /// VkPipelineBindPoint pipelineBindPoint, /// VkPipelineLayout layout, /// uint32_t firstSet, /// uint32_t descriptorSetCount, /// const VkDescriptorSet* pDescriptorSets, /// uint32_t dynamicOffsetCount, /// const uint32_t* pDynamicOffsets); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindDescriptorSets( this T handle, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, int firstSet, scoped ReadOnlySpan pDescriptorSets, scoped Span pDynamicOffsets ) where T : VulkanHandleWrapper { fixed (ByteSize32* pDynamicOffsetsFixed = pDynamicOffsets) fixed (VkDescriptorSet* pDescriptorSetsFixed = pDescriptorSets) { handle.PInvoke.vkCmdBindDescriptorSets.Invoke( handle.Handle, pipelineBindPoint, layout, firstSet, pDescriptorSets.Length, pDescriptorSetsFixed, pDynamicOffsets.Length, (int*)pDynamicOffsetsFixed ); } } /// /// vkCmdClearColorImage - Clear regions of a color image /// /// /// /// To clear one or more subranges of a color image, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdClearColorImage( /// VkCommandBuffer commandBuffer, /// VkImage image, /// VkImageLayout imageLayout, /// const VkClearColorValue* pColor, /// uint32_t rangeCount, /// const VkImageSubresourceRange* pRanges); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void ClearColorImage( this T handle, VkImage image, VkImageLayout imageLayout, VkClearColorValue* pColor, scoped ReadOnlySpan pRanges ) where T : VulkanHandleWrapper { fixed (VkImageSubresourceRange* pRangesFixed = pRanges) { handle.PInvoke.vkCmdClearColorImage.Invoke( handle.Handle, image, imageLayout, pColor, pRanges.Length, pRangesFixed ); } } /// /// vkCmdDispatch - Dispatch compute work items /// /// /// /// :refpage: vkCmdDispatch /// /// /// To record a dispatch, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdDispatch( /// VkCommandBuffer commandBuffer, /// uint32_t groupCountX, /// uint32_t groupCountY, /// uint32_t groupCountZ); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Dispatch(this T handle, int groupCountX, int groupCountY, int groupCountZ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDispatch.Invoke(handle.Handle, groupCountX, groupCountY, groupCountZ); } /// /// vkCmdDispatchIndirect - Dispatch compute work items with indirect parameters /// /// /// /// :refpage: vkCmdDispatchIndirect /// /// /// To record an indirect dispatching command, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdDispatchIndirect( /// VkCommandBuffer commandBuffer, /// VkBuffer buffer, /// VkDeviceSize offset); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DispatchIndirect(this T handle, VkBuffer buffer, ByteSize64 offset) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDispatchIndirect.Invoke(handle.Handle, buffer, offset); } /// /// vkCmdSetEvent - Set an event object to signaled state /// /// /// /// :refpage: vkCmdSetEvent /// /// /// To set the state of an event to signaled from a device, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdSetEvent( /// VkCommandBuffer commandBuffer, /// VkEvent event, /// VkPipelineStageFlags stageMask); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetEvent(this T handle, VkEvent @event, VkPipelineStageFlags stageMask) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetEvent.Invoke(handle.Handle, @event, stageMask); } /// /// vkCmdResetEvent - Reset an event object to non-signaled state /// /// /// /// :refpage: vkCmdResetEvent /// /// /// To set the state of an event to unsignaled from a device, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdResetEvent( /// VkCommandBuffer commandBuffer, /// VkEvent event, /// VkPipelineStageFlags stageMask); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ResetEvent(this T handle, VkEvent @event, VkPipelineStageFlags stageMask) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdResetEvent.Invoke(handle.Handle, @event, stageMask); } /// /// vkCmdWaitEvents - Wait for one or more events and insert a set of memory /// /// /// /// :refpage: vkCmdWaitEvents /// /// /// To wait for one or more events to enter the signaled state on a device, /// call: /// /// /// [[synchronization-events-waiting-device]] /// /// // Provided by VK_VERSION_1_0 /// void vkCmdWaitEvents( /// VkCommandBuffer commandBuffer, /// uint32_t eventCount, /// const VkEvent* pEvents, /// VkPipelineStageFlags srcStageMask, /// VkPipelineStageFlags dstStageMask, /// uint32_t memoryBarrierCount, /// const VkMemoryBarrier* pMemoryBarriers, /// uint32_t bufferMemoryBarrierCount, /// const VkBufferMemoryBarrier* pBufferMemoryBarriers, /// uint32_t imageMemoryBarrierCount, /// const VkImageMemoryBarrier* pImageMemoryBarriers); /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void WaitEvents( this T handle, scoped ReadOnlySpan pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, scoped ReadOnlySpan pMemoryBarriers, scoped ReadOnlySpan pBufferMemoryBarriers, scoped ReadOnlySpan pImageMemoryBarriers ) where T : VulkanHandleWrapper { fixed (VkImageMemoryBarrier* pImageMemoryBarriersFixed = pImageMemoryBarriers) fixed (VkBufferMemoryBarrier* pBufferMemoryBarriersFixed = pBufferMemoryBarriers) fixed (VkMemoryBarrier* pMemoryBarriersFixed = pMemoryBarriers) fixed (VkEvent* pEventsFixed = pEvents) { handle.PInvoke.vkCmdWaitEvents.Invoke( handle.Handle, pEvents.Length, pEventsFixed, srcStageMask, dstStageMask, pMemoryBarriers.Length, pMemoryBarriersFixed, pBufferMemoryBarriers.Length, pBufferMemoryBarriersFixed, pImageMemoryBarriers.Length, pImageMemoryBarriersFixed ); } } /// /// vkCmdPushConstants - Update the values of push constants /// /// /// /// :refpage: vkCmdPushConstants /// /// /// To update push constants, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdPushConstants( /// VkCommandBuffer commandBuffer, /// VkPipelineLayout layout, /// VkShaderStageFlags stageFlags, /// uint32_t offset, /// uint32_t size, /// const void* pValues); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void PushConstants( this T handle, VkPipelineLayout layout, VkShaderStageFlags stageFlags, int offset, scoped ReadOnlySpan pValues ) where T : VulkanHandleWrapper { fixed (byte* pValuesFixed = pValues) { handle.PInvoke.vkCmdPushConstants.Invoke( handle.Handle, layout, stageFlags, offset, pValues.Length, pValuesFixed ); } } /// /// vkCreateGraphicsPipelines - Create graphics pipelines /// /// /// /// :refpage: vkCreateGraphicsPipelines /// :objectnameplural: graphics pipelines /// :objectnamecamelcase: graphicsPipeline /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: createInfoCount /// /// /// To create graphics pipelines, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreateGraphicsPipelines( /// VkDevice device, /// VkPipelineCache pipelineCache, /// uint32_t createInfoCount, /// const VkGraphicsPipelineCreateInfo* pCreateInfos, /// const VkAllocationCallbacks* pAllocator, /// VkPipeline* pPipelines); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CreateGraphicsPipelines( this VulkanHandleWrapper handle, VkPipelineCache pipelineCache, scoped ReadOnlySpan pCreateInfos, VkAllocator? pAllocator, scoped ReadOnlySpan pPipelines ) { fixed (VkPipeline* pPipelinesFixed = pPipelines) fixed (VkGraphicsPipelineCreateInfo* pCreateInfosFixed = pCreateInfos) { VkResult result = handle.PInvoke.vkCreateGraphicsPipelines.Invoke( handle.Handle, pipelineCache, pCreateInfos.Length, pCreateInfosFixed, pAllocator, pPipelinesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateGraphicsPipelines failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateGraphicsPipelines failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorInvalidShaderNV: throw new VkResultError( VkResult.ErrorInvalidShaderNV, "Vulkan call to vkCreateGraphicsPipelines failed with error: VK_ERROR_INVALID_SHADER_NV" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateGraphicsPipelines failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateGraphicsPipelines failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.PipelineCompileRequiredEXT: default: break; } return result; } } /// /// vkCreateFramebuffer - Create a new framebuffer object /// /// /// /// :refpage: vkCreateFramebuffer /// :objectnameplural: framebuffers /// :objectnamecamelcase: framebuffer /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create a framebuffer, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreateFramebuffer( /// VkDevice device, /// const VkFramebufferCreateInfo* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkFramebuffer* pFramebuffer); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkFramebuffer CreateFramebuffer( this VulkanHandleWrapper handle, in VkFramebufferCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkFramebufferCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkFramebuffer pFramebufferLocal = default; VkResult result = handle.PInvoke.vkCreateFramebuffer.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pFramebufferLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateFramebuffer failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateFramebuffer failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateFramebuffer failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateFramebuffer failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pFramebufferLocal; } } /// /// vkDestroyFramebuffer - Destroy a framebuffer object /// /// /// /// To destroy a framebuffer, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroyFramebuffer( /// VkDevice device, /// VkFramebuffer framebuffer, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyFramebuffer( this VulkanHandleWrapper handle, VkFramebuffer framebuffer, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyFramebuffer.Invoke(handle.Handle, framebuffer, pAllocator); } /// /// vkCreateRenderPass - Create a new render pass object /// /// /// /// :refpage: vkCreateRenderPass /// :objectnameplural: render passes /// :objectnamecamelcase: renderPass /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create a render pass, call: /// /// /// // Provided by VK_VERSION_1_0 /// VkResult vkCreateRenderPass( /// VkDevice device, /// const VkRenderPassCreateInfo* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkRenderPass* pRenderPass); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkRenderPass CreateRenderPass( this VulkanHandleWrapper handle, in VkRenderPassCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkRenderPassCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkRenderPass pRenderPassLocal = default; VkResult result = handle.PInvoke.vkCreateRenderPass.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pRenderPassLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateRenderPass failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateRenderPass failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateRenderPass failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateRenderPass failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pRenderPassLocal; } } /// /// vkDestroyRenderPass - Destroy a render pass object /// /// /// /// To destroy a render pass, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkDestroyRenderPass( /// VkDevice device, /// VkRenderPass renderPass, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyRenderPass( this VulkanHandleWrapper handle, VkRenderPass renderPass, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyRenderPass.Invoke(handle.Handle, renderPass, pAllocator); } /// /// vkGetRenderAreaGranularity - Returns the granularity for optimal render area /// /// /// /// To query the render area granularity, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkGetRenderAreaGranularity( /// VkDevice device, /// VkRenderPass renderPass, /// VkExtent2D* pGranularity); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetRenderAreaGranularity( this VulkanHandleWrapper handle, VkRenderPass renderPass, ref VkExtent2D pGranularity ) { fixed (VkExtent2D* pGranularityFixed = &pGranularity) { handle.PInvoke.vkGetRenderAreaGranularity.Invoke(handle.Handle, renderPass, pGranularityFixed); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkExtent2D. public static VkExtent2D GetRenderAreaGranularity( this VulkanHandleWrapper handle, VkRenderPass renderPass ) { VkExtent2D outValue = new(); GetRenderAreaGranularity(handle, renderPass, ref outValue); return outValue; } /// /// vkCmdSetViewport - Set the viewport dynamically for a command buffer /// /// /// /// To dynamically set^ the viewport transformation /// parameters, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdSetViewport( /// VkCommandBuffer commandBuffer, /// uint32_t firstViewport, /// uint32_t viewportCount, /// const VkViewport* pViewports); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetViewport( this T handle, int firstViewport, scoped ReadOnlySpan pViewports ) where T : VulkanHandleWrapper { fixed (VkViewport* pViewportsFixed = pViewports) { handle.PInvoke.vkCmdSetViewport.Invoke( handle.Handle, firstViewport, pViewports.Length, pViewportsFixed ); } } /// /// vkCmdSetScissor - Set scissor rectangles dynamically for a command buffer /// /// /// /// To dynamically set^ the scissor rectangles, /// call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdSetScissor( /// VkCommandBuffer commandBuffer, /// uint32_t firstScissor, /// uint32_t scissorCount, /// const VkRect2D* pScissors); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetScissor( this T handle, int firstScissor, scoped ReadOnlySpan pScissors ) where T : VulkanHandleWrapper { fixed (VkRect2D* pScissorsFixed = pScissors) { handle.PInvoke.vkCmdSetScissor.Invoke(handle.Handle, firstScissor, pScissors.Length, pScissorsFixed); } } /// /// vkCmdSetLineWidth - Set line width dynamically for a command buffer /// /// /// /// To dynamically set^ the line width, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdSetLineWidth( /// VkCommandBuffer commandBuffer, /// float lineWidth); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetLineWidth(this T handle, float lineWidth) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetLineWidth.Invoke(handle.Handle, lineWidth); } /// /// vkCmdSetDepthBias - Set depth bias factors and clamp dynamically for a command buffer /// /// /// /// To dynamically set^ the depth bias parameters, /// call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdSetDepthBias( /// VkCommandBuffer commandBuffer, /// float depthBiasConstantFactor, /// float depthBiasClamp, /// float depthBiasSlopeFactor); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDepthBias( this T handle, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDepthBias.Invoke( handle.Handle, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor ); } /// /// vkCmdSetBlendConstants - Set the values of blend constants /// /// /// /// To dynamically set and change^ the blend /// constants, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdSetBlendConstants( /// VkCommandBuffer commandBuffer, /// const float blendConstants[4]); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetBlendConstants(this T handle, float* blendConstants) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetBlendConstants.Invoke(handle.Handle, blendConstants); } /// /// vkCmdSetDepthBounds - Set depth bounds range dynamically for a command buffer /// /// /// /// To dynamically set^ the depth bounds range, /// call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdSetDepthBounds( /// VkCommandBuffer commandBuffer, /// float minDepthBounds, /// float maxDepthBounds); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDepthBounds(this T handle, float minDepthBounds, float maxDepthBounds) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDepthBounds.Invoke(handle.Handle, minDepthBounds, maxDepthBounds); } /// /// vkCmdSetStencilCompareMask - Set stencil compare mask dynamically for a command buffer /// /// /// /// To dynamically set^ the stencil compare mask, /// call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdSetStencilCompareMask( /// VkCommandBuffer commandBuffer, /// VkStencilFaceFlags faceMask, /// uint32_t compareMask); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetStencilCompareMask(this T handle, VkStencilFaceFlags faceMask, int compareMask) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetStencilCompareMask.Invoke(handle.Handle, faceMask, compareMask); } /// /// vkCmdSetStencilWriteMask - Set stencil write mask dynamically for a command buffer /// /// /// /// To dynamically set^ the stencil write mask, /// call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdSetStencilWriteMask( /// VkCommandBuffer commandBuffer, /// VkStencilFaceFlags faceMask, /// uint32_t writeMask); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetStencilWriteMask(this T handle, VkStencilFaceFlags faceMask, int writeMask) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetStencilWriteMask.Invoke(handle.Handle, faceMask, writeMask); } /// /// vkCmdSetStencilReference - Set stencil reference value dynamically for a command buffer /// /// /// /// To dynamically set^ the stencil reference value, /// call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdSetStencilReference( /// VkCommandBuffer commandBuffer, /// VkStencilFaceFlags faceMask, /// uint32_t reference); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetStencilReference(this T handle, VkStencilFaceFlags faceMask, int reference) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetStencilReference.Invoke(handle.Handle, faceMask, reference); } /// /// vkCmdBindIndexBuffer - Bind an index buffer to a command buffer /// /// /// /// :refpage: vkCmdBindIndexBuffer /// /// /// To bind an index buffer to a command buffer, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdBindIndexBuffer( /// VkCommandBuffer commandBuffer, /// VkBuffer buffer, /// VkDeviceSize offset, /// VkIndexType indexType); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void BindIndexBuffer(this T handle, VkBuffer buffer, ByteSize64 offset, VkIndexType indexType) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdBindIndexBuffer.Invoke(handle.Handle, buffer, offset, indexType); } /// /// vkCmdBindVertexBuffers - Bind vertex buffers to a command buffer /// /// /// /// To bind vertex buffers to a command buffer for use in subsequent drawing /// commands, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdBindVertexBuffers( /// VkCommandBuffer commandBuffer, /// uint32_t firstBinding, /// uint32_t bindingCount, /// const VkBuffer* pBuffers, /// const VkDeviceSize* pOffsets); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindVertexBuffers( this T handle, int firstBinding, scoped ReadOnlySpan pBuffers, scoped ReadOnlySpan pOffsets ) where T : VulkanHandleWrapper { fixed (ByteSize64* pOffsetsFixed = pOffsets) fixed (VkBuffer* pBuffersFixed = pBuffers) { handle.PInvoke.vkCmdBindVertexBuffers.Invoke( handle.Handle, firstBinding, pBuffers.Length, pBuffersFixed, pOffsetsFixed ); } } /// /// vkCmdDraw - Draw primitives /// /// /// /// :refpage: vkCmdDraw /// /// /// To record a non-indexed draw, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdDraw( /// VkCommandBuffer commandBuffer, /// uint32_t vertexCount, /// uint32_t instanceCount, /// uint32_t firstVertex, /// uint32_t firstInstance); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Draw( this T handle, int vertexCount, int instanceCount, int firstVertex, int firstInstance ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDraw.Invoke(handle.Handle, vertexCount, instanceCount, firstVertex, firstInstance); } /// /// vkCmdDrawIndexed - Draw primitives with indexed vertices /// /// /// /// :refpage: vkCmdDrawIndexed /// /// /// To record an indexed draw, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdDrawIndexed( /// VkCommandBuffer commandBuffer, /// uint32_t indexCount, /// uint32_t instanceCount, /// uint32_t firstIndex, /// int32_t vertexOffset, /// uint32_t firstInstance); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawIndexed( this T handle, int indexCount, int instanceCount, int firstIndex, int vertexOffset, int firstInstance ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawIndexed.Invoke( handle.Handle, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance ); } /// /// vkCmdDrawIndirect - Draw primitives with indirect parameters /// /// /// /// :refpage: vkCmdDrawIndirect /// /// /// To record a non-indexed indirect drawing command, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdDrawIndirect( /// VkCommandBuffer commandBuffer, /// VkBuffer buffer, /// VkDeviceSize offset, /// uint32_t drawCount, /// uint32_t stride); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawIndirect( this T handle, VkBuffer buffer, ByteSize64 offset, int drawCount, ByteSize32 stride ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawIndirect.Invoke(handle.Handle, buffer, offset, drawCount, stride); } /// /// vkCmdDrawIndexedIndirect - Draw primitives with indirect parameters and indexed vertices /// /// /// /// :refpage: vkCmdDrawIndexedIndirect /// /// /// To record an indexed indirect drawing command, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdDrawIndexedIndirect( /// VkCommandBuffer commandBuffer, /// VkBuffer buffer, /// VkDeviceSize offset, /// uint32_t drawCount, /// uint32_t stride); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawIndexedIndirect( this T handle, VkBuffer buffer, ByteSize64 offset, int drawCount, ByteSize32 stride ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawIndexedIndirect.Invoke(handle.Handle, buffer, offset, drawCount, stride); } /// /// vkCmdBlitImage - Copy regions of an image, potentially performing format conversion, /// /// /// /// :refpage: vkCmdBlitImage /// /// /// To copy regions of a source image into a destination image, potentially /// performing format conversion, arbitrary scaling, and filtering, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdBlitImage( /// VkCommandBuffer commandBuffer, /// VkImage srcImage, /// VkImageLayout srcImageLayout, /// VkImage dstImage, /// VkImageLayout dstImageLayout, /// uint32_t regionCount, /// const VkImageBlit* pRegions, /// VkFilter filter); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BlitImage( this T handle, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, scoped ReadOnlySpan pRegions, VkFilter filter ) where T : VulkanHandleWrapper { fixed (VkImageBlit* pRegionsFixed = pRegions) { handle.PInvoke.vkCmdBlitImage.Invoke( handle.Handle, srcImage, srcImageLayout, dstImage, dstImageLayout, pRegions.Length, pRegionsFixed, filter ); } } /// /// vkCmdClearDepthStencilImage - Fill regions of a combined depth/stencil image /// /// /// /// To clear one or more subranges of a depth/stencil image, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdClearDepthStencilImage( /// VkCommandBuffer commandBuffer, /// VkImage image, /// VkImageLayout imageLayout, /// const VkClearDepthStencilValue* pDepthStencil, /// uint32_t rangeCount, /// const VkImageSubresourceRange* pRanges); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void ClearDepthStencilImage( this T handle, VkImage image, VkImageLayout imageLayout, VkClearDepthStencilValue* pDepthStencil, scoped ReadOnlySpan pRanges ) where T : VulkanHandleWrapper { fixed (VkImageSubresourceRange* pRangesFixed = pRanges) { handle.PInvoke.vkCmdClearDepthStencilImage.Invoke( handle.Handle, image, imageLayout, pDepthStencil, pRanges.Length, pRangesFixed ); } } /// /// vkCmdClearAttachments - Clear regions within bound framebuffer attachments /// /// /// /// To clear one or more regions of color and depth/stencil attachments inside a /// render pass instance, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdClearAttachments( /// VkCommandBuffer commandBuffer, /// uint32_t attachmentCount, /// const VkClearAttachment* pAttachments, /// uint32_t rectCount, /// const VkClearRect* pRects); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void ClearAttachments( this T handle, scoped ReadOnlySpan pAttachments, scoped ReadOnlySpan pRects ) where T : VulkanHandleWrapper { fixed (VkClearRect* pRectsFixed = pRects) fixed (VkClearAttachment* pAttachmentsFixed = pAttachments) { handle.PInvoke.vkCmdClearAttachments.Invoke( handle.Handle, pAttachments.Length, pAttachmentsFixed, pRects.Length, pRectsFixed ); } } /// /// vkCmdResolveImage - Resolve regions of an image /// /// /// /// :refpage: vkCmdResolveImage /// /// /// To resolve a multisample color image to a non-multisample color image, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdResolveImage( /// VkCommandBuffer commandBuffer, /// VkImage srcImage, /// VkImageLayout srcImageLayout, /// VkImage dstImage, /// VkImageLayout dstImageLayout, /// uint32_t regionCount, /// const VkImageResolve* pRegions); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void ResolveImage( this T handle, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, scoped ReadOnlySpan pRegions ) where T : VulkanHandleWrapper { fixed (VkImageResolve* pRegionsFixed = pRegions) { handle.PInvoke.vkCmdResolveImage.Invoke( handle.Handle, srcImage, srcImageLayout, dstImage, dstImageLayout, pRegions.Length, pRegionsFixed ); } } /// /// vkCmdBeginRenderPass - Begin a new render pass /// /// /// /// To begin a render pass instance, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdBeginRenderPass( /// VkCommandBuffer commandBuffer, /// const VkRenderPassBeginInfo* pRenderPassBegin, /// VkSubpassContents contents); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BeginRenderPass( this T handle, in VkRenderPassBeginInfo pRenderPassBegin, VkSubpassContents contents ) where T : VulkanHandleWrapper { fixed (VkRenderPassBeginInfo* pRenderPassBeginFixed = &pRenderPassBegin) { handle.PInvoke.vkCmdBeginRenderPass.Invoke(handle.Handle, pRenderPassBeginFixed, contents); } } /// /// vkCmdNextSubpass - Transition to the next subpass of a render pass /// /// /// /// To transition to the next subpass in the render pass instance after /// recording the commands for a subpass, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdNextSubpass( /// VkCommandBuffer commandBuffer, /// VkSubpassContents contents); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void NextSubpass(this T handle, VkSubpassContents contents) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdNextSubpass.Invoke(handle.Handle, contents); } /// /// vkCmdEndRenderPass - End the current render pass /// /// /// /// To record a command to end a render pass instance after recording the /// commands for the last subpass, call: /// /// /// // Provided by VK_VERSION_1_0 /// void vkCmdEndRenderPass( /// VkCommandBuffer commandBuffer); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void EndRenderPass(this T handle) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdEndRenderPass.Invoke(handle.Handle); } /// /// vkBindBufferMemory2 - Bind device memory to buffer objects /// /// /// /// :refpage: vkBindBufferMemory2 /// /// /// To attach memory to buffer objects for one or more buffers at a time, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindBufferMemory2( this VulkanHandleWrapper handle, scoped ReadOnlySpan pBindInfos ) { fixed (VkBindBufferMemoryInfo* pBindInfosFixed = pBindInfos) { VkResult result = handle.PInvoke.vkBindBufferMemory2.Invoke( handle.Handle, pBindInfos.Length, pBindInfosFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkBindBufferMemory2 failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkBindBufferMemory2 failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: throw new VkResultError( VkResult.ErrorInvalidOpaqueCaptureAddressKHR, "Vulkan call to vkBindBufferMemory2 failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkBindBufferMemory2 failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkBindBufferMemory2 failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkBindImageMemory2 - Bind device memory to image objects /// /// /// /// :refpage: vkBindImageMemory2 /// /// /// To attach memory to image objects for one or more images at a time, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindImageMemory2( this VulkanHandleWrapper handle, scoped ReadOnlySpan pBindInfos ) { fixed (VkBindImageMemoryInfo* pBindInfosFixed = pBindInfos) { VkResult result = handle.PInvoke.vkBindImageMemory2.Invoke( handle.Handle, pBindInfos.Length, pBindInfosFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkBindImageMemory2 failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkBindImageMemory2 failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkBindImageMemory2 failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkBindImageMemory2 failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkGetDeviceGroupPeerMemoryFeatures - Query supported peer memory features of a device /// /// /// /// Peer memory is memory that is allocated for a given physical device and /// then bound to a resource and accessed by a different physical device, in a /// logical device that represents multiple physical devices. /// Some ways of reading and writing peer memory may: not be supported by a /// device. /// /// /// To determine how peer memory can be accessed, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkPeerMemoryFeatureFlags GetGroupPeerMemoryFeatures( this VulkanHandleWrapper handle, int heapIndex, int localDeviceIndex, int remoteDeviceIndex ) { VkPeerMemoryFeatureFlags pPeerMemoryFeaturesLocal = default; handle.PInvoke.vkGetDeviceGroupPeerMemoryFeatures.Invoke( handle.Handle, heapIndex, localDeviceIndex, remoteDeviceIndex, &pPeerMemoryFeaturesLocal ); return pPeerMemoryFeaturesLocal; } /// /// vkCmdSetDeviceMask - Modify device mask of a command buffer /// /// /// /// To update the current device mask of a command buffer, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDeviceMask(this T handle, int deviceMask) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDeviceMask.Invoke(handle.Handle, deviceMask); } /// /// vkGetImageMemoryRequirements2 - Returns the memory requirements for specified Vulkan object /// /// /// /// To determine the memory requirements for an image resource, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetImageMemoryRequirements2( this VulkanHandleWrapper handle, in VkImageMemoryRequirementsInfo2 pInfo, ref VkMemoryRequirements2 pMemoryRequirements ) { fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) fixed (VkImageMemoryRequirementsInfo2* pInfoFixed = &pInfo) { handle.PInvoke.vkGetImageMemoryRequirements2.Invoke( handle.Handle, pInfoFixed, pMemoryRequirementsFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryRequirements2. public static VkMemoryRequirements2 GetImageMemoryRequirements2( this VulkanHandleWrapper handle, in VkImageMemoryRequirementsInfo2 pInfo ) { VkMemoryRequirements2 outValue = new(); GetImageMemoryRequirements2(handle, pInfo, ref outValue); return outValue; } /// /// vkGetBufferMemoryRequirements2 - Returns the memory requirements for specified Vulkan object /// /// /// /// To determine the memory requirements for a buffer resource, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetBufferMemoryRequirements2( this VulkanHandleWrapper handle, in VkBufferMemoryRequirementsInfo2 pInfo, ref VkMemoryRequirements2 pMemoryRequirements ) { fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) fixed (VkBufferMemoryRequirementsInfo2* pInfoFixed = &pInfo) { handle.PInvoke.vkGetBufferMemoryRequirements2.Invoke( handle.Handle, pInfoFixed, pMemoryRequirementsFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryRequirements2. public static VkMemoryRequirements2 GetBufferMemoryRequirements2( this VulkanHandleWrapper handle, in VkBufferMemoryRequirementsInfo2 pInfo ) { VkMemoryRequirements2 outValue = new(); GetBufferMemoryRequirements2(handle, pInfo, ref outValue); return outValue; } /// /// vkGetImageSparseMemoryRequirements2 - Query the memory requirements for a sparse image /// /// /// /// To query sparse memory requirements for an image, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe void GetImageSparseMemoryRequirements2( this VulkanHandleWrapper handle, in VkImageSparseMemoryRequirementsInfo2 pInfo, ref int pSparseMemoryRequirementCount, scoped ReadOnlySpan pSparseMemoryRequirements ) { fixed (VkSparseImageMemoryRequirements2* pSparseMemoryRequirementsFixed = pSparseMemoryRequirements) fixed (VkImageSparseMemoryRequirementsInfo2* pInfoFixed = &pInfo) fixed (int* pSparseMemoryRequirementCountFixed = &pSparseMemoryRequirementCount) { handle.PInvoke.vkGetImageSparseMemoryRequirements2.Invoke( handle.Handle, pInfoFixed, pSparseMemoryRequirementCountFixed, pSparseMemoryRequirementsFixed ); } } /// Queries the required length. /// The required length. public static int GetImageSparseMemoryRequirements2_Count( this VulkanHandleWrapper handle, in VkImageSparseMemoryRequirementsInfo2 pInfo ) { int pSparseMemoryRequirementCount = default; GetImageSparseMemoryRequirements2(handle, pInfo, ref pSparseMemoryRequirementCount, null); return pSparseMemoryRequirementCount; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static void GetImageSparseMemoryRequirements2_Write( this VulkanHandleWrapper handle, in VkImageSparseMemoryRequirementsInfo2 pInfo, scoped ReadOnlySpan pSparseMemoryRequirements ) { int pSparseMemoryRequirementCount = pSparseMemoryRequirements.Length; GetImageSparseMemoryRequirements2( handle, pInfo, ref pSparseMemoryRequirementCount, pSparseMemoryRequirements ); } /// /// vkTrimCommandPool - Trim a command pool /// /// /// /// To trim a command pool, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void TrimCommandPool( this VulkanHandleWrapper handle, VkCommandPool commandPool, VkCommandPoolTrimFlags flags ) { handle.PInvoke.vkTrimCommandPool.Invoke(handle.Handle, commandPool, flags); } /// /// vkGetDeviceQueue2 - Get a queue handle from a device /// /// /// /// To retrieve a handle to a VkQueue object with specific /// VkDeviceQueueCreateFlags creation flags, call: /// /// /// // Provided by VK_VERSION_1_1 /// void vkGetDeviceQueue2( /// VkDevice device, /// const VkDeviceQueueInfo2* pQueueInfo, /// VkQueue* pQueue); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkQueue GetQueue2( this VulkanHandleWrapper handle, in VkDeviceQueueInfo2 pQueueInfo ) { fixed (VkDeviceQueueInfo2* pQueueInfoFixed = &pQueueInfo) { VkQueue pQueueLocal = default; handle.PInvoke.vkGetDeviceQueue2.Invoke(handle.Handle, pQueueInfoFixed, &pQueueLocal); return pQueueLocal; } } /// /// vkCmdDispatchBase - Dispatch compute work items with non-zero base values for the workgroup IDs /// /// /// /// :refpage: vkCmdDispatchBase /// /// /// To record a dispatch using non-zero base values for the components of /// WorkgroupId, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DispatchBase( this T handle, int baseGroupX, int baseGroupY, int baseGroupZ, int groupCountX, int groupCountY, int groupCountZ ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDispatchBase.Invoke( handle.Handle, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ ); } /// /// vkCreateDescriptorUpdateTemplate - Create a new descriptor update template /// /// /// /// Updating a large VkDescriptorSet array can be an expensive operation /// since an application must specify one VkWriteDescriptorSet structure /// for each descriptor or descriptor array to update, each of which /// re-specifies the same state when updating the same descriptor in multiple /// descriptor sets. /// For cases when an application wishes to update the same set of descriptors /// in multiple descriptor sets allocated using the same /// VkDescriptorSetLayout, vkUpdateDescriptorSetWithTemplate can be /// used as a replacement for vkUpdateDescriptorSets. /// /// /// VkDescriptorUpdateTemplate allows implementations to convert a set of /// descriptor update operations on a single descriptor set to an internal /// format. /// In conjunction with /// vkUpdateDescriptorSetWithTemplate, this can be more efficient /// compared to calling /// vkUpdateDescriptorSets. /// The descriptors themselves are not specified in the /// VkDescriptorUpdateTemplate, rather, offsets into an application /// provided pointer to host memory are specified, which are combined with a /// pointer passed to /// vkUpdateDescriptorSetWithTemplate. /// This allows large batches of updates to be executed without having to /// convert application data structures into a strictly-defined Vulkan data /// structure. /// /// /// To create a descriptor update template, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkDescriptorUpdateTemplate CreateDescriptorUpdateTemplate( this VulkanHandleWrapper handle, in VkDescriptorUpdateTemplateCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkDescriptorUpdateTemplateCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkDescriptorUpdateTemplate pDescriptorUpdateTemplateLocal = default; VkResult result = handle.PInvoke.vkCreateDescriptorUpdateTemplate.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pDescriptorUpdateTemplateLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateDescriptorUpdateTemplate failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateDescriptorUpdateTemplate failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateDescriptorUpdateTemplate failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateDescriptorUpdateTemplate failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pDescriptorUpdateTemplateLocal; } } /// /// vkDestroyDescriptorUpdateTemplate - Destroy a descriptor update template object /// /// /// /// To destroy a descriptor update template, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyDescriptorUpdateTemplate( this VulkanHandleWrapper handle, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyDescriptorUpdateTemplate.Invoke( handle.Handle, descriptorUpdateTemplate, pAllocator ); } /// /// vkUpdateDescriptorSetWithTemplate - Update the contents of a descriptor set object using an update template /// /// /// /// Once a VkDescriptorUpdateTemplate has been created, descriptor sets /// can be updated by calling: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void UpdateDescriptorSetWithTemplate( this VulkanHandleWrapper handle, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, void* pData ) { handle.PInvoke.vkUpdateDescriptorSetWithTemplate.Invoke( handle.Handle, descriptorSet, descriptorUpdateTemplate, pData ); } /// /// vkGetDescriptorSetLayoutSupport - Query whether a descriptor set layout can be created /// /// /// /// To query information about whether a descriptor set layout can be created, /// call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetDescriptorSetLayoutSupport( this VulkanHandleWrapper handle, in VkDescriptorSetLayoutCreateInfo pCreateInfo, ref VkDescriptorSetLayoutSupport pSupport ) { fixed (VkDescriptorSetLayoutSupport* pSupportFixed = &pSupport) fixed (VkDescriptorSetLayoutCreateInfo* pCreateInfoFixed = &pCreateInfo) { handle.PInvoke.vkGetDescriptorSetLayoutSupport.Invoke(handle.Handle, pCreateInfoFixed, pSupportFixed); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkDescriptorSetLayoutSupport. public static VkDescriptorSetLayoutSupport GetDescriptorSetLayoutSupport( this VulkanHandleWrapper handle, in VkDescriptorSetLayoutCreateInfo pCreateInfo ) { VkDescriptorSetLayoutSupport outValue = new(); GetDescriptorSetLayoutSupport(handle, pCreateInfo, ref outValue); return outValue; } /// /// vkCreateSamplerYcbcrConversion - Create a new {YCbCr} conversion /// /// /// /// :refpage: vkCreateSamplerYcbcrConversion /// :objectnameplural: sampler conversions /// :objectnamecamelcase: samplerYcbcrConversion /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create a VkSamplerYcbcrConversion, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkSamplerYCbCrConversion CreateSamplerYcbcrConversion( this VulkanHandleWrapper handle, in VkSamplerYCbCrConversionCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkSamplerYCbCrConversionCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkSamplerYCbCrConversion pYcbcrConversionLocal = default; VkResult result = handle.PInvoke.vkCreateSamplerYcbcrConversion.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pYcbcrConversionLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateSamplerYcbcrConversion failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateSamplerYcbcrConversion failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateSamplerYcbcrConversion failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateSamplerYcbcrConversion failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pYcbcrConversionLocal; } } /// /// vkDestroySamplerYcbcrConversion - Destroy a created {YCbCr} conversion /// /// /// /// To destroy a sampler {YCbCr} conversion, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroySamplerYcbcrConversion( this VulkanHandleWrapper handle, VkSamplerYCbCrConversion ycbcrConversion, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroySamplerYcbcrConversion.Invoke(handle.Handle, ycbcrConversion, pAllocator); } /// /// vkResetQueryPool - Reset queries in a query pool /// /// /// /// :refpage: vkResetQueryPool /// /// /// To reset a range of queries in a query pool on the host, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ResetQueryPool( this VulkanHandleWrapper handle, VkQueryPool queryPool, int firstQuery, int queryCount ) { handle.PInvoke.vkResetQueryPool.Invoke(handle.Handle, queryPool, firstQuery, queryCount); } /// /// vkGetSemaphoreCounterValue - Query the current state of a timeline semaphore /// /// /// /// :refpage: vkGetSemaphoreCounterValue /// /// /// To query the current counter value of a semaphore created with a /// VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE from the host, /// call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe nint GetSemaphoreCounterValue( this VulkanHandleWrapper handle, VkSemaphore semaphore ) { nint pValueLocal = default; VkResult result = handle.PInvoke.vkGetSemaphoreCounterValue.Invoke(handle.Handle, semaphore, &pValueLocal); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetSemaphoreCounterValue failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetSemaphoreCounterValue failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkGetSemaphoreCounterValue failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetSemaphoreCounterValue failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetSemaphoreCounterValue failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pValueLocal; } /// /// vkWaitSemaphores - Wait for timeline semaphores on the host /// /// /// /// :refpage: vkWaitSemaphores /// /// /// To wait for a set of semaphores created with a VkSemaphoreType of /// VK_SEMAPHORE_TYPE_TIMELINE to reach particular counter values on the /// host, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult WaitSemaphores( this VulkanHandleWrapper handle, in VkSemaphoreWaitInfo pWaitInfo, nint timeout ) { fixed (VkSemaphoreWaitInfo* pWaitInfoFixed = &pWaitInfo) { VkResult result = handle.PInvoke.vkWaitSemaphores.Invoke(handle.Handle, pWaitInfoFixed, timeout); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkWaitSemaphores failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkWaitSemaphores failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkWaitSemaphores failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkWaitSemaphores failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkWaitSemaphores failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Timeout: default: break; } return result; } } /// /// vkSignalSemaphore - Signal a timeline semaphore on the host /// /// /// /// :refpage: vkSignalSemaphore /// /// /// To signal a semaphore created with a VkSemaphoreType of /// VK_SEMAPHORE_TYPE_TIMELINE with a particular counter value, on the /// host, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SignalSemaphore( this VulkanHandleWrapper handle, in VkSemaphoreSignalInfo pSignalInfo ) { fixed (VkSemaphoreSignalInfo* pSignalInfoFixed = &pSignalInfo) { VkResult result = handle.PInvoke.vkSignalSemaphore.Invoke(handle.Handle, pSignalInfoFixed); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkSignalSemaphore failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkSignalSemaphore failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkSignalSemaphore failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkSignalSemaphore failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkGetBufferDeviceAddress - Query an address of a buffer /// /// /// /// To query a 64-bit buffer device address value which can be used to identify /// a buffer to API commands or through which buffer memory can be accessed, /// call: /// /// /// // Jon: 3-way conditional logic here is wrong /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkDeviceAddress GetBufferDeviceAddress( this VulkanHandleWrapper handle, in VkBufferDeviceAddressInfo pInfo ) { fixed (VkBufferDeviceAddressInfo* pInfoFixed = &pInfo) { return handle.PInvoke.vkGetBufferDeviceAddress.Invoke(handle.Handle, pInfoFixed); } } /// /// vkGetBufferOpaqueCaptureAddress - Query an opaque capture address of a buffer /// /// /// /// To query a 64-bit buffer opaque capture address, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe nint GetBufferOpaqueCaptureAddress( this VulkanHandleWrapper handle, in VkBufferDeviceAddressInfo pInfo ) { fixed (VkBufferDeviceAddressInfo* pInfoFixed = &pInfo) { return handle.PInvoke.vkGetBufferOpaqueCaptureAddress.Invoke(handle.Handle, pInfoFixed); } } /// /// vkGetDeviceMemoryOpaqueCaptureAddress - Query an opaque capture address of a memory object /// /// /// /// To query a 64-bit opaque capture address value from a memory object, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe nint GetMemoryOpaqueCaptureAddress( this VulkanHandleWrapper handle, in VkDeviceMemoryOpaqueCaptureAddressInfo pInfo ) { fixed (VkDeviceMemoryOpaqueCaptureAddressInfo* pInfoFixed = &pInfo) { return handle.PInvoke.vkGetDeviceMemoryOpaqueCaptureAddress.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCmdDrawIndirectCount - Draw primitives with indirect parameters and draw count /// /// /// /// :refpage: vkCmdDrawIndirectCount /// /// /// To record a non-indexed draw call with a draw call count sourced from a /// buffer, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawIndirectCount( this T handle, VkBuffer buffer, ByteSize64 offset, VkBuffer countBuffer, ByteSize64 countBufferOffset, int maxDrawCount, int stride ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawIndirectCount.Invoke( handle.Handle, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); } /// /// vkCmdDrawIndexedIndirectCount - Draw parameters with indirect parameters, indexed vertices, and draw count /// /// /// /// :refpage: vkCmdDrawIndexedIndirectCount /// /// /// To record an indexed draw call with a draw call count sourced from a buffer, /// call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawIndexedIndirectCount( this T handle, VkBuffer buffer, ByteSize64 offset, VkBuffer countBuffer, ByteSize64 countBufferOffset, int maxDrawCount, int stride ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawIndexedIndirectCount.Invoke( handle.Handle, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); } /// /// vkCreateRenderPass2 - Create a new render pass object /// /// /// /// :refpage: vkCreateRenderPass2 /// :objectnameplural: render passes /// :objectnamecamelcase: renderPass /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create a render pass, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkRenderPass CreateRenderPass2( this VulkanHandleWrapper handle, in VkRenderPassCreateInfo2 pCreateInfo, VkAllocator? pAllocator ) { fixed (VkRenderPassCreateInfo2* pCreateInfoFixed = &pCreateInfo) { VkRenderPass pRenderPassLocal = default; VkResult result = handle.PInvoke.vkCreateRenderPass2.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pRenderPassLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateRenderPass2 failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateRenderPass2 failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateRenderPass2 failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateRenderPass2 failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pRenderPassLocal; } } /// /// vkCmdBeginRenderPass2 - Begin a new render pass /// /// /// /// To begin a render pass, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BeginRenderPass2( this T handle, VkRenderPassBeginInfo* pRenderPassBegin, in VkSubpassBeginInfo pSubpassBeginInfo ) where T : VulkanHandleWrapper { fixed (VkSubpassBeginInfo* pSubpassBeginInfoFixed = &pSubpassBeginInfo) { handle.PInvoke.vkCmdBeginRenderPass2.Invoke(handle.Handle, pRenderPassBegin, pSubpassBeginInfoFixed); } } /// /// vkCmdNextSubpass2 - Transition to the next subpass of a render pass /// /// /// /// To transition to the next subpass in the render pass instance after /// recording the commands for a subpass, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void NextSubpass2( this T handle, in VkSubpassBeginInfo pSubpassBeginInfo, in VkSubpassEndInfo pSubpassEndInfo ) where T : VulkanHandleWrapper { fixed (VkSubpassEndInfo* pSubpassEndInfoFixed = &pSubpassEndInfo) fixed (VkSubpassBeginInfo* pSubpassBeginInfoFixed = &pSubpassBeginInfo) { handle.PInvoke.vkCmdNextSubpass2.Invoke(handle.Handle, pSubpassBeginInfoFixed, pSubpassEndInfoFixed); } } /// /// vkCmdEndRenderPass2 - End the current render pass /// /// /// /// To record a command to end a render pass instance after recording the /// commands for the last subpass, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void EndRenderPass2(this T handle, in VkSubpassEndInfo pSubpassEndInfo) where T : VulkanHandleWrapper { fixed (VkSubpassEndInfo* pSubpassEndInfoFixed = &pSubpassEndInfo) { handle.PInvoke.vkCmdEndRenderPass2.Invoke(handle.Handle, pSubpassEndInfoFixed); } } /// /// vkCreatePrivateDataSlot - Create a slot for private data storage /// /// /// /// To create a private data slot, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkPrivateDataSlot CreatePrivateDataSlot( this VulkanHandleWrapper handle, in VkPrivateDataSlotCreateInfo pCreateInfo, VkAllocator? pAllocator ) { fixed (VkPrivateDataSlotCreateInfo* pCreateInfoFixed = &pCreateInfo) { VkPrivateDataSlot pPrivateDataSlotLocal = default; VkResult result = handle.PInvoke.vkCreatePrivateDataSlot.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pPrivateDataSlotLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreatePrivateDataSlot failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreatePrivateDataSlot failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreatePrivateDataSlot failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pPrivateDataSlotLocal; } } /// /// vkDestroyPrivateDataSlot - Destroy a private data slot /// /// /// /// To destroy a private data slot, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyPrivateDataSlot( this VulkanHandleWrapper handle, VkPrivateDataSlot privateDataSlot, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyPrivateDataSlot.Invoke(handle.Handle, privateDataSlot, pAllocator); } /// /// vkSetPrivateData - Associate data with a Vulkan object /// /// /// /// To store application-defined data in a slot associated with a Vulkan object, /// call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetPrivateData( this VulkanHandleWrapper handle, VkObjectType objectType, nint objectHandle, VkPrivateDataSlot privateDataSlot, nint data ) { VkResult result = handle.PInvoke.vkSetPrivateData.Invoke( handle.Handle, objectType, objectHandle, privateDataSlot, data ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkSetPrivateData failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkSetPrivateData failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkSetPrivateData failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkGetPrivateData - Retrieve data associated with a Vulkan object /// /// /// /// To retrieve application-defined data from a slot associated with a Vulkan /// object, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe nint GetPrivateData( this VulkanHandleWrapper handle, VkObjectType objectType, nint objectHandle, VkPrivateDataSlot privateDataSlot ) { nint pDataLocal = default; handle.PInvoke.vkGetPrivateData.Invoke( handle.Handle, objectType, objectHandle, privateDataSlot, &pDataLocal ); return pDataLocal; } /// /// vkCmdPipelineBarrier2 - Insert a memory dependency /// /// /// /// :refpage: vkCmdPipelineBarrier2 /// /// /// To record a pipeline barrier, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void PipelineBarrier2(this T handle, in VkDependencyInfo pDependencyInfo) where T : VulkanHandleWrapper { fixed (VkDependencyInfo* pDependencyInfoFixed = &pDependencyInfo) { handle.PInvoke.vkCmdPipelineBarrier2.Invoke(handle.Handle, pDependencyInfoFixed); } } /// /// vkCmdWriteTimestamp2 - Write a device timestamp into a query object /// /// /// /// :refpage: vkCmdWriteTimestamp2 /// /// /// To request a timestamp and write the value to memory, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteTimestamp2( this T handle, VkPipelineStageFlags2 stage, VkQueryPool queryPool, int query ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdWriteTimestamp2.Invoke(handle.Handle, stage, queryPool, query); } /// /// vkQueueSubmit2 - Submits command buffers to a queue /// /// /// /// :refpage: vkQueueSubmit2KHR /// /// /// To submit command buffers to a queue, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe void Submit2Internal( this VulkanHandleWrapper handle, scoped ReadOnlySpan pSubmits, VkFence fence ) { fixed (VkSubmitInfo2* pSubmitsFixed = pSubmits) { VkResult result = handle.PInvoke.vkQueueSubmit2.Invoke( handle.Handle, pSubmits.Length, pSubmitsFixed, fence ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkQueueSubmit2 failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkQueueSubmit2 failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkQueueSubmit2 failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkQueueSubmit2 failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkQueueSubmit2 failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCmdCopyBuffer2 - Copy data between buffer regions /// /// /// /// :refpage: vkCmdCopyBuffer2 /// /// /// To copy data between buffer objects, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyBuffer2(this T handle, in VkCopyBufferInfo2 pCopyBufferInfo) where T : VulkanHandleWrapper { fixed (VkCopyBufferInfo2* pCopyBufferInfoFixed = &pCopyBufferInfo) { handle.PInvoke.vkCmdCopyBuffer2.Invoke(handle.Handle, pCopyBufferInfoFixed); } } /// /// vkCmdCopyImage2 - Copy data between images /// /// /// /// :refpage: vkCmdCopyImage2 /// /// /// To copy data between image objects, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyImage2(this T handle, in VkCopyImageInfo2 pCopyImageInfo) where T : VulkanHandleWrapper { fixed (VkCopyImageInfo2* pCopyImageInfoFixed = &pCopyImageInfo) { handle.PInvoke.vkCmdCopyImage2.Invoke(handle.Handle, pCopyImageInfoFixed); } } /// /// vkCmdCopyBufferToImage2 - Copy data from a buffer into an image /// /// /// /// :refpage: vkCmdCopyBufferToImage2 /// /// /// To copy data from a buffer object to an image object, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyBufferToImage2( this T handle, in VkCopyBufferToImageInfo2 pCopyBufferToImageInfo ) where T : VulkanHandleWrapper { fixed (VkCopyBufferToImageInfo2* pCopyBufferToImageInfoFixed = &pCopyBufferToImageInfo) { handle.PInvoke.vkCmdCopyBufferToImage2.Invoke(handle.Handle, pCopyBufferToImageInfoFixed); } } /// /// vkCmdCopyImageToBuffer2 - Copy image data into a buffer /// /// /// /// :refpage: vkCmdCopyImageToBuffer2 /// /// /// To copy data from an image object to a buffer object, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyImageToBuffer2( this T handle, in VkCopyImageToBufferInfo2 pCopyImageToBufferInfo ) where T : VulkanHandleWrapper { fixed (VkCopyImageToBufferInfo2* pCopyImageToBufferInfoFixed = &pCopyImageToBufferInfo) { handle.PInvoke.vkCmdCopyImageToBuffer2.Invoke(handle.Handle, pCopyImageToBufferInfoFixed); } } /// /// vkGetDeviceBufferMemoryRequirements - Returns the memory requirements for specified Vulkan object /// /// /// /// To determine the memory requirements for a buffer resource without creating /// an object, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetBufferMemoryRequirements( this VulkanHandleWrapper handle, in VkDeviceBufferMemoryRequirements pInfo, ref VkMemoryRequirements2 pMemoryRequirements ) { fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) fixed (VkDeviceBufferMemoryRequirements* pInfoFixed = &pInfo) { handle.PInvoke.vkGetDeviceBufferMemoryRequirements.Invoke( handle.Handle, pInfoFixed, pMemoryRequirementsFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryRequirements2. public static VkMemoryRequirements2 GetBufferMemoryRequirements( this VulkanHandleWrapper handle, in VkDeviceBufferMemoryRequirements pInfo ) { VkMemoryRequirements2 outValue = new(); GetBufferMemoryRequirements(handle, pInfo, ref outValue); return outValue; } /// /// vkGetDeviceImageMemoryRequirements - Returns the memory requirements for specified Vulkan object /// /// /// /// To determine the memory requirements for an image resource without creating /// an object, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetImageMemoryRequirements( this VulkanHandleWrapper handle, in VkDeviceImageMemoryRequirements pInfo, ref VkMemoryRequirements2 pMemoryRequirements ) { fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) fixed (VkDeviceImageMemoryRequirements* pInfoFixed = &pInfo) { handle.PInvoke.vkGetDeviceImageMemoryRequirements.Invoke( handle.Handle, pInfoFixed, pMemoryRequirementsFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryRequirements2. public static VkMemoryRequirements2 GetImageMemoryRequirements( this VulkanHandleWrapper handle, in VkDeviceImageMemoryRequirements pInfo ) { VkMemoryRequirements2 outValue = new(); GetImageMemoryRequirements(handle, pInfo, ref outValue); return outValue; } /// /// vkGetDeviceImageSparseMemoryRequirements - Query the memory requirements for a sparse image /// /// /// /// To determine the sparse memory requirements for an image resource without /// creating an object, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe void GetImageSparseMemoryRequirements( this VulkanHandleWrapper handle, in VkDeviceImageMemoryRequirements pInfo, ref int pSparseMemoryRequirementCount, scoped ReadOnlySpan pSparseMemoryRequirements ) { fixed (VkSparseImageMemoryRequirements2* pSparseMemoryRequirementsFixed = pSparseMemoryRequirements) fixed (VkDeviceImageMemoryRequirements* pInfoFixed = &pInfo) fixed (int* pSparseMemoryRequirementCountFixed = &pSparseMemoryRequirementCount) { handle.PInvoke.vkGetDeviceImageSparseMemoryRequirements.Invoke( handle.Handle, pInfoFixed, pSparseMemoryRequirementCountFixed, pSparseMemoryRequirementsFixed ); } } /// Queries the required length. /// The required length. public static int GetImageSparseMemoryRequirements_Count( this VulkanHandleWrapper handle, in VkDeviceImageMemoryRequirements pInfo ) { int pSparseMemoryRequirementCount = default; GetImageSparseMemoryRequirements(handle, pInfo, ref pSparseMemoryRequirementCount, null); return pSparseMemoryRequirementCount; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static void GetImageSparseMemoryRequirements_Write( this VulkanHandleWrapper handle, in VkDeviceImageMemoryRequirements pInfo, scoped ReadOnlySpan pSparseMemoryRequirements ) { int pSparseMemoryRequirementCount = pSparseMemoryRequirements.Length; GetImageSparseMemoryRequirements( handle, pInfo, ref pSparseMemoryRequirementCount, pSparseMemoryRequirements ); } /// /// vkCmdSetEvent2 - Set an event object to signaled state /// /// /// /// To signal an event from a device, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetEvent2(this T handle, VkEvent @event, in VkDependencyInfo pDependencyInfo) where T : VulkanHandleWrapper { fixed (VkDependencyInfo* pDependencyInfoFixed = &pDependencyInfo) { handle.PInvoke.vkCmdSetEvent2.Invoke(handle.Handle, @event, pDependencyInfoFixed); } } /// /// vkCmdResetEvent2 - Reset an event object to non-signaled state /// /// /// /// :refpage: vkCmdResetEvent2 /// /// /// To unsignal the event from a device, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ResetEvent2(this T handle, VkEvent @event, VkPipelineStageFlags2 stageMask) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdResetEvent2.Invoke(handle.Handle, @event, stageMask); } /// /// vkCmdWaitEvents2 - Wait for one or more events /// /// /// /// :refpage: vkCmdWaitEvents2 /// /// /// To wait for one or more events to enter the signaled state on a device, /// call: /// /// /// [[synchronization-events-waiting-device]] /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void WaitEvents2( this T handle, scoped ReadOnlySpan pEvents, scoped ReadOnlySpan pDependencyInfos ) where T : VulkanHandleWrapper { fixed (VkDependencyInfo* pDependencyInfosFixed = pDependencyInfos) fixed (VkEvent* pEventsFixed = pEvents) { handle.PInvoke.vkCmdWaitEvents2.Invoke( handle.Handle, pEvents.Length, pEventsFixed, pDependencyInfosFixed ); } } /// /// vkCmdBlitImage2 - Copy regions of an image, potentially performing format conversion, /// /// /// /// :refpage: vkCmdBlitImage2 /// /// /// To copy regions of a source image into a destination image, potentially /// performing format conversion, arbitrary scaling, and filtering, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BlitImage2(this T handle, in VkBlitImageInfo2 pBlitImageInfo) where T : VulkanHandleWrapper { fixed (VkBlitImageInfo2* pBlitImageInfoFixed = &pBlitImageInfo) { handle.PInvoke.vkCmdBlitImage2.Invoke(handle.Handle, pBlitImageInfoFixed); } } /// /// vkCmdResolveImage2 - Resolve regions of an image /// /// /// /// :refpage: vkCmdResolveImage2 /// /// /// To resolve a multisample image to a non-multisample image, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void ResolveImage2(this T handle, in VkResolveImageInfo2 pResolveImageInfo) where T : VulkanHandleWrapper { fixed (VkResolveImageInfo2* pResolveImageInfoFixed = &pResolveImageInfo) { handle.PInvoke.vkCmdResolveImage2.Invoke(handle.Handle, pResolveImageInfoFixed); } } /// /// vkCmdBeginRendering - Begin a dynamic render pass instance /// /// /// /// To begin a render pass instance, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BeginRendering(this T handle, in VkRenderingInfo pRenderingInfo) where T : VulkanHandleWrapper { fixed (VkRenderingInfo* pRenderingInfoFixed = &pRenderingInfo) { handle.PInvoke.vkCmdBeginRendering.Invoke(handle.Handle, pRenderingInfoFixed); } } /// /// vkCmdEndRendering - End a dynamic render pass instance /// /// /// /// To end a render pass instance, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void EndRendering(this T handle) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdEndRendering.Invoke(handle.Handle); } /// /// vkCmdSetCullMode - Set cull mode dynamically for a command buffer /// /// /// /// To dynamically set^ the cull mode, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetCullMode(this T handle, VkCullModeFlags cullMode) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetCullMode.Invoke(handle.Handle, cullMode); } /// /// vkCmdSetFrontFace - Set front face orientation dynamically for a command buffer /// /// /// /// To dynamically set^ the front face orientation, /// call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetFrontFace(this T handle, VkFrontFace frontFace) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetFrontFace.Invoke(handle.Handle, frontFace); } /// /// vkCmdSetPrimitiveTopology - Set primitive topology state dynamically for a command buffer /// /// /// /// To dynamically set^ primitive topology, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetPrimitiveTopology(this T handle, VkPrimitiveTopology primitiveTopology) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetPrimitiveTopology.Invoke(handle.Handle, primitiveTopology); } /// /// vkCmdSetViewportWithCount - Set the viewport count and viewports dynamically for a command buffer /// /// /// /// To dynamically set^ the viewport count and /// viewports, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetViewportWithCount(this T handle, scoped ReadOnlySpan pViewports) where T : VulkanHandleWrapper { fixed (VkViewport* pViewportsFixed = pViewports) { handle.PInvoke.vkCmdSetViewportWithCount.Invoke(handle.Handle, pViewports.Length, pViewportsFixed); } } /// /// vkCmdSetScissorWithCount - Set the scissor count and scissor rectangular bounds dynamically for a command buffer /// /// /// /// To dynamically set^ the scissor count and /// scissor rectangular bounds, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetScissorWithCount(this T handle, scoped ReadOnlySpan pScissors) where T : VulkanHandleWrapper { fixed (VkRect2D* pScissorsFixed = pScissors) { handle.PInvoke.vkCmdSetScissorWithCount.Invoke(handle.Handle, pScissors.Length, pScissorsFixed); } } /// /// vkCmdBindVertexBuffers2 - Bind vertex buffers to a command buffer and dynamically set strides /// /// /// /// To bind vertex buffers, along with their sizes and strides, to a command /// buffer for use in subsequent drawing commands, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindVertexBuffers2( this T handle, int firstBinding, scoped ReadOnlySpan pBuffers, scoped ReadOnlySpan pOffsets, scoped ReadOnlySpan pSizes, scoped ReadOnlySpan pStrides ) where T : VulkanHandleWrapper { fixed (ByteSize64* pStridesFixed = pStrides) fixed (ByteSize64* pSizesFixed = pSizes) fixed (ByteSize64* pOffsetsFixed = pOffsets) fixed (VkBuffer* pBuffersFixed = pBuffers) { handle.PInvoke.vkCmdBindVertexBuffers2.Invoke( handle.Handle, firstBinding, pBuffers.Length, pBuffersFixed, pOffsetsFixed, pSizesFixed, pStridesFixed ); } } /// /// vkCmdSetDepthTestEnable - Set depth test enable dynamically for a command buffer /// /// /// /// To dynamically enable or disable^ the depth /// test, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDepthTestEnable(this T handle, Brutal.Bool32 depthTestEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDepthTestEnable.Invoke(handle.Handle, depthTestEnable); } /// /// vkCmdSetDepthWriteEnable - Set depth write enable dynamically for a command buffer /// /// /// /// To dynamically set^ the depth write enable, /// call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDepthWriteEnable(this T handle, Brutal.Bool32 depthWriteEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDepthWriteEnable.Invoke(handle.Handle, depthWriteEnable); } /// /// vkCmdSetDepthCompareOp - Set depth comparison operator dynamically for a command buffer /// /// /// /// To dynamically set^ the depth compare operator, /// call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDepthCompareOp(this T handle, VkCompareOp depthCompareOp) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDepthCompareOp.Invoke(handle.Handle, depthCompareOp); } /// /// vkCmdSetDepthBoundsTestEnable - Set depth bounds test enable dynamically for a command buffer /// /// /// /// To dynamically enable or disable^ the depth /// bounds test, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDepthBoundsTestEnable(this T handle, Brutal.Bool32 depthBoundsTestEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDepthBoundsTestEnable.Invoke(handle.Handle, depthBoundsTestEnable); } /// /// vkCmdSetStencilTestEnable - Set stencil test enable dynamically for a command buffer /// /// /// /// To dynamically enable or disable^ the stencil /// test, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetStencilTestEnable(this T handle, Brutal.Bool32 stencilTestEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetStencilTestEnable.Invoke(handle.Handle, stencilTestEnable); } /// /// vkCmdSetStencilOp - Set stencil operation dynamically for a command buffer /// /// /// /// To dynamically set^ the stencil operation, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetStencilOp( this T handle, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetStencilOp.Invoke(handle.Handle, faceMask, failOp, passOp, depthFailOp, compareOp); } /// /// vkCmdSetRasterizerDiscardEnable - Control whether primitives are discarded before the rasterization stage dynamically for a command buffer /// /// /// /// To dynamically enable^ whether primitives are /// discarded before the rasterization stage, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetRasterizerDiscardEnable(this T handle, Brutal.Bool32 rasterizerDiscardEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetRasterizerDiscardEnable.Invoke(handle.Handle, rasterizerDiscardEnable); } /// /// vkCmdSetDepthBiasEnable - Control whether to bias fragment depth values dynamically for a command buffer /// /// /// /// To dynamically enable^ whether to bias fragment /// depth values, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDepthBiasEnable(this T handle, Brutal.Bool32 depthBiasEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDepthBiasEnable.Invoke(handle.Handle, depthBiasEnable); } /// /// vkCmdSetPrimitiveRestartEnable - Set primitive assembly restart state dynamically for a command buffer /// /// /// /// To dynamically control^ whether a special vertex /// index value is treated as restarting the assembly of primitives, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetPrimitiveRestartEnable(this T handle, Brutal.Bool32 primitiveRestartEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetPrimitiveRestartEnable.Invoke(handle.Handle, primitiveRestartEnable); } /// /// vkMapMemory2 - Map a memory object into application address space /// /// /// /// To retrieve a host virtual address pointer to a region of a mappable memory /// object, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void MapMemory2( this VulkanHandleWrapper handle, in VkMemoryMapInfo pMemoryMapInfo, void** ppData ) { fixed (VkMemoryMapInfo* pMemoryMapInfoFixed = &pMemoryMapInfo) { VkResult result = handle.PInvoke.vkMapMemory2.Invoke(handle.Handle, pMemoryMapInfoFixed, ppData); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkMapMemory2 failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkMapMemory2 failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorMemoryMapFailed: throw new VkResultError( VkResult.ErrorMemoryMapFailed, "Vulkan call to vkMapMemory2 failed with error: VK_ERROR_MEMORY_MAP_FAILED" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkMapMemory2 failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkMapMemory2 failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkUnmapMemory2 - Unmap a previously mapped memory object /// /// /// /// To unmap a memory object once host access to it is no longer needed by the /// application, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void UnmapMemory2( this VulkanHandleWrapper handle, in VkMemoryUnmapInfo pMemoryUnmapInfo ) { fixed (VkMemoryUnmapInfo* pMemoryUnmapInfoFixed = &pMemoryUnmapInfo) { VkResult result = handle.PInvoke.vkUnmapMemory2.Invoke(handle.Handle, pMemoryUnmapInfoFixed); switch (result) { case VkResult.ErrorMemoryMapFailed: throw new VkResultError( VkResult.ErrorMemoryMapFailed, "Vulkan call to vkUnmapMemory2 failed with error: VK_ERROR_MEMORY_MAP_FAILED" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkUnmapMemory2 failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkUnmapMemory2 failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkGetDeviceImageSubresourceLayout - Retrieve information about an image subresource without an image object /// /// /// /// To query the memory layout of an image subresource, without an image object, /// call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetImageSubresourceLayout( this VulkanHandleWrapper handle, in VkDeviceImageSubresourceInfo pInfo, ref VkSubresourceLayout2 pLayout ) { fixed (VkSubresourceLayout2* pLayoutFixed = &pLayout) fixed (VkDeviceImageSubresourceInfo* pInfoFixed = &pInfo) { handle.PInvoke.vkGetDeviceImageSubresourceLayout.Invoke(handle.Handle, pInfoFixed, pLayoutFixed); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkSubresourceLayout2. public static VkSubresourceLayout2 GetImageSubresourceLayout( this VulkanHandleWrapper handle, in VkDeviceImageSubresourceInfo pInfo ) { VkSubresourceLayout2 outValue = new(); GetImageSubresourceLayout(handle, pInfo, ref outValue); return outValue; } /// /// vkGetImageSubresourceLayout2 - Retrieve information about an image subresource /// /// /// /// :refpage: vkGetImageSubresourceLayout2 /// /// /// To query the memory layout of an image subresource, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetImageSubresourceLayout2( this VulkanHandleWrapper handle, VkImage image, VkImageSubresource2* pSubresource, ref VkSubresourceLayout2 pLayout ) { fixed (VkSubresourceLayout2* pLayoutFixed = &pLayout) { handle.PInvoke.vkGetImageSubresourceLayout2.Invoke(handle.Handle, image, pSubresource, pLayoutFixed); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkSubresourceLayout2. public static unsafe VkSubresourceLayout2 GetImageSubresourceLayout2( this VulkanHandleWrapper handle, VkImage image, VkImageSubresource2* pSubresource ) { VkSubresourceLayout2 outValue = new(); GetImageSubresourceLayout2(handle, image, pSubresource, ref outValue); return outValue; } /// /// vkCopyMemoryToImage - Copy data from host memory into an image /// /// /// /// :refpage: vkCopyMemoryToImage /// /// /// To copy data from host memory to an image object, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyMemoryToImage( this VulkanHandleWrapper handle, in VkCopyMemoryToImageInfo pCopyMemoryToImageInfo ) { fixed (VkCopyMemoryToImageInfo* pCopyMemoryToImageInfoFixed = &pCopyMemoryToImageInfo) { VkResult result = handle.PInvoke.vkCopyMemoryToImage.Invoke(handle.Handle, pCopyMemoryToImageInfoFixed); switch (result) { case VkResult.ErrorInitializationFailed: throw new VkResultError( VkResult.ErrorInitializationFailed, "Vulkan call to vkCopyMemoryToImage failed with error: VK_ERROR_INITIALIZATION_FAILED" ); case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCopyMemoryToImage failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCopyMemoryToImage failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorMemoryMapFailed: throw new VkResultError( VkResult.ErrorMemoryMapFailed, "Vulkan call to vkCopyMemoryToImage failed with error: VK_ERROR_MEMORY_MAP_FAILED" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCopyMemoryToImage failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCopyMemoryToImage failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCopyImageToMemory - Copy image data into host memory /// /// /// /// :refpage: vkCopyImageToMemory /// /// /// To copy data from an image object to host memory, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyImageToMemory( this VulkanHandleWrapper handle, in VkCopyImageToMemoryInfo pCopyImageToMemoryInfo ) { fixed (VkCopyImageToMemoryInfo* pCopyImageToMemoryInfoFixed = &pCopyImageToMemoryInfo) { VkResult result = handle.PInvoke.vkCopyImageToMemory.Invoke(handle.Handle, pCopyImageToMemoryInfoFixed); switch (result) { case VkResult.ErrorInitializationFailed: throw new VkResultError( VkResult.ErrorInitializationFailed, "Vulkan call to vkCopyImageToMemory failed with error: VK_ERROR_INITIALIZATION_FAILED" ); case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCopyImageToMemory failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCopyImageToMemory failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorMemoryMapFailed: throw new VkResultError( VkResult.ErrorMemoryMapFailed, "Vulkan call to vkCopyImageToMemory failed with error: VK_ERROR_MEMORY_MAP_FAILED" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCopyImageToMemory failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCopyImageToMemory failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCopyImageToImage - Copy image data using the host /// /// /// /// :refpage: vkCopyImageToImage /// /// /// To copy data from an image object to another image object using the host, /// call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyImageToImage( this VulkanHandleWrapper handle, in VkCopyImageToImageInfo pCopyImageToImageInfo ) { fixed (VkCopyImageToImageInfo* pCopyImageToImageInfoFixed = &pCopyImageToImageInfo) { VkResult result = handle.PInvoke.vkCopyImageToImage.Invoke(handle.Handle, pCopyImageToImageInfoFixed); switch (result) { case VkResult.ErrorInitializationFailed: throw new VkResultError( VkResult.ErrorInitializationFailed, "Vulkan call to vkCopyImageToImage failed with error: VK_ERROR_INITIALIZATION_FAILED" ); case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCopyImageToImage failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCopyImageToImage failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorMemoryMapFailed: throw new VkResultError( VkResult.ErrorMemoryMapFailed, "Vulkan call to vkCopyImageToImage failed with error: VK_ERROR_MEMORY_MAP_FAILED" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCopyImageToImage failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCopyImageToImage failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkTransitionImageLayout - Perform an image layout transition on the host /// /// /// /// To perform an image layout transition on the host, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void TransitionImageLayout( this VulkanHandleWrapper handle, scoped ReadOnlySpan pTransitions ) { fixed (VkHostImageLayoutTransitionInfo* pTransitionsFixed = pTransitions) { VkResult result = handle.PInvoke.vkTransitionImageLayout.Invoke( handle.Handle, pTransitions.Length, pTransitionsFixed ); switch (result) { case VkResult.ErrorInitializationFailed: throw new VkResultError( VkResult.ErrorInitializationFailed, "Vulkan call to vkTransitionImageLayout failed with error: VK_ERROR_INITIALIZATION_FAILED" ); case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkTransitionImageLayout failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkTransitionImageLayout failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorMemoryMapFailed: throw new VkResultError( VkResult.ErrorMemoryMapFailed, "Vulkan call to vkTransitionImageLayout failed with error: VK_ERROR_MEMORY_MAP_FAILED" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkTransitionImageLayout failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkTransitionImageLayout failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCmdPushDescriptorSet - Pushes descriptor updates into a command buffer /// /// /// /// :refpage: vkCmdPushDescriptorSet /// /// /// To push descriptor updates into a command buffer, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void PushDescriptorSet( this T handle, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, int set, scoped ReadOnlySpan pDescriptorWrites ) where T : VulkanHandleWrapper { fixed (VkWriteDescriptorSet* pDescriptorWritesFixed = pDescriptorWrites) { handle.PInvoke.vkCmdPushDescriptorSet.Invoke( handle.Handle, pipelineBindPoint, layout, set, pDescriptorWrites.Length, pDescriptorWritesFixed ); } } /// /// vkCmdPushDescriptorSetWithTemplate - Pushes descriptor updates into a command buffer using a descriptor update template /// /// /// /// :refpage: vkCmdPushDescriptorSetWithTemplate /// /// /// To use a descriptor update template to specify the push descriptors to /// update in a command buffer, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void PushDescriptorSetWithTemplate( this T handle, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, int set, void* pData ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdPushDescriptorSetWithTemplate.Invoke( handle.Handle, descriptorUpdateTemplate, layout, set, pData ); } /// /// vkCmdBindDescriptorSets2 - Binds descriptor sets to a command buffer /// /// /// /// :refpage: vkCmdBindDescriptorSets2 /// /// /// To bind one or more descriptor sets to a command buffer, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindDescriptorSets2( this T handle, in VkBindDescriptorSetsInfo pBindDescriptorSetsInfo ) where T : VulkanHandleWrapper { fixed (VkBindDescriptorSetsInfo* pBindDescriptorSetsInfoFixed = &pBindDescriptorSetsInfo) { handle.PInvoke.vkCmdBindDescriptorSets2.Invoke(handle.Handle, pBindDescriptorSetsInfoFixed); } } /// /// vkCmdPushConstants2 - Update the values of push constants /// /// /// /// :refpage: vkCmdPushConstants2 /// /// /// To update push constants, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void PushConstants2(this T handle, in VkPushConstantsInfo pPushConstantsInfo) where T : VulkanHandleWrapper { fixed (VkPushConstantsInfo* pPushConstantsInfoFixed = &pPushConstantsInfo) { handle.PInvoke.vkCmdPushConstants2.Invoke(handle.Handle, pPushConstantsInfoFixed); } } /// /// vkCmdPushDescriptorSet2 - Pushes descriptor updates into a command buffer /// /// /// /// :refpage: vkCmdPushDescriptorSet2 /// /// /// To push descriptor updates into a command buffer, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void PushDescriptorSet2( this T handle, in VkPushDescriptorSetInfo pPushDescriptorSetInfo ) where T : VulkanHandleWrapper { fixed (VkPushDescriptorSetInfo* pPushDescriptorSetInfoFixed = &pPushDescriptorSetInfo) { handle.PInvoke.vkCmdPushDescriptorSet2.Invoke(handle.Handle, pPushDescriptorSetInfoFixed); } } /// /// vkCmdPushDescriptorSetWithTemplate2 - Pushes descriptor updates into a command buffer using a descriptor update template /// /// /// /// :refpage: vkCmdPushDescriptorSetWithTemplate2 /// /// /// To use a descriptor update template to specify the push descriptors to /// update in a command buffer, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void PushDescriptorSetWithTemplate2( this T handle, in VkPushDescriptorSetWithTemplateInfo pPushDescriptorSetWithTemplateInfo ) where T : VulkanHandleWrapper { fixed ( VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfoFixed = &pPushDescriptorSetWithTemplateInfo ) { handle.PInvoke.vkCmdPushDescriptorSetWithTemplate2.Invoke( handle.Handle, pPushDescriptorSetWithTemplateInfoFixed ); } } /// /// vkCmdSetLineStipple - Set line stipple dynamically for a command buffer /// /// /// /// To dynamically set^ the line stipple state, /// call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetLineStipple(this T handle, int lineStippleFactor, ushort lineStipplePattern) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetLineStipple.Invoke(handle.Handle, lineStippleFactor, lineStipplePattern); } /// /// vkCmdBindIndexBuffer2 - Bind an index buffer to a command buffer /// /// /// /// :refpage: vkCmdBindIndexBuffer2 /// /// /// To bind an index buffer, along with its size, to a command buffer, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void BindIndexBuffer2( this T handle, VkBuffer buffer, ByteSize64 offset, ByteSize64 size, VkIndexType indexType ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdBindIndexBuffer2.Invoke(handle.Handle, buffer, offset, size, indexType); } /// /// vkGetRenderingAreaGranularity - Returns the granularity for dynamic rendering optimal render area /// /// /// /// To query the render area granularity for a render pass instance, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetRenderingAreaGranularity( this VulkanHandleWrapper handle, in VkRenderingAreaInfo pRenderingAreaInfo, ref VkExtent2D pGranularity ) { fixed (VkExtent2D* pGranularityFixed = &pGranularity) fixed (VkRenderingAreaInfo* pRenderingAreaInfoFixed = &pRenderingAreaInfo) { handle.PInvoke.vkGetRenderingAreaGranularity.Invoke( handle.Handle, pRenderingAreaInfoFixed, pGranularityFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkExtent2D. public static VkExtent2D GetRenderingAreaGranularity( this VulkanHandleWrapper handle, in VkRenderingAreaInfo pRenderingAreaInfo ) { VkExtent2D outValue = new(); GetRenderingAreaGranularity(handle, pRenderingAreaInfo, ref outValue); return outValue; } /// /// vkCmdSetRenderingAttachmentLocations - Set color attachment location mappings for a command buffer /// /// /// /// To set the fragment output location mappings during rendering, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetRenderingAttachmentLocations( this T handle, in VkRenderingAttachmentLocationInfo pLocationInfo ) where T : VulkanHandleWrapper { fixed (VkRenderingAttachmentLocationInfo* pLocationInfoFixed = &pLocationInfo) { handle.PInvoke.vkCmdSetRenderingAttachmentLocations.Invoke(handle.Handle, pLocationInfoFixed); } } /// /// vkCmdSetRenderingInputAttachmentIndices - Set input attachment index mappings for a command buffer /// /// /// /// To set the input attachment index mappings during dynamic rendering, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetRenderingInputAttachmentIndices( this T handle, in VkRenderingInputAttachmentIndexInfo pInputAttachmentIndexInfo ) where T : VulkanHandleWrapper { fixed (VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfoFixed = &pInputAttachmentIndexInfo) { handle.PInvoke.vkCmdSetRenderingInputAttachmentIndices.Invoke( handle.Handle, pInputAttachmentIndexInfoFixed ); } } /// /// vkCreateSwapchainKHR - Create a swapchain /// /// /// /// :refpage: vkCreateSwapchainKHR /// :objectnameplural: swapchains /// :objectnamecamelcase: swapchain /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create a swapchain, call: /// /// /// // Provided by VK_KHR_swapchain /// VkResult vkCreateSwapchainKHR( /// VkDevice device, /// const VkSwapchainCreateInfoKHR* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkSwapchainKHR* pSwapchain); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkSwapchainKHR CreateSwapchainKHR( this VulkanHandleWrapper handle, in VkSwapchainCreateInfoKHR pCreateInfo, VkAllocator? pAllocator ) { fixed (VkSwapchainCreateInfoKHR* pCreateInfoFixed = &pCreateInfo) { VkSwapchainKHR pSwapchainLocal = default; VkResult result = handle.PInvoke.vkCreateSwapchainKHR.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pSwapchainLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorSurfaceLostKHR: throw new VkResultError( VkResult.ErrorSurfaceLostKHR, "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" ); case VkResult.ErrorNativeWindowInUseKHR: throw new VkResultError( VkResult.ErrorNativeWindowInUseKHR, "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_NATIVE_WINDOW_IN_USE_KHR" ); case VkResult.ErrorInitializationFailed: throw new VkResultError( VkResult.ErrorInitializationFailed, "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_INITIALIZATION_FAILED" ); case VkResult.ErrorCompressionExhaustedEXT: throw new VkResultError( VkResult.ErrorCompressionExhaustedEXT, "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_COMPRESSION_EXHAUSTED_EXT" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateSwapchainKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pSwapchainLocal; } } /// /// vkDestroySwapchainKHR - Destroy a swapchain object /// /// /// /// To destroy a swapchain object call: /// /// /// // Provided by VK_KHR_swapchain /// void vkDestroySwapchainKHR( /// VkDevice device, /// VkSwapchainKHR swapchain, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroySwapchainKHR( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroySwapchainKHR.Invoke(handle.Handle, swapchain, pAllocator); } /// /// vkGetSwapchainImagesKHR - Obtain the array of presentable images associated with a swapchain /// /// /// /// :refpage: vkGetSwapchainImagesKHR /// /// /// To obtain the array of presentable images associated with a swapchain, call: /// /// /// // Provided by VK_KHR_swapchain /// VkResult vkGetSwapchainImagesKHR( /// VkDevice device, /// VkSwapchainKHR swapchain, /// uint32_t* pSwapchainImageCount, /// VkImage* pSwapchainImages); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe VkResult GetSwapchainImagesKHR( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain, ref int pSwapchainImageCount, scoped ReadOnlySpan pSwapchainImages ) { fixed (VkImage* pSwapchainImagesFixed = pSwapchainImages) fixed (int* pSwapchainImageCountFixed = &pSwapchainImageCount) { VkResult result = handle.PInvoke.vkGetSwapchainImagesKHR.Invoke( handle.Handle, swapchain, pSwapchainImageCountFixed, pSwapchainImagesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetSwapchainImagesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetSwapchainImagesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetSwapchainImagesKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetSwapchainImagesKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// Queries the required length. /// The required length. public static int GetSwapchainImagesKHR_Count( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain ) { int pSwapchainImageCount = default; GetSwapchainImagesKHR(handle, swapchain, ref pSwapchainImageCount, null); return pSwapchainImageCount; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static VkResult GetSwapchainImagesKHR_Write( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain, scoped ReadOnlySpan pSwapchainImages ) { int pSwapchainImageCount = pSwapchainImages.Length; return GetSwapchainImagesKHR(handle, swapchain, ref pSwapchainImageCount, pSwapchainImages); } /// /// vkAcquireNextImageKHR - Retrieve the index of the next available presentable image /// /// /// /// :refpage: vkAcquireNextImageKHR /// /// /// To acquire an available presentable image to use, and retrieve the index of /// that image, call: /// /// /// // Provided by VK_KHR_swapchain /// VkResult vkAcquireNextImageKHR( /// VkDevice device, /// VkSwapchainKHR swapchain, /// uint64_t timeout, /// VkSemaphore semaphore, /// VkFence fence, /// uint32_t* pImageIndex); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult AcquireNextImageKHR( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain, nint timeout, VkSemaphore semaphore, VkFence fence, out int pImageIndex ) { int pImageIndexLocal = default; VkResult result = handle.PInvoke.vkAcquireNextImageKHR.Invoke( handle.Handle, swapchain, timeout, semaphore, fence, &pImageIndexLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkAcquireNextImageKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkAcquireNextImageKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkAcquireNextImageKHR failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorOutOfDateKHR: throw new VkResultError( VkResult.ErrorOutOfDateKHR, "Vulkan call to vkAcquireNextImageKHR failed with error: VK_ERROR_OUT_OF_DATE_KHR" ); case VkResult.ErrorSurfaceLostKHR: throw new VkResultError( VkResult.ErrorSurfaceLostKHR, "Vulkan call to vkAcquireNextImageKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" ); case VkResult.ErrorFullScreenExclusiveModeLostEXT: throw new VkResultError( VkResult.ErrorFullScreenExclusiveModeLostEXT, "Vulkan call to vkAcquireNextImageKHR failed with error: VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkAcquireNextImageKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkAcquireNextImageKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Timeout: case VkResult.NotReady: case VkResult.SuboptimalKHR: default: break; } pImageIndex = pImageIndexLocal; return result; } /// /// vkQueuePresentKHR - Queue an image for presentation /// /// /// /// :refpage: vkQueuePresentKHR /// /// /// After queueing all rendering commands and transitioning the image to the /// correct layout, to queue an image for presentation, call: /// /// /// // Provided by VK_KHR_swapchain /// VkResult vkQueuePresentKHR( /// VkQueue queue, /// const VkPresentInfoKHR* pPresentInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe VkResult PresentKHRInternal( this VulkanHandleWrapper handle, in VkPresentInfoKHR pPresentInfo ) { fixed (VkPresentInfoKHR* pPresentInfoFixed = &pPresentInfo) { VkResult result = handle.PInvoke.vkQueuePresentKHR.Invoke(handle.Handle, pPresentInfoFixed); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorOutOfDateKHR: throw new VkResultError( VkResult.ErrorOutOfDateKHR, "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_OUT_OF_DATE_KHR" ); case VkResult.ErrorSurfaceLostKHR: throw new VkResultError( VkResult.ErrorSurfaceLostKHR, "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" ); case VkResult.ErrorFullScreenExclusiveModeLostEXT: throw new VkResultError( VkResult.ErrorFullScreenExclusiveModeLostEXT, "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.ErrorPresentTimingQueueFullEXT: throw new VkResultError( VkResult.ErrorPresentTimingQueueFullEXT, "Vulkan call to vkQueuePresentKHR failed with error: VK_ERROR_PRESENT_TIMING_QUEUE_FULL_EXT" ); case VkResult.Success: case VkResult.SuboptimalKHR: default: break; } return result; } } /// /// vkGetDeviceGroupPresentCapabilitiesKHR - Query present capabilities from other physical devices /// /// /// /// :refpage: vkGetDeviceGroupPresentCapabilitiesKHR /// /// /// A logical device that represents multiple physical devices may: support /// presenting from images on more than one physical device, or combining images /// from multiple physical devices. /// /// /// To query these capabilities, call: /// /// /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_surface /// VkResult vkGetDeviceGroupPresentCapabilitiesKHR( /// VkDevice device, /// VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetGroupPresentCapabilitiesKHR( this VulkanHandleWrapper handle, ref VkDeviceGroupPresentCapabilitiesKHR pDeviceGroupPresentCapabilities ) { fixed ( VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilitiesFixed = &pDeviceGroupPresentCapabilities ) { VkResult result = handle.PInvoke.vkGetDeviceGroupPresentCapabilitiesKHR.Invoke( handle.Handle, pDeviceGroupPresentCapabilitiesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetDeviceGroupPresentCapabilitiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetDeviceGroupPresentCapabilitiesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetDeviceGroupPresentCapabilitiesKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetDeviceGroupPresentCapabilitiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkDeviceGroupPresentCapabilitiesKHR. public static VkDeviceGroupPresentCapabilitiesKHR GetGroupPresentCapabilitiesKHR( this VulkanHandleWrapper handle ) { VkDeviceGroupPresentCapabilitiesKHR outValue = new(); GetGroupPresentCapabilitiesKHR(handle, ref outValue); return outValue; } /// /// vkGetDeviceGroupSurfacePresentModesKHR - Query present capabilities for a surface /// /// /// /// :refpage: vkGetDeviceGroupSurfacePresentModesKHR /// /// /// Some surfaces may: not be capable of using all the device group present /// modes. /// /// /// To query the supported device group present modes for a particular surface, /// call: /// /// /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_surface /// VkResult vkGetDeviceGroupSurfacePresentModesKHR( /// VkDevice device, /// VkSurfaceKHR surface, /// VkDeviceGroupPresentModeFlagsKHR* pModes); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkDeviceGroupPresentModeFlagsKHR GetGroupSurfacePresentModesKHR( this VulkanHandleWrapper handle, VkSurfaceKHR surface ) { VkDeviceGroupPresentModeFlagsKHR pModesLocal = default; VkResult result = handle.PInvoke.vkGetDeviceGroupSurfacePresentModesKHR.Invoke( handle.Handle, surface, &pModesLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetDeviceGroupSurfacePresentModesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetDeviceGroupSurfacePresentModesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorSurfaceLostKHR: throw new VkResultError( VkResult.ErrorSurfaceLostKHR, "Vulkan call to vkGetDeviceGroupSurfacePresentModesKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetDeviceGroupSurfacePresentModesKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetDeviceGroupSurfacePresentModesKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pModesLocal; } /// /// vkAcquireNextImage2KHR - Retrieve the index of the next available presentable image /// /// /// /// :refpage: vkAcquireNextImage2KHR /// /// /// To acquire an available presentable image to use, and retrieve the index of /// that image, call: /// /// /// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_swapchain /// VkResult vkAcquireNextImage2KHR( /// VkDevice device, /// const VkAcquireNextImageInfoKHR* pAcquireInfo, /// uint32_t* pImageIndex); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult AcquireNextImage2KHR( this VulkanHandleWrapper handle, in VkAcquireNextImageInfoKHR pAcquireInfo, out int pImageIndex ) { fixed (VkAcquireNextImageInfoKHR* pAcquireInfoFixed = &pAcquireInfo) { int pImageIndexLocal = default; VkResult result = handle.PInvoke.vkAcquireNextImage2KHR.Invoke( handle.Handle, pAcquireInfoFixed, &pImageIndexLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkAcquireNextImage2KHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkAcquireNextImage2KHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkAcquireNextImage2KHR failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorOutOfDateKHR: throw new VkResultError( VkResult.ErrorOutOfDateKHR, "Vulkan call to vkAcquireNextImage2KHR failed with error: VK_ERROR_OUT_OF_DATE_KHR" ); case VkResult.ErrorSurfaceLostKHR: throw new VkResultError( VkResult.ErrorSurfaceLostKHR, "Vulkan call to vkAcquireNextImage2KHR failed with error: VK_ERROR_SURFACE_LOST_KHR" ); case VkResult.ErrorFullScreenExclusiveModeLostEXT: throw new VkResultError( VkResult.ErrorFullScreenExclusiveModeLostEXT, "Vulkan call to vkAcquireNextImage2KHR failed with error: VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkAcquireNextImage2KHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkAcquireNextImage2KHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Timeout: case VkResult.NotReady: case VkResult.SuboptimalKHR: default: break; } pImageIndex = pImageIndexLocal; return result; } } /// /// vkCreateSharedSwapchainsKHR - Create multiple swapchains that share presentable images /// /// /// /// :refpage: vkCreateSharedSwapchainsKHR /// :objectnameplural: swapchains /// :objectnamecamelcase: swapchain /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: swapchainCount /// /// /// When the `VK_KHR_display_swapchain` extension is enabled, multiple /// swapchains that share presentable images are created by calling: /// /// /// // Provided by VK_KHR_display_swapchain /// VkResult vkCreateSharedSwapchainsKHR( /// VkDevice device, /// uint32_t swapchainCount, /// const VkSwapchainCreateInfoKHR* pCreateInfos, /// const VkAllocationCallbacks* pAllocator, /// VkSwapchainKHR* pSwapchains); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CreateSharedSwapchainsKHR( this VulkanHandleWrapper handle, VkSwapchainCreateInfoKHR* pCreateInfos, VkAllocator? pAllocator, scoped ReadOnlySpan pSwapchains ) { fixed (VkSwapchainKHR* pSwapchainsFixed = pSwapchains) { VkResult result = handle.PInvoke.vkCreateSharedSwapchainsKHR.Invoke( handle.Handle, pSwapchains.Length, pCreateInfos, pAllocator, pSwapchainsFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateSharedSwapchainsKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateSharedSwapchainsKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorIncompatibleDisplayKHR: throw new VkResultError( VkResult.ErrorIncompatibleDisplayKHR, "Vulkan call to vkCreateSharedSwapchainsKHR failed with error: VK_ERROR_INCOMPATIBLE_DISPLAY_KHR" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkCreateSharedSwapchainsKHR failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorSurfaceLostKHR: throw new VkResultError( VkResult.ErrorSurfaceLostKHR, "Vulkan call to vkCreateSharedSwapchainsKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateSharedSwapchainsKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateSharedSwapchainsKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCreateVideoSessionKHR - Creates a video session object /// /// /// /// To create a video session object, call: /// /// /// // Provided by VK_KHR_video_queue /// VkResult vkCreateVideoSessionKHR( /// VkDevice device, /// const VkVideoSessionCreateInfoKHR* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkVideoSessionKHR* pVideoSession); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkVideoSessionKHR CreateVideoSessionKHR( this VulkanHandleWrapper handle, in VkVideoSessionCreateInfoKHR pCreateInfo, VkAllocator? pAllocator ) { fixed (VkVideoSessionCreateInfoKHR* pCreateInfoFixed = &pCreateInfo) { VkVideoSessionKHR pVideoSessionLocal = default; VkResult result = handle.PInvoke.vkCreateVideoSessionKHR.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pVideoSessionLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateVideoSessionKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateVideoSessionKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorInitializationFailed: throw new VkResultError( VkResult.ErrorInitializationFailed, "Vulkan call to vkCreateVideoSessionKHR failed with error: VK_ERROR_INITIALIZATION_FAILED" ); case VkResult.ErrorVideoStdVersionNotSupportedKHR: throw new VkResultError( VkResult.ErrorVideoStdVersionNotSupportedKHR, "Vulkan call to vkCreateVideoSessionKHR failed with error: VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR" ); case VkResult.ErrorInvalidVideoStdParametersKHR: throw new VkResultError( VkResult.ErrorInvalidVideoStdParametersKHR, "Vulkan call to vkCreateVideoSessionKHR failed with error: VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateVideoSessionKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateVideoSessionKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pVideoSessionLocal; } } /// /// vkDestroyVideoSessionKHR - Destroy video session object /// /// /// /// To destroy a video session, call: /// /// /// // Provided by VK_KHR_video_queue /// void vkDestroyVideoSessionKHR( /// VkDevice device, /// VkVideoSessionKHR videoSession, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyVideoSessionKHR( this VulkanHandleWrapper handle, VkVideoSessionKHR videoSession, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyVideoSessionKHR.Invoke(handle.Handle, videoSession, pAllocator); } /// /// vkGetVideoSessionMemoryRequirementsKHR - Get the memory requirements for a video session /// /// /// /// To determine the memory requirements for a video session object, call: /// /// /// // Provided by VK_KHR_video_queue /// VkResult vkGetVideoSessionMemoryRequirementsKHR( /// VkDevice device, /// VkVideoSessionKHR videoSession, /// uint32_t* pMemoryRequirementsCount, /// VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe VkResult GetVideoSessionMemoryRequirementsKHR( this VulkanHandleWrapper handle, VkVideoSessionKHR videoSession, ref int pMemoryRequirementsCount, scoped ReadOnlySpan pMemoryRequirements ) { fixed (VkVideoSessionMemoryRequirementsKHR* pMemoryRequirementsFixed = pMemoryRequirements) fixed (int* pMemoryRequirementsCountFixed = &pMemoryRequirementsCount) { VkResult result = handle.PInvoke.vkGetVideoSessionMemoryRequirementsKHR.Invoke( handle.Handle, videoSession, pMemoryRequirementsCountFixed, pMemoryRequirementsFixed ); switch (result) { case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetVideoSessionMemoryRequirementsKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetVideoSessionMemoryRequirementsKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// Queries the required length. /// The required length. public static int GetVideoSessionMemoryRequirementsKHR_Count( this VulkanHandleWrapper handle, VkVideoSessionKHR videoSession ) { int pMemoryRequirementsCount = default; GetVideoSessionMemoryRequirementsKHR(handle, videoSession, ref pMemoryRequirementsCount, null); return pMemoryRequirementsCount; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static VkResult GetVideoSessionMemoryRequirementsKHR_Write( this VulkanHandleWrapper handle, VkVideoSessionKHR videoSession, scoped ReadOnlySpan pMemoryRequirements ) { int pMemoryRequirementsCount = pMemoryRequirements.Length; return GetVideoSessionMemoryRequirementsKHR( handle, videoSession, ref pMemoryRequirementsCount, pMemoryRequirements ); } /// /// vkBindVideoSessionMemoryKHR - Bind Video Memory /// /// /// /// To attach memory to a video session object, call: /// /// /// // Provided by VK_KHR_video_queue /// VkResult vkBindVideoSessionMemoryKHR( /// VkDevice device, /// VkVideoSessionKHR videoSession, /// uint32_t bindSessionMemoryInfoCount, /// const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindVideoSessionMemoryKHR( this VulkanHandleWrapper handle, VkVideoSessionKHR videoSession, scoped ReadOnlySpan pBindSessionMemoryInfos ) { fixed (VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfosFixed = pBindSessionMemoryInfos) { VkResult result = handle.PInvoke.vkBindVideoSessionMemoryKHR.Invoke( handle.Handle, videoSession, pBindSessionMemoryInfos.Length, pBindSessionMemoryInfosFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkBindVideoSessionMemoryKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkBindVideoSessionMemoryKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkBindVideoSessionMemoryKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkBindVideoSessionMemoryKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCreateVideoSessionParametersKHR - Creates video session parameters object /// /// /// /// To create a video session parameters object, call: /// /// /// // Provided by VK_KHR_video_queue /// VkResult vkCreateVideoSessionParametersKHR( /// VkDevice device, /// const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkVideoSessionParametersKHR* pVideoSessionParameters); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkVideoSessionParametersKHR CreateVideoSessionParametersKHR( this VulkanHandleWrapper handle, in VkVideoSessionParametersCreateInfoKHR pCreateInfo, VkAllocator? pAllocator ) { fixed (VkVideoSessionParametersCreateInfoKHR* pCreateInfoFixed = &pCreateInfo) { VkVideoSessionParametersKHR pVideoSessionParametersLocal = default; VkResult result = handle.PInvoke.vkCreateVideoSessionParametersKHR.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pVideoSessionParametersLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateVideoSessionParametersKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateVideoSessionParametersKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorInitializationFailed: throw new VkResultError( VkResult.ErrorInitializationFailed, "Vulkan call to vkCreateVideoSessionParametersKHR failed with error: VK_ERROR_INITIALIZATION_FAILED" ); case VkResult.ErrorInvalidVideoStdParametersKHR: throw new VkResultError( VkResult.ErrorInvalidVideoStdParametersKHR, "Vulkan call to vkCreateVideoSessionParametersKHR failed with error: VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateVideoSessionParametersKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateVideoSessionParametersKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pVideoSessionParametersLocal; } } /// /// vkUpdateVideoSessionParametersKHR - Update video session parameters object /// /// /// /// To update video session parameters object with new parameters, call: /// /// /// // Provided by VK_KHR_video_queue /// VkResult vkUpdateVideoSessionParametersKHR( /// VkDevice device, /// VkVideoSessionParametersKHR videoSessionParameters, /// const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void UpdateVideoSessionParametersKHR( this VulkanHandleWrapper handle, VkVideoSessionParametersKHR videoSessionParameters, in VkVideoSessionParametersUpdateInfoKHR pUpdateInfo ) { fixed (VkVideoSessionParametersUpdateInfoKHR* pUpdateInfoFixed = &pUpdateInfo) { VkResult result = handle.PInvoke.vkUpdateVideoSessionParametersKHR.Invoke( handle.Handle, videoSessionParameters, pUpdateInfoFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkUpdateVideoSessionParametersKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkUpdateVideoSessionParametersKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorInvalidVideoStdParametersKHR: throw new VkResultError( VkResult.ErrorInvalidVideoStdParametersKHR, "Vulkan call to vkUpdateVideoSessionParametersKHR failed with error: VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkUpdateVideoSessionParametersKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkUpdateVideoSessionParametersKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkDestroyVideoSessionParametersKHR - Destroy video session parameters object /// /// /// /// To destroy a video session parameters object, call: /// /// /// // Provided by VK_KHR_video_queue /// void vkDestroyVideoSessionParametersKHR( /// VkDevice device, /// VkVideoSessionParametersKHR videoSessionParameters, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyVideoSessionParametersKHR( this VulkanHandleWrapper handle, VkVideoSessionParametersKHR videoSessionParameters, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyVideoSessionParametersKHR.Invoke(handle.Handle, videoSessionParameters, pAllocator); } /// /// vkCmdBeginVideoCodingKHR - Begin video coding scope /// /// /// /// To begin a video coding scope, call: /// /// /// // Provided by VK_KHR_video_queue /// void vkCmdBeginVideoCodingKHR( /// VkCommandBuffer commandBuffer, /// const VkVideoBeginCodingInfoKHR* pBeginInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BeginVideoCodingKHR(this T handle, in VkVideoBeginCodingInfoKHR pBeginInfo) where T : VulkanHandleWrapper { fixed (VkVideoBeginCodingInfoKHR* pBeginInfoFixed = &pBeginInfo) { handle.PInvoke.vkCmdBeginVideoCodingKHR.Invoke(handle.Handle, pBeginInfoFixed); } } /// /// vkCmdEndVideoCodingKHR - End video coding scope /// /// /// /// To end a video coding scope, call: /// /// /// // Provided by VK_KHR_video_queue /// void vkCmdEndVideoCodingKHR( /// VkCommandBuffer commandBuffer, /// const VkVideoEndCodingInfoKHR* pEndCodingInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void EndVideoCodingKHR(this T handle, in VkVideoEndCodingInfoKHR pEndCodingInfo) where T : VulkanHandleWrapper { fixed (VkVideoEndCodingInfoKHR* pEndCodingInfoFixed = &pEndCodingInfo) { handle.PInvoke.vkCmdEndVideoCodingKHR.Invoke(handle.Handle, pEndCodingInfoFixed); } } /// /// vkCmdControlVideoCodingKHR - Control video coding parameters /// /// /// /// To apply dynamic controls to the bound video session object, call: /// /// /// // Provided by VK_KHR_video_queue /// void vkCmdControlVideoCodingKHR( /// VkCommandBuffer commandBuffer, /// const VkVideoCodingControlInfoKHR* pCodingControlInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void ControlVideoCodingKHR( this T handle, in VkVideoCodingControlInfoKHR pCodingControlInfo ) where T : VulkanHandleWrapper { fixed (VkVideoCodingControlInfoKHR* pCodingControlInfoFixed = &pCodingControlInfo) { handle.PInvoke.vkCmdControlVideoCodingKHR.Invoke(handle.Handle, pCodingControlInfoFixed); } } /// /// vkCmdDecodeVideoKHR - Launch a video decode operation /// /// /// /// To launch video decode operations, call: /// /// /// // Provided by VK_KHR_video_decode_queue /// void vkCmdDecodeVideoKHR( /// VkCommandBuffer commandBuffer, /// const VkVideoDecodeInfoKHR* pDecodeInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DecodeVideoKHR(this T handle, in VkVideoDecodeInfoKHR pDecodeInfo) where T : VulkanHandleWrapper { fixed (VkVideoDecodeInfoKHR* pDecodeInfoFixed = &pDecodeInfo) { handle.PInvoke.vkCmdDecodeVideoKHR.Invoke(handle.Handle, pDecodeInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BeginRenderingKHR(this T handle, in VkRenderingInfo pRenderingInfo) where T : VulkanHandleWrapper { fixed (VkRenderingInfo* pRenderingInfoFixed = &pRenderingInfo) { handle.PInvoke.vkCmdBeginRenderingKHR.Invoke(handle.Handle, pRenderingInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void EndRenderingKHR(this T handle) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdEndRenderingKHR.Invoke(handle.Handle); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkPeerMemoryFeatureFlags GetGroupPeerMemoryFeaturesKHR( this VulkanHandleWrapper handle, int heapIndex, int localDeviceIndex, int remoteDeviceIndex ) { VkPeerMemoryFeatureFlags pPeerMemoryFeaturesLocal = default; handle.PInvoke.vkGetDeviceGroupPeerMemoryFeaturesKHR.Invoke( handle.Handle, heapIndex, localDeviceIndex, remoteDeviceIndex, &pPeerMemoryFeaturesLocal ); return pPeerMemoryFeaturesLocal; } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDeviceMaskKHR(this T handle, int deviceMask) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDeviceMaskKHR.Invoke(handle.Handle, deviceMask); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DispatchBaseKHR( this T handle, int baseGroupX, int baseGroupY, int baseGroupZ, int groupCountX, int groupCountY, int groupCountZ ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDispatchBaseKHR.Invoke( handle.Handle, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ ); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void TrimCommandPoolKHR( this VulkanHandleWrapper handle, VkCommandPool commandPool, VkCommandPoolTrimFlags flags ) { handle.PInvoke.vkTrimCommandPoolKHR.Invoke(handle.Handle, commandPool, flags); } /// /// vkGetMemoryFdKHR - Get a POSIX file descriptor for a memory object /// /// /// /// :refpage: vkGetMemoryFdKHR /// /// /// To export a POSIX file descriptor referencing the payload of a Vulkan device /// memory object, call: /// /// /// // Provided by VK_KHR_external_memory_fd /// VkResult vkGetMemoryFdKHR( /// VkDevice device, /// const VkMemoryGetFdInfoKHR* pGetFdInfo, /// int* pFd); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe int GetMemoryFdKHR( this VulkanHandleWrapper handle, in VkMemoryGetFdInfoKHR pGetFdInfo ) { fixed (VkMemoryGetFdInfoKHR* pGetFdInfoFixed = &pGetFdInfo) { int pFdLocal = default; VkResult result = handle.PInvoke.vkGetMemoryFdKHR.Invoke(handle.Handle, pGetFdInfoFixed, &pFdLocal); switch (result) { case VkResult.ErrorTooManyObjects: throw new VkResultError( VkResult.ErrorTooManyObjects, "Vulkan call to vkGetMemoryFdKHR failed with error: VK_ERROR_TOO_MANY_OBJECTS" ); case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetMemoryFdKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetMemoryFdKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetMemoryFdKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pFdLocal; } } /// /// vkGetMemoryFdPropertiesKHR - Get Properties of External Memory File Descriptors /// /// /// /// :refpage: vkGetMemoryFdPropertiesKHR /// /// /// POSIX file descriptor memory handles compatible with Vulkan may: also be /// created by non-Vulkan APIs using methods beyond the scope of this /// specification. /// To determine the correct parameters to use when importing such handles, /// call: /// /// /// // Provided by VK_KHR_external_memory_fd /// VkResult vkGetMemoryFdPropertiesKHR( /// VkDevice device, /// VkExternalMemoryHandleTypeFlagBits handleType, /// int fd, /// VkMemoryFdPropertiesKHR* pMemoryFdProperties); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetMemoryFdPropertiesKHR( this VulkanHandleWrapper handle, VkExternalMemoryHandleTypeFlags handleType, int fd, ref VkMemoryFdPropertiesKHR pMemoryFdProperties ) { fixed (VkMemoryFdPropertiesKHR* pMemoryFdPropertiesFixed = &pMemoryFdProperties) { VkResult result = handle.PInvoke.vkGetMemoryFdPropertiesKHR.Invoke( handle.Handle, handleType, fd, pMemoryFdPropertiesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetMemoryFdPropertiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorInvalidExternalHandle: throw new VkResultError( VkResult.ErrorInvalidExternalHandle, "Vulkan call to vkGetMemoryFdPropertiesKHR failed with error: VK_ERROR_INVALID_EXTERNAL_HANDLE" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetMemoryFdPropertiesKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetMemoryFdPropertiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryFdPropertiesKHR. public static VkMemoryFdPropertiesKHR GetMemoryFdPropertiesKHR( this VulkanHandleWrapper handle, VkExternalMemoryHandleTypeFlags handleType, int fd ) { VkMemoryFdPropertiesKHR outValue = new(); GetMemoryFdPropertiesKHR(handle, handleType, fd, ref outValue); return outValue; } /// /// vkImportSemaphoreFdKHR - Import a semaphore from a POSIX file descriptor /// /// /// /// :refpage: vkImportSemaphoreFdKHR /// /// /// To import a semaphore payload from a POSIX file descriptor, call: /// /// /// // Provided by VK_KHR_external_semaphore_fd /// VkResult vkImportSemaphoreFdKHR( /// VkDevice device, /// const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void ImportSemaphoreFdKHR( this VulkanHandleWrapper handle, in VkImportSemaphoreFdInfoKHR pImportSemaphoreFdInfo ) { fixed (VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfoFixed = &pImportSemaphoreFdInfo) { VkResult result = handle.PInvoke.vkImportSemaphoreFdKHR.Invoke( handle.Handle, pImportSemaphoreFdInfoFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkImportSemaphoreFdKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorInvalidExternalHandle: throw new VkResultError( VkResult.ErrorInvalidExternalHandle, "Vulkan call to vkImportSemaphoreFdKHR failed with error: VK_ERROR_INVALID_EXTERNAL_HANDLE" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkImportSemaphoreFdKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkImportSemaphoreFdKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkGetSemaphoreFdKHR - Get a POSIX file descriptor handle for a semaphore /// /// /// /// :refpage: vkGetSemaphoreFdKHR /// /// /// To export a POSIX file descriptor representing the payload of a semaphore, /// call: /// /// /// // Provided by VK_KHR_external_semaphore_fd /// VkResult vkGetSemaphoreFdKHR( /// VkDevice device, /// const VkSemaphoreGetFdInfoKHR* pGetFdInfo, /// int* pFd); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe int GetSemaphoreFdKHR( this VulkanHandleWrapper handle, in VkSemaphoreGetFdInfoKHR pGetFdInfo ) { fixed (VkSemaphoreGetFdInfoKHR* pGetFdInfoFixed = &pGetFdInfo) { int pFdLocal = default; VkResult result = handle.PInvoke.vkGetSemaphoreFdKHR.Invoke(handle.Handle, pGetFdInfoFixed, &pFdLocal); switch (result) { case VkResult.ErrorTooManyObjects: throw new VkResultError( VkResult.ErrorTooManyObjects, "Vulkan call to vkGetSemaphoreFdKHR failed with error: VK_ERROR_TOO_MANY_OBJECTS" ); case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetSemaphoreFdKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetSemaphoreFdKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetSemaphoreFdKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pFdLocal; } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void PushDescriptorSetKHR( this T handle, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, int set, int descriptorWriteCount, VkWriteDescriptorSet* pDescriptorWrites ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdPushDescriptorSetKHR.Invoke( handle.Handle, pipelineBindPoint, layout, set, descriptorWriteCount, pDescriptorWrites ); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void PushDescriptorSetWithTemplateKHR( this T handle, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, int set, void* pData ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdPushDescriptorSetWithTemplateKHR.Invoke( handle.Handle, descriptorUpdateTemplate, layout, set, pData ); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CreateDescriptorUpdateTemplateKHR( this VulkanHandleWrapper handle, in VkDescriptorUpdateTemplateCreateInfo pCreateInfo, VkAllocator? pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate ) { fixed (VkDescriptorUpdateTemplateCreateInfo* pCreateInfoFixed = &pCreateInfo) { return handle.PInvoke.vkCreateDescriptorUpdateTemplateKHR.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, pDescriptorUpdateTemplate ); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyDescriptorUpdateTemplateKHR( this VulkanHandleWrapper handle, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyDescriptorUpdateTemplateKHR.Invoke( handle.Handle, descriptorUpdateTemplate, pAllocator ); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void UpdateDescriptorSetWithTemplateKHR( this VulkanHandleWrapper handle, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, void* pData ) { handle.PInvoke.vkUpdateDescriptorSetWithTemplateKHR.Invoke( handle.Handle, descriptorSet, descriptorUpdateTemplate, pData ); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CreateRenderPass2KHR( this VulkanHandleWrapper handle, in VkRenderPassCreateInfo2 pCreateInfo, VkAllocator? pAllocator, VkRenderPass* pRenderPass ) { fixed (VkRenderPassCreateInfo2* pCreateInfoFixed = &pCreateInfo) { return handle.PInvoke.vkCreateRenderPass2KHR.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, pRenderPass ); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BeginRenderPass2KHR( this T handle, VkRenderPassBeginInfo* pRenderPassBegin, in VkSubpassBeginInfo pSubpassBeginInfo ) where T : VulkanHandleWrapper { fixed (VkSubpassBeginInfo* pSubpassBeginInfoFixed = &pSubpassBeginInfo) { handle.PInvoke.vkCmdBeginRenderPass2KHR.Invoke(handle.Handle, pRenderPassBegin, pSubpassBeginInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void NextSubpass2KHR( this T handle, in VkSubpassBeginInfo pSubpassBeginInfo, in VkSubpassEndInfo pSubpassEndInfo ) where T : VulkanHandleWrapper { fixed (VkSubpassEndInfo* pSubpassEndInfoFixed = &pSubpassEndInfo) fixed (VkSubpassBeginInfo* pSubpassBeginInfoFixed = &pSubpassBeginInfo) { handle.PInvoke.vkCmdNextSubpass2KHR.Invoke(handle.Handle, pSubpassBeginInfoFixed, pSubpassEndInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void EndRenderPass2KHR(this T handle, in VkSubpassEndInfo pSubpassEndInfo) where T : VulkanHandleWrapper { fixed (VkSubpassEndInfo* pSubpassEndInfoFixed = &pSubpassEndInfo) { handle.PInvoke.vkCmdEndRenderPass2KHR.Invoke(handle.Handle, pSubpassEndInfoFixed); } } /// /// vkGetSwapchainStatusKHR - Get a swapchain&apos;s status /// /// /// /// :refpage: vkGetSwapchainStatusKHR /// /// /// In order to query a swapchain's status when rendering to a shared /// presentable image, call: /// /// // Provided by VK_KHR_shared_presentable_image /// VkResult vkGetSwapchainStatusKHR( /// VkDevice device, /// VkSwapchainKHR swapchain); /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static VkResult GetSwapchainStatusKHR( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain ) { VkResult result = handle.PInvoke.vkGetSwapchainStatusKHR.Invoke(handle.Handle, swapchain); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetSwapchainStatusKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetSwapchainStatusKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkGetSwapchainStatusKHR failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorOutOfDateKHR: throw new VkResultError( VkResult.ErrorOutOfDateKHR, "Vulkan call to vkGetSwapchainStatusKHR failed with error: VK_ERROR_OUT_OF_DATE_KHR" ); case VkResult.ErrorSurfaceLostKHR: throw new VkResultError( VkResult.ErrorSurfaceLostKHR, "Vulkan call to vkGetSwapchainStatusKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" ); case VkResult.ErrorFullScreenExclusiveModeLostEXT: throw new VkResultError( VkResult.ErrorFullScreenExclusiveModeLostEXT, "Vulkan call to vkGetSwapchainStatusKHR failed with error: VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetSwapchainStatusKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetSwapchainStatusKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.SuboptimalKHR: default: break; } return result; } /// /// vkImportFenceFdKHR - Import a fence from a POSIX file descriptor /// /// /// /// :refpage: vkImportFenceFdKHR /// /// /// To import a fence payload from a POSIX file descriptor, call: /// /// /// // Provided by VK_KHR_external_fence_fd /// VkResult vkImportFenceFdKHR( /// VkDevice device, /// const VkImportFenceFdInfoKHR* pImportFenceFdInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void ImportFenceFdKHR( this VulkanHandleWrapper handle, in VkImportFenceFdInfoKHR pImportFenceFdInfo ) { fixed (VkImportFenceFdInfoKHR* pImportFenceFdInfoFixed = &pImportFenceFdInfo) { VkResult result = handle.PInvoke.vkImportFenceFdKHR.Invoke(handle.Handle, pImportFenceFdInfoFixed); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkImportFenceFdKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorInvalidExternalHandle: throw new VkResultError( VkResult.ErrorInvalidExternalHandle, "Vulkan call to vkImportFenceFdKHR failed with error: VK_ERROR_INVALID_EXTERNAL_HANDLE" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkImportFenceFdKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkImportFenceFdKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkGetFenceFdKHR - Get a POSIX file descriptor handle for a fence /// /// /// /// :refpage: vkGetFenceFdKHR /// /// /// To export a POSIX file descriptor representing the payload of a fence, call: /// /// /// // Provided by VK_KHR_external_fence_fd /// VkResult vkGetFenceFdKHR( /// VkDevice device, /// const VkFenceGetFdInfoKHR* pGetFdInfo, /// int* pFd); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe int GetFenceFdKHR( this VulkanHandleWrapper handle, in VkFenceGetFdInfoKHR pGetFdInfo ) { fixed (VkFenceGetFdInfoKHR* pGetFdInfoFixed = &pGetFdInfo) { int pFdLocal = default; VkResult result = handle.PInvoke.vkGetFenceFdKHR.Invoke(handle.Handle, pGetFdInfoFixed, &pFdLocal); switch (result) { case VkResult.ErrorTooManyObjects: throw new VkResultError( VkResult.ErrorTooManyObjects, "Vulkan call to vkGetFenceFdKHR failed with error: VK_ERROR_TOO_MANY_OBJECTS" ); case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetFenceFdKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetFenceFdKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetFenceFdKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pFdLocal; } } /// /// vkAcquireProfilingLockKHR - Acquires the profiling lock /// /// /// /// :refpage: vkAcquireProfilingLockKHR /// /// /// To record and submit a command buffer containing a performance query pool /// the profiling lock must be held. /// The profiling lock must be acquired prior to any call to /// vkBeginCommandBuffer that will be using a performance query pool. /// The profiling lock must be held while any command buffer containing a /// performance query pool is in the recording, executable, or _pending /// state_. /// To acquire the profiling lock, call: /// /// /// // Provided by VK_KHR_performance_query /// VkResult vkAcquireProfilingLockKHR( /// VkDevice device, /// const VkAcquireProfilingLockInfoKHR* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void AcquireProfilingLockKHR( this VulkanHandleWrapper handle, in VkAcquireProfilingLockInfoKHR pInfo ) { fixed (VkAcquireProfilingLockInfoKHR* pInfoFixed = &pInfo) { VkResult result = handle.PInvoke.vkAcquireProfilingLockKHR.Invoke(handle.Handle, pInfoFixed); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkAcquireProfilingLockKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.Timeout: throw new VkResultError( VkResult.Timeout, "Vulkan call to vkAcquireProfilingLockKHR failed with error: VK_TIMEOUT" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkAcquireProfilingLockKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkAcquireProfilingLockKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkReleaseProfilingLockKHR - Releases the profiling lock /// /// /// /// To release the profiling lock, call: /// /// /// // Provided by VK_KHR_performance_query /// void vkReleaseProfilingLockKHR( /// VkDevice device); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ReleaseProfilingLockKHR(this VulkanHandleWrapper handle) { handle.PInvoke.vkReleaseProfilingLockKHR.Invoke(handle.Handle); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetImageMemoryRequirements2KHR( this VulkanHandleWrapper handle, in VkImageMemoryRequirementsInfo2 pInfo, ref VkMemoryRequirements2 pMemoryRequirements ) { fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) fixed (VkImageMemoryRequirementsInfo2* pInfoFixed = &pInfo) { handle.PInvoke.vkGetImageMemoryRequirements2KHR.Invoke( handle.Handle, pInfoFixed, pMemoryRequirementsFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryRequirements2. public static VkMemoryRequirements2 GetImageMemoryRequirements2KHR( this VulkanHandleWrapper handle, in VkImageMemoryRequirementsInfo2 pInfo ) { VkMemoryRequirements2 outValue = new(); GetImageMemoryRequirements2KHR(handle, pInfo, ref outValue); return outValue; } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetBufferMemoryRequirements2KHR( this VulkanHandleWrapper handle, in VkBufferMemoryRequirementsInfo2 pInfo, ref VkMemoryRequirements2 pMemoryRequirements ) { fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) fixed (VkBufferMemoryRequirementsInfo2* pInfoFixed = &pInfo) { handle.PInvoke.vkGetBufferMemoryRequirements2KHR.Invoke( handle.Handle, pInfoFixed, pMemoryRequirementsFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryRequirements2. public static VkMemoryRequirements2 GetBufferMemoryRequirements2KHR( this VulkanHandleWrapper handle, in VkBufferMemoryRequirementsInfo2 pInfo ) { VkMemoryRequirements2 outValue = new(); GetBufferMemoryRequirements2KHR(handle, pInfo, ref outValue); return outValue; } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetImageSparseMemoryRequirements2KHR( this VulkanHandleWrapper handle, in VkImageSparseMemoryRequirementsInfo2 pInfo, int* pSparseMemoryRequirementCount, ref VkSparseImageMemoryRequirements2 pSparseMemoryRequirements ) { fixed (VkSparseImageMemoryRequirements2* pSparseMemoryRequirementsFixed = &pSparseMemoryRequirements) fixed (VkImageSparseMemoryRequirementsInfo2* pInfoFixed = &pInfo) { handle.PInvoke.vkGetImageSparseMemoryRequirements2KHR.Invoke( handle.Handle, pInfoFixed, pSparseMemoryRequirementCount, pSparseMemoryRequirementsFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkSparseImageMemoryRequirements2. public static unsafe VkSparseImageMemoryRequirements2 GetImageSparseMemoryRequirements2KHR( this VulkanHandleWrapper handle, in VkImageSparseMemoryRequirementsInfo2 pInfo, int* pSparseMemoryRequirementCount ) { VkSparseImageMemoryRequirements2 outValue = new(); GetImageSparseMemoryRequirements2KHR(handle, pInfo, pSparseMemoryRequirementCount, ref outValue); return outValue; } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CreateSamplerYcbcrConversionKHR( this VulkanHandleWrapper handle, in VkSamplerYCbCrConversionCreateInfo pCreateInfo, VkAllocator? pAllocator, VkSamplerYCbCrConversion* pYcbcrConversion ) { fixed (VkSamplerYCbCrConversionCreateInfo* pCreateInfoFixed = &pCreateInfo) { return handle.PInvoke.vkCreateSamplerYcbcrConversionKHR.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, pYcbcrConversion ); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroySamplerYcbcrConversionKHR( this VulkanHandleWrapper handle, VkSamplerYCbCrConversion ycbcrConversion, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroySamplerYcbcrConversionKHR.Invoke(handle.Handle, ycbcrConversion, pAllocator); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult BindBufferMemory2KHR( this VulkanHandleWrapper handle, int bindInfoCount, VkBindBufferMemoryInfo* pBindInfos ) { return handle.PInvoke.vkBindBufferMemory2KHR.Invoke(handle.Handle, bindInfoCount, pBindInfos); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult BindImageMemory2KHR( this VulkanHandleWrapper handle, int bindInfoCount, VkBindImageMemoryInfo* pBindInfos ) { return handle.PInvoke.vkBindImageMemory2KHR.Invoke(handle.Handle, bindInfoCount, pBindInfos); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetDescriptorSetLayoutSupportKHR( this VulkanHandleWrapper handle, in VkDescriptorSetLayoutCreateInfo pCreateInfo, ref VkDescriptorSetLayoutSupport pSupport ) { fixed (VkDescriptorSetLayoutSupport* pSupportFixed = &pSupport) fixed (VkDescriptorSetLayoutCreateInfo* pCreateInfoFixed = &pCreateInfo) { handle.PInvoke.vkGetDescriptorSetLayoutSupportKHR.Invoke( handle.Handle, pCreateInfoFixed, pSupportFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkDescriptorSetLayoutSupport. public static VkDescriptorSetLayoutSupport GetDescriptorSetLayoutSupportKHR( this VulkanHandleWrapper handle, in VkDescriptorSetLayoutCreateInfo pCreateInfo ) { VkDescriptorSetLayoutSupport outValue = new(); GetDescriptorSetLayoutSupportKHR(handle, pCreateInfo, ref outValue); return outValue; } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawIndirectCountKHR( this T handle, VkBuffer buffer, ByteSize64 offset, VkBuffer countBuffer, ByteSize64 countBufferOffset, int maxDrawCount, int stride ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawIndirectCountKHR.Invoke( handle.Handle, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawIndexedIndirectCountKHR( this T handle, VkBuffer buffer, ByteSize64 offset, VkBuffer countBuffer, ByteSize64 countBufferOffset, int maxDrawCount, int stride ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawIndexedIndirectCountKHR.Invoke( handle.Handle, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult GetSemaphoreCounterValueKHR( this VulkanHandleWrapper handle, VkSemaphore semaphore, nint* pValue ) { return handle.PInvoke.vkGetSemaphoreCounterValueKHR.Invoke(handle.Handle, semaphore, pValue); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult WaitSemaphoresKHR( this VulkanHandleWrapper handle, in VkSemaphoreWaitInfo pWaitInfo, nint timeout ) { fixed (VkSemaphoreWaitInfo* pWaitInfoFixed = &pWaitInfo) { return handle.PInvoke.vkWaitSemaphoresKHR.Invoke(handle.Handle, pWaitInfoFixed, timeout); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult SignalSemaphoreKHR( this VulkanHandleWrapper handle, in VkSemaphoreSignalInfo pSignalInfo ) { fixed (VkSemaphoreSignalInfo* pSignalInfoFixed = &pSignalInfo) { return handle.PInvoke.vkSignalSemaphoreKHR.Invoke(handle.Handle, pSignalInfoFixed); } } /// /// vkCmdSetFragmentShadingRateKHR - Set pipeline fragment shading rate and combiner operation dynamically for a command buffer /// /// /// /// To dynamically set^ the pipeline fragment /// shading rate and combiner operation, call: /// /// /// // Provided by VK_KHR_fragment_shading_rate /// void vkCmdSetFragmentShadingRateKHR( /// VkCommandBuffer commandBuffer, /// const VkExtent2D* pFragmentSize, /// const VkFragmentShadingRateCombinerOpKHR combinerOps[2]); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetFragmentShadingRateKHR( this T handle, VkExtent2D* pFragmentSize, VkFragmentShadingRateCombinerOpKHR* combinerOps ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetFragmentShadingRateKHR.Invoke(handle.Handle, pFragmentSize, combinerOps); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetRenderingAttachmentLocationsKHR( this T handle, in VkRenderingAttachmentLocationInfo pLocationInfo ) where T : VulkanHandleWrapper { fixed (VkRenderingAttachmentLocationInfo* pLocationInfoFixed = &pLocationInfo) { handle.PInvoke.vkCmdSetRenderingAttachmentLocationsKHR.Invoke(handle.Handle, pLocationInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetRenderingInputAttachmentIndicesKHR( this T handle, in VkRenderingInputAttachmentIndexInfo pInputAttachmentIndexInfo ) where T : VulkanHandleWrapper { fixed (VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfoFixed = &pInputAttachmentIndexInfo) { handle.PInvoke.vkCmdSetRenderingInputAttachmentIndicesKHR.Invoke( handle.Handle, pInputAttachmentIndexInfoFixed ); } } /// /// vkWaitForPresentKHR - Wait for presentation /// /// /// /// When the presentWait^ feature is enabled, an /// application can wait for an image to be presented to the user by first /// specifying a presentId for the target presentation by adding a /// VkPresentIdKHR structure to the pNext chain of the /// VkPresentInfoKHR structure and then waiting for that presentation to /// complete by calling: /// /// /// // Provided by VK_KHR_present_wait /// VkResult vkWaitForPresentKHR( /// VkDevice device, /// VkSwapchainKHR swapchain, /// uint64_t presentId, /// uint64_t timeout); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static VkResult WaitForPresentKHR( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain, nint presentId, nint timeout ) { VkResult result = handle.PInvoke.vkWaitForPresentKHR.Invoke(handle.Handle, swapchain, presentId, timeout); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkWaitForPresentKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkWaitForPresentKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkWaitForPresentKHR failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorOutOfDateKHR: throw new VkResultError( VkResult.ErrorOutOfDateKHR, "Vulkan call to vkWaitForPresentKHR failed with error: VK_ERROR_OUT_OF_DATE_KHR" ); case VkResult.ErrorSurfaceLostKHR: throw new VkResultError( VkResult.ErrorSurfaceLostKHR, "Vulkan call to vkWaitForPresentKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" ); case VkResult.ErrorFullScreenExclusiveModeLostEXT: throw new VkResultError( VkResult.ErrorFullScreenExclusiveModeLostEXT, "Vulkan call to vkWaitForPresentKHR failed with error: VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkWaitForPresentKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkWaitForPresentKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Timeout: case VkResult.SuboptimalKHR: default: break; } return result; } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkDeviceAddress GetBufferDeviceAddressKHR( this VulkanHandleWrapper handle, in VkBufferDeviceAddressInfo pInfo ) { fixed (VkBufferDeviceAddressInfo* pInfoFixed = &pInfo) { return handle.PInvoke.vkGetBufferDeviceAddressKHR.Invoke(handle.Handle, pInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe nint GetBufferOpaqueCaptureAddressKHR( this VulkanHandleWrapper handle, in VkBufferDeviceAddressInfo pInfo ) { fixed (VkBufferDeviceAddressInfo* pInfoFixed = &pInfo) { return handle.PInvoke.vkGetBufferOpaqueCaptureAddressKHR.Invoke(handle.Handle, pInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe nint GetMemoryOpaqueCaptureAddressKHR( this VulkanHandleWrapper handle, in VkDeviceMemoryOpaqueCaptureAddressInfo pInfo ) { fixed (VkDeviceMemoryOpaqueCaptureAddressInfo* pInfoFixed = &pInfo) { return handle.PInvoke.vkGetDeviceMemoryOpaqueCaptureAddressKHR.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCreateDeferredOperationKHR - Create a deferred operation handle /// /// /// /// :refpage: vkCreateDeferredOperationKHR /// /// /// To construct the tracking object for a deferred command, call: /// /// /// // Provided by VK_KHR_deferred_host_operations /// VkResult vkCreateDeferredOperationKHR( /// VkDevice device, /// const VkAllocationCallbacks* pAllocator, /// VkDeferredOperationKHR* pDeferredOperation); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkDeferredOperationKHR CreateDeferredOperationKHR( this VulkanHandleWrapper handle, VkAllocator? pAllocator ) { VkDeferredOperationKHR pDeferredOperationLocal = default; VkResult result = handle.PInvoke.vkCreateDeferredOperationKHR.Invoke( handle.Handle, pAllocator, &pDeferredOperationLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateDeferredOperationKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateDeferredOperationKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateDeferredOperationKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pDeferredOperationLocal; } /// /// vkDestroyDeferredOperationKHR - Destroy a deferred operation handle /// /// /// /// :refpage: vkDestroyDeferredOperationKHR /// /// /// When a deferred operation is completed, the application can destroy the /// tracking object by calling: /// /// /// // Provided by VK_KHR_deferred_host_operations /// void vkDestroyDeferredOperationKHR( /// VkDevice device, /// VkDeferredOperationKHR operation, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyDeferredOperationKHR( this VulkanHandleWrapper handle, VkDeferredOperationKHR operation, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyDeferredOperationKHR.Invoke(handle.Handle, operation, pAllocator); } /// /// vkGetDeferredOperationMaxConcurrencyKHR - Query the maximum concurrency on a deferred operation /// /// /// /// :refpage: vkGetDeferredOperationMaxConcurrencyKHR /// /// /// To query the number of additional threads that can usefully be joined to a /// deferred operation, call: /// /// /// // Provided by VK_KHR_deferred_host_operations /// uint32_t vkGetDeferredOperationMaxConcurrencyKHR( /// VkDevice device, /// VkDeferredOperationKHR operation); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int GetDeferredOperationMaxConcurrencyKHR( this VulkanHandleWrapper handle, VkDeferredOperationKHR operation ) { return handle.PInvoke.vkGetDeferredOperationMaxConcurrencyKHR.Invoke(handle.Handle, operation); } /// /// vkGetDeferredOperationResultKHR - Query the result of a deferred operation /// /// /// /// :refpage: vkGetDeferredOperationResultKHR /// /// /// The vkGetDeferredOperationResultKHR function is defined as: /// /// /// // Provided by VK_KHR_deferred_host_operations /// VkResult vkGetDeferredOperationResultKHR( /// VkDevice device, /// VkDeferredOperationKHR operation); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static VkResult GetDeferredOperationResultKHR( this VulkanHandleWrapper handle, VkDeferredOperationKHR operation ) { VkResult result = handle.PInvoke.vkGetDeferredOperationResultKHR.Invoke(handle.Handle, operation); switch (result) { case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetDeferredOperationResultKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetDeferredOperationResultKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.NotReady: default: break; } return result; } /// /// vkDeferredOperationJoinKHR - Assign a thread to a deferred operation /// /// /// /// :refpage: vkDeferredOperationJoinKHR /// /// /// To assign a thread to a deferred operation, call: /// /// /// // Provided by VK_KHR_deferred_host_operations /// VkResult vkDeferredOperationJoinKHR( /// VkDevice device, /// VkDeferredOperationKHR operation); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static VkResult DeferredOperationJoinKHR( this VulkanHandleWrapper handle, VkDeferredOperationKHR operation ) { VkResult result = handle.PInvoke.vkDeferredOperationJoinKHR.Invoke(handle.Handle, operation); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkDeferredOperationJoinKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkDeferredOperationJoinKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkDeferredOperationJoinKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkDeferredOperationJoinKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.ThreadDoneKHR: case VkResult.ThreadIdleKHR: default: break; } return result; } /// /// vkGetPipelineExecutablePropertiesKHR - Get the executables associated with a pipeline /// /// /// /// When a pipeline is created, its state and shaders are compiled into zero or /// more device-specific executables, which are used when executing commands /// against that pipeline. /// To query the properties of these pipeline executables, call: /// /// /// // Provided by VK_KHR_pipeline_executable_properties /// VkResult vkGetPipelineExecutablePropertiesKHR( /// VkDevice device, /// const VkPipelineInfoKHR* pPipelineInfo, /// uint32_t* pExecutableCount, /// VkPipelineExecutablePropertiesKHR* pProperties); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe VkResult GetPipelineExecutablePropertiesKHR( this VulkanHandleWrapper handle, in VkPipelineInfoKHR pPipelineInfo, ref int pExecutableCount, scoped ReadOnlySpan pProperties ) { fixed (VkPipelineExecutablePropertiesKHR* pPropertiesFixed = pProperties) fixed (VkPipelineInfoKHR* pPipelineInfoFixed = &pPipelineInfo) fixed (int* pExecutableCountFixed = &pExecutableCount) { VkResult result = handle.PInvoke.vkGetPipelineExecutablePropertiesKHR.Invoke( handle.Handle, pPipelineInfoFixed, pExecutableCountFixed, pPropertiesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetPipelineExecutablePropertiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetPipelineExecutablePropertiesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetPipelineExecutablePropertiesKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetPipelineExecutablePropertiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// Queries the required length. /// The required length. public static int GetPipelineExecutablePropertiesKHR_Count( this VulkanHandleWrapper handle, in VkPipelineInfoKHR pPipelineInfo ) { int pExecutableCount = default; GetPipelineExecutablePropertiesKHR(handle, pPipelineInfo, ref pExecutableCount, null); return pExecutableCount; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static VkResult GetPipelineExecutablePropertiesKHR_Write( this VulkanHandleWrapper handle, in VkPipelineInfoKHR pPipelineInfo, scoped ReadOnlySpan pProperties ) { int pExecutableCount = pProperties.Length; return GetPipelineExecutablePropertiesKHR(handle, pPipelineInfo, ref pExecutableCount, pProperties); } /// /// vkGetPipelineExecutableStatisticsKHR - Get compile time statistics associated with a pipeline executable /// /// /// /// Each pipeline executable may: have a set of statistics associated with it /// that are generated by the pipeline compilation process. /// These statistics may: include things such as instruction counts, amount of /// spilling (if any), maximum number of simultaneous threads, or anything else /// which may: aid developers in evaluating the expected performance of a /// shader. /// To query the compile time statistics associated with a pipeline executable, /// call: /// /// /// // Provided by VK_KHR_pipeline_executable_properties /// VkResult vkGetPipelineExecutableStatisticsKHR( /// VkDevice device, /// const VkPipelineExecutableInfoKHR* pExecutableInfo, /// uint32_t* pStatisticCount, /// VkPipelineExecutableStatisticKHR* pStatistics); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe VkResult GetPipelineExecutableStatisticsKHR( this VulkanHandleWrapper handle, in VkPipelineExecutableInfoKHR pExecutableInfo, ref int pStatisticCount, scoped ReadOnlySpan pStatistics ) { fixed (VkPipelineExecutableStatisticKHR* pStatisticsFixed = pStatistics) fixed (VkPipelineExecutableInfoKHR* pExecutableInfoFixed = &pExecutableInfo) fixed (int* pStatisticCountFixed = &pStatisticCount) { VkResult result = handle.PInvoke.vkGetPipelineExecutableStatisticsKHR.Invoke( handle.Handle, pExecutableInfoFixed, pStatisticCountFixed, pStatisticsFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetPipelineExecutableStatisticsKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetPipelineExecutableStatisticsKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetPipelineExecutableStatisticsKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetPipelineExecutableStatisticsKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// Queries the required length. /// The required length. public static int GetPipelineExecutableStatisticsKHR_Count( this VulkanHandleWrapper handle, in VkPipelineExecutableInfoKHR pExecutableInfo ) { int pStatisticCount = default; GetPipelineExecutableStatisticsKHR(handle, pExecutableInfo, ref pStatisticCount, null); return pStatisticCount; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static VkResult GetPipelineExecutableStatisticsKHR_Write( this VulkanHandleWrapper handle, in VkPipelineExecutableInfoKHR pExecutableInfo, scoped ReadOnlySpan pStatistics ) { int pStatisticCount = pStatistics.Length; return GetPipelineExecutableStatisticsKHR(handle, pExecutableInfo, ref pStatisticCount, pStatistics); } /// /// vkGetPipelineExecutableInternalRepresentationsKHR - Get internal representations of the pipeline executable /// /// /// /// Each pipeline executable may: have one or more text or binary internal /// representations associated with it which are generated as part of the /// compile process. /// These may: include the final shader assembly, a binary form of the compiled /// shader, or the shader compiler's internal representation at any number of /// intermediate compile steps. /// To query the internal representations associated with a pipeline executable, /// call: /// /// /// // Provided by VK_KHR_pipeline_executable_properties /// VkResult vkGetPipelineExecutableInternalRepresentationsKHR( /// VkDevice device, /// const VkPipelineExecutableInfoKHR* pExecutableInfo, /// uint32_t* pInternalRepresentationCount, /// VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe VkResult GetPipelineExecutableInternalRepresentationsKHR( this VulkanHandleWrapper handle, in VkPipelineExecutableInfoKHR pExecutableInfo, ref int pInternalRepresentationCount, scoped ReadOnlySpan pInternalRepresentations ) { fixed ( VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentationsFixed = pInternalRepresentations ) fixed (VkPipelineExecutableInfoKHR* pExecutableInfoFixed = &pExecutableInfo) fixed (int* pInternalRepresentationCountFixed = &pInternalRepresentationCount) { VkResult result = handle.PInvoke.vkGetPipelineExecutableInternalRepresentationsKHR.Invoke( handle.Handle, pExecutableInfoFixed, pInternalRepresentationCountFixed, pInternalRepresentationsFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetPipelineExecutableInternalRepresentationsKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetPipelineExecutableInternalRepresentationsKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetPipelineExecutableInternalRepresentationsKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetPipelineExecutableInternalRepresentationsKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// Queries the required length. /// The required length. public static int GetPipelineExecutableInternalRepresentationsKHR_Count( this VulkanHandleWrapper handle, in VkPipelineExecutableInfoKHR pExecutableInfo ) { int pInternalRepresentationCount = default; GetPipelineExecutableInternalRepresentationsKHR( handle, pExecutableInfo, ref pInternalRepresentationCount, null ); return pInternalRepresentationCount; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static VkResult GetPipelineExecutableInternalRepresentationsKHR_Write( this VulkanHandleWrapper handle, in VkPipelineExecutableInfoKHR pExecutableInfo, scoped ReadOnlySpan pInternalRepresentations ) { int pInternalRepresentationCount = pInternalRepresentations.Length; return GetPipelineExecutableInternalRepresentationsKHR( handle, pExecutableInfo, ref pInternalRepresentationCount, pInternalRepresentations ); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult MapMemory2KHR( this VulkanHandleWrapper handle, in VkMemoryMapInfo pMemoryMapInfo, void** ppData ) { fixed (VkMemoryMapInfo* pMemoryMapInfoFixed = &pMemoryMapInfo) { return handle.PInvoke.vkMapMemory2KHR.Invoke(handle.Handle, pMemoryMapInfoFixed, ppData); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult UnmapMemory2KHR( this VulkanHandleWrapper handle, in VkMemoryUnmapInfo pMemoryUnmapInfo ) { fixed (VkMemoryUnmapInfo* pMemoryUnmapInfoFixed = &pMemoryUnmapInfo) { return handle.PInvoke.vkUnmapMemory2KHR.Invoke(handle.Handle, pMemoryUnmapInfoFixed); } } /// /// vkGetEncodedVideoSessionParametersKHR - Get encoded parameter sets from a video session parameters object /// /// /// /// Encoded parameter data can be retrieved from a video session parameters /// object created with a video encode operation using the command: /// /// /// // Provided by VK_KHR_video_encode_queue /// VkResult vkGetEncodedVideoSessionParametersKHR( /// VkDevice device, /// const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, /// VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, /// size_t* pDataSize, /// void* pData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe VkResult GetEncodedVideoSessionParametersKHR( this VulkanHandleWrapper handle, in VkVideoEncodeSessionParametersGetInfoKHR pVideoSessionParametersInfo, in VkVideoEncodeSessionParametersFeedbackInfoKHR pFeedbackInfo, ref nuint pDataSize, scoped ReadOnlySpan pData ) { fixed (byte* pDataFixed = pData) fixed (VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfoFixed = &pFeedbackInfo) fixed ( VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfoFixed = &pVideoSessionParametersInfo ) fixed (nuint* pDataSizeFixed = &pDataSize) { VkResult result = handle.PInvoke.vkGetEncodedVideoSessionParametersKHR.Invoke( handle.Handle, pVideoSessionParametersInfoFixed, pFeedbackInfoFixed, pDataSizeFixed, pDataFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetEncodedVideoSessionParametersKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetEncodedVideoSessionParametersKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetEncodedVideoSessionParametersKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetEncodedVideoSessionParametersKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// Queries the required length. /// The required length. public static nuint GetEncodedVideoSessionParametersKHR_Count( this VulkanHandleWrapper handle, in VkVideoEncodeSessionParametersGetInfoKHR pVideoSessionParametersInfo, in VkVideoEncodeSessionParametersFeedbackInfoKHR pFeedbackInfo ) { nuint pDataSize = default; GetEncodedVideoSessionParametersKHR( handle, pVideoSessionParametersInfo, pFeedbackInfo, ref pDataSize, null ); return pDataSize; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static VkResult GetEncodedVideoSessionParametersKHR_Write( this VulkanHandleWrapper handle, in VkVideoEncodeSessionParametersGetInfoKHR pVideoSessionParametersInfo, in VkVideoEncodeSessionParametersFeedbackInfoKHR pFeedbackInfo, scoped ReadOnlySpan pData ) { nuint pDataSize = (nuint)pData.Length; return GetEncodedVideoSessionParametersKHR( handle, pVideoSessionParametersInfo, pFeedbackInfo, ref pDataSize, pData ); } /// /// vkCmdEncodeVideoKHR - Launch video encode operations /// /// /// /// To launch video encode operations, call: /// /// /// // Provided by VK_KHR_video_encode_queue /// void vkCmdEncodeVideoKHR( /// VkCommandBuffer commandBuffer, /// const VkVideoEncodeInfoKHR* pEncodeInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void EncodeVideoKHR(this T handle, in VkVideoEncodeInfoKHR pEncodeInfo) where T : VulkanHandleWrapper { fixed (VkVideoEncodeInfoKHR* pEncodeInfoFixed = &pEncodeInfo) { handle.PInvoke.vkCmdEncodeVideoKHR.Invoke(handle.Handle, pEncodeInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetEvent2KHR(this T handle, VkEvent @event, in VkDependencyInfo pDependencyInfo) where T : VulkanHandleWrapper { fixed (VkDependencyInfo* pDependencyInfoFixed = &pDependencyInfo) { handle.PInvoke.vkCmdSetEvent2KHR.Invoke(handle.Handle, @event, pDependencyInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ResetEvent2KHR(this T handle, VkEvent @event, VkPipelineStageFlags2 stageMask) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdResetEvent2KHR.Invoke(handle.Handle, @event, stageMask); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void WaitEvents2KHR( this T handle, int eventCount, VkEvent* pEvents, VkDependencyInfo* pDependencyInfos ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdWaitEvents2KHR.Invoke(handle.Handle, eventCount, pEvents, pDependencyInfos); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void PipelineBarrier2KHR(this T handle, in VkDependencyInfo pDependencyInfo) where T : VulkanHandleWrapper { fixed (VkDependencyInfo* pDependencyInfoFixed = &pDependencyInfo) { handle.PInvoke.vkCmdPipelineBarrier2KHR.Invoke(handle.Handle, pDependencyInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteTimestamp2KHR( this T handle, VkPipelineStageFlags2 stage, VkQueryPool queryPool, int query ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdWriteTimestamp2KHR.Invoke(handle.Handle, stage, queryPool, query); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult Submit2KHR( this VulkanHandleWrapper handle, int submitCount, VkSubmitInfo2* pSubmits, VkFence fence ) { return handle.PInvoke.vkQueueSubmit2KHR.Invoke(handle.Handle, submitCount, pSubmits, fence); } /// /// vkCmdBindIndexBuffer3KHR - Bind an address range as an index buffer to a command buffer /// /// /// /// :refpage: vkCmdBindIndexBuffer3KHR /// /// /// To bind an address range as an index buffer to a command buffer, call: /// /// /// // Provided by VK_KHR_device_address_commands /// void vkCmdBindIndexBuffer3KHR( /// VkCommandBuffer commandBuffer, /// const VkBindIndexBuffer3InfoKHR* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindIndexBuffer3KHR(this T handle, in VkBindIndexBuffer3InfoKHR pInfo) where T : VulkanHandleWrapper { fixed (VkBindIndexBuffer3InfoKHR* pInfoFixed = &pInfo) { handle.PInvoke.vkCmdBindIndexBuffer3KHR.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCmdBindVertexBuffers3KHR - Bind strided address ranges as vertex buffers to a command buffer and dynamically set strides /// /// /// /// To bind strided address ranges as vertex buffers to a command buffer for use /// in subsequent drawing commands, call: /// /// /// // Provided by VK_KHR_device_address_commands /// void vkCmdBindVertexBuffers3KHR( /// VkCommandBuffer commandBuffer, /// uint32_t firstBinding, /// uint32_t bindingCount, /// const VkBindVertexBuffer3InfoKHR* pBindingInfos); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindVertexBuffers3KHR( this T handle, int firstBinding, scoped ReadOnlySpan pBindingInfos ) where T : VulkanHandleWrapper { fixed (VkBindVertexBuffer3InfoKHR* pBindingInfosFixed = pBindingInfos) { handle.PInvoke.vkCmdBindVertexBuffers3KHR.Invoke( handle.Handle, firstBinding, pBindingInfos.Length, pBindingInfosFixed ); } } /// /// vkCmdDrawIndirect2KHR - Draw primitives with indirect parameters through an address range /// /// /// /// :refpage: vkCmdDrawIndirect2KHR /// /// /// To record a non-indexed indirect drawing command, call: /// /// /// // Provided by VK_KHR_device_address_commands /// void vkCmdDrawIndirect2KHR( /// VkCommandBuffer commandBuffer, /// const VkDrawIndirect2InfoKHR* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DrawIndirect2KHR(this T handle, in VkDrawIndirect2InfoKHR pInfo) where T : VulkanHandleWrapper { fixed (VkDrawIndirect2InfoKHR* pInfoFixed = &pInfo) { handle.PInvoke.vkCmdDrawIndirect2KHR.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCmdDrawIndexedIndirect2KHR - Draw primitives with indirect parameters through an address range and with indexed vertices /// /// /// /// :refpage: vkCmdDrawIndexedIndirect2KHR /// /// /// To record an indexed indirect drawing command, call: /// /// /// // Provided by VK_KHR_device_address_commands /// void vkCmdDrawIndexedIndirect2KHR( /// VkCommandBuffer commandBuffer, /// const VkDrawIndirect2InfoKHR* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DrawIndexedIndirect2KHR(this T handle, in VkDrawIndirect2InfoKHR pInfo) where T : VulkanHandleWrapper { fixed (VkDrawIndirect2InfoKHR* pInfoFixed = &pInfo) { handle.PInvoke.vkCmdDrawIndexedIndirect2KHR.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCmdDispatchIndirect2KHR - Dispatch compute work items with indirect parameters through an address range /// /// /// /// :refpage: vkCmdDispatchIndirect2KHR /// /// /// To record an indirect dispatching command, call: /// /// /// // Provided by VK_KHR_device_address_commands /// void vkCmdDispatchIndirect2KHR( /// VkCommandBuffer commandBuffer, /// const VkDispatchIndirect2InfoKHR* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DispatchIndirect2KHR(this T handle, in VkDispatchIndirect2InfoKHR pInfo) where T : VulkanHandleWrapper { fixed (VkDispatchIndirect2InfoKHR* pInfoFixed = &pInfo) { handle.PInvoke.vkCmdDispatchIndirect2KHR.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCmdCopyMemoryKHR - Copy data between memory ranges /// /// /// /// :refpage: vkCmdCopyMemoryKHR /// /// /// To copy data between memory ranges, call: /// /// /// // Provided by VK_KHR_device_address_commands /// void vkCmdCopyMemoryKHR( /// VkCommandBuffer commandBuffer, /// const VkCopyDeviceMemoryInfoKHR* pCopyMemoryInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyMemoryKHR(this T handle, in VkCopyDeviceMemoryInfoKHR pCopyMemoryInfo) where T : VulkanHandleWrapper { fixed (VkCopyDeviceMemoryInfoKHR* pCopyMemoryInfoFixed = &pCopyMemoryInfo) { handle.PInvoke.vkCmdCopyMemoryKHR.Invoke(handle.Handle, pCopyMemoryInfoFixed); } } /// /// vkCmdCopyMemoryToImageKHR - Copy data from memory ranges to an image /// /// /// /// :refpage: vkCmdCopyMemoryToImageKHR /// /// /// To copy data from an image to memory ranges, call: /// /// /// // Provided by VK_KHR_device_address_commands /// void vkCmdCopyMemoryToImageKHR( /// VkCommandBuffer commandBuffer, /// const VkCopyDeviceMemoryImageInfoKHR* pCopyMemoryInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyMemoryToImageKHR( this T handle, in VkCopyDeviceMemoryImageInfoKHR pCopyMemoryInfo ) where T : VulkanHandleWrapper { fixed (VkCopyDeviceMemoryImageInfoKHR* pCopyMemoryInfoFixed = &pCopyMemoryInfo) { handle.PInvoke.vkCmdCopyMemoryToImageKHR.Invoke(handle.Handle, pCopyMemoryInfoFixed); } } /// /// vkCmdCopyImageToMemoryKHR - Copy data from an image to memory ranges /// /// /// /// :refpage: vkCmdCopyImageToMemoryKHR /// /// /// To copy data from an image to memory ranges, call: /// /// /// // Provided by VK_KHR_device_address_commands /// void vkCmdCopyImageToMemoryKHR( /// VkCommandBuffer commandBuffer, /// const VkCopyDeviceMemoryImageInfoKHR* pCopyMemoryInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyImageToMemoryKHR( this T handle, in VkCopyDeviceMemoryImageInfoKHR pCopyMemoryInfo ) where T : VulkanHandleWrapper { fixed (VkCopyDeviceMemoryImageInfoKHR* pCopyMemoryInfoFixed = &pCopyMemoryInfo) { handle.PInvoke.vkCmdCopyImageToMemoryKHR.Invoke(handle.Handle, pCopyMemoryInfoFixed); } } /// /// vkCmdUpdateMemoryKHR - Update the content of device memory from host memory /// /// /// /// :refpage: vkCmdUpdateMemoryKHR /// /// /// To update device memory inline in a command buffer, call: /// /// /// // Provided by VK_KHR_device_address_commands /// void vkCmdUpdateMemoryKHR( /// VkCommandBuffer commandBuffer, /// const VkDeviceAddressRangeKHR* pDstRange, /// VkAddressCommandFlagsKHR dstFlags, /// VkDeviceSize dataSize, /// const void* pData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void UpdateMemoryKHR( this T handle, VkDeviceAddressRangeKHR* pDstRange, VkAddressCommandFlagsKHR dstFlags, scoped ReadOnlySpan pData ) where T : VulkanHandleWrapper { fixed (byte* pDataFixed = pData) { handle.PInvoke.vkCmdUpdateMemoryKHR.Invoke( handle.Handle, pDstRange, dstFlags, (ByteSize64)pData.Length, pDataFixed ); } } /// /// vkCmdFillMemoryKHR - Fill a memory range with a fixed 4-byte bit pattern /// /// /// /// :refpage: vkCmdFillMemoryKHR /// /// /// To fill a memory range with a fixed 4-byte bit pattern, call: /// /// /// // Provided by VK_KHR_device_address_commands /// void vkCmdFillMemoryKHR( /// VkCommandBuffer commandBuffer, /// const VkDeviceAddressRangeKHR* pDstRange, /// VkAddressCommandFlagsKHR dstFlags, /// uint32_t data); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void FillMemoryKHR( this T handle, VkDeviceAddressRangeKHR* pDstRange, VkAddressCommandFlagsKHR dstFlags, int data ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdFillMemoryKHR.Invoke(handle.Handle, pDstRange, dstFlags, data); } /// /// vkCmdCopyQueryPoolResultsToMemoryKHR - Copy the results of queries in a query pool to a memory range /// /// /// /// :refpage: vkCmdCopyQueryPoolResultsToMemoryKHR /// /// /// To copy query statuses and numerical results directly to buffer memory, /// call: /// /// /// // Provided by VK_KHR_device_address_commands /// void vkCmdCopyQueryPoolResultsToMemoryKHR( /// VkCommandBuffer commandBuffer, /// VkQueryPool queryPool, /// uint32_t firstQuery, /// uint32_t queryCount, /// const VkStridedDeviceAddressRangeKHR* pDstRange, /// VkAddressCommandFlagsKHR dstFlags, /// VkQueryResultFlags queryResultFlags); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyQueryPoolResultsToMemoryKHR( this T handle, VkQueryPool queryPool, int firstQuery, int queryCount, VkStridedDeviceAddressRangeKHR* pDstRange, VkAddressCommandFlagsKHR dstFlags, VkQueryResultFlags queryResultFlags ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdCopyQueryPoolResultsToMemoryKHR.Invoke( handle.Handle, queryPool, firstQuery, queryCount, pDstRange, dstFlags, queryResultFlags ); } /// /// vkCmdDrawIndirectCount2KHR - Draw primitives with indirect parameters and draw count through address ranges /// /// /// /// :refpage: vkCmdDrawIndirectCount2KHR /// /// /// To record a non-indexed indirect drawing command, call: /// /// /// // Provided by VK_KHR_device_address_commands with VK_KHR_draw_indirect_count or VK_VERSION_1_2 /// void vkCmdDrawIndirectCount2KHR( /// VkCommandBuffer commandBuffer, /// const VkDrawIndirectCount2InfoKHR* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DrawIndirectCount2KHR(this T handle, in VkDrawIndirectCount2InfoKHR pInfo) where T : VulkanHandleWrapper { fixed (VkDrawIndirectCount2InfoKHR* pInfoFixed = &pInfo) { handle.PInvoke.vkCmdDrawIndirectCount2KHR.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCmdDrawIndexedIndirectCount2KHR - Draw primitives with indirect parameters and draw count through address ranges and with indexed vertices /// /// /// /// :refpage: vkCmdDrawIndexedIndirectCount2KHR /// /// /// To record a non-indexed indirect drawing command, call: /// /// /// // Provided by VK_KHR_device_address_commands with VK_KHR_draw_indirect_count or VK_VERSION_1_2 /// void vkCmdDrawIndexedIndirectCount2KHR( /// VkCommandBuffer commandBuffer, /// const VkDrawIndirectCount2InfoKHR* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DrawIndexedIndirectCount2KHR(this T handle, in VkDrawIndirectCount2InfoKHR pInfo) where T : VulkanHandleWrapper { fixed (VkDrawIndirectCount2InfoKHR* pInfoFixed = &pInfo) { handle.PInvoke.vkCmdDrawIndexedIndirectCount2KHR.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCmdBeginConditionalRendering2EXT - Define the beginning of a conditional rendering block /// /// /// /// To begin conditional rendering, call: /// /// /// // Provided by VK_KHR_device_address_commands with VK_EXT_conditional_rendering /// void vkCmdBeginConditionalRendering2EXT( /// VkCommandBuffer commandBuffer, /// const VkConditionalRenderingBeginInfo2EXT* pConditionalRenderingBegin); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BeginConditionalRendering2EXT( this T handle, VkConditionalRenderingBeginInfo2EXT* pConditionalRenderingBegin ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdBeginConditionalRendering2EXT.Invoke(handle.Handle, pConditionalRenderingBegin); } /// /// vkCmdBindTransformFeedbackBuffers2EXT - Bind transform feedback memory ranges to a command buffer /// /// /// /// :refpage: vkCmdBindTransformFeedbackBuffers2EXT /// /// /// To bind transform feedback memory ranges to a command buffer for use in /// subsequent drawing commands, call: /// /// /// // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback /// void vkCmdBindTransformFeedbackBuffers2EXT( /// VkCommandBuffer commandBuffer, /// uint32_t firstBinding, /// uint32_t bindingCount, /// const VkBindTransformFeedbackBuffer2InfoEXT* pBindingInfos); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindTransformFeedbackBuffers2EXT( this T handle, int firstBinding, scoped ReadOnlySpan pBindingInfos ) where T : VulkanHandleWrapper { fixed (VkBindTransformFeedbackBuffer2InfoEXT* pBindingInfosFixed = pBindingInfos) { handle.PInvoke.vkCmdBindTransformFeedbackBuffers2EXT.Invoke( handle.Handle, firstBinding, pBindingInfos.Length, pBindingInfosFixed ); } } /// /// vkCmdBeginTransformFeedback2EXT - Make transform feedback active in the command buffer /// /// /// /// :refpage: vkCmdBeginTransformFeedback2EXT /// :firstcounter: firstCounterRange /// :countercount: counterRangeCount /// :bindCommand: vkCmdBindTransformFeedbackBuffers2EXT /// /// /// Transform feedback for specific transform feedback buffers is made active by /// calling: /// /// /// // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback /// void vkCmdBeginTransformFeedback2EXT( /// VkCommandBuffer commandBuffer, /// uint32_t firstCounterRange, /// uint32_t counterRangeCount, /// const VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfos); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BeginTransformFeedback2EXT( this T handle, int firstCounterRange, scoped ReadOnlySpan pCounterInfos ) where T : VulkanHandleWrapper { fixed (VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfosFixed = pCounterInfos) { handle.PInvoke.vkCmdBeginTransformFeedback2EXT.Invoke( handle.Handle, firstCounterRange, pCounterInfos.Length, pCounterInfosFixed ); } } /// /// vkCmdEndTransformFeedback2EXT - Make transform feedback inactive in the command buffer /// /// /// /// :refpage: vkCmdEndTransformFeedback2EXT /// :countercount: counterRangeCount /// /// /// Transform feedback for specific transform feedback buffers is made inactive /// by calling: /// /// /// // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback /// void vkCmdEndTransformFeedback2EXT( /// VkCommandBuffer commandBuffer, /// uint32_t firstCounterRange, /// uint32_t counterRangeCount, /// const VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfos); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void EndTransformFeedback2EXT( this T handle, int firstCounterRange, scoped ReadOnlySpan pCounterInfos ) where T : VulkanHandleWrapper { fixed (VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfosFixed = pCounterInfos) { handle.PInvoke.vkCmdEndTransformFeedback2EXT.Invoke( handle.Handle, firstCounterRange, pCounterInfos.Length, pCounterInfosFixed ); } } /// /// vkCmdDrawIndirectByteCount2EXT - Draw primitives with indirect parameters where the vertex count is derived from the counter byte value in the counter memory range /// /// /// /// :refpage: vkCmdDrawIndirectByteCount2EXT /// /// /// To record a non-indexed draw call, where the vertex count is based on a byte /// count read from a memory range and the passed in vertex stride parameter, /// call: /// /// /// // Provided by VK_KHR_device_address_commands with VK_EXT_transform_feedback /// void vkCmdDrawIndirectByteCount2EXT( /// VkCommandBuffer commandBuffer, /// uint32_t instanceCount, /// uint32_t firstInstance, /// const VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfo, /// uint32_t counterOffset, /// uint32_t vertexStride); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DrawIndirectByteCount2EXT( this T handle, int instanceCount, int firstInstance, in VkBindTransformFeedbackBuffer2InfoEXT pCounterInfo, int counterOffset, int vertexStride ) where T : VulkanHandleWrapper { fixed (VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfoFixed = &pCounterInfo) { handle.PInvoke.vkCmdDrawIndirectByteCount2EXT.Invoke( handle.Handle, instanceCount, firstInstance, pCounterInfoFixed, counterOffset, vertexStride ); } } /// /// vkCmdDrawMeshTasksIndirect2EXT - Issue a mesh tasks draw with indirect parameters through an address range /// /// /// /// :refpage: vkCmdDrawMeshTasksIndirect2EXT /// /// /// To record an indirect mesh tasks drawing command, call: /// /// /// // Provided by VK_KHR_device_address_commands with VK_EXT_mesh_shader /// void vkCmdDrawMeshTasksIndirect2EXT( /// VkCommandBuffer commandBuffer, /// const VkDrawIndirect2InfoKHR* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DrawMeshTasksIndirect2EXT(this T handle, in VkDrawIndirect2InfoKHR pInfo) where T : VulkanHandleWrapper { fixed (VkDrawIndirect2InfoKHR* pInfoFixed = &pInfo) { handle.PInvoke.vkCmdDrawMeshTasksIndirect2EXT.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCmdDrawMeshTasksIndirectCount2EXT - Perform an indirect mesh tasks draw with the draw count sourced from an address range /// /// /// /// :refpage: vkCmdDrawMeshTasksIndirectCount2EXT /// /// /// To record an indirect mesh tasks drawing command with the draw count sourced /// from an address range, call: /// /// /// // Provided by VK_KHR_device_address_commands with (VK_KHR_draw_indirect_count or VK_VERSION_1_2) and VK_EXT_mesh_shader /// void vkCmdDrawMeshTasksIndirectCount2EXT( /// VkCommandBuffer commandBuffer, /// const VkDrawIndirectCount2InfoKHR* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DrawMeshTasksIndirectCount2EXT(this T handle, in VkDrawIndirectCount2InfoKHR pInfo) where T : VulkanHandleWrapper { fixed (VkDrawIndirectCount2InfoKHR* pInfoFixed = &pInfo) { handle.PInvoke.vkCmdDrawMeshTasksIndirectCount2EXT.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCmdWriteMarkerToMemoryAMD - Execute a pipelined write of a marker value into a memory range /// /// /// /// :refpage: vkCmdWriteMarkerToMemoryAMD /// /// /// To write a 32-bit marker value into memory as a pipelined operation, call: /// /// /// // Provided by VK_KHR_device_address_commands with VK_AMD_buffer_marker /// void vkCmdWriteMarkerToMemoryAMD( /// VkCommandBuffer commandBuffer, /// const VkMemoryMarkerInfoAMD* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void WriteMarkerToMemoryAMD(this T handle, in VkMemoryMarkerInfoAMD pInfo) where T : VulkanHandleWrapper { fixed (VkMemoryMarkerInfoAMD* pInfoFixed = &pInfo) { handle.PInvoke.vkCmdWriteMarkerToMemoryAMD.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCreateAccelerationStructure2KHR - Create a new acceleration structure object using a device address /// /// /// /// :refpage: vkCreateAccelerationStructure2KHR /// /// /// To create an acceleration structure using a device address, call: /// /// /// // Provided by VK_KHR_acceleration_structure with VK_KHR_device_address_commands /// VkResult vkCreateAccelerationStructure2KHR( /// VkDevice device, /// const VkAccelerationStructureCreateInfo2KHR* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkAccelerationStructureKHR* pAccelerationStructure); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkAccelerationStructureKHR CreateAccelerationStructure2KHR( this VulkanHandleWrapper handle, in VkAccelerationStructureCreateInfo2KHR pCreateInfo, VkAllocator? pAllocator ) { fixed (VkAccelerationStructureCreateInfo2KHR* pCreateInfoFixed = &pCreateInfo) { VkAccelerationStructureKHR pAccelerationStructureLocal = default; VkResult result = handle.PInvoke.vkCreateAccelerationStructure2KHR.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pAccelerationStructureLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateAccelerationStructure2KHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: throw new VkResultError( VkResult.ErrorInvalidOpaqueCaptureAddressKHR, "Vulkan call to vkCreateAccelerationStructure2KHR failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateAccelerationStructure2KHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateAccelerationStructure2KHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.Success: default: break; } return pAccelerationStructureLocal; } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyBuffer2KHR(this T handle, in VkCopyBufferInfo2 pCopyBufferInfo) where T : VulkanHandleWrapper { fixed (VkCopyBufferInfo2* pCopyBufferInfoFixed = &pCopyBufferInfo) { handle.PInvoke.vkCmdCopyBuffer2KHR.Invoke(handle.Handle, pCopyBufferInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyImage2KHR(this T handle, in VkCopyImageInfo2 pCopyImageInfo) where T : VulkanHandleWrapper { fixed (VkCopyImageInfo2* pCopyImageInfoFixed = &pCopyImageInfo) { handle.PInvoke.vkCmdCopyImage2KHR.Invoke(handle.Handle, pCopyImageInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyBufferToImage2KHR( this T handle, in VkCopyBufferToImageInfo2 pCopyBufferToImageInfo ) where T : VulkanHandleWrapper { fixed (VkCopyBufferToImageInfo2* pCopyBufferToImageInfoFixed = &pCopyBufferToImageInfo) { handle.PInvoke.vkCmdCopyBufferToImage2KHR.Invoke(handle.Handle, pCopyBufferToImageInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyImageToBuffer2KHR( this T handle, in VkCopyImageToBufferInfo2 pCopyImageToBufferInfo ) where T : VulkanHandleWrapper { fixed (VkCopyImageToBufferInfo2* pCopyImageToBufferInfoFixed = &pCopyImageToBufferInfo) { handle.PInvoke.vkCmdCopyImageToBuffer2KHR.Invoke(handle.Handle, pCopyImageToBufferInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BlitImage2KHR(this T handle, in VkBlitImageInfo2 pBlitImageInfo) where T : VulkanHandleWrapper { fixed (VkBlitImageInfo2* pBlitImageInfoFixed = &pBlitImageInfo) { handle.PInvoke.vkCmdBlitImage2KHR.Invoke(handle.Handle, pBlitImageInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void ResolveImage2KHR(this T handle, in VkResolveImageInfo2 pResolveImageInfo) where T : VulkanHandleWrapper { fixed (VkResolveImageInfo2* pResolveImageInfoFixed = &pResolveImageInfo) { handle.PInvoke.vkCmdResolveImage2KHR.Invoke(handle.Handle, pResolveImageInfoFixed); } } /// /// vkCmdTraceRaysIndirect2KHR - Initialize an indirect ray tracing dispatch with indirect shader binding tables /// /// /// /// :refpage: vkCmdTraceRaysIndirect2KHR /// /// /// To dispatch ray tracing, with some parameters sourced on the device, use: /// /// /// // Provided by VK_KHR_ray_tracing_maintenance1 with VK_KHR_ray_tracing_pipeline /// void vkCmdTraceRaysIndirect2KHR( /// VkCommandBuffer commandBuffer, /// VkDeviceAddress indirectDeviceAddress); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void TraceRaysIndirect2KHR(this T handle, VkDeviceAddress indirectDeviceAddress) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdTraceRaysIndirect2KHR.Invoke(handle.Handle, indirectDeviceAddress); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetBufferMemoryRequirementsKHR( this VulkanHandleWrapper handle, in VkDeviceBufferMemoryRequirements pInfo, ref VkMemoryRequirements2 pMemoryRequirements ) { fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) fixed (VkDeviceBufferMemoryRequirements* pInfoFixed = &pInfo) { handle.PInvoke.vkGetDeviceBufferMemoryRequirementsKHR.Invoke( handle.Handle, pInfoFixed, pMemoryRequirementsFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryRequirements2. public static VkMemoryRequirements2 GetBufferMemoryRequirementsKHR( this VulkanHandleWrapper handle, in VkDeviceBufferMemoryRequirements pInfo ) { VkMemoryRequirements2 outValue = new(); GetBufferMemoryRequirementsKHR(handle, pInfo, ref outValue); return outValue; } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetImageMemoryRequirementsKHR( this VulkanHandleWrapper handle, in VkDeviceImageMemoryRequirements pInfo, ref VkMemoryRequirements2 pMemoryRequirements ) { fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) fixed (VkDeviceImageMemoryRequirements* pInfoFixed = &pInfo) { handle.PInvoke.vkGetDeviceImageMemoryRequirementsKHR.Invoke( handle.Handle, pInfoFixed, pMemoryRequirementsFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryRequirements2. public static VkMemoryRequirements2 GetImageMemoryRequirementsKHR( this VulkanHandleWrapper handle, in VkDeviceImageMemoryRequirements pInfo ) { VkMemoryRequirements2 outValue = new(); GetImageMemoryRequirementsKHR(handle, pInfo, ref outValue); return outValue; } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetImageSparseMemoryRequirementsKHR( this VulkanHandleWrapper handle, in VkDeviceImageMemoryRequirements pInfo, int* pSparseMemoryRequirementCount, ref VkSparseImageMemoryRequirements2 pSparseMemoryRequirements ) { fixed (VkSparseImageMemoryRequirements2* pSparseMemoryRequirementsFixed = &pSparseMemoryRequirements) fixed (VkDeviceImageMemoryRequirements* pInfoFixed = &pInfo) { handle.PInvoke.vkGetDeviceImageSparseMemoryRequirementsKHR.Invoke( handle.Handle, pInfoFixed, pSparseMemoryRequirementCount, pSparseMemoryRequirementsFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkSparseImageMemoryRequirements2. public static unsafe VkSparseImageMemoryRequirements2 GetImageSparseMemoryRequirementsKHR( this VulkanHandleWrapper handle, in VkDeviceImageMemoryRequirements pInfo, int* pSparseMemoryRequirementCount ) { VkSparseImageMemoryRequirements2 outValue = new(); GetImageSparseMemoryRequirementsKHR(handle, pInfo, pSparseMemoryRequirementCount, ref outValue); return outValue; } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void BindIndexBuffer2KHR( this T handle, VkBuffer buffer, ByteSize64 offset, ByteSize64 size, VkIndexType indexType ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdBindIndexBuffer2KHR.Invoke(handle.Handle, buffer, offset, size, indexType); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetRenderingAreaGranularityKHR( this VulkanHandleWrapper handle, in VkRenderingAreaInfo pRenderingAreaInfo, ref VkExtent2D pGranularity ) { fixed (VkExtent2D* pGranularityFixed = &pGranularity) fixed (VkRenderingAreaInfo* pRenderingAreaInfoFixed = &pRenderingAreaInfo) { handle.PInvoke.vkGetRenderingAreaGranularityKHR.Invoke( handle.Handle, pRenderingAreaInfoFixed, pGranularityFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkExtent2D. public static VkExtent2D GetRenderingAreaGranularityKHR( this VulkanHandleWrapper handle, in VkRenderingAreaInfo pRenderingAreaInfo ) { VkExtent2D outValue = new(); GetRenderingAreaGranularityKHR(handle, pRenderingAreaInfo, ref outValue); return outValue; } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetImageSubresourceLayoutKHR( this VulkanHandleWrapper handle, in VkDeviceImageSubresourceInfo pInfo, ref VkSubresourceLayout2 pLayout ) { fixed (VkSubresourceLayout2* pLayoutFixed = &pLayout) fixed (VkDeviceImageSubresourceInfo* pInfoFixed = &pInfo) { handle.PInvoke.vkGetDeviceImageSubresourceLayoutKHR.Invoke(handle.Handle, pInfoFixed, pLayoutFixed); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkSubresourceLayout2. public static VkSubresourceLayout2 GetImageSubresourceLayoutKHR( this VulkanHandleWrapper handle, in VkDeviceImageSubresourceInfo pInfo ) { VkSubresourceLayout2 outValue = new(); GetImageSubresourceLayoutKHR(handle, pInfo, ref outValue); return outValue; } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetImageSubresourceLayout2KHR( this VulkanHandleWrapper handle, VkImage image, VkImageSubresource2* pSubresource, ref VkSubresourceLayout2 pLayout ) { fixed (VkSubresourceLayout2* pLayoutFixed = &pLayout) { handle.PInvoke.vkGetImageSubresourceLayout2KHR.Invoke(handle.Handle, image, pSubresource, pLayoutFixed); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkSubresourceLayout2. public static unsafe VkSubresourceLayout2 GetImageSubresourceLayout2KHR( this VulkanHandleWrapper handle, VkImage image, VkImageSubresource2* pSubresource ) { VkSubresourceLayout2 outValue = new(); GetImageSubresourceLayout2KHR(handle, image, pSubresource, ref outValue); return outValue; } /// /// vkWaitForPresent2KHR - Wait for presentation /// /// /// /// When the VkSurfaceCapabilitiesPresentWait2KHR surface capability is /// present for a given surface, an application can wait for an image to be /// presented to the user by first specifying a presentId for the target /// presentation by adding a VkPresentId2KHR structure to the pNext /// chain of the VkPresentInfoKHR structure and then waiting for that /// presentation to complete by calling: /// /// /// // Provided by VK_KHR_present_wait2 /// VkResult vkWaitForPresent2KHR( /// VkDevice device, /// VkSwapchainKHR swapchain, /// const VkPresentWait2InfoKHR* pPresentWait2Info); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult WaitForPresent2KHR( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain, in VkPresentWait2InfoKHR pPresentWait2Info ) { fixed (VkPresentWait2InfoKHR* pPresentWait2InfoFixed = &pPresentWait2Info) { VkResult result = handle.PInvoke.vkWaitForPresent2KHR.Invoke( handle.Handle, swapchain, pPresentWait2InfoFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkWaitForPresent2KHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkWaitForPresent2KHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkWaitForPresent2KHR failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorOutOfDateKHR: throw new VkResultError( VkResult.ErrorOutOfDateKHR, "Vulkan call to vkWaitForPresent2KHR failed with error: VK_ERROR_OUT_OF_DATE_KHR" ); case VkResult.ErrorSurfaceLostKHR: throw new VkResultError( VkResult.ErrorSurfaceLostKHR, "Vulkan call to vkWaitForPresent2KHR failed with error: VK_ERROR_SURFACE_LOST_KHR" ); case VkResult.ErrorFullScreenExclusiveModeLostEXT: throw new VkResultError( VkResult.ErrorFullScreenExclusiveModeLostEXT, "Vulkan call to vkWaitForPresent2KHR failed with error: VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkWaitForPresent2KHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkWaitForPresent2KHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Timeout: case VkResult.SuboptimalKHR: default: break; } return result; } } /// /// vkCreatePipelineBinariesKHR - Create pipeline binaries from a pipeline or previously retrieved data /// /// /// /// To create pipeline binary objects, call: /// /// /// // Provided by VK_KHR_pipeline_binary /// VkResult vkCreatePipelineBinariesKHR( /// VkDevice device, /// const VkPipelineBinaryCreateInfoKHR* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkPipelineBinaryHandlesInfoKHR* pBinaries); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CreatePipelineBinariesKHR( this VulkanHandleWrapper handle, in VkPipelineBinaryCreateInfoKHR pCreateInfo, VkAllocator? pAllocator, VkPipelineBinaryHandlesInfoKHR* pBinaries ) { fixed (VkPipelineBinaryCreateInfoKHR* pCreateInfoFixed = &pCreateInfo) { VkResult result = handle.PInvoke.vkCreatePipelineBinariesKHR.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, pBinaries ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreatePipelineBinariesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreatePipelineBinariesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorInitializationFailed: throw new VkResultError( VkResult.ErrorInitializationFailed, "Vulkan call to vkCreatePipelineBinariesKHR failed with error: VK_ERROR_INITIALIZATION_FAILED" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreatePipelineBinariesKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreatePipelineBinariesKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: case VkResult.PipelineBinaryMissingKHR: default: break; } return result; } } /// /// vkDestroyPipelineBinaryKHR - Destroy a pipeline binary /// /// /// /// To destroy a VkPipelineBinaryKHR, call: /// /// /// // Provided by VK_KHR_pipeline_binary /// void vkDestroyPipelineBinaryKHR( /// VkDevice device, /// VkPipelineBinaryKHR pipelineBinary, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyPipelineBinaryKHR( this VulkanHandleWrapper handle, VkPipelineBinaryKHR pipelineBinary, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyPipelineBinaryKHR.Invoke(handle.Handle, pipelineBinary, pAllocator); } /// /// vkGetPipelineKeyKHR - Generate the pipeline key from pipeline creation info /// /// /// /// To generate the key for a particular pipeline creation info, call: /// /// /// // Provided by VK_KHR_pipeline_binary /// VkResult vkGetPipelineKeyKHR( /// VkDevice device, /// const VkPipelineCreateInfoKHR* pPipelineCreateInfo, /// VkPipelineBinaryKeyKHR* pPipelineKey); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetPipelineKeyKHR( this VulkanHandleWrapper handle, in VkPipelineCreateInfoKHR pPipelineCreateInfo, ref VkPipelineBinaryKeyKHR pPipelineKey ) { fixed (VkPipelineBinaryKeyKHR* pPipelineKeyFixed = &pPipelineKey) fixed (VkPipelineCreateInfoKHR* pPipelineCreateInfoFixed = &pPipelineCreateInfo) { VkResult result = handle.PInvoke.vkGetPipelineKeyKHR.Invoke( handle.Handle, pPipelineCreateInfoFixed, pPipelineKeyFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetPipelineKeyKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetPipelineKeyKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetPipelineKeyKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetPipelineKeyKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkPipelineBinaryKeyKHR. public static VkPipelineBinaryKeyKHR GetPipelineKeyKHR( this VulkanHandleWrapper handle, in VkPipelineCreateInfoKHR pPipelineCreateInfo ) { VkPipelineBinaryKeyKHR outValue = new(); GetPipelineKeyKHR(handle, pPipelineCreateInfo, ref outValue); return outValue; } /// /// vkGetPipelineBinaryDataKHR - Get the data store from a pipeline binary /// /// /// /// Data can be retrieved from a pipeline binary object using the command: /// /// /// // Provided by VK_KHR_pipeline_binary /// VkResult vkGetPipelineBinaryDataKHR( /// VkDevice device, /// const VkPipelineBinaryDataInfoKHR* pInfo, /// VkPipelineBinaryKeyKHR* pPipelineBinaryKey, /// size_t* pPipelineBinaryDataSize, /// void* pPipelineBinaryData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe void GetPipelineBinaryDataKHR( this VulkanHandleWrapper handle, in VkPipelineBinaryDataInfoKHR pInfo, VkPipelineBinaryKeyKHR* pPipelineBinaryKey, ref nuint pPipelineBinaryDataSize, scoped ReadOnlySpan pPipelineBinaryData ) { fixed (byte* pPipelineBinaryDataFixed = pPipelineBinaryData) fixed (VkPipelineBinaryDataInfoKHR* pInfoFixed = &pInfo) fixed (nuint* pPipelineBinaryDataSizeFixed = &pPipelineBinaryDataSize) { VkResult result = handle.PInvoke.vkGetPipelineBinaryDataKHR.Invoke( handle.Handle, pInfoFixed, pPipelineBinaryKey, pPipelineBinaryDataSizeFixed, pPipelineBinaryDataFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetPipelineBinaryDataKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetPipelineBinaryDataKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorNotEnoughSpaceKHR: throw new VkResultError( VkResult.ErrorNotEnoughSpaceKHR, "Vulkan call to vkGetPipelineBinaryDataKHR failed with error: VK_ERROR_NOT_ENOUGH_SPACE_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetPipelineBinaryDataKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetPipelineBinaryDataKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// Queries the required length. /// The required length. public static nuint GetPipelineBinaryDataKHR_Count( this VulkanHandleWrapper handle, in VkPipelineBinaryDataInfoKHR pInfo, VkPipelineBinaryKeyKHR* pPipelineBinaryKey ) { nuint pPipelineBinaryDataSize = default; GetPipelineBinaryDataKHR(handle, pInfo, pPipelineBinaryKey, ref pPipelineBinaryDataSize, null); return pPipelineBinaryDataSize; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static void GetPipelineBinaryDataKHR_Write( this VulkanHandleWrapper handle, in VkPipelineBinaryDataInfoKHR pInfo, VkPipelineBinaryKeyKHR* pPipelineBinaryKey, scoped ReadOnlySpan pPipelineBinaryData ) { nuint pPipelineBinaryDataSize = (nuint)pPipelineBinaryData.Length; GetPipelineBinaryDataKHR( handle, pInfo, pPipelineBinaryKey, ref pPipelineBinaryDataSize, pPipelineBinaryData ); } /// /// vkReleaseCapturedPipelineDataKHR - Release captured pipeline binary data /// /// /// /// To release pipeline resources captured with /// VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR, call: /// /// /// // Provided by VK_KHR_pipeline_binary /// VkResult vkReleaseCapturedPipelineDataKHR( /// VkDevice device, /// const VkReleaseCapturedPipelineDataInfoKHR* pInfo, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void ReleaseCapturedPipelineDataKHR( this VulkanHandleWrapper handle, in VkReleaseCapturedPipelineDataInfoKHR pInfo, VkAllocator? pAllocator ) { fixed (VkReleaseCapturedPipelineDataInfoKHR* pInfoFixed = &pInfo) { VkResult result = handle.PInvoke.vkReleaseCapturedPipelineDataKHR.Invoke( handle.Handle, pInfoFixed, pAllocator ); switch (result) { case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkReleaseCapturedPipelineDataKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkReleaseCapturedPipelineDataKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkReleaseSwapchainImagesKHR - Release previously acquired but unused images /// /// /// /// To release images previously acquired through /// vkAcquireNextImageKHR, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void ReleaseSwapchainImagesKHR( this VulkanHandleWrapper handle, in VkReleaseSwapchainImagesInfoKHR pReleaseInfo ) { fixed (VkReleaseSwapchainImagesInfoKHR* pReleaseInfoFixed = &pReleaseInfo) { VkResult result = handle.PInvoke.vkReleaseSwapchainImagesKHR.Invoke(handle.Handle, pReleaseInfoFixed); switch (result) { case VkResult.ErrorSurfaceLostKHR: throw new VkResultError( VkResult.ErrorSurfaceLostKHR, "Vulkan call to vkReleaseSwapchainImagesKHR failed with error: VK_ERROR_SURFACE_LOST_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkReleaseSwapchainImagesKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkReleaseSwapchainImagesKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetLineStippleKHR(this T handle, int lineStippleFactor, ushort lineStipplePattern) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetLineStippleKHR.Invoke(handle.Handle, lineStippleFactor, lineStipplePattern); } /// /// vkGetCalibratedTimestampsKHR - Query calibrated timestamps /// /// /// /// :refpage: vkGetCalibratedTimestampsKHR /// /// /// In order to be able to correlate the time a particular operation took place /// at on timelines of different time domains (e.g. a device operation vs. a /// host operation), Vulkan allows querying calibrated timestamps from multiple /// time domains. /// /// /// To query calibrated timestamps from a set of time domains, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe nint GetCalibratedTimestampsKHR( this VulkanHandleWrapper handle, scoped ReadOnlySpan pTimestampInfos, scoped ReadOnlySpan pTimestamps ) { fixed (nint* pTimestampsFixed = pTimestamps) fixed (VkCalibratedTimestampInfoKHR* pTimestampInfosFixed = pTimestampInfos) { nint pMaxDeviationLocal = default; VkResult result = handle.PInvoke.vkGetCalibratedTimestampsKHR.Invoke( handle.Handle, pTimestampInfos.Length, pTimestampInfosFixed, pTimestampsFixed, &pMaxDeviationLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetCalibratedTimestampsKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetCalibratedTimestampsKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetCalibratedTimestampsKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetCalibratedTimestampsKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pMaxDeviationLocal; } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindDescriptorSets2KHR( this T handle, in VkBindDescriptorSetsInfo pBindDescriptorSetsInfo ) where T : VulkanHandleWrapper { fixed (VkBindDescriptorSetsInfo* pBindDescriptorSetsInfoFixed = &pBindDescriptorSetsInfo) { handle.PInvoke.vkCmdBindDescriptorSets2KHR.Invoke(handle.Handle, pBindDescriptorSetsInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void PushConstants2KHR(this T handle, in VkPushConstantsInfo pPushConstantsInfo) where T : VulkanHandleWrapper { fixed (VkPushConstantsInfo* pPushConstantsInfoFixed = &pPushConstantsInfo) { handle.PInvoke.vkCmdPushConstants2KHR.Invoke(handle.Handle, pPushConstantsInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void PushDescriptorSet2KHR( this T handle, in VkPushDescriptorSetInfo pPushDescriptorSetInfo ) where T : VulkanHandleWrapper { fixed (VkPushDescriptorSetInfo* pPushDescriptorSetInfoFixed = &pPushDescriptorSetInfo) { handle.PInvoke.vkCmdPushDescriptorSet2KHR.Invoke(handle.Handle, pPushDescriptorSetInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void PushDescriptorSetWithTemplate2KHR( this T handle, in VkPushDescriptorSetWithTemplateInfo pPushDescriptorSetWithTemplateInfo ) where T : VulkanHandleWrapper { fixed ( VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfoFixed = &pPushDescriptorSetWithTemplateInfo ) { handle.PInvoke.vkCmdPushDescriptorSetWithTemplate2KHR.Invoke( handle.Handle, pPushDescriptorSetWithTemplateInfoFixed ); } } /// /// vkCmdSetDescriptorBufferOffsets2EXT - Setting descriptor buffer offsets in a command buffer /// /// /// /// :refpage: vkCmdSetDescriptorBufferOffsets2EXT /// /// /// To set descriptor buffer offsets in a command buffer, call: /// /// /// // Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer /// void vkCmdSetDescriptorBufferOffsets2EXT( /// VkCommandBuffer commandBuffer, /// const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetDescriptorBufferOffsets2EXT( this T handle, in VkSetDescriptorBufferOffsetsInfoEXT pSetDescriptorBufferOffsetsInfo ) where T : VulkanHandleWrapper { fixed ( VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfoFixed = &pSetDescriptorBufferOffsetsInfo ) { handle.PInvoke.vkCmdSetDescriptorBufferOffsets2EXT.Invoke( handle.Handle, pSetDescriptorBufferOffsetsInfoFixed ); } } /// /// vkCmdBindDescriptorBufferEmbeddedSamplers2EXT - Setting embedded immutable samplers offsets in a command buffer /// /// /// /// :refpage: vkCmdBindDescriptorBufferEmbeddedSamplers2EXT /// /// /// To bind an embedded immutable sampler set to a command buffer, call: /// /// /// // Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer /// void vkCmdBindDescriptorBufferEmbeddedSamplers2EXT( /// VkCommandBuffer commandBuffer, /// const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindDescriptorBufferEmbeddedSamplers2EXT( this T handle, in VkBindDescriptorBufferEmbeddedSamplersInfoEXT pBindDescriptorBufferEmbeddedSamplersInfo ) where T : VulkanHandleWrapper { fixed ( VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfoFixed = &pBindDescriptorBufferEmbeddedSamplersInfo ) { handle.PInvoke.vkCmdBindDescriptorBufferEmbeddedSamplers2EXT.Invoke( handle.Handle, pBindDescriptorBufferEmbeddedSamplersInfoFixed ); } } /// /// vkCmdCopyMemoryIndirectKHR - Copy data between memory regions /// /// /// /// To copy data between two memory regions by specifying copy parameters /// indirectly in memory, call: /// /// /// // Provided by VK_KHR_copy_memory_indirect /// void vkCmdCopyMemoryIndirectKHR( /// VkCommandBuffer commandBuffer, /// const VkCopyMemoryIndirectInfoKHR* pCopyMemoryIndirectInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyMemoryIndirectKHR( this T handle, in VkCopyMemoryIndirectInfoKHR pCopyMemoryIndirectInfo ) where T : VulkanHandleWrapper { fixed (VkCopyMemoryIndirectInfoKHR* pCopyMemoryIndirectInfoFixed = &pCopyMemoryIndirectInfo) { handle.PInvoke.vkCmdCopyMemoryIndirectKHR.Invoke(handle.Handle, pCopyMemoryIndirectInfoFixed); } } /// /// vkCmdCopyMemoryToImageIndirectKHR - Copy data from a memory region to an image object /// /// /// /// :refpage: vkCmdCopyMemoryToImageIndirectKHR /// /// /// To copy data from a memory region to an image object by specifying copy /// parameters in memory, call: /// /// /// // Provided by VK_KHR_copy_memory_indirect /// void vkCmdCopyMemoryToImageIndirectKHR( /// VkCommandBuffer commandBuffer, /// const VkCopyMemoryToImageIndirectInfoKHR* pCopyMemoryToImageIndirectInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyMemoryToImageIndirectKHR( this T handle, in VkCopyMemoryToImageIndirectInfoKHR pCopyMemoryToImageIndirectInfo ) where T : VulkanHandleWrapper { fixed ( VkCopyMemoryToImageIndirectInfoKHR* pCopyMemoryToImageIndirectInfoFixed = &pCopyMemoryToImageIndirectInfo ) { handle.PInvoke.vkCmdCopyMemoryToImageIndirectKHR.Invoke( handle.Handle, pCopyMemoryToImageIndirectInfoFixed ); } } /// /// vkGetDeviceFaultReportsKHR - Reports fault information for the specified device /// /// /// /// To retrieve diagnostic information about faults call: /// /// /// // Provided by VK_KHR_device_fault /// VkResult vkGetDeviceFaultReportsKHR( /// VkDevice device, /// uint64_t timeout, /// uint32_t* pFaultCounts, /// VkDeviceFaultInfoKHR* pFaultInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe VkResult GetFaultReportsKHR( this VulkanHandleWrapper handle, nint timeout, ref int pFaultCounts, scoped ReadOnlySpan pFaultInfo ) { fixed (VkDeviceFaultInfoKHR* pFaultInfoFixed = pFaultInfo) fixed (int* pFaultCountsFixed = &pFaultCounts) { VkResult result = handle.PInvoke.vkGetDeviceFaultReportsKHR.Invoke( handle.Handle, timeout, pFaultCountsFixed, pFaultInfoFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetDeviceFaultReportsKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetDeviceFaultReportsKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetDeviceFaultReportsKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: case VkResult.Timeout: default: break; } return result; } } /// Queries the required length. /// The required length. public static int GetFaultReportsKHR_Count( this VulkanHandleWrapper handle, nint timeout ) { int pFaultCounts = default; GetFaultReportsKHR(handle, timeout, ref pFaultCounts, null); return pFaultCounts; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static VkResult GetFaultReportsKHR_Write( this VulkanHandleWrapper handle, nint timeout, scoped ReadOnlySpan pFaultInfo ) { int pFaultCounts = pFaultInfo.Length; return GetFaultReportsKHR(handle, timeout, ref pFaultCounts, pFaultInfo); } /// /// vkGetDeviceFaultDebugInfoKHR - Retrieve vendor-specific crash dump data for the specified logical device /// /// /// /// To retrieve a vendor-specific binary crash dump call: /// /// /// // Provided by VK_KHR_device_fault /// VkResult vkGetDeviceFaultDebugInfoKHR( /// VkDevice device, /// VkDeviceFaultDebugInfoKHR* pDebugInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult GetFaultDebugInfoKHR( this VulkanHandleWrapper handle, ref VkDeviceFaultDebugInfoKHR pDebugInfo ) { fixed (VkDeviceFaultDebugInfoKHR* pDebugInfoFixed = &pDebugInfo) { VkResult result = handle.PInvoke.vkGetDeviceFaultDebugInfoKHR.Invoke(handle.Handle, pDebugInfoFixed); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetDeviceFaultDebugInfoKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorNotEnoughSpaceKHR: throw new VkResultError( VkResult.ErrorNotEnoughSpaceKHR, "Vulkan call to vkGetDeviceFaultDebugInfoKHR failed with error: VK_ERROR_NOT_ENOUGH_SPACE_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetDeviceFaultDebugInfoKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetDeviceFaultDebugInfoKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// /// vkCmdEndRendering2KHR - End a dynamic render pass instance /// /// /// /// To end a render pass instance, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void EndRendering2KHR(this T handle, in VkRenderingEndInfoKHR pRenderingEndInfo) where T : VulkanHandleWrapper { fixed (VkRenderingEndInfoKHR* pRenderingEndInfoFixed = &pRenderingEndInfo) { handle.PInvoke.vkCmdEndRendering2KHR.Invoke(handle.Handle, pRenderingEndInfoFixed); } } /// /// vkDebugMarkerSetObjectTagEXT - Attach arbitrary data to an object /// /// /// /// In addition to setting a name for an object, debugging and validation layers /// may have uses for additional binary data on a per-object basis that has no /// other place in the Vulkan API. /// For example, a VkShaderModule could have additional debugging data /// attached to it to aid in offline shader tracing. /// To attach data to an object, call: /// /// /// // Provided by VK_EXT_debug_marker /// VkResult vkDebugMarkerSetObjectTagEXT( /// VkDevice device, /// const VkDebugMarkerObjectTagInfoEXT* pTagInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DebugMarkerSetObjectTagEXT( this VulkanHandleWrapper handle, in VkDebugMarkerObjectTagInfoEXT pTagInfo ) { fixed (VkDebugMarkerObjectTagInfoEXT* pTagInfoFixed = &pTagInfo) { VkResult result = handle.PInvoke.vkDebugMarkerSetObjectTagEXT.Invoke(handle.Handle, pTagInfoFixed); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkDebugMarkerSetObjectTagEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkDebugMarkerSetObjectTagEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkDebugMarkerSetObjectTagEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkDebugMarkerSetObjectTagEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkDebugMarkerSetObjectNameEXT - Give an application-defined name to an object /// /// /// /// An object can be given an application-defined name by calling: /// /// /// // Provided by VK_EXT_debug_marker /// VkResult vkDebugMarkerSetObjectNameEXT( /// VkDevice device, /// const VkDebugMarkerObjectNameInfoEXT* pNameInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DebugMarkerSetObjectNameEXT( this VulkanHandleWrapper handle, in VkDebugMarkerObjectNameInfoEXT pNameInfo ) { fixed (VkDebugMarkerObjectNameInfoEXT* pNameInfoFixed = &pNameInfo) { VkResult result = handle.PInvoke.vkDebugMarkerSetObjectNameEXT.Invoke(handle.Handle, pNameInfoFixed); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkDebugMarkerSetObjectNameEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkDebugMarkerSetObjectNameEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkDebugMarkerSetObjectNameEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkDebugMarkerSetObjectNameEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCmdDebugMarkerBeginEXT - Open a command buffer marker region /// /// /// /// A marker region can be opened by calling: /// /// /// // Provided by VK_EXT_debug_marker /// void vkCmdDebugMarkerBeginEXT( /// VkCommandBuffer commandBuffer, /// const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DebugMarkerBeginEXT(this T handle, in VkDebugMarkerMarkerInfoEXT pMarkerInfo) where T : VulkanHandleWrapper { fixed (VkDebugMarkerMarkerInfoEXT* pMarkerInfoFixed = &pMarkerInfo) { handle.PInvoke.vkCmdDebugMarkerBeginEXT.Invoke(handle.Handle, pMarkerInfoFixed); } } /// /// vkCmdDebugMarkerEndEXT - Close a command buffer marker region /// /// /// /// A marker region can be closed by calling: /// /// /// // Provided by VK_EXT_debug_marker /// void vkCmdDebugMarkerEndEXT( /// VkCommandBuffer commandBuffer); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DebugMarkerEndEXT(this T handle) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDebugMarkerEndEXT.Invoke(handle.Handle); } /// /// vkCmdDebugMarkerInsertEXT - Insert a marker label into a command buffer /// /// /// /// A single marker label can be inserted into a command buffer by calling: /// /// /// // Provided by VK_EXT_debug_marker /// void vkCmdDebugMarkerInsertEXT( /// VkCommandBuffer commandBuffer, /// const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DebugMarkerInsertEXT(this T handle, in VkDebugMarkerMarkerInfoEXT pMarkerInfo) where T : VulkanHandleWrapper { fixed (VkDebugMarkerMarkerInfoEXT* pMarkerInfoFixed = &pMarkerInfo) { handle.PInvoke.vkCmdDebugMarkerInsertEXT.Invoke(handle.Handle, pMarkerInfoFixed); } } /// /// vkCmdBindTransformFeedbackBuffersEXT - Bind transform feedback buffers to a command buffer /// /// /// /// :refpage: vkCmdBindTransformFeedbackBuffersEXT /// /// /// To bind transform feedback buffers to a command buffer for use in subsequent /// drawing commands, call: /// /// /// // Provided by VK_EXT_transform_feedback /// void vkCmdBindTransformFeedbackBuffersEXT( /// VkCommandBuffer commandBuffer, /// uint32_t firstBinding, /// uint32_t bindingCount, /// const VkBuffer* pBuffers, /// const VkDeviceSize* pOffsets, /// const VkDeviceSize* pSizes); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindTransformFeedbackBuffersEXT( this T handle, int firstBinding, scoped ReadOnlySpan pBuffers, scoped ReadOnlySpan pOffsets, scoped ReadOnlySpan pSizes ) where T : VulkanHandleWrapper { fixed (ByteSize64* pSizesFixed = pSizes) fixed (ByteSize64* pOffsetsFixed = pOffsets) fixed (VkBuffer* pBuffersFixed = pBuffers) { handle.PInvoke.vkCmdBindTransformFeedbackBuffersEXT.Invoke( handle.Handle, firstBinding, pBuffers.Length, pBuffersFixed, pOffsetsFixed, pSizesFixed ); } } /// /// vkCmdBeginTransformFeedbackEXT - Make transform feedback active in the command buffer /// /// /// /// :refpage: vkCmdBeginTransformFeedbackEXT /// :firstcounter: firstCounterBuffer /// :countercount: counterBufferCount /// :bindCommand: vkCmdBindTransformFeedbackBuffersEXT /// /// /// Transform feedback for specific transform feedback buffers is made active by /// calling: /// /// /// // Provided by VK_EXT_transform_feedback /// void vkCmdBeginTransformFeedbackEXT( /// VkCommandBuffer commandBuffer, /// uint32_t firstCounterBuffer, /// uint32_t counterBufferCount, /// const VkBuffer* pCounterBuffers, /// const VkDeviceSize* pCounterBufferOffsets); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BeginTransformFeedbackEXT( this T handle, int firstCounterBuffer, scoped ReadOnlySpan pCounterBuffers, scoped ReadOnlySpan pCounterBufferOffsets ) where T : VulkanHandleWrapper { fixed (ByteSize64* pCounterBufferOffsetsFixed = pCounterBufferOffsets) fixed (VkBuffer* pCounterBuffersFixed = pCounterBuffers) { handle.PInvoke.vkCmdBeginTransformFeedbackEXT.Invoke( handle.Handle, firstCounterBuffer, pCounterBuffers.Length, pCounterBuffersFixed, pCounterBufferOffsetsFixed ); } } /// /// vkCmdEndTransformFeedbackEXT - Make transform feedback inactive in the command buffer /// /// /// /// :refpage: vkCmdEndTransformFeedbackEXT /// :countercount: counterBufferCount /// /// /// Transform feedback for specific transform feedback buffers is made inactive /// by calling: /// /// /// // Provided by VK_EXT_transform_feedback /// void vkCmdEndTransformFeedbackEXT( /// VkCommandBuffer commandBuffer, /// uint32_t firstCounterBuffer, /// uint32_t counterBufferCount, /// const VkBuffer* pCounterBuffers, /// const VkDeviceSize* pCounterBufferOffsets); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void EndTransformFeedbackEXT( this T handle, int firstCounterBuffer, scoped ReadOnlySpan pCounterBuffers, scoped ReadOnlySpan pCounterBufferOffsets ) where T : VulkanHandleWrapper { fixed (ByteSize64* pCounterBufferOffsetsFixed = pCounterBufferOffsets) fixed (VkBuffer* pCounterBuffersFixed = pCounterBuffers) { handle.PInvoke.vkCmdEndTransformFeedbackEXT.Invoke( handle.Handle, firstCounterBuffer, pCounterBuffers.Length, pCounterBuffersFixed, pCounterBufferOffsetsFixed ); } } /// /// vkCmdBeginQueryIndexedEXT - Begin an indexed query /// /// /// /// :refpage: vkCmdBeginQueryIndexedEXT /// /// /// To begin an indexed query, call: /// /// /// // Provided by VK_EXT_transform_feedback /// void vkCmdBeginQueryIndexedEXT( /// VkCommandBuffer commandBuffer, /// VkQueryPool queryPool, /// uint32_t query, /// VkQueryControlFlags flags, /// uint32_t index); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void BeginQueryIndexedEXT( this T handle, VkQueryPool queryPool, int query, VkQueryControlFlags flags, int index ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdBeginQueryIndexedEXT.Invoke(handle.Handle, queryPool, query, flags, index); } /// /// vkCmdEndQueryIndexedEXT - Ends a query /// /// /// /// :refpage: vkCmdEndQueryIndexedEXT /// /// /// To end an indexed query after the set of desired drawing or dispatching /// commands is recorded, call: /// /// /// // Provided by VK_EXT_transform_feedback /// void vkCmdEndQueryIndexedEXT( /// VkCommandBuffer commandBuffer, /// VkQueryPool queryPool, /// uint32_t query, /// uint32_t index); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void EndQueryIndexedEXT(this T handle, VkQueryPool queryPool, int query, int index) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdEndQueryIndexedEXT.Invoke(handle.Handle, queryPool, query, index); } /// /// vkCmdDrawIndirectByteCountEXT - Draw primitives with indirect parameters where the vertex count is derived from the counter byte value in the counter buffer /// /// /// /// :refpage: vkCmdDrawIndirectByteCountEXT /// /// /// To record a non-indexed draw call, where the vertex count is based on a byte /// count read from a buffer and the passed in vertex stride parameter, call: /// /// /// // Provided by VK_EXT_transform_feedback /// void vkCmdDrawIndirectByteCountEXT( /// VkCommandBuffer commandBuffer, /// uint32_t instanceCount, /// uint32_t firstInstance, /// VkBuffer counterBuffer, /// VkDeviceSize counterBufferOffset, /// uint32_t counterOffset, /// uint32_t vertexStride); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawIndirectByteCountEXT( this T handle, int instanceCount, int firstInstance, VkBuffer counterBuffer, ByteSize64 counterBufferOffset, int counterOffset, int vertexStride ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawIndirectByteCountEXT.Invoke( handle.Handle, instanceCount, firstInstance, counterBuffer, counterBufferOffset, counterOffset, vertexStride ); } /// /// vkCreateCuModuleNVX - Stub description of vkCreateCuModuleNVX /// /// /// /// There is currently no specification language written for this command. /// This section acts only as placeholder and to avoid dead links in the /// specification and reference pages. /// /// /// // Provided by VK_NVX_binary_import /// VkResult vkCreateCuModuleNVX( /// VkDevice device, /// const VkCuModuleCreateInfoNVX* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkCuModuleNVX* pModule); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkCuModuleNVX CreateCuModuleNVX( this VulkanHandleWrapper handle, in VkCuModuleCreateInfoNVX pCreateInfo, VkAllocator? pAllocator ) { fixed (VkCuModuleCreateInfoNVX* pCreateInfoFixed = &pCreateInfo) { VkCuModuleNVX pModuleLocal = default; VkResult result = handle.PInvoke.vkCreateCuModuleNVX.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pModuleLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateCuModuleNVX failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorInitializationFailed: throw new VkResultError( VkResult.ErrorInitializationFailed, "Vulkan call to vkCreateCuModuleNVX failed with error: VK_ERROR_INITIALIZATION_FAILED" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateCuModuleNVX failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateCuModuleNVX failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pModuleLocal; } } /// /// vkCreateCuFunctionNVX - Stub description of vkCreateCuFunctionNVX /// /// /// /// There is currently no specification language written for this command. /// This section acts only as placeholder and to avoid dead links in the /// specification and reference pages. /// /// /// // Provided by VK_NVX_binary_import /// VkResult vkCreateCuFunctionNVX( /// VkDevice device, /// const VkCuFunctionCreateInfoNVX* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkCuFunctionNVX* pFunction); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkCuFunctionNVX CreateCuFunctionNVX( this VulkanHandleWrapper handle, in VkCuFunctionCreateInfoNVX pCreateInfo, VkAllocator? pAllocator ) { fixed (VkCuFunctionCreateInfoNVX* pCreateInfoFixed = &pCreateInfo) { VkCuFunctionNVX pFunctionLocal = default; VkResult result = handle.PInvoke.vkCreateCuFunctionNVX.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pFunctionLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateCuFunctionNVX failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorInitializationFailed: throw new VkResultError( VkResult.ErrorInitializationFailed, "Vulkan call to vkCreateCuFunctionNVX failed with error: VK_ERROR_INITIALIZATION_FAILED" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateCuFunctionNVX failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateCuFunctionNVX failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pFunctionLocal; } } /// /// vkDestroyCuModuleNVX - Stub description of vkDestroyCuModuleNVX /// /// /// /// There is currently no specification language written for this command. /// This section acts only as placeholder and to avoid dead links in the /// specification and reference pages. /// /// /// // Provided by VK_NVX_binary_import /// void vkDestroyCuModuleNVX( /// VkDevice device, /// VkCuModuleNVX module, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyCuModuleNVX( this VulkanHandleWrapper handle, VkCuModuleNVX module, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyCuModuleNVX.Invoke(handle.Handle, module, pAllocator); } /// /// vkDestroyCuFunctionNVX - Stub description of vkDestroyCuFunctionNVX /// /// /// /// There is currently no specification language written for this command. /// This section acts only as placeholder and to avoid dead links in the /// specification and reference pages. /// /// /// // Provided by VK_NVX_binary_import /// void vkDestroyCuFunctionNVX( /// VkDevice device, /// VkCuFunctionNVX function, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyCuFunctionNVX( this VulkanHandleWrapper handle, VkCuFunctionNVX function, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyCuFunctionNVX.Invoke(handle.Handle, function, pAllocator); } /// /// vkCmdCuLaunchKernelNVX - Stub description of vkCmdCuLaunchKernelNVX /// /// /// /// There is currently no specification language written for this command. /// This section acts only as placeholder and to avoid dead links in the /// specification and reference pages. /// /// /// // Provided by VK_NVX_binary_import /// void vkCmdCuLaunchKernelNVX( /// VkCommandBuffer commandBuffer, /// const VkCuLaunchInfoNVX* pLaunchInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CuLaunchKernelNVX(this T handle, in VkCuLaunchInfoNVX pLaunchInfo) where T : VulkanHandleWrapper { fixed (VkCuLaunchInfoNVX* pLaunchInfoFixed = &pLaunchInfo) { handle.PInvoke.vkCmdCuLaunchKernelNVX.Invoke(handle.Handle, pLaunchInfoFixed); } } /// /// vkGetImageViewHandleNVX - Get the handle for an image view for a specific descriptor type /// /// /// /// To get the handle for an image view, call: /// /// /// // Provided by VK_NVX_image_view_handle /// uint32_t vkGetImageViewHandleNVX( /// VkDevice device, /// const VkImageViewHandleInfoNVX* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe int GetImageViewHandleNVX( this VulkanHandleWrapper handle, in VkImageViewHandleInfoNVX pInfo ) { fixed (VkImageViewHandleInfoNVX* pInfoFixed = &pInfo) { return handle.PInvoke.vkGetImageViewHandleNVX.Invoke(handle.Handle, pInfoFixed); } } /// /// vkGetImageViewHandle64NVX - Get the 64-bit handle for an image view for a specific descriptor type /// /// /// /// To get the 64-bit handle for an image view, call: /// /// /// // Provided by VK_NVX_image_view_handle /// uint64_t vkGetImageViewHandle64NVX( /// VkDevice device, /// const VkImageViewHandleInfoNVX* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe nint GetImageViewHandle64NVX( this VulkanHandleWrapper handle, in VkImageViewHandleInfoNVX pInfo ) { fixed (VkImageViewHandleInfoNVX* pInfoFixed = &pInfo) { return handle.PInvoke.vkGetImageViewHandle64NVX.Invoke(handle.Handle, pInfoFixed); } } /// /// vkGetImageViewAddressNVX - Get the device address of an image view /// /// /// /// To get the device address for an image view, call: /// /// /// // Provided by VK_NVX_image_view_handle /// VkResult vkGetImageViewAddressNVX( /// VkDevice device, /// VkImageView imageView, /// VkImageViewAddressPropertiesNVX* pProperties); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetImageViewAddressNVX( this VulkanHandleWrapper handle, VkImageView imageView, ref VkImageViewAddressPropertiesNVX pProperties ) { fixed (VkImageViewAddressPropertiesNVX* pPropertiesFixed = &pProperties) { VkResult result = handle.PInvoke.vkGetImageViewAddressNVX.Invoke( handle.Handle, imageView, pPropertiesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetImageViewAddressNVX failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetImageViewAddressNVX failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetImageViewAddressNVX failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkImageViewAddressPropertiesNVX. public static VkImageViewAddressPropertiesNVX GetImageViewAddressNVX( this VulkanHandleWrapper handle, VkImageView imageView ) { VkImageViewAddressPropertiesNVX outValue = new(); GetImageViewAddressNVX(handle, imageView, ref outValue); return outValue; } /// /// vkGetDeviceCombinedImageSamplerIndexNVX - Get the handle for an image view and sampler index /// /// /// /// To get the handle for a combined image sampler, call: /// /// /// // Provided by VK_NVX_image_view_handle /// uint64_t vkGetDeviceCombinedImageSamplerIndexNVX( /// VkDevice device, /// uint64_t imageViewIndex, /// uint64_t samplerIndex); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static nint GetCombinedImageSamplerIndexNVX( this VulkanHandleWrapper handle, nint imageViewIndex, nint samplerIndex ) { return handle.PInvoke.vkGetDeviceCombinedImageSamplerIndexNVX.Invoke( handle.Handle, imageViewIndex, samplerIndex ); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawIndirectCountAMD( this T handle, VkBuffer buffer, ByteSize64 offset, VkBuffer countBuffer, ByteSize64 countBufferOffset, int maxDrawCount, int stride ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawIndirectCountAMD.Invoke( handle.Handle, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawIndexedIndirectCountAMD( this T handle, VkBuffer buffer, ByteSize64 offset, VkBuffer countBuffer, ByteSize64 countBufferOffset, int maxDrawCount, int stride ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawIndexedIndirectCountAMD.Invoke( handle.Handle, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); } /// /// vkGetShaderInfoAMD - Get information about a shader in a pipeline /// /// /// /// Information about a particular shader that has been compiled as part of a /// pipeline object can be extracted by calling: /// /// /// // Provided by VK_AMD_shader_info /// VkResult vkGetShaderInfoAMD( /// VkDevice device, /// VkPipeline pipeline, /// VkShaderStageFlagBits shaderStage, /// VkShaderInfoTypeAMD infoType, /// size_t* pInfoSize, /// void* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe VkResult GetShaderInfoAMD( this VulkanHandleWrapper handle, VkPipeline pipeline, VkShaderStageFlags shaderStage, VkShaderInfoTypeAMD infoType, ref nuint pInfoSize, scoped ReadOnlySpan pInfo ) { fixed (byte* pInfoFixed = pInfo) fixed (nuint* pInfoSizeFixed = &pInfoSize) { VkResult result = handle.PInvoke.vkGetShaderInfoAMD.Invoke( handle.Handle, pipeline, shaderStage, infoType, pInfoSizeFixed, pInfoFixed ); switch (result) { case VkResult.ErrorFeatureNotPresent: throw new VkResultError( VkResult.ErrorFeatureNotPresent, "Vulkan call to vkGetShaderInfoAMD failed with error: VK_ERROR_FEATURE_NOT_PRESENT" ); case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetShaderInfoAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetShaderInfoAMD failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetShaderInfoAMD failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// Queries the required length. /// The required length. public static nuint GetShaderInfoAMD_Count( this VulkanHandleWrapper handle, VkPipeline pipeline, VkShaderStageFlags shaderStage, VkShaderInfoTypeAMD infoType ) { nuint pInfoSize = default; GetShaderInfoAMD(handle, pipeline, shaderStage, infoType, ref pInfoSize, null); return pInfoSize; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static VkResult GetShaderInfoAMD_Write( this VulkanHandleWrapper handle, VkPipeline pipeline, VkShaderStageFlags shaderStage, VkShaderInfoTypeAMD infoType, scoped ReadOnlySpan pInfo ) { nuint pInfoSize = (nuint)pInfo.Length; return GetShaderInfoAMD(handle, pipeline, shaderStage, infoType, ref pInfoSize, pInfo); } /// /// vkCmdBeginConditionalRenderingEXT - Define the beginning of a conditional rendering block /// /// /// /// To begin conditional rendering, call: /// /// /// // Provided by VK_EXT_conditional_rendering /// void vkCmdBeginConditionalRenderingEXT( /// VkCommandBuffer commandBuffer, /// const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BeginConditionalRenderingEXT( this T handle, VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdBeginConditionalRenderingEXT.Invoke(handle.Handle, pConditionalRenderingBegin); } /// /// vkCmdEndConditionalRenderingEXT - Define the end of a conditional rendering block /// /// /// /// To end conditional rendering, call: /// /// /// // Provided by VK_EXT_conditional_rendering /// void vkCmdEndConditionalRenderingEXT( /// VkCommandBuffer commandBuffer); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void EndConditionalRenderingEXT(this T handle) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdEndConditionalRenderingEXT.Invoke(handle.Handle); } /// /// vkCmdSetViewportWScalingNV - Set the viewport W scaling dynamically for a command buffer /// /// /// /// To dynamically set^ the viewport *W* scaling /// parameters, call: /// /// /// // Provided by VK_NV_clip_space_w_scaling /// void vkCmdSetViewportWScalingNV( /// VkCommandBuffer commandBuffer, /// uint32_t firstViewport, /// uint32_t viewportCount, /// const VkViewportWScalingNV* pViewportWScalings); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetViewportWScalingNV( this T handle, int firstViewport, scoped ReadOnlySpan pViewportWScalings ) where T : VulkanHandleWrapper { fixed (VkViewportWScalingNV* pViewportWScalingsFixed = pViewportWScalings) { handle.PInvoke.vkCmdSetViewportWScalingNV.Invoke( handle.Handle, firstViewport, pViewportWScalings.Length, pViewportWScalingsFixed ); } } /// /// vkDisplayPowerControlEXT - Set the power state of a display /// /// /// /// :refpage: vkDisplayPowerControlEXT /// /// /// To set the power state of a display, call: /// /// /// // Provided by VK_EXT_display_control /// VkResult vkDisplayPowerControlEXT( /// VkDevice device, /// VkDisplayKHR display, /// const VkDisplayPowerInfoEXT* pDisplayPowerInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DisplayPowerControlEXT( this VulkanHandleWrapper handle, VkDisplayKHR display, in VkDisplayPowerInfoEXT pDisplayPowerInfo ) { fixed (VkDisplayPowerInfoEXT* pDisplayPowerInfoFixed = &pDisplayPowerInfo) { VkResult result = handle.PInvoke.vkDisplayPowerControlEXT.Invoke( handle.Handle, display, pDisplayPowerInfoFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkDisplayPowerControlEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkDisplayPowerControlEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkDisplayPowerControlEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkRegisterDeviceEventEXT - Signal a fence when a device event occurs /// /// /// /// :refpage: vkRegisterDeviceEventEXT /// /// /// To create a fence that will be signaled when an event occurs on a device, /// call: /// /// /// // Provided by VK_EXT_display_control /// VkResult vkRegisterDeviceEventEXT( /// VkDevice device, /// const VkDeviceEventInfoEXT* pDeviceEventInfo, /// const VkAllocationCallbacks* pAllocator, /// VkFence* pFence); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void RegisterDeviceEventEXT( this VulkanHandleWrapper handle, in VkDeviceEventInfoEXT pDeviceEventInfo, VkAllocator? pAllocator, VkFence* pFence ) { fixed (VkDeviceEventInfoEXT* pDeviceEventInfoFixed = &pDeviceEventInfo) { VkResult result = handle.PInvoke.vkRegisterDeviceEventEXT.Invoke( handle.Handle, pDeviceEventInfoFixed, pAllocator, pFence ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkRegisterDeviceEventEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkRegisterDeviceEventEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkRegisterDeviceEventEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkRegisterDisplayEventEXT - Signal a fence when a display event occurs /// /// /// /// :refpage: vkRegisterDisplayEventEXT /// /// /// To create a fence that will be signaled when an event occurs on a /// VkDisplayKHR object, call: /// /// /// // Provided by VK_EXT_display_control /// VkResult vkRegisterDisplayEventEXT( /// VkDevice device, /// VkDisplayKHR display, /// const VkDisplayEventInfoEXT* pDisplayEventInfo, /// const VkAllocationCallbacks* pAllocator, /// VkFence* pFence); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void RegisterDisplayEventEXT( this VulkanHandleWrapper handle, VkDisplayKHR display, in VkDisplayEventInfoEXT pDisplayEventInfo, VkAllocator? pAllocator, VkFence* pFence ) { fixed (VkDisplayEventInfoEXT* pDisplayEventInfoFixed = &pDisplayEventInfo) { VkResult result = handle.PInvoke.vkRegisterDisplayEventEXT.Invoke( handle.Handle, display, pDisplayEventInfoFixed, pAllocator, pFence ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkRegisterDisplayEventEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkRegisterDisplayEventEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkRegisterDisplayEventEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkGetSwapchainCounterEXT - Query the current value of a surface counter /// /// /// /// :refpage: vkGetSwapchainCounterEXT /// /// /// The requested counters become active when the first presentation command for /// the associated swapchain is processed by the presentation engine. /// To query the value of an active counter, use: /// /// /// // Provided by VK_EXT_display_control /// VkResult vkGetSwapchainCounterEXT( /// VkDevice device, /// VkSwapchainKHR swapchain, /// VkSurfaceCounterFlagBitsEXT counter, /// uint64_t* pCounterValue); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe nint GetSwapchainCounterEXT( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain, VkSurfaceCounterFlagsEXT counter ) { nint pCounterValueLocal = default; VkResult result = handle.PInvoke.vkGetSwapchainCounterEXT.Invoke( handle.Handle, swapchain, counter, &pCounterValueLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetSwapchainCounterEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkGetSwapchainCounterEXT failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorOutOfDateKHR: throw new VkResultError( VkResult.ErrorOutOfDateKHR, "Vulkan call to vkGetSwapchainCounterEXT failed with error: VK_ERROR_OUT_OF_DATE_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetSwapchainCounterEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetSwapchainCounterEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pCounterValueLocal; } /// /// vkGetRefreshCycleDurationGOOGLE - Obtain the RC duration of the PE&apos;s display /// /// /// /// To query the duration of a refresh cycle (RC) for the presentation engine's /// display, call: /// /// /// // Provided by VK_GOOGLE_display_timing /// VkResult vkGetRefreshCycleDurationGOOGLE( /// VkDevice device, /// VkSwapchainKHR swapchain, /// VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetRefreshCycleDurationGOOGLE( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain, ref VkRefreshCycleDurationGOOGLE pDisplayTimingProperties ) { fixed (VkRefreshCycleDurationGOOGLE* pDisplayTimingPropertiesFixed = &pDisplayTimingProperties) { VkResult result = handle.PInvoke.vkGetRefreshCycleDurationGOOGLE.Invoke( handle.Handle, swapchain, pDisplayTimingPropertiesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetRefreshCycleDurationGOOGLE failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkGetRefreshCycleDurationGOOGLE failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorSurfaceLostKHR: throw new VkResultError( VkResult.ErrorSurfaceLostKHR, "Vulkan call to vkGetRefreshCycleDurationGOOGLE failed with error: VK_ERROR_SURFACE_LOST_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetRefreshCycleDurationGOOGLE failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetRefreshCycleDurationGOOGLE failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkRefreshCycleDurationGOOGLE. public static VkRefreshCycleDurationGOOGLE GetRefreshCycleDurationGOOGLE( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain ) { VkRefreshCycleDurationGOOGLE outValue = new(); GetRefreshCycleDurationGOOGLE(handle, swapchain, ref outValue); return outValue; } /// /// vkGetPastPresentationTimingGOOGLE - Obtain timing of a previously-presented image /// /// /// /// The implementation will maintain a limited amount of history of timing /// information about previous presents. /// Because of the asynchronous nature of the presentation engine, the timing /// information for a given vkQueuePresentKHR command will become /// available some time later. /// These time values can be asynchronously queried, and will be returned if /// available. /// All time values are in nanoseconds, relative to a monotonically-increasing /// clock (e.g. `CLOCK_MONOTONIC` (see clock_gettime(2)) on Android and Linux). /// /// /// To asynchronously query the presentation engine, for newly-available timing /// information about one or more previous presents to a given swapchain, call: /// /// /// // Provided by VK_GOOGLE_display_timing /// VkResult vkGetPastPresentationTimingGOOGLE( /// VkDevice device, /// VkSwapchainKHR swapchain, /// uint32_t* pPresentationTimingCount, /// VkPastPresentationTimingGOOGLE* pPresentationTimings); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe VkResult GetPastPresentationTimingGOOGLE( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain, ref int pPresentationTimingCount, scoped ReadOnlySpan pPresentationTimings ) { fixed (VkPastPresentationTimingGOOGLE* pPresentationTimingsFixed = pPresentationTimings) fixed (int* pPresentationTimingCountFixed = &pPresentationTimingCount) { VkResult result = handle.PInvoke.vkGetPastPresentationTimingGOOGLE.Invoke( handle.Handle, swapchain, pPresentationTimingCountFixed, pPresentationTimingsFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetPastPresentationTimingGOOGLE failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkGetPastPresentationTimingGOOGLE failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorOutOfDateKHR: throw new VkResultError( VkResult.ErrorOutOfDateKHR, "Vulkan call to vkGetPastPresentationTimingGOOGLE failed with error: VK_ERROR_OUT_OF_DATE_KHR" ); case VkResult.ErrorSurfaceLostKHR: throw new VkResultError( VkResult.ErrorSurfaceLostKHR, "Vulkan call to vkGetPastPresentationTimingGOOGLE failed with error: VK_ERROR_SURFACE_LOST_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetPastPresentationTimingGOOGLE failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetPastPresentationTimingGOOGLE failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// Queries the required length. /// The required length. public static int GetPastPresentationTimingGOOGLE_Count( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain ) { int pPresentationTimingCount = default; GetPastPresentationTimingGOOGLE(handle, swapchain, ref pPresentationTimingCount, null); return pPresentationTimingCount; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static VkResult GetPastPresentationTimingGOOGLE_Write( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain, scoped ReadOnlySpan pPresentationTimings ) { int pPresentationTimingCount = pPresentationTimings.Length; return GetPastPresentationTimingGOOGLE( handle, swapchain, ref pPresentationTimingCount, pPresentationTimings ); } /// /// vkCmdSetDiscardRectangleEXT - Set discard rectangles dynamically for a command buffer /// /// /// /// To dynamically set^ the discard rectangles, /// call: /// /// /// // Provided by VK_EXT_discard_rectangles /// void vkCmdSetDiscardRectangleEXT( /// VkCommandBuffer commandBuffer, /// uint32_t firstDiscardRectangle, /// uint32_t discardRectangleCount, /// const VkRect2D* pDiscardRectangles); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetDiscardRectangleEXT( this T handle, int firstDiscardRectangle, scoped ReadOnlySpan pDiscardRectangles ) where T : VulkanHandleWrapper { fixed (VkRect2D* pDiscardRectanglesFixed = pDiscardRectangles) { handle.PInvoke.vkCmdSetDiscardRectangleEXT.Invoke( handle.Handle, firstDiscardRectangle, pDiscardRectangles.Length, pDiscardRectanglesFixed ); } } /// /// vkCmdSetDiscardRectangleEnableEXT - Enable discard rectangles dynamically for a command buffer /// /// /// /// To dynamically set^ whether discard rectangles /// are enabled, call: /// /// /// // Provided by VK_EXT_discard_rectangles /// void vkCmdSetDiscardRectangleEnableEXT( /// VkCommandBuffer commandBuffer, /// VkBool32 discardRectangleEnable); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDiscardRectangleEnableEXT(this T handle, Brutal.Bool32 discardRectangleEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDiscardRectangleEnableEXT.Invoke(handle.Handle, discardRectangleEnable); } /// /// vkCmdSetDiscardRectangleModeEXT - Sets the discard rectangle mode dynamically for a command buffer /// /// /// /// To dynamically set^ the discard rectangle mode, /// call: /// /// /// // Provided by VK_EXT_discard_rectangles /// void vkCmdSetDiscardRectangleModeEXT( /// VkCommandBuffer commandBuffer, /// VkDiscardRectangleModeEXT discardRectangleMode); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDiscardRectangleModeEXT(this T handle, VkDiscardRectangleModeEXT discardRectangleMode) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDiscardRectangleModeEXT.Invoke(handle.Handle, discardRectangleMode); } /// /// vkSetHdrMetadataEXT - Set HDR metadata /// /// /// /// To provide HDR metadata to an implementation, call: /// /// /// // Provided by VK_EXT_hdr_metadata /// void vkSetHdrMetadataEXT( /// VkDevice device, /// uint32_t swapchainCount, /// const VkSwapchainKHR* pSwapchains, /// const VkHdrMetadataEXT* pMetadata); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetHdrMetadataEXT( this VulkanHandleWrapper handle, scoped ReadOnlySpan pSwapchains, scoped ReadOnlySpan pMetadata ) { fixed (VkHdrMetadataEXT* pMetadataFixed = pMetadata) fixed (VkSwapchainKHR* pSwapchainsFixed = pSwapchains) { handle.PInvoke.vkSetHdrMetadataEXT.Invoke( handle.Handle, pSwapchains.Length, pSwapchainsFixed, pMetadataFixed ); } } /// /// vkSetDebugUtilsObjectNameEXT - Give an application-defined name to an object /// /// /// /// An object can be given an application-defined name by calling: /// /// /// // Provided by VK_EXT_debug_utils /// VkResult vkSetDebugUtilsObjectNameEXT( /// VkDevice device, /// const VkDebugUtilsObjectNameInfoEXT* pNameInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetDebugUtilsObjectNameEXT( this VulkanHandleWrapper handle, in VkDebugUtilsObjectNameInfoEXT pNameInfo ) { fixed (VkDebugUtilsObjectNameInfoEXT* pNameInfoFixed = &pNameInfo) { VkResult result = handle.PInvoke.vkSetDebugUtilsObjectNameEXT.Invoke(handle.Handle, pNameInfoFixed); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkSetDebugUtilsObjectNameEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkSetDebugUtilsObjectNameEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkSetDebugUtilsObjectNameEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkSetDebugUtilsObjectNameEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkSetDebugUtilsObjectTagEXT - Attach arbitrary data to an object /// /// /// /// // Provided by VK_EXT_debug_utils /// VkResult vkSetDebugUtilsObjectTagEXT( /// VkDevice device, /// const VkDebugUtilsObjectTagInfoEXT* pTagInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetDebugUtilsObjectTagEXT( this VulkanHandleWrapper handle, in VkDebugUtilsObjectTagInfoEXT pTagInfo ) { fixed (VkDebugUtilsObjectTagInfoEXT* pTagInfoFixed = &pTagInfo) { VkResult result = handle.PInvoke.vkSetDebugUtilsObjectTagEXT.Invoke(handle.Handle, pTagInfoFixed); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkSetDebugUtilsObjectTagEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkSetDebugUtilsObjectTagEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkSetDebugUtilsObjectTagEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkSetDebugUtilsObjectTagEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkQueueBeginDebugUtilsLabelEXT - Open a queue debug label region /// /// /// /// A queue debug label region is opened by calling: /// /// /// // Provided by VK_EXT_debug_utils /// void vkQueueBeginDebugUtilsLabelEXT( /// VkQueue queue, /// const VkDebugUtilsLabelEXT* pLabelInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe void BeginDebugUtilsLabelEXTInternal( this VulkanHandleWrapper handle, in VkDebugUtilsLabelEXT pLabelInfo ) { fixed (VkDebugUtilsLabelEXT* pLabelInfoFixed = &pLabelInfo) { handle.PInvoke.vkQueueBeginDebugUtilsLabelEXT.Invoke(handle.Handle, pLabelInfoFixed); } } /// /// vkQueueEndDebugUtilsLabelEXT - Close a queue debug label region /// /// /// /// A queue debug label region is closed by calling: /// /// /// // Provided by VK_EXT_debug_utils /// void vkQueueEndDebugUtilsLabelEXT( /// VkQueue queue); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void EndDebugUtilsLabelEXTInternal( this VulkanHandleWrapper handle ) { handle.PInvoke.vkQueueEndDebugUtilsLabelEXT.Invoke(handle.Handle); } /// /// vkQueueInsertDebugUtilsLabelEXT - Insert a label into a queue /// /// /// /// A single label can be inserted into a queue by calling: /// /// /// // Provided by VK_EXT_debug_utils /// void vkQueueInsertDebugUtilsLabelEXT( /// VkQueue queue, /// const VkDebugUtilsLabelEXT* pLabelInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe void InsertDebugUtilsLabelEXTInternal( this VulkanHandleWrapper handle, in VkDebugUtilsLabelEXT pLabelInfo ) { fixed (VkDebugUtilsLabelEXT* pLabelInfoFixed = &pLabelInfo) { handle.PInvoke.vkQueueInsertDebugUtilsLabelEXT.Invoke(handle.Handle, pLabelInfoFixed); } } /// /// vkCmdBeginDebugUtilsLabelEXT - Open a command buffer debug label region /// /// /// /// A command buffer debug label region can be opened by calling: /// /// /// // Provided by VK_EXT_debug_utils /// void vkCmdBeginDebugUtilsLabelEXT( /// VkCommandBuffer commandBuffer, /// const VkDebugUtilsLabelEXT* pLabelInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BeginDebugUtilsLabelEXT(this T handle, in VkDebugUtilsLabelEXT pLabelInfo) where T : VulkanHandleWrapper { fixed (VkDebugUtilsLabelEXT* pLabelInfoFixed = &pLabelInfo) { handle.PInvoke.vkCmdBeginDebugUtilsLabelEXT.Invoke(handle.Handle, pLabelInfoFixed); } } /// /// vkCmdEndDebugUtilsLabelEXT - Close a command buffer label region /// /// /// /// A command buffer label region can be closed by calling: /// /// /// // Provided by VK_EXT_debug_utils /// void vkCmdEndDebugUtilsLabelEXT( /// VkCommandBuffer commandBuffer); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void EndDebugUtilsLabelEXT(this T handle) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdEndDebugUtilsLabelEXT.Invoke(handle.Handle); } /// /// vkCmdInsertDebugUtilsLabelEXT - Insert a label into a command buffer /// /// /// /// A single debug label can be inserted into a command buffer by calling: /// /// /// // Provided by VK_EXT_debug_utils /// void vkCmdInsertDebugUtilsLabelEXT( /// VkCommandBuffer commandBuffer, /// const VkDebugUtilsLabelEXT* pLabelInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void InsertDebugUtilsLabelEXT(this T handle, in VkDebugUtilsLabelEXT pLabelInfo) where T : VulkanHandleWrapper { fixed (VkDebugUtilsLabelEXT* pLabelInfoFixed = &pLabelInfo) { handle.PInvoke.vkCmdInsertDebugUtilsLabelEXT.Invoke(handle.Handle, pLabelInfoFixed); } } /// /// vkCreateGpaSessionAMD - Create a new GPA session object /// /// /// /// :refpage: vkCreateGpaSessionAMD /// :objectnameplural: GPA sessions /// :objectnamecamelcase: gpaSession /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create a GPA session object, call: /// /// /// // Provided by VK_AMD_gpa_interface /// VkResult vkCreateGpaSessionAMD( /// VkDevice device, /// const VkGpaSessionCreateInfoAMD* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkGpaSessionAMD* pGpaSession); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkGpaSessionAMD CreateGpaSessionAMD( this VulkanHandleWrapper handle, in VkGpaSessionCreateInfoAMD pCreateInfo, VkAllocator? pAllocator ) { fixed (VkGpaSessionCreateInfoAMD* pCreateInfoFixed = &pCreateInfo) { VkGpaSessionAMD pGpaSessionLocal = default; VkResult result = handle.PInvoke.vkCreateGpaSessionAMD.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pGpaSessionLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateGpaSessionAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateGpaSessionAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateGpaSessionAMD failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateGpaSessionAMD failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pGpaSessionLocal; } } /// /// vkDestroyGpaSessionAMD - Destroy a GPA session object /// /// /// /// To destroy a GPA session object, call: /// /// /// // Provided by VK_AMD_gpa_interface /// void vkDestroyGpaSessionAMD( /// VkDevice device, /// VkGpaSessionAMD gpaSession, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyGpaSessionAMD( this VulkanHandleWrapper handle, VkGpaSessionAMD gpaSession, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyGpaSessionAMD.Invoke(handle.Handle, gpaSession, pAllocator); } /// /// vkSetGpaDeviceClockModeAMD - Setting a device clock /// /// /// /// To set or query GPU clocks, call: /// /// /// // Provided by VK_AMD_gpa_interface /// VkResult vkSetGpaDeviceClockModeAMD( /// VkDevice device, /// VkGpaDeviceClockModeInfoAMD* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetGpaDeviceClockModeAMD( this VulkanHandleWrapper handle, in VkGpaDeviceClockModeInfoAMD pInfo ) { fixed (VkGpaDeviceClockModeInfoAMD* pInfoFixed = &pInfo) { VkResult result = handle.PInvoke.vkSetGpaDeviceClockModeAMD.Invoke(handle.Handle, pInfoFixed); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkSetGpaDeviceClockModeAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkSetGpaDeviceClockModeAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkSetGpaDeviceClockModeAMD failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkSetGpaDeviceClockModeAMD failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkGetGpaDeviceClockInfoAMD - Getting device clocks and ratios /// /// /// /// To query the GPU clock current values and their ratios to their maximums, /// call: /// /// /// // Provided by VK_AMD_gpa_interface /// VkResult vkGetGpaDeviceClockInfoAMD( /// VkDevice device, /// VkGpaDeviceGetClockInfoAMD* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetGpaDeviceClockInfoAMD( this VulkanHandleWrapper handle, ref VkGpaDeviceGetClockInfoAMD pInfo ) { fixed (VkGpaDeviceGetClockInfoAMD* pInfoFixed = &pInfo) { VkResult result = handle.PInvoke.vkGetGpaDeviceClockInfoAMD.Invoke(handle.Handle, pInfoFixed); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetGpaDeviceClockInfoAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetGpaDeviceClockInfoAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetGpaDeviceClockInfoAMD failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetGpaDeviceClockInfoAMD failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkGpaDeviceGetClockInfoAMD. public static VkGpaDeviceGetClockInfoAMD GetGpaDeviceClockInfoAMD( this VulkanHandleWrapper handle ) { VkGpaDeviceGetClockInfoAMD outValue = new(); GetGpaDeviceClockInfoAMD(handle, ref outValue); return outValue; } /// /// vkCmdBeginGpaSessionAMD - Begin a GPA session /// /// /// /// To begin a GPA session, call: /// /// /// // Provided by VK_AMD_gpa_interface /// VkResult vkCmdBeginGpaSessionAMD( /// VkCommandBuffer commandBuffer, /// VkGpaSessionAMD gpaSession); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void BeginGpaSessionAMD(this T handle, VkGpaSessionAMD gpaSession) where T : VulkanHandleWrapper { VkResult result = handle.PInvoke.vkCmdBeginGpaSessionAMD.Invoke(handle.Handle, gpaSession); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCmdBeginGpaSessionAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCmdBeginGpaSessionAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCmdBeginGpaSessionAMD failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCmdBeginGpaSessionAMD failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkCmdEndGpaSessionAMD - End a GPA session /// /// /// /// To end a GPA session, call: /// /// /// // Provided by VK_AMD_gpa_interface /// VkResult vkCmdEndGpaSessionAMD( /// VkCommandBuffer commandBuffer, /// VkGpaSessionAMD gpaSession); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void EndGpaSessionAMD(this T handle, VkGpaSessionAMD gpaSession) where T : VulkanHandleWrapper { VkResult result = handle.PInvoke.vkCmdEndGpaSessionAMD.Invoke(handle.Handle, gpaSession); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCmdEndGpaSessionAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCmdEndGpaSessionAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCmdEndGpaSessionAMD failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCmdEndGpaSessionAMD failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkCmdBeginGpaSampleAMD - Beginning a sample /// /// /// /// To begin a GPA sample, call: /// /// /// // Provided by VK_AMD_gpa_interface /// VkResult vkCmdBeginGpaSampleAMD( /// VkCommandBuffer commandBuffer, /// VkGpaSessionAMD gpaSession, /// const VkGpaSampleBeginInfoAMD* pGpaSampleBeginInfo, /// uint32_t* pSampleID); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BeginGpaSampleAMD( this T handle, VkGpaSessionAMD gpaSession, in VkGpaSampleBeginInfoAMD pGpaSampleBeginInfo, int* pSampleID ) where T : VulkanHandleWrapper { fixed (VkGpaSampleBeginInfoAMD* pGpaSampleBeginInfoFixed = &pGpaSampleBeginInfo) { VkResult result = handle.PInvoke.vkCmdBeginGpaSampleAMD.Invoke( handle.Handle, gpaSession, pGpaSampleBeginInfoFixed, pSampleID ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCmdBeginGpaSampleAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCmdBeginGpaSampleAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCmdBeginGpaSampleAMD failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCmdBeginGpaSampleAMD failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCmdEndGpaSampleAMD - Ending a sample /// /// /// /// To end a GPA sample, call: /// /// /// // Provided by VK_AMD_gpa_interface /// void vkCmdEndGpaSampleAMD( /// VkCommandBuffer commandBuffer, /// VkGpaSessionAMD gpaSession, /// uint32_t sampleID); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void EndGpaSampleAMD(this T handle, VkGpaSessionAMD gpaSession, int sampleID) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdEndGpaSampleAMD.Invoke(handle.Handle, gpaSession, sampleID); } /// /// vkGetGpaSessionStatusAMD - Getting the status of a GPA session /// /// /// /// Once a GPA session has ended, its status can be queried by: /// /// /// // Provided by VK_AMD_gpa_interface /// VkResult vkGetGpaSessionStatusAMD( /// VkDevice device, /// VkGpaSessionAMD gpaSession); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void GetGpaSessionStatusAMD( this VulkanHandleWrapper handle, VkGpaSessionAMD gpaSession ) { VkResult result = handle.PInvoke.vkGetGpaSessionStatusAMD.Invoke(handle.Handle, gpaSession); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetGpaSessionStatusAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetGpaSessionStatusAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetGpaSessionStatusAMD failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetGpaSessionStatusAMD failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkGetGpaSessionResultsAMD - Getting the status of a GPA session /// /// /// /// Once a GPA session's results are available, they can be obtained by: /// /// /// // Provided by VK_AMD_gpa_interface /// VkResult vkGetGpaSessionResultsAMD( /// VkDevice device, /// VkGpaSessionAMD gpaSession, /// uint32_t sampleID, /// size_t* pSizeInBytes, /// void* pData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe void GetGpaSessionResultsAMD( this VulkanHandleWrapper handle, VkGpaSessionAMD gpaSession, int sampleID, ref nuint pSizeInBytes, scoped ReadOnlySpan pData ) { fixed (byte* pDataFixed = pData) fixed (nuint* pSizeInBytesFixed = &pSizeInBytes) { VkResult result = handle.PInvoke.vkGetGpaSessionResultsAMD.Invoke( handle.Handle, gpaSession, sampleID, pSizeInBytesFixed, pDataFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetGpaSessionResultsAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetGpaSessionResultsAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetGpaSessionResultsAMD failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetGpaSessionResultsAMD failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// Queries the required length. /// The required length. public static nuint GetGpaSessionResultsAMD_Count( this VulkanHandleWrapper handle, VkGpaSessionAMD gpaSession, int sampleID ) { nuint pSizeInBytes = default; GetGpaSessionResultsAMD(handle, gpaSession, sampleID, ref pSizeInBytes, null); return pSizeInBytes; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static void GetGpaSessionResultsAMD_Write( this VulkanHandleWrapper handle, VkGpaSessionAMD gpaSession, int sampleID, scoped ReadOnlySpan pData ) { nuint pSizeInBytes = (nuint)pData.Length; GetGpaSessionResultsAMD(handle, gpaSession, sampleID, ref pSizeInBytes, pData); } /// /// vkResetGpaSessionAMD - Reset a GPA session /// /// /// /// To reset a GPA session for reuse, call: /// /// /// // Provided by VK_AMD_gpa_interface /// VkResult vkResetGpaSessionAMD( /// VkDevice device, /// VkGpaSessionAMD gpaSession); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ResetGpaSessionAMD( this VulkanHandleWrapper handle, VkGpaSessionAMD gpaSession ) { VkResult result = handle.PInvoke.vkResetGpaSessionAMD.Invoke(handle.Handle, gpaSession); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkResetGpaSessionAMD failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkResetGpaSessionAMD failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkResetGpaSessionAMD failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkResetGpaSessionAMD failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkCmdCopyGpaSessionResultsAMD - Copying GPA session results /// /// /// /// To copy the results of a GPA session into another, call: /// /// /// // Provided by VK_AMD_gpa_interface /// void vkCmdCopyGpaSessionResultsAMD( /// VkCommandBuffer commandBuffer, /// VkGpaSessionAMD gpaSession); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void CopyGpaSessionResultsAMD(this T handle, VkGpaSessionAMD gpaSession) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdCopyGpaSessionResultsAMD.Invoke(handle.Handle, gpaSession); } /// /// vkWriteSamplerDescriptorsEXT - Write sampler descriptors to memory /// /// /// /// To write sampler descriptors to memory, call: /// /// /// // Provided by VK_EXT_descriptor_heap /// VkResult vkWriteSamplerDescriptorsEXT( /// VkDevice device, /// uint32_t samplerCount, /// const VkSamplerCreateInfo* pSamplers, /// const VkHostAddressRangeEXT* pDescriptors); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void WriteSamplerDescriptorsEXT( this VulkanHandleWrapper handle, scoped ReadOnlySpan pSamplers, scoped ReadOnlySpan pDescriptors ) { fixed (VkHostAddressRangeEXT* pDescriptorsFixed = pDescriptors) fixed (VkSamplerCreateInfo* pSamplersFixed = pSamplers) { VkResult result = handle.PInvoke.vkWriteSamplerDescriptorsEXT.Invoke( handle.Handle, pSamplers.Length, pSamplersFixed, pDescriptorsFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkWriteSamplerDescriptorsEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkWriteSamplerDescriptorsEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkWriteSamplerDescriptorsEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkWriteSamplerDescriptorsEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkWriteResourceDescriptorsEXT - Write resource descriptors to memory /// /// /// /// To write resource descriptors to memory, call: /// /// /// // Provided by VK_EXT_descriptor_heap /// VkResult vkWriteResourceDescriptorsEXT( /// VkDevice device, /// uint32_t resourceCount, /// const VkResourceDescriptorInfoEXT* pResources, /// const VkHostAddressRangeEXT* pDescriptors); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void WriteResourceDescriptorsEXT( this VulkanHandleWrapper handle, scoped ReadOnlySpan pResources, scoped ReadOnlySpan pDescriptors ) { fixed (VkHostAddressRangeEXT* pDescriptorsFixed = pDescriptors) fixed (VkResourceDescriptorInfoEXT* pResourcesFixed = pResources) { VkResult result = handle.PInvoke.vkWriteResourceDescriptorsEXT.Invoke( handle.Handle, pResources.Length, pResourcesFixed, pDescriptorsFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkWriteResourceDescriptorsEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkWriteResourceDescriptorsEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkWriteResourceDescriptorsEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkWriteResourceDescriptorsEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCmdBindSamplerHeapEXT - Binds a sampler heap to a command buffer /// /// /// /// :refpage: vkCmdBindSamplerHeapEXT /// /// /// To bind a sampler heap to a command buffer, call: /// /// /// // Provided by VK_EXT_descriptor_heap /// void vkCmdBindSamplerHeapEXT( /// VkCommandBuffer commandBuffer, /// const VkBindHeapInfoEXT* pBindInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindSamplerHeapEXT(this T handle, in VkBindHeapInfoEXT pBindInfo) where T : VulkanHandleWrapper { fixed (VkBindHeapInfoEXT* pBindInfoFixed = &pBindInfo) { handle.PInvoke.vkCmdBindSamplerHeapEXT.Invoke(handle.Handle, pBindInfoFixed); } } /// /// vkCmdBindResourceHeapEXT - Binds a resource heap to a command buffer /// /// /// /// :refpage: vkCmdBindResourceHeapEXT /// /// /// To bind a resource heap to a command buffer, call: /// /// /// // Provided by VK_EXT_descriptor_heap /// void vkCmdBindResourceHeapEXT( /// VkCommandBuffer commandBuffer, /// const VkBindHeapInfoEXT* pBindInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindResourceHeapEXT(this T handle, in VkBindHeapInfoEXT pBindInfo) where T : VulkanHandleWrapper { fixed (VkBindHeapInfoEXT* pBindInfoFixed = &pBindInfo) { handle.PInvoke.vkCmdBindResourceHeapEXT.Invoke(handle.Handle, pBindInfoFixed); } } /// /// vkCmdPushDataEXT - Update the values of push data /// /// /// /// To update push data when using descriptor heaps, call: /// /// /// // Provided by VK_EXT_descriptor_heap /// void vkCmdPushDataEXT( /// VkCommandBuffer commandBuffer, /// const VkPushDataInfoEXT* pPushDataInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void PushDataEXT(this T handle, in VkPushDataInfoEXT pPushDataInfo) where T : VulkanHandleWrapper { fixed (VkPushDataInfoEXT* pPushDataInfoFixed = &pPushDataInfo) { handle.PInvoke.vkCmdPushDataEXT.Invoke(handle.Handle, pPushDataInfoFixed); } } /// /// vkGetImageOpaqueCaptureDataEXT - Get image opaque capture descriptor data for descriptor heap replay /// /// /// /// To get the opaque capture descriptor data for images, call: /// /// /// // Provided by VK_EXT_descriptor_heap /// VkResult vkGetImageOpaqueCaptureDataEXT( /// VkDevice device, /// uint32_t imageCount, /// const VkImage* pImages, /// VkHostAddressRangeEXT* pDatas); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetImageOpaqueCaptureDataEXT( this VulkanHandleWrapper handle, scoped ReadOnlySpan pImages, scoped ReadOnlySpan pDatas ) { fixed (VkHostAddressRangeEXT* pDatasFixed = pDatas) fixed (VkImage* pImagesFixed = pImages) { VkResult result = handle.PInvoke.vkGetImageOpaqueCaptureDataEXT.Invoke( handle.Handle, pImages.Length, pImagesFixed, pDatasFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetImageOpaqueCaptureDataEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetImageOpaqueCaptureDataEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetImageOpaqueCaptureDataEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetImageOpaqueCaptureDataEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkRegisterCustomBorderColorEXT - Register a custom border color /// /// /// /// To register a custom border color, call: /// /// /// // Provided by VK_EXT_custom_border_color with VK_EXT_descriptor_heap /// VkResult vkRegisterCustomBorderColorEXT( /// VkDevice device, /// const VkSamplerCustomBorderColorCreateInfoEXT* pBorderColor, /// VkBool32 requestIndex, /// uint32_t* pIndex); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void RegisterCustomBorderColorEXT( this VulkanHandleWrapper handle, VkSamplerCustomBorderColorCreateInfoEXT* pBorderColor, Brutal.Bool32 requestIndex, int* pIndex ) { VkResult result = handle.PInvoke.vkRegisterCustomBorderColorEXT.Invoke( handle.Handle, pBorderColor, requestIndex, pIndex ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkRegisterCustomBorderColorEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkRegisterCustomBorderColorEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorTooManyObjects: throw new VkResultError( VkResult.ErrorTooManyObjects, "Vulkan call to vkRegisterCustomBorderColorEXT failed with error: VK_ERROR_TOO_MANY_OBJECTS" ); case VkResult.ErrorInvalidOpaqueCaptureAddress: throw new VkResultError( VkResult.ErrorInvalidOpaqueCaptureAddress, "Vulkan call to vkRegisterCustomBorderColorEXT failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkRegisterCustomBorderColorEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkRegisterCustomBorderColorEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkUnregisterCustomBorderColorEXT - Unregister a custom border color /// /// /// /// To unregister a custom border color, call: /// /// /// // Provided by VK_EXT_custom_border_color with VK_EXT_descriptor_heap /// void vkUnregisterCustomBorderColorEXT( /// VkDevice device, /// uint32_t index); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void UnregisterCustomBorderColorEXT( this VulkanHandleWrapper handle, int index ) { handle.PInvoke.vkUnregisterCustomBorderColorEXT.Invoke(handle.Handle, index); } /// /// vkGetTensorOpaqueCaptureDataARM - Get tensor opaque capture descriptor data for descriptor heap replay /// /// /// /// To get the opaque capture descriptor data for tensors, call: /// /// /// // Provided by VK_EXT_descriptor_heap with VK_ARM_tensors /// VkResult vkGetTensorOpaqueCaptureDataARM( /// VkDevice device, /// uint32_t tensorCount, /// const VkTensorARM* pTensors, /// VkHostAddressRangeEXT* pDatas); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetTensorOpaqueCaptureDataARM( this VulkanHandleWrapper handle, scoped ReadOnlySpan pTensors, scoped ReadOnlySpan pDatas ) { fixed (VkHostAddressRangeEXT* pDatasFixed = pDatas) fixed (VkTensorARM* pTensorsFixed = pTensors) { VkResult result = handle.PInvoke.vkGetTensorOpaqueCaptureDataARM.Invoke( handle.Handle, pTensors.Length, pTensorsFixed, pDatasFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetTensorOpaqueCaptureDataARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetTensorOpaqueCaptureDataARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetTensorOpaqueCaptureDataARM failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetTensorOpaqueCaptureDataARM failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCmdSetSampleLocationsEXT - Set sample locations dynamically for a command buffer /// /// /// /// To dynamically set^ the sample locations used /// for rasterization, call: /// /// /// // Provided by VK_EXT_sample_locations /// void vkCmdSetSampleLocationsEXT( /// VkCommandBuffer commandBuffer, /// const VkSampleLocationsInfoEXT* pSampleLocationsInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetSampleLocationsEXT( this T handle, in VkSampleLocationsInfoEXT pSampleLocationsInfo ) where T : VulkanHandleWrapper { fixed (VkSampleLocationsInfoEXT* pSampleLocationsInfoFixed = &pSampleLocationsInfo) { handle.PInvoke.vkCmdSetSampleLocationsEXT.Invoke(handle.Handle, pSampleLocationsInfoFixed); } } /// /// vkGetImageDrmFormatModifierPropertiesEXT - Returns an image&apos;s DRM format modifier /// /// /// /// :refpage: vkGetImageDrmFormatModifierPropertiesEXT /// /// /// If an image was created with VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, /// then the image has a Linux DRM format /// modifier^. /// To query the modifier, call: /// /// /// // Provided by VK_EXT_image_drm_format_modifier /// VkResult vkGetImageDrmFormatModifierPropertiesEXT( /// VkDevice device, /// VkImage image, /// VkImageDrmFormatModifierPropertiesEXT* pProperties); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetImageDrmFormatModifierPropertiesEXT( this VulkanHandleWrapper handle, VkImage image, ref VkImageDrmFormatModifierPropertiesEXT pProperties ) { fixed (VkImageDrmFormatModifierPropertiesEXT* pPropertiesFixed = &pProperties) { VkResult result = handle.PInvoke.vkGetImageDrmFormatModifierPropertiesEXT.Invoke( handle.Handle, image, pPropertiesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetImageDrmFormatModifierPropertiesEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetImageDrmFormatModifierPropertiesEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetImageDrmFormatModifierPropertiesEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkImageDrmFormatModifierPropertiesEXT. public static VkImageDrmFormatModifierPropertiesEXT GetImageDrmFormatModifierPropertiesEXT( this VulkanHandleWrapper handle, VkImage image ) { VkImageDrmFormatModifierPropertiesEXT outValue = new(); GetImageDrmFormatModifierPropertiesEXT(handle, image, ref outValue); return outValue; } /// /// vkCreateValidationCacheEXT - Creates a new validation cache /// /// /// /// To create validation cache objects, call: /// /// /// // Provided by VK_EXT_validation_cache /// VkResult vkCreateValidationCacheEXT( /// VkDevice device, /// const VkValidationCacheCreateInfoEXT* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkValidationCacheEXT* pValidationCache); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkValidationCacheEXT CreateValidationCacheEXT( this VulkanHandleWrapper handle, in VkValidationCacheCreateInfoEXT pCreateInfo, VkAllocator? pAllocator ) { fixed (VkValidationCacheCreateInfoEXT* pCreateInfoFixed = &pCreateInfo) { VkValidationCacheEXT pValidationCacheLocal = default; VkResult result = handle.PInvoke.vkCreateValidationCacheEXT.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pValidationCacheLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateValidationCacheEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateValidationCacheEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateValidationCacheEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pValidationCacheLocal; } } /// /// vkDestroyValidationCacheEXT - Destroy a validation cache object /// /// /// /// To destroy a validation cache, call: /// /// /// // Provided by VK_EXT_validation_cache /// void vkDestroyValidationCacheEXT( /// VkDevice device, /// VkValidationCacheEXT validationCache, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyValidationCacheEXT( this VulkanHandleWrapper handle, VkValidationCacheEXT validationCache, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyValidationCacheEXT.Invoke(handle.Handle, validationCache, pAllocator); } /// /// vkMergeValidationCachesEXT - Combine the data stores of validation caches /// /// /// /// Validation cache objects can be merged using the command: /// /// /// // Provided by VK_EXT_validation_cache /// VkResult vkMergeValidationCachesEXT( /// VkDevice device, /// VkValidationCacheEXT dstCache, /// uint32_t srcCacheCount, /// const VkValidationCacheEXT* pSrcCaches); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void MergeValidationCachesEXT( this VulkanHandleWrapper handle, VkValidationCacheEXT dstCache, scoped ReadOnlySpan pSrcCaches ) { fixed (VkValidationCacheEXT* pSrcCachesFixed = pSrcCaches) { VkResult result = handle.PInvoke.vkMergeValidationCachesEXT.Invoke( handle.Handle, dstCache, pSrcCaches.Length, pSrcCachesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkMergeValidationCachesEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkMergeValidationCachesEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkMergeValidationCachesEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkMergeValidationCachesEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkGetValidationCacheDataEXT - Get the data store from a validation cache /// /// /// /// Data can be retrieved from a validation cache object using the command: /// /// /// // Provided by VK_EXT_validation_cache /// VkResult vkGetValidationCacheDataEXT( /// VkDevice device, /// VkValidationCacheEXT validationCache, /// size_t* pDataSize, /// void* pData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe VkResult GetValidationCacheDataEXT( this VulkanHandleWrapper handle, VkValidationCacheEXT validationCache, ref nuint pDataSize, scoped ReadOnlySpan pData ) { fixed (byte* pDataFixed = pData) fixed (nuint* pDataSizeFixed = &pDataSize) { VkResult result = handle.PInvoke.vkGetValidationCacheDataEXT.Invoke( handle.Handle, validationCache, pDataSizeFixed, pDataFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetValidationCacheDataEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetValidationCacheDataEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetValidationCacheDataEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetValidationCacheDataEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// Queries the required length. /// The required length. public static nuint GetValidationCacheDataEXT_Count( this VulkanHandleWrapper handle, VkValidationCacheEXT validationCache ) { nuint pDataSize = default; GetValidationCacheDataEXT(handle, validationCache, ref pDataSize, null); return pDataSize; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static VkResult GetValidationCacheDataEXT_Write( this VulkanHandleWrapper handle, VkValidationCacheEXT validationCache, scoped ReadOnlySpan pData ) { nuint pDataSize = (nuint)pData.Length; return GetValidationCacheDataEXT(handle, validationCache, ref pDataSize, pData); } /// /// vkCmdBindShadingRateImageNV - Bind a shading rate image on a command buffer /// /// /// /// When shading rate image usage is enabled in the bound pipeline, the pipeline /// uses a shading rate image specified by the command: /// /// /// // Provided by VK_NV_shading_rate_image /// void vkCmdBindShadingRateImageNV( /// VkCommandBuffer commandBuffer, /// VkImageView imageView, /// VkImageLayout imageLayout); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void BindShadingRateImageNV(this T handle, VkImageView imageView, VkImageLayout imageLayout) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdBindShadingRateImageNV.Invoke(handle.Handle, imageView, imageLayout); } /// /// vkCmdSetViewportShadingRatePaletteNV - Set shading rate image palettes dynamically for a command buffer /// /// /// /// To dynamically set^ the per-viewport shading /// rate image palettes, call: /// /// /// // Provided by VK_NV_shading_rate_image /// void vkCmdSetViewportShadingRatePaletteNV( /// VkCommandBuffer commandBuffer, /// uint32_t firstViewport, /// uint32_t viewportCount, /// const VkShadingRatePaletteNV* pShadingRatePalettes); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetViewportShadingRatePaletteNV( this T handle, int firstViewport, scoped ReadOnlySpan pShadingRatePalettes ) where T : VulkanHandleWrapper { fixed (VkShadingRatePaletteNV* pShadingRatePalettesFixed = pShadingRatePalettes) { handle.PInvoke.vkCmdSetViewportShadingRatePaletteNV.Invoke( handle.Handle, firstViewport, pShadingRatePalettes.Length, pShadingRatePalettesFixed ); } } /// /// vkCmdSetCoarseSampleOrderNV - Set order of coverage samples for coarse fragments dynamically for a command buffer /// /// /// /// To dynamically set^ the order of coverage /// samples in fragments larger than one pixel, call: /// /// /// // Provided by VK_NV_shading_rate_image /// void vkCmdSetCoarseSampleOrderNV( /// VkCommandBuffer commandBuffer, /// VkCoarseSampleOrderTypeNV sampleOrderType, /// uint32_t customSampleOrderCount, /// const VkCoarseSampleOrderCustomNV* pCustomSampleOrders); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetCoarseSampleOrderNV( this T handle, VkCoarseSampleOrderTypeNV sampleOrderType, scoped ReadOnlySpan pCustomSampleOrders ) where T : VulkanHandleWrapper { fixed (VkCoarseSampleOrderCustomNV* pCustomSampleOrdersFixed = pCustomSampleOrders) { handle.PInvoke.vkCmdSetCoarseSampleOrderNV.Invoke( handle.Handle, sampleOrderType, pCustomSampleOrders.Length, pCustomSampleOrdersFixed ); } } /// /// vkCreateAccelerationStructureNV - Create a new acceleration structure object /// /// /// /// :refpage: vkCreateAccelerationStructureNV /// /// /// To create acceleration structures, call: /// /// /// // Provided by VK_NV_ray_tracing /// VkResult vkCreateAccelerationStructureNV( /// VkDevice device, /// const VkAccelerationStructureCreateInfoNV* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkAccelerationStructureNV* pAccelerationStructure); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkAccelerationStructureNV CreateAccelerationStructureNV( this VulkanHandleWrapper handle, in VkAccelerationStructureCreateInfoNV pCreateInfo, VkAllocator? pAllocator ) { fixed (VkAccelerationStructureCreateInfoNV* pCreateInfoFixed = &pCreateInfo) { VkAccelerationStructureNV pAccelerationStructureLocal = default; VkResult result = handle.PInvoke.vkCreateAccelerationStructureNV.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pAccelerationStructureLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateAccelerationStructureNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateAccelerationStructureNV failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateAccelerationStructureNV failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pAccelerationStructureLocal; } } /// /// vkDestroyAccelerationStructureNV - Destroy an acceleration structure object /// /// /// /// :refpage: vkDestroyAccelerationStructureNV /// /// /// To destroy an acceleration structure, call: /// /// /// // Provided by VK_NV_ray_tracing /// void vkDestroyAccelerationStructureNV( /// VkDevice device, /// VkAccelerationStructureNV accelerationStructure, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyAccelerationStructureNV( this VulkanHandleWrapper handle, VkAccelerationStructureNV accelerationStructure, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyAccelerationStructureNV.Invoke(handle.Handle, accelerationStructure, pAllocator); } /// /// vkGetAccelerationStructureMemoryRequirementsNV - Get acceleration structure memory requirements /// /// /// /// :refpage: vkGetAccelerationStructureMemoryRequirementsNV /// /// /// An acceleration structure has memory requirements for the structure object /// itself, scratch space for the build, and scratch space for the update. /// /// /// Scratch space is allocated as a VkBuffer, so for /// VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV /// and /// VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV /// the pMemoryRequirements->alignment and /// pMemoryRequirements->memoryTypeBits values returned by this call must /// be filled with zero, and should be ignored by the application. /// /// /// To query the memory requirements, call: /// /// /// // Provided by VK_NV_ray_tracing /// void vkGetAccelerationStructureMemoryRequirementsNV( /// VkDevice device, /// const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, /// VkMemoryRequirements2* pMemoryRequirements); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetAccelerationStructureMemoryRequirementsNV( this VulkanHandleWrapper handle, in VkAccelerationStructureMemoryRequirementsInfoNV pInfo, ref VkMemoryRequirements2 pMemoryRequirements ) { fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) fixed (VkAccelerationStructureMemoryRequirementsInfoNV* pInfoFixed = &pInfo) { handle.PInvoke.vkGetAccelerationStructureMemoryRequirementsNV.Invoke( handle.Handle, pInfoFixed, pMemoryRequirementsFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryRequirements2. public static VkMemoryRequirements2 GetAccelerationStructureMemoryRequirementsNV( this VulkanHandleWrapper handle, in VkAccelerationStructureMemoryRequirementsInfoNV pInfo ) { VkMemoryRequirements2 outValue = new(); GetAccelerationStructureMemoryRequirementsNV(handle, pInfo, ref outValue); return outValue; } /// /// vkBindAccelerationStructureMemoryNV - Bind acceleration structure memory /// /// /// /// :refpage: vkBindAccelerationStructureMemoryNV /// /// /// To attach memory to one or more acceleration structures at a time, call: /// /// /// // Provided by VK_NV_ray_tracing /// VkResult vkBindAccelerationStructureMemoryNV( /// VkDevice device, /// uint32_t bindInfoCount, /// const VkBindAccelerationStructureMemoryInfoNV* pBindInfos); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindAccelerationStructureMemoryNV( this VulkanHandleWrapper handle, scoped ReadOnlySpan pBindInfos ) { fixed (VkBindAccelerationStructureMemoryInfoNV* pBindInfosFixed = pBindInfos) { VkResult result = handle.PInvoke.vkBindAccelerationStructureMemoryNV.Invoke( handle.Handle, pBindInfos.Length, pBindInfosFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkBindAccelerationStructureMemoryNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkBindAccelerationStructureMemoryNV failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkBindAccelerationStructureMemoryNV failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkBindAccelerationStructureMemoryNV failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCmdBuildAccelerationStructureNV - Build an acceleration structure /// /// /// /// :refpage: vkCmdBuildAccelerationStructureNV /// /// /// To build an acceleration structure for the `VK_NV_ray_tracing` /// extension call: /// /// /// // Provided by VK_NV_ray_tracing /// void vkCmdBuildAccelerationStructureNV( /// VkCommandBuffer commandBuffer, /// const VkAccelerationStructureInfoNV* pInfo, /// VkBuffer instanceData, /// VkDeviceSize instanceOffset, /// VkBool32 update, /// VkAccelerationStructureNV dst, /// VkAccelerationStructureNV src, /// VkBuffer scratch, /// VkDeviceSize scratchOffset); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BuildAccelerationStructureNV( this T handle, in VkAccelerationStructureInfoNV pInfo, VkBuffer instanceData, ByteSize64 instanceOffset, Brutal.Bool32 update, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkBuffer scratch, ByteSize64 scratchOffset ) where T : VulkanHandleWrapper { fixed (VkAccelerationStructureInfoNV* pInfoFixed = &pInfo) { handle.PInvoke.vkCmdBuildAccelerationStructureNV.Invoke( handle.Handle, pInfoFixed, instanceData, instanceOffset, update, dst, src, scratch, scratchOffset ); } } /// /// vkCmdCopyAccelerationStructureNV - Copy an acceleration structure /// /// /// /// :refpage: vkCmdCopyAccelerationStructureNV /// /// /// To copy an acceleration structure for the `VK_NV_ray_tracing` /// extension call: /// /// /// // Provided by VK_NV_ray_tracing /// void vkCmdCopyAccelerationStructureNV( /// VkCommandBuffer commandBuffer, /// VkAccelerationStructureNV dst, /// VkAccelerationStructureNV src, /// VkCopyAccelerationStructureModeKHR mode); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void CopyAccelerationStructureNV( this T handle, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdCopyAccelerationStructureNV.Invoke(handle.Handle, dst, src, mode); } /// /// vkCmdTraceRaysNV - Initialize a ray tracing dispatch /// /// /// /// :refpage: vkCmdTraceRaysNV /// /// /// To dispatch ray tracing for the `VK_NV_ray_tracing` extension use: /// /// /// // Provided by VK_NV_ray_tracing /// void vkCmdTraceRaysNV( /// VkCommandBuffer commandBuffer, /// VkBuffer raygenShaderBindingTableBuffer, /// VkDeviceSize raygenShaderBindingOffset, /// VkBuffer missShaderBindingTableBuffer, /// VkDeviceSize missShaderBindingOffset, /// VkDeviceSize missShaderBindingStride, /// VkBuffer hitShaderBindingTableBuffer, /// VkDeviceSize hitShaderBindingOffset, /// VkDeviceSize hitShaderBindingStride, /// VkBuffer callableShaderBindingTableBuffer, /// VkDeviceSize callableShaderBindingOffset, /// VkDeviceSize callableShaderBindingStride, /// uint32_t width, /// uint32_t height, /// uint32_t depth); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void TraceRaysNV( this T handle, VkBuffer raygenShaderBindingTableBuffer, ByteSize64 raygenShaderBindingOffset, VkBuffer missShaderBindingTableBuffer, ByteSize64 missShaderBindingOffset, ByteSize64 missShaderBindingStride, VkBuffer hitShaderBindingTableBuffer, ByteSize64 hitShaderBindingOffset, ByteSize64 hitShaderBindingStride, VkBuffer callableShaderBindingTableBuffer, ByteSize64 callableShaderBindingOffset, ByteSize64 callableShaderBindingStride, int width, int height, int depth ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdTraceRaysNV.Invoke( handle.Handle, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, missShaderBindingTableBuffer, missShaderBindingOffset, missShaderBindingStride, hitShaderBindingTableBuffer, hitShaderBindingOffset, hitShaderBindingStride, callableShaderBindingTableBuffer, callableShaderBindingOffset, callableShaderBindingStride, width, height, depth ); } /// /// vkCreateRayTracingPipelinesNV - Creates a new ray tracing pipeline object /// /// /// /// :refpage: vkCreateRayTracingPipelinesNV /// /// /// To create ray tracing pipelines, call: /// /// /// // Provided by VK_NV_ray_tracing /// VkResult vkCreateRayTracingPipelinesNV( /// VkDevice device, /// VkPipelineCache pipelineCache, /// uint32_t createInfoCount, /// const VkRayTracingPipelineCreateInfoNV* pCreateInfos, /// const VkAllocationCallbacks* pAllocator, /// VkPipeline* pPipelines); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CreateRayTracingPipelinesNV( this VulkanHandleWrapper handle, VkPipelineCache pipelineCache, scoped ReadOnlySpan pCreateInfos, VkAllocator? pAllocator, scoped ReadOnlySpan pPipelines ) { fixed (VkPipeline* pPipelinesFixed = pPipelines) fixed (VkRayTracingPipelineCreateInfoNV* pCreateInfosFixed = pCreateInfos) { VkResult result = handle.PInvoke.vkCreateRayTracingPipelinesNV.Invoke( handle.Handle, pipelineCache, pCreateInfos.Length, pCreateInfosFixed, pAllocator, pPipelinesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateRayTracingPipelinesNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateRayTracingPipelinesNV failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorInvalidShaderNV: throw new VkResultError( VkResult.ErrorInvalidShaderNV, "Vulkan call to vkCreateRayTracingPipelinesNV failed with error: VK_ERROR_INVALID_SHADER_NV" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateRayTracingPipelinesNV failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateRayTracingPipelinesNV failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.PipelineCompileRequiredEXT: default: break; } return result; } } /// /// vkGetRayTracingShaderGroupHandlesKHR - Query ray tracing pipeline shader group handles /// /// /// /// :refpage: vkGetRayTracingShaderGroupHandlesKHR /// /// /// To query the opaque handles of shaders in the ray tracing pipeline, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetRayTracingShaderGroupHandlesKHR( this VulkanHandleWrapper handle, VkPipeline pipeline, int firstGroup, int groupCount, scoped ReadOnlySpan pData ) { fixed (byte* pDataFixed = pData) { VkResult result = handle.PInvoke.vkGetRayTracingShaderGroupHandlesKHR.Invoke( handle.Handle, pipeline, firstGroup, groupCount, (nuint)pData.Length, pDataFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetRayTracingShaderGroupHandlesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetRayTracingShaderGroupHandlesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetRayTracingShaderGroupHandlesKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetRayTracingShaderGroupHandlesKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult GetRayTracingShaderGroupHandlesNV( this VulkanHandleWrapper handle, VkPipeline pipeline, int firstGroup, int groupCount, nuint dataSize, void* pData ) { return handle.PInvoke.vkGetRayTracingShaderGroupHandlesNV.Invoke( handle.Handle, pipeline, firstGroup, groupCount, dataSize, pData ); } /// /// vkGetAccelerationStructureHandleNV - Get opaque acceleration structure handle /// /// /// /// :refpage: vkGetAccelerationStructureHandleNV /// /// /// To allow constructing geometry instances with device code if desired, we /// need to be able to query an opaque handle for an acceleration structure. /// This handle is a value of 8 bytes. /// To get this handle, call: /// /// /// // Provided by VK_NV_ray_tracing /// VkResult vkGetAccelerationStructureHandleNV( /// VkDevice device, /// VkAccelerationStructureNV accelerationStructure, /// size_t dataSize, /// void* pData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetAccelerationStructureHandleNV( this VulkanHandleWrapper handle, VkAccelerationStructureNV accelerationStructure, scoped ReadOnlySpan pData ) { fixed (byte* pDataFixed = pData) { VkResult result = handle.PInvoke.vkGetAccelerationStructureHandleNV.Invoke( handle.Handle, accelerationStructure, (nuint)pData.Length, pDataFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetAccelerationStructureHandleNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetAccelerationStructureHandleNV failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetAccelerationStructureHandleNV failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetAccelerationStructureHandleNV failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCmdWriteAccelerationStructuresPropertiesNV - Write acceleration structure result parameters to query results. /// /// /// /// :refpage: vkCmdWriteAccelerationStructuresPropertiesNV /// /// /// To query acceleration structure size parameters for the /// `VK_NV_ray_tracing` extension call: /// /// /// // Provided by VK_NV_ray_tracing /// void vkCmdWriteAccelerationStructuresPropertiesNV( /// VkCommandBuffer commandBuffer, /// uint32_t accelerationStructureCount, /// const VkAccelerationStructureNV* pAccelerationStructures, /// VkQueryType queryType, /// VkQueryPool queryPool, /// uint32_t firstQuery); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void WriteAccelerationStructuresPropertiesNV( this T handle, scoped ReadOnlySpan pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, int firstQuery ) where T : VulkanHandleWrapper { fixed (VkAccelerationStructureNV* pAccelerationStructuresFixed = pAccelerationStructures) { handle.PInvoke.vkCmdWriteAccelerationStructuresPropertiesNV.Invoke( handle.Handle, pAccelerationStructures.Length, pAccelerationStructuresFixed, queryType, queryPool, firstQuery ); } } /// /// vkCompileDeferredNV - Deferred compilation of shaders /// /// /// /// :refpage: vkCompileDeferredNV /// /// /// To compile a deferred shader in a pipeline call: /// /// /// // Provided by VK_NV_ray_tracing /// VkResult vkCompileDeferredNV( /// VkDevice device, /// VkPipeline pipeline, /// uint32_t shader); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void CompileDeferredNV( this VulkanHandleWrapper handle, VkPipeline pipeline, int shader ) { VkResult result = handle.PInvoke.vkCompileDeferredNV.Invoke(handle.Handle, pipeline, shader); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCompileDeferredNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCompileDeferredNV failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCompileDeferredNV failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCompileDeferredNV failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkGetMemoryHostPointerPropertiesEXT - Get properties of external memory host pointer /// /// /// /// :refpage: vkGetMemoryHostPointerPropertiesEXT /// /// /// To determine the correct parameters to use when importing host pointers, /// call: /// /// /// // Provided by VK_EXT_external_memory_host /// VkResult vkGetMemoryHostPointerPropertiesEXT( /// VkDevice device, /// VkExternalMemoryHandleTypeFlagBits handleType, /// const void* pHostPointer, /// VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetMemoryHostPointerPropertiesEXT( this VulkanHandleWrapper handle, VkExternalMemoryHandleTypeFlags handleType, void* pHostPointer, ref VkMemoryHostPointerPropertiesEXT pMemoryHostPointerProperties ) { fixed (VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerPropertiesFixed = &pMemoryHostPointerProperties) { VkResult result = handle.PInvoke.vkGetMemoryHostPointerPropertiesEXT.Invoke( handle.Handle, handleType, pHostPointer, pMemoryHostPointerPropertiesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetMemoryHostPointerPropertiesEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorInvalidExternalHandle: throw new VkResultError( VkResult.ErrorInvalidExternalHandle, "Vulkan call to vkGetMemoryHostPointerPropertiesEXT failed with error: VK_ERROR_INVALID_EXTERNAL_HANDLE" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetMemoryHostPointerPropertiesEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetMemoryHostPointerPropertiesEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryHostPointerPropertiesEXT. public static unsafe VkMemoryHostPointerPropertiesEXT GetMemoryHostPointerPropertiesEXT( this VulkanHandleWrapper handle, VkExternalMemoryHandleTypeFlags handleType, void* pHostPointer ) { VkMemoryHostPointerPropertiesEXT outValue = new(); GetMemoryHostPointerPropertiesEXT(handle, handleType, pHostPointer, ref outValue); return outValue; } /// /// vkCmdWriteBufferMarkerAMD - Execute a pipelined write of a marker value into a buffer /// /// /// /// :refpage: vkCmdWriteBufferMarkerAMD /// /// /// To write a 32-bit marker value into a buffer as a pipelined operation, call: /// /// /// // Provided by VK_AMD_buffer_marker /// void vkCmdWriteBufferMarkerAMD( /// VkCommandBuffer commandBuffer, /// VkPipelineStageFlagBits pipelineStage, /// VkBuffer dstBuffer, /// VkDeviceSize dstOffset, /// uint32_t marker); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteBufferMarkerAMD( this T handle, VkPipelineStageFlags pipelineStage, VkBuffer dstBuffer, ByteSize64 dstOffset, int marker ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdWriteBufferMarkerAMD.Invoke(handle.Handle, pipelineStage, dstBuffer, dstOffset, marker); } /// /// vkCmdWriteBufferMarker2AMD - Execute a pipelined write of a marker value into a buffer /// /// /// /// :refpage: vkCmdWriteBufferMarker2AMD /// /// /// To write a 32-bit marker value into a buffer as a pipelined operation, call: /// /// /// // Provided by VK_AMD_buffer_marker with VK_VERSION_1_3 or VK_KHR_synchronization2 /// void vkCmdWriteBufferMarker2AMD( /// VkCommandBuffer commandBuffer, /// VkPipelineStageFlags2 stage, /// VkBuffer dstBuffer, /// VkDeviceSize dstOffset, /// uint32_t marker); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void WriteBufferMarker2AMD( this T handle, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, ByteSize64 dstOffset, int marker ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdWriteBufferMarker2AMD.Invoke(handle.Handle, stage, dstBuffer, dstOffset, marker); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult GetCalibratedTimestampsEXT( this VulkanHandleWrapper handle, int timestampCount, VkCalibratedTimestampInfoKHR* pTimestampInfos, nint* pTimestamps, nint* pMaxDeviation ) { return handle.PInvoke.vkGetCalibratedTimestampsEXT.Invoke( handle.Handle, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation ); } /// /// vkCmdDrawMeshTasksNV - Draw mesh task work items /// /// /// /// :refpage: vkCmdDrawMeshTasksNV /// /// /// To record a mesh tasks drawing command, call: /// /// /// // Provided by VK_NV_mesh_shader /// void vkCmdDrawMeshTasksNV( /// VkCommandBuffer commandBuffer, /// uint32_t taskCount, /// uint32_t firstTask); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawMeshTasksNV(this T handle, int taskCount, int firstTask) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawMeshTasksNV.Invoke(handle.Handle, taskCount, firstTask); } /// /// vkCmdDrawMeshTasksIndirectNV - Issue an indirect mesh tasks draw into a command buffer /// /// /// /// :refpage: vkCmdDrawMeshTasksIndirectNV /// /// /// To record an indirect mesh tasks drawing command, call: /// /// /// // Provided by VK_NV_mesh_shader /// void vkCmdDrawMeshTasksIndirectNV( /// VkCommandBuffer commandBuffer, /// VkBuffer buffer, /// VkDeviceSize offset, /// uint32_t drawCount, /// uint32_t stride); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawMeshTasksIndirectNV( this T handle, VkBuffer buffer, ByteSize64 offset, int drawCount, int stride ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawMeshTasksIndirectNV.Invoke(handle.Handle, buffer, offset, drawCount, stride); } /// /// vkCmdDrawMeshTasksIndirectCountNV - Perform an indirect mesh tasks draw with the draw count sourced from a buffer /// /// /// /// :refpage: vkCmdDrawMeshTasksIndirectCountNV /// /// /// To record an indirect mesh tasks drawing command with the draw count sourced /// from a buffer, call: /// /// /// // Provided by VK_NV_mesh_shader with VK_VERSION_1_2 or VK_KHR_draw_indirect_count or VK_AMD_draw_indirect_count /// void vkCmdDrawMeshTasksIndirectCountNV( /// VkCommandBuffer commandBuffer, /// VkBuffer buffer, /// VkDeviceSize offset, /// VkBuffer countBuffer, /// VkDeviceSize countBufferOffset, /// uint32_t maxDrawCount, /// uint32_t stride); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawMeshTasksIndirectCountNV( this T handle, VkBuffer buffer, ByteSize64 offset, VkBuffer countBuffer, ByteSize64 countBufferOffset, int maxDrawCount, int stride ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawMeshTasksIndirectCountNV.Invoke( handle.Handle, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); } /// /// vkCmdSetExclusiveScissorEnableNV - Dynamically enable each exclusive scissor for a command buffer /// /// /// /// To dynamically set^ whether an exclusive scissor /// is enabled or not, call: /// /// /// // Provided by VK_NV_scissor_exclusive /// void vkCmdSetExclusiveScissorEnableNV( /// VkCommandBuffer commandBuffer, /// uint32_t firstExclusiveScissor, /// uint32_t exclusiveScissorCount, /// const VkBool32* pExclusiveScissorEnables); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetExclusiveScissorEnableNV( this T handle, int firstExclusiveScissor, scoped ReadOnlySpan pExclusiveScissorEnables ) where T : VulkanHandleWrapper { fixed (Brutal.Bool32* pExclusiveScissorEnablesFixed = pExclusiveScissorEnables) { handle.PInvoke.vkCmdSetExclusiveScissorEnableNV.Invoke( handle.Handle, firstExclusiveScissor, pExclusiveScissorEnables.Length, pExclusiveScissorEnablesFixed ); } } /// /// vkCmdSetExclusiveScissorNV - Set exclusive scissor rectangles dynamically for a command buffer /// /// /// /// To dynamically set^ the exclusive scissor /// rectangles, call: /// /// /// // Provided by VK_NV_scissor_exclusive /// void vkCmdSetExclusiveScissorNV( /// VkCommandBuffer commandBuffer, /// uint32_t firstExclusiveScissor, /// uint32_t exclusiveScissorCount, /// const VkRect2D* pExclusiveScissors); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetExclusiveScissorNV( this T handle, int firstExclusiveScissor, scoped ReadOnlySpan pExclusiveScissors ) where T : VulkanHandleWrapper { fixed (VkRect2D* pExclusiveScissorsFixed = pExclusiveScissors) { handle.PInvoke.vkCmdSetExclusiveScissorNV.Invoke( handle.Handle, firstExclusiveScissor, pExclusiveScissors.Length, pExclusiveScissorsFixed ); } } /// /// vkCmdSetCheckpointNV - Insert diagnostic checkpoint in command stream /// /// /// /// Device diagnostic checkpoints are inserted into the command stream by /// calling vkCmdSetCheckpointNV. /// /// /// // Provided by VK_NV_device_diagnostic_checkpoints /// void vkCmdSetCheckpointNV( /// VkCommandBuffer commandBuffer, /// const void* pCheckpointMarker); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetCheckpointNV(this T handle, void* pCheckpointMarker) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetCheckpointNV.Invoke(handle.Handle, pCheckpointMarker); } /// /// vkGetQueueCheckpointDataNV - Retrieve diagnostic checkpoint data /// /// /// /// If the device encounters an error during execution, the implementation will /// return a VK_ERROR_DEVICE_LOST error to the application at a certain /// point during host execution. /// When this happens, the application can call /// vkGetQueueCheckpointDataNV to retrieve information on the most recent /// diagnostic checkpoints that were executed by the device. /// /// /// // Provided by VK_NV_device_diagnostic_checkpoints /// void vkGetQueueCheckpointDataNV( /// VkQueue queue, /// uint32_t* pCheckpointDataCount, /// VkCheckpointDataNV* pCheckpointData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe void GetCheckpointDataNV( this VulkanHandleWrapper handle, ref int pCheckpointDataCount, scoped ReadOnlySpan pCheckpointData ) { fixed (VkCheckpointDataNV* pCheckpointDataFixed = pCheckpointData) fixed (int* pCheckpointDataCountFixed = &pCheckpointDataCount) { handle.PInvoke.vkGetQueueCheckpointDataNV.Invoke( handle.Handle, pCheckpointDataCountFixed, pCheckpointDataFixed ); } } /// Queries the required length. /// The required length. public static int GetCheckpointDataNV_Count(this VulkanHandleWrapper handle) { int pCheckpointDataCount = default; GetCheckpointDataNV(handle, ref pCheckpointDataCount, null); return pCheckpointDataCount; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static void GetCheckpointDataNV_Write( this VulkanHandleWrapper handle, scoped ReadOnlySpan pCheckpointData ) { int pCheckpointDataCount = pCheckpointData.Length; GetCheckpointDataNV(handle, ref pCheckpointDataCount, pCheckpointData); } /// /// vkGetQueueCheckpointData2NV - Retrieve diagnostic checkpoint data /// /// /// /// If the device encounters an error during execution, the implementation will /// return a VK_ERROR_DEVICE_LOST error to the application at some point /// during host execution. /// When this happens, the application can call /// vkGetQueueCheckpointData2NV to retrieve information on the most recent /// diagnostic checkpoints that were executed by the device. /// /// /// // Provided by VK_NV_device_diagnostic_checkpoints with VK_VERSION_1_3 or VK_KHR_synchronization2 /// void vkGetQueueCheckpointData2NV( /// VkQueue queue, /// uint32_t* pCheckpointDataCount, /// VkCheckpointData2NV* pCheckpointData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe void GetCheckpointData2NV( this VulkanHandleWrapper handle, ref int pCheckpointDataCount, scoped ReadOnlySpan pCheckpointData ) { fixed (VkCheckpointData2NV* pCheckpointDataFixed = pCheckpointData) fixed (int* pCheckpointDataCountFixed = &pCheckpointDataCount) { handle.PInvoke.vkGetQueueCheckpointData2NV.Invoke( handle.Handle, pCheckpointDataCountFixed, pCheckpointDataFixed ); } } /// Queries the required length. /// The required length. public static int GetCheckpointData2NV_Count(this VulkanHandleWrapper handle) { int pCheckpointDataCount = default; GetCheckpointData2NV(handle, ref pCheckpointDataCount, null); return pCheckpointDataCount; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static void GetCheckpointData2NV_Write( this VulkanHandleWrapper handle, scoped ReadOnlySpan pCheckpointData ) { int pCheckpointDataCount = pCheckpointData.Length; GetCheckpointData2NV(handle, ref pCheckpointDataCount, pCheckpointData); } /// /// vkSetSwapchainPresentTimingQueueSizeEXT - Allocate memory for the swapchain-internal timing results queue /// /// /// /// In order to collect timing information about presentation, a swapchain needs /// an internal queue to store asynchronously updated results until applications /// collect them. /// /// /// To allocate the swapchain's internal timing results queue, call: /// /// /// // Provided by VK_EXT_present_timing /// VkResult vkSetSwapchainPresentTimingQueueSizeEXT( /// VkDevice device, /// VkSwapchainKHR swapchain, /// uint32_t size); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static VkResult SetSwapchainPresentTimingQueueSizeEXT( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain, int size ) { VkResult result = handle.PInvoke.vkSetSwapchainPresentTimingQueueSizeEXT.Invoke( handle.Handle, swapchain, size ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkSetSwapchainPresentTimingQueueSizeEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkSetSwapchainPresentTimingQueueSizeEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkSetSwapchainPresentTimingQueueSizeEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkSetSwapchainPresentTimingQueueSizeEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.NotReady: default: break; } return result; } /// /// vkGetSwapchainTimingPropertiesEXT - Obtain the display timing properties of the PE&apos;s display /// /// /// /// The implementation maintains an internal monotonically increasing counter /// which updates when the presentation engine's timing properties are modified. /// /// /// To query the presentation engine's current timing properties for a given /// swapchain, call: /// /// /// // Provided by VK_EXT_present_timing /// VkResult vkGetSwapchainTimingPropertiesEXT( /// VkDevice device, /// VkSwapchainKHR swapchain, /// VkSwapchainTimingPropertiesEXT* pSwapchainTimingProperties, /// uint64_t* pSwapchainTimingPropertiesCounter); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult GetSwapchainTimingPropertiesEXT( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain, VkSwapchainTimingPropertiesEXT* pSwapchainTimingProperties, nint* pSwapchainTimingPropertiesCounter ) { VkResult result = handle.PInvoke.vkGetSwapchainTimingPropertiesEXT.Invoke( handle.Handle, swapchain, pSwapchainTimingProperties, pSwapchainTimingPropertiesCounter ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetSwapchainTimingPropertiesEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetSwapchainTimingPropertiesEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorSurfaceLostKHR: throw new VkResultError( VkResult.ErrorSurfaceLostKHR, "Vulkan call to vkGetSwapchainTimingPropertiesEXT failed with error: VK_ERROR_SURFACE_LOST_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetSwapchainTimingPropertiesEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetSwapchainTimingPropertiesEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.NotReady: default: break; } return result; } /// /// vkGetSwapchainTimeDomainPropertiesEXT - Obtain the time domains supported by the PE for the swapchain /// /// /// /// The implementation maintains an internal monotonically increasing counter /// which updates when the presentation engine's list of supported time domains /// for a swapchain is modified. /// /// /// To query the time domains supported by the presentation engine for a given /// swapchain, call: /// /// /// // Provided by VK_EXT_present_timing /// VkResult vkGetSwapchainTimeDomainPropertiesEXT( /// VkDevice device, /// VkSwapchainKHR swapchain, /// VkSwapchainTimeDomainPropertiesEXT* pSwapchainTimeDomainProperties, /// uint64_t* pTimeDomainsCounter); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult GetSwapchainTimeDomainPropertiesEXT( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain, VkSwapchainTimeDomainPropertiesEXT* pSwapchainTimeDomainProperties, nint* pTimeDomainsCounter ) { VkResult result = handle.PInvoke.vkGetSwapchainTimeDomainPropertiesEXT.Invoke( handle.Handle, swapchain, pSwapchainTimeDomainProperties, pTimeDomainsCounter ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetSwapchainTimeDomainPropertiesEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetSwapchainTimeDomainPropertiesEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorSurfaceLostKHR: throw new VkResultError( VkResult.ErrorSurfaceLostKHR, "Vulkan call to vkGetSwapchainTimeDomainPropertiesEXT failed with error: VK_ERROR_SURFACE_LOST_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetSwapchainTimeDomainPropertiesEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetSwapchainTimeDomainPropertiesEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } /// /// vkGetPastPresentationTimingEXT - Obtain timing of previously-presented images /// /// /// /// Because of the asynchronous nature of the presentation engine, the timing /// information for a given vkQueuePresentKHR command may: only becomes /// available some time after the presentation has occurred. /// These time values should be asynchronously queried, and are returned if /// available. /// All time values are in nanoseconds, according to the time-domain being used. /// /// /// To asynchronously query the presentation engine for newly-available timing /// information about one or more previous presents to a given swapchain, call: /// /// /// // Provided by VK_EXT_present_timing /// VkResult vkGetPastPresentationTimingEXT( /// VkDevice device, /// const VkPastPresentationTimingInfoEXT* pPastPresentationTimingInfo, /// VkPastPresentationTimingPropertiesEXT* pPastPresentationTimingProperties); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult GetPastPresentationTimingEXT( this VulkanHandleWrapper handle, in VkPastPresentationTimingInfoEXT pPastPresentationTimingInfo, VkPastPresentationTimingPropertiesEXT* pPastPresentationTimingProperties ) { fixed (VkPastPresentationTimingInfoEXT* pPastPresentationTimingInfoFixed = &pPastPresentationTimingInfo) { VkResult result = handle.PInvoke.vkGetPastPresentationTimingEXT.Invoke( handle.Handle, pPastPresentationTimingInfoFixed, pPastPresentationTimingProperties ); switch (result) { case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkGetPastPresentationTimingEXT failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorOutOfDateKHR: throw new VkResultError( VkResult.ErrorOutOfDateKHR, "Vulkan call to vkGetPastPresentationTimingEXT failed with error: VK_ERROR_OUT_OF_DATE_KHR" ); case VkResult.ErrorSurfaceLostKHR: throw new VkResultError( VkResult.ErrorSurfaceLostKHR, "Vulkan call to vkGetPastPresentationTimingEXT failed with error: VK_ERROR_SURFACE_LOST_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetPastPresentationTimingEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetPastPresentationTimingEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// /// vkInitializePerformanceApiINTEL - Initialize a device for performance queries /// /// /// /// Prior to creating a performance query pool, initialize the device for /// performance queries with the call: /// /// /// // Provided by VK_INTEL_performance_query /// VkResult vkInitializePerformanceApiINTEL( /// VkDevice device, /// const VkInitializePerformanceApiInfoINTEL* pInitializeInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void InitializePerformanceApiINTEL( this VulkanHandleWrapper handle, in VkInitializePerformanceApiInfoINTEL pInitializeInfo ) { fixed (VkInitializePerformanceApiInfoINTEL* pInitializeInfoFixed = &pInitializeInfo) { VkResult result = handle.PInvoke.vkInitializePerformanceApiINTEL.Invoke( handle.Handle, pInitializeInfoFixed ); switch (result) { case VkResult.ErrorTooManyObjects: throw new VkResultError( VkResult.ErrorTooManyObjects, "Vulkan call to vkInitializePerformanceApiINTEL failed with error: VK_ERROR_TOO_MANY_OBJECTS" ); case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkInitializePerformanceApiINTEL failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkInitializePerformanceApiINTEL failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkInitializePerformanceApiINTEL failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkUninitializePerformanceApiINTEL - Uninitialize a device for performance queries /// /// /// /// Once performance query operations have completed, uninitialize the device /// for performance queries with the call: /// /// /// // Provided by VK_INTEL_performance_query /// void vkUninitializePerformanceApiINTEL( /// VkDevice device); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void UninitializePerformanceApiINTEL( this VulkanHandleWrapper handle ) { handle.PInvoke.vkUninitializePerformanceApiINTEL.Invoke(handle.Handle); } /// /// vkCmdSetPerformanceMarkerINTEL - Markers /// /// /// /// To help associate query results with a particular point at which an /// application emitted commands, markers can be set into the command buffers /// with the call: /// /// /// // Provided by VK_INTEL_performance_query /// VkResult vkCmdSetPerformanceMarkerINTEL( /// VkCommandBuffer commandBuffer, /// const VkPerformanceMarkerInfoINTEL* pMarkerInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetPerformanceMarkerINTEL( this T handle, in VkPerformanceMarkerInfoINTEL pMarkerInfo ) where T : VulkanHandleWrapper { fixed (VkPerformanceMarkerInfoINTEL* pMarkerInfoFixed = &pMarkerInfo) { VkResult result = handle.PInvoke.vkCmdSetPerformanceMarkerINTEL.Invoke(handle.Handle, pMarkerInfoFixed); switch (result) { case VkResult.ErrorTooManyObjects: throw new VkResultError( VkResult.ErrorTooManyObjects, "Vulkan call to vkCmdSetPerformanceMarkerINTEL failed with error: VK_ERROR_TOO_MANY_OBJECTS" ); case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCmdSetPerformanceMarkerINTEL failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCmdSetPerformanceMarkerINTEL failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCmdSetPerformanceMarkerINTEL failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCmdSetPerformanceStreamMarkerINTEL - Markers /// /// /// /// When monitoring the behavior of an application within the dataset generated /// by the entire set of applications running on the system, it is useful to /// identify draw calls within a potentially huge amount of performance data. /// To do so, application can generate stream markers that will be used to trace /// back a particular draw call with a particular performance data item. /// /// /// // Provided by VK_INTEL_performance_query /// VkResult vkCmdSetPerformanceStreamMarkerINTEL( /// VkCommandBuffer commandBuffer, /// const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetPerformanceStreamMarkerINTEL( this T handle, in VkPerformanceStreamMarkerInfoINTEL pMarkerInfo ) where T : VulkanHandleWrapper { fixed (VkPerformanceStreamMarkerInfoINTEL* pMarkerInfoFixed = &pMarkerInfo) { VkResult result = handle.PInvoke.vkCmdSetPerformanceStreamMarkerINTEL.Invoke( handle.Handle, pMarkerInfoFixed ); switch (result) { case VkResult.ErrorTooManyObjects: throw new VkResultError( VkResult.ErrorTooManyObjects, "Vulkan call to vkCmdSetPerformanceStreamMarkerINTEL failed with error: VK_ERROR_TOO_MANY_OBJECTS" ); case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCmdSetPerformanceStreamMarkerINTEL failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCmdSetPerformanceStreamMarkerINTEL failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCmdSetPerformanceStreamMarkerINTEL failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCmdSetPerformanceOverrideINTEL - Performance override settings /// /// /// /// Some applications might want measure the effect of a set of commands with a /// different settings. /// It is possible to override a particular settings using : /// /// /// // Provided by VK_INTEL_performance_query /// VkResult vkCmdSetPerformanceOverrideINTEL( /// VkCommandBuffer commandBuffer, /// const VkPerformanceOverrideInfoINTEL* pOverrideInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetPerformanceOverrideINTEL( this T handle, in VkPerformanceOverrideInfoINTEL pOverrideInfo ) where T : VulkanHandleWrapper { fixed (VkPerformanceOverrideInfoINTEL* pOverrideInfoFixed = &pOverrideInfo) { VkResult result = handle.PInvoke.vkCmdSetPerformanceOverrideINTEL.Invoke( handle.Handle, pOverrideInfoFixed ); switch (result) { case VkResult.ErrorTooManyObjects: throw new VkResultError( VkResult.ErrorTooManyObjects, "Vulkan call to vkCmdSetPerformanceOverrideINTEL failed with error: VK_ERROR_TOO_MANY_OBJECTS" ); case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCmdSetPerformanceOverrideINTEL failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCmdSetPerformanceOverrideINTEL failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCmdSetPerformanceOverrideINTEL failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkAcquirePerformanceConfigurationINTEL - Acquire the performance query capability /// /// /// /// To acquire a device performance configuration, call: /// /// /// // Provided by VK_INTEL_performance_query /// VkResult vkAcquirePerformanceConfigurationINTEL( /// VkDevice device, /// const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, /// VkPerformanceConfigurationINTEL* pConfiguration); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void AcquirePerformanceConfigurationINTEL( this VulkanHandleWrapper handle, in VkPerformanceConfigurationAcquireInfoINTEL pAcquireInfo, VkPerformanceConfigurationINTEL* pConfiguration ) { fixed (VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfoFixed = &pAcquireInfo) { VkResult result = handle.PInvoke.vkAcquirePerformanceConfigurationINTEL.Invoke( handle.Handle, pAcquireInfoFixed, pConfiguration ); switch (result) { case VkResult.ErrorTooManyObjects: throw new VkResultError( VkResult.ErrorTooManyObjects, "Vulkan call to vkAcquirePerformanceConfigurationINTEL failed with error: VK_ERROR_TOO_MANY_OBJECTS" ); case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkAcquirePerformanceConfigurationINTEL failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkAcquirePerformanceConfigurationINTEL failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkAcquirePerformanceConfigurationINTEL failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkReleasePerformanceConfigurationINTEL - Release a configuration to capture performance data /// /// /// /// To release a device performance configuration, call: /// /// /// // Provided by VK_INTEL_performance_query /// VkResult vkReleasePerformanceConfigurationINTEL( /// VkDevice device, /// VkPerformanceConfigurationINTEL configuration); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ReleasePerformanceConfigurationINTEL( this VulkanHandleWrapper handle, VkPerformanceConfigurationINTEL configuration ) { VkResult result = handle.PInvoke.vkReleasePerformanceConfigurationINTEL.Invoke( handle.Handle, configuration ); switch (result) { case VkResult.ErrorTooManyObjects: throw new VkResultError( VkResult.ErrorTooManyObjects, "Vulkan call to vkReleasePerformanceConfigurationINTEL failed with error: VK_ERROR_TOO_MANY_OBJECTS" ); case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkReleasePerformanceConfigurationINTEL failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkReleasePerformanceConfigurationINTEL failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkReleasePerformanceConfigurationINTEL failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkQueueSetPerformanceConfigurationINTEL - Set a performance query /// /// /// /// To set a performance configuration, call: /// /// /// // Provided by VK_INTEL_performance_query /// VkResult vkQueueSetPerformanceConfigurationINTEL( /// VkQueue queue, /// VkPerformanceConfigurationINTEL configuration); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetPerformanceConfigurationINTEL( this VulkanHandleWrapper handle, VkPerformanceConfigurationINTEL configuration ) { VkResult result = handle.PInvoke.vkQueueSetPerformanceConfigurationINTEL.Invoke( handle.Handle, configuration ); switch (result) { case VkResult.ErrorTooManyObjects: throw new VkResultError( VkResult.ErrorTooManyObjects, "Vulkan call to vkQueueSetPerformanceConfigurationINTEL failed with error: VK_ERROR_TOO_MANY_OBJECTS" ); case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkQueueSetPerformanceConfigurationINTEL failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkQueueSetPerformanceConfigurationINTEL failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkQueueSetPerformanceConfigurationINTEL failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkGetPerformanceParameterINTEL - Query performance capabilities of the device /// /// /// /// Some performance query features of a device can be discovered with the call: /// /// /// // Provided by VK_INTEL_performance_query /// VkResult vkGetPerformanceParameterINTEL( /// VkDevice device, /// VkPerformanceParameterTypeINTEL parameter, /// VkPerformanceValueINTEL* pValue); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetPerformanceParameterINTEL( this VulkanHandleWrapper handle, VkPerformanceParameterTypeINTEL parameter, ref VkPerformanceValueINTEL pValue ) { fixed (VkPerformanceValueINTEL* pValueFixed = &pValue) { VkResult result = handle.PInvoke.vkGetPerformanceParameterINTEL.Invoke( handle.Handle, parameter, pValueFixed ); switch (result) { case VkResult.ErrorTooManyObjects: throw new VkResultError( VkResult.ErrorTooManyObjects, "Vulkan call to vkGetPerformanceParameterINTEL failed with error: VK_ERROR_TOO_MANY_OBJECTS" ); case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetPerformanceParameterINTEL failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetPerformanceParameterINTEL failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetPerformanceParameterINTEL failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkPerformanceValueINTEL. public static VkPerformanceValueINTEL GetPerformanceParameterINTEL( this VulkanHandleWrapper handle, VkPerformanceParameterTypeINTEL parameter ) { VkPerformanceValueINTEL outValue = new(); GetPerformanceParameterINTEL(handle, parameter, ref outValue); return outValue; } /// /// vkSetLocalDimmingAMD - Set Local Dimming /// /// /// /// The local dimming HDR setting may also be changed over the life of a /// swapchain by calling: /// /// /// // Provided by VK_AMD_display_native_hdr /// void vkSetLocalDimmingAMD( /// VkDevice device, /// VkSwapchainKHR swapChain, /// VkBool32 localDimmingEnable); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetLocalDimmingAMD( this VulkanHandleWrapper handle, VkSwapchainKHR swapChain, Brutal.Bool32 localDimmingEnable ) { handle.PInvoke.vkSetLocalDimmingAMD.Invoke(handle.Handle, swapChain, localDimmingEnable); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkDeviceAddress GetBufferDeviceAddressEXT( this VulkanHandleWrapper handle, in VkBufferDeviceAddressInfo pInfo ) { fixed (VkBufferDeviceAddressInfo* pInfoFixed = &pInfo) { return handle.PInvoke.vkGetBufferDeviceAddressEXT.Invoke(handle.Handle, pInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetLineStippleEXT(this T handle, int lineStippleFactor, ushort lineStipplePattern) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetLineStippleEXT.Invoke(handle.Handle, lineStippleFactor, lineStipplePattern); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ResetQueryPoolEXT( this VulkanHandleWrapper handle, VkQueryPool queryPool, int firstQuery, int queryCount ) { handle.PInvoke.vkResetQueryPoolEXT.Invoke(handle.Handle, queryPool, firstQuery, queryCount); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetCullModeEXT(this T handle, VkCullModeFlags cullMode) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetCullModeEXT.Invoke(handle.Handle, cullMode); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetFrontFaceEXT(this T handle, VkFrontFace frontFace) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetFrontFaceEXT.Invoke(handle.Handle, frontFace); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetPrimitiveTopologyEXT(this T handle, VkPrimitiveTopology primitiveTopology) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetPrimitiveTopologyEXT.Invoke(handle.Handle, primitiveTopology); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetViewportWithCountEXT(this T handle, int viewportCount, VkViewport* pViewports) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetViewportWithCountEXT.Invoke(handle.Handle, viewportCount, pViewports); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetScissorWithCountEXT(this T handle, int scissorCount, VkRect2D* pScissors) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetScissorWithCountEXT.Invoke(handle.Handle, scissorCount, pScissors); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindVertexBuffers2EXT( this T handle, int firstBinding, int bindingCount, VkBuffer* pBuffers, ByteSize64* pOffsets, ByteSize64* pSizes, ByteSize64* pStrides ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdBindVertexBuffers2EXT.Invoke( handle.Handle, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides ); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDepthTestEnableEXT(this T handle, Brutal.Bool32 depthTestEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDepthTestEnableEXT.Invoke(handle.Handle, depthTestEnable); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDepthWriteEnableEXT(this T handle, Brutal.Bool32 depthWriteEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDepthWriteEnableEXT.Invoke(handle.Handle, depthWriteEnable); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDepthCompareOpEXT(this T handle, VkCompareOp depthCompareOp) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDepthCompareOpEXT.Invoke(handle.Handle, depthCompareOp); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDepthBoundsTestEnableEXT(this T handle, Brutal.Bool32 depthBoundsTestEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDepthBoundsTestEnableEXT.Invoke(handle.Handle, depthBoundsTestEnable); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetStencilTestEnableEXT(this T handle, Brutal.Bool32 stencilTestEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetStencilTestEnableEXT.Invoke(handle.Handle, stencilTestEnable); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetStencilOpEXT( this T handle, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetStencilOpEXT.Invoke(handle.Handle, faceMask, failOp, passOp, depthFailOp, compareOp); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CopyMemoryToImageEXT( this VulkanHandleWrapper handle, in VkCopyMemoryToImageInfo pCopyMemoryToImageInfo ) { fixed (VkCopyMemoryToImageInfo* pCopyMemoryToImageInfoFixed = &pCopyMemoryToImageInfo) { return handle.PInvoke.vkCopyMemoryToImageEXT.Invoke(handle.Handle, pCopyMemoryToImageInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CopyImageToMemoryEXT( this VulkanHandleWrapper handle, in VkCopyImageToMemoryInfo pCopyImageToMemoryInfo ) { fixed (VkCopyImageToMemoryInfo* pCopyImageToMemoryInfoFixed = &pCopyImageToMemoryInfo) { return handle.PInvoke.vkCopyImageToMemoryEXT.Invoke(handle.Handle, pCopyImageToMemoryInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CopyImageToImageEXT( this VulkanHandleWrapper handle, in VkCopyImageToImageInfo pCopyImageToImageInfo ) { fixed (VkCopyImageToImageInfo* pCopyImageToImageInfoFixed = &pCopyImageToImageInfo) { return handle.PInvoke.vkCopyImageToImageEXT.Invoke(handle.Handle, pCopyImageToImageInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult TransitionImageLayoutEXT( this VulkanHandleWrapper handle, int transitionCount, VkHostImageLayoutTransitionInfo* pTransitions ) { return handle.PInvoke.vkTransitionImageLayoutEXT.Invoke(handle.Handle, transitionCount, pTransitions); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetImageSubresourceLayout2EXT( this VulkanHandleWrapper handle, VkImage image, VkImageSubresource2* pSubresource, ref VkSubresourceLayout2 pLayout ) { fixed (VkSubresourceLayout2* pLayoutFixed = &pLayout) { handle.PInvoke.vkGetImageSubresourceLayout2EXT.Invoke(handle.Handle, image, pSubresource, pLayoutFixed); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkSubresourceLayout2. public static unsafe VkSubresourceLayout2 GetImageSubresourceLayout2EXT( this VulkanHandleWrapper handle, VkImage image, VkImageSubresource2* pSubresource ) { VkSubresourceLayout2 outValue = new(); GetImageSubresourceLayout2EXT(handle, image, pSubresource, ref outValue); return outValue; } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult ReleaseSwapchainImagesEXT( this VulkanHandleWrapper handle, in VkReleaseSwapchainImagesInfoKHR pReleaseInfo ) { fixed (VkReleaseSwapchainImagesInfoKHR* pReleaseInfoFixed = &pReleaseInfo) { return handle.PInvoke.vkReleaseSwapchainImagesEXT.Invoke(handle.Handle, pReleaseInfoFixed); } } /// /// vkGetGeneratedCommandsMemoryRequirementsNV - Retrieve the buffer allocation requirements for generated commands /// /// /// /// With `VK_NV_device_generated_commands`, to retrieve the memory size /// and alignment requirements of a particular execution state call: /// /// /// // Provided by VK_NV_device_generated_commands /// void vkGetGeneratedCommandsMemoryRequirementsNV( /// VkDevice device, /// const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, /// VkMemoryRequirements2* pMemoryRequirements); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetGeneratedCommandsMemoryRequirementsNV( this VulkanHandleWrapper handle, in VkGeneratedCommandsMemoryRequirementsInfoNV pInfo, ref VkMemoryRequirements2 pMemoryRequirements ) { fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) fixed (VkGeneratedCommandsMemoryRequirementsInfoNV* pInfoFixed = &pInfo) { handle.PInvoke.vkGetGeneratedCommandsMemoryRequirementsNV.Invoke( handle.Handle, pInfoFixed, pMemoryRequirementsFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryRequirements2. public static VkMemoryRequirements2 GetGeneratedCommandsMemoryRequirementsNV( this VulkanHandleWrapper handle, in VkGeneratedCommandsMemoryRequirementsInfoNV pInfo ) { VkMemoryRequirements2 outValue = new(); GetGeneratedCommandsMemoryRequirementsNV(handle, pInfo, ref outValue); return outValue; } /// /// vkCmdPreprocessGeneratedCommandsNV - Performs preprocessing for generated commands /// /// /// /// Commands can be preprocessed prior execution using the following command: /// /// /// // Provided by VK_NV_device_generated_commands /// void vkCmdPreprocessGeneratedCommandsNV( /// VkCommandBuffer commandBuffer, /// const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void PreprocessGeneratedCommandsNV( this T handle, in VkGeneratedCommandsInfoNV pGeneratedCommandsInfo ) where T : VulkanHandleWrapper { fixed (VkGeneratedCommandsInfoNV* pGeneratedCommandsInfoFixed = &pGeneratedCommandsInfo) { handle.PInvoke.vkCmdPreprocessGeneratedCommandsNV.Invoke(handle.Handle, pGeneratedCommandsInfoFixed); } } /// /// vkCmdExecuteGeneratedCommandsNV - Generate and execute commands on the device /// /// /// /// :refpage: vkCmdExecuteGeneratedCommandsNV /// /// /// With `VK_NV_device_generated_commands`, the actual generation of /// commands as well as their execution on the device is handled as single /// action with: /// /// /// // Provided by VK_NV_device_generated_commands /// void vkCmdExecuteGeneratedCommandsNV( /// VkCommandBuffer commandBuffer, /// VkBool32 isPreprocessed, /// const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void ExecuteGeneratedCommandsNV( this T handle, Brutal.Bool32 isPreprocessed, in VkGeneratedCommandsInfoNV pGeneratedCommandsInfo ) where T : VulkanHandleWrapper { fixed (VkGeneratedCommandsInfoNV* pGeneratedCommandsInfoFixed = &pGeneratedCommandsInfo) { handle.PInvoke.vkCmdExecuteGeneratedCommandsNV.Invoke( handle.Handle, isPreprocessed, pGeneratedCommandsInfoFixed ); } } /// /// vkCmdBindPipelineShaderGroupNV - Bind a pipeline object /// /// /// /// For pipelines that were created with the support of multiple shader groups /// (see Graphics Pipeline Shader Groups^), the regular /// vkCmdBindPipeline command will bind Shader Group `0`. /// To explicitly bind a shader group use: /// /// /// // Provided by VK_NV_device_generated_commands /// void vkCmdBindPipelineShaderGroupNV( /// VkCommandBuffer commandBuffer, /// VkPipelineBindPoint pipelineBindPoint, /// VkPipeline pipeline, /// uint32_t groupIndex); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void BindPipelineShaderGroupNV( this T handle, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, int groupIndex ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdBindPipelineShaderGroupNV.Invoke( handle.Handle, pipelineBindPoint, pipeline, groupIndex ); } /// /// vkCreateIndirectCommandsLayoutNV - Create an indirect command layout object /// /// /// /// Indirect command layouts for `VK_NV_device_generated_commands` are /// created by: /// /// /// // Provided by VK_NV_device_generated_commands /// VkResult vkCreateIndirectCommandsLayoutNV( /// VkDevice device, /// const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkIndirectCommandsLayoutNV* pIndirectCommandsLayout); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkIndirectCommandsLayoutNV CreateIndirectCommandsLayoutNV( this VulkanHandleWrapper handle, in VkIndirectCommandsLayoutCreateInfoNV pCreateInfo, VkAllocator? pAllocator ) { fixed (VkIndirectCommandsLayoutCreateInfoNV* pCreateInfoFixed = &pCreateInfo) { VkIndirectCommandsLayoutNV pIndirectCommandsLayoutLocal = default; VkResult result = handle.PInvoke.vkCreateIndirectCommandsLayoutNV.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pIndirectCommandsLayoutLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateIndirectCommandsLayoutNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateIndirectCommandsLayoutNV failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateIndirectCommandsLayoutNV failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateIndirectCommandsLayoutNV failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pIndirectCommandsLayoutLocal; } } /// /// vkDestroyIndirectCommandsLayoutNV - Destroy an indirect commands layout /// /// /// /// Indirect command layouts for `VK_NV_device_generated_commands` are /// destroyed by: /// /// /// // Provided by VK_NV_device_generated_commands /// void vkDestroyIndirectCommandsLayoutNV( /// VkDevice device, /// VkIndirectCommandsLayoutNV indirectCommandsLayout, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyIndirectCommandsLayoutNV( this VulkanHandleWrapper handle, VkIndirectCommandsLayoutNV indirectCommandsLayout, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyIndirectCommandsLayoutNV.Invoke(handle.Handle, indirectCommandsLayout, pAllocator); } /// /// vkCmdSetDepthBias2EXT - Set depth bias factors and clamp dynamically for a command buffer /// /// /// /// To dynamically set^ the depth bias parameters, /// call: /// /// /// // Provided by VK_EXT_depth_bias_control /// void vkCmdSetDepthBias2EXT( /// VkCommandBuffer commandBuffer, /// const VkDepthBiasInfoEXT* pDepthBiasInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetDepthBias2EXT(this T handle, in VkDepthBiasInfoEXT pDepthBiasInfo) where T : VulkanHandleWrapper { fixed (VkDepthBiasInfoEXT* pDepthBiasInfoFixed = &pDepthBiasInfo) { handle.PInvoke.vkCmdSetDepthBias2EXT.Invoke(handle.Handle, pDepthBiasInfoFixed); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CreatePrivateDataSlotEXT( this VulkanHandleWrapper handle, in VkPrivateDataSlotCreateInfo pCreateInfo, VkAllocator? pAllocator, VkPrivateDataSlot* pPrivateDataSlot ) { fixed (VkPrivateDataSlotCreateInfo* pCreateInfoFixed = &pCreateInfo) { return handle.PInvoke.vkCreatePrivateDataSlotEXT.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, pPrivateDataSlot ); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyPrivateDataSlotEXT( this VulkanHandleWrapper handle, VkPrivateDataSlot privateDataSlot, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyPrivateDataSlotEXT.Invoke(handle.Handle, privateDataSlot, pAllocator); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static VkResult SetPrivateDataEXT( this VulkanHandleWrapper handle, VkObjectType objectType, nint objectHandle, VkPrivateDataSlot privateDataSlot, nint data ) { return handle.PInvoke.vkSetPrivateDataEXT.Invoke( handle.Handle, objectType, objectHandle, privateDataSlot, data ); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe nint GetPrivateDataEXT( this VulkanHandleWrapper handle, VkObjectType objectType, nint objectHandle, VkPrivateDataSlot privateDataSlot ) { nint pDataLocal = default; handle.PInvoke.vkGetPrivateDataEXT.Invoke( handle.Handle, objectType, objectHandle, privateDataSlot, &pDataLocal ); return pDataLocal; } /// /// vkQueueSetPerfHintQCOM - Set a performance hint on a queue /// /// /// /// To set a performance hint on a VkQueue object, call: /// /// /// // Provided by VK_QCOM_queue_perf_hint /// VkResult vkQueueSetPerfHintQCOM( /// VkQueue queue, /// const VkPerfHintInfoQCOM* pPerfHintInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetPerfHintQCOM( this VulkanHandleWrapper handle, in VkPerfHintInfoQCOM pPerfHintInfo ) { fixed (VkPerfHintInfoQCOM* pPerfHintInfoFixed = &pPerfHintInfo) { VkResult result = handle.PInvoke.vkQueueSetPerfHintQCOM.Invoke(handle.Handle, pPerfHintInfoFixed); switch (result) { case VkResult.ErrorDeviceLost: throw new VkResultError( VkResult.ErrorDeviceLost, "Vulkan call to vkQueueSetPerfHintQCOM failed with error: VK_ERROR_DEVICE_LOST" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkQueueSetPerfHintQCOM failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkQueueSetPerfHintQCOM failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCmdDispatchTileQCOM - Dispatch per-tile work items /// /// /// /// :refpage: vkCmdDispatchTileQCOM /// /// /// To record an area-based dispatch, call: /// /// /// // Provided by VK_QCOM_tile_shading /// void vkCmdDispatchTileQCOM( /// VkCommandBuffer commandBuffer, /// const VkDispatchTileInfoQCOM* pDispatchTileInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DispatchTileQCOM(this T handle, in VkDispatchTileInfoQCOM pDispatchTileInfo) where T : VulkanHandleWrapper { fixed (VkDispatchTileInfoQCOM* pDispatchTileInfoFixed = &pDispatchTileInfo) { handle.PInvoke.vkCmdDispatchTileQCOM.Invoke(handle.Handle, pDispatchTileInfoFixed); } } /// /// vkCmdBeginPerTileExecutionQCOM - Begin per-tile execution mode /// /// /// /// :refpage: vkCmdBeginPerTileExecutionQCOM /// /// /// To enable the per-tile execution model, call: /// /// /// // Provided by VK_QCOM_tile_shading /// void vkCmdBeginPerTileExecutionQCOM( /// VkCommandBuffer commandBuffer, /// const VkPerTileBeginInfoQCOM* pPerTileBeginInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BeginPerTileExecutionQCOM( this T handle, in VkPerTileBeginInfoQCOM pPerTileBeginInfo ) where T : VulkanHandleWrapper { fixed (VkPerTileBeginInfoQCOM* pPerTileBeginInfoFixed = &pPerTileBeginInfo) { handle.PInvoke.vkCmdBeginPerTileExecutionQCOM.Invoke(handle.Handle, pPerTileBeginInfoFixed); } } /// /// vkCmdEndPerTileExecutionQCOM - End per-tile execution mode /// /// /// /// :refpage: vkCmdEndPerTileExecutionQCOM /// /// /// To disable per-tile execution model, call: /// /// /// // Provided by VK_QCOM_tile_shading /// void vkCmdEndPerTileExecutionQCOM( /// VkCommandBuffer commandBuffer, /// const VkPerTileEndInfoQCOM* pPerTileEndInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void EndPerTileExecutionQCOM(this T handle, in VkPerTileEndInfoQCOM pPerTileEndInfo) where T : VulkanHandleWrapper { fixed (VkPerTileEndInfoQCOM* pPerTileEndInfoFixed = &pPerTileEndInfo) { handle.PInvoke.vkCmdEndPerTileExecutionQCOM.Invoke(handle.Handle, pPerTileEndInfoFixed); } } /// /// vkSetLatencySleepModeLegacyNV - Stub description of vkSetLatencySleepModeLegacyNV /// /// /// /// This is an undocumented legacy function and is superseded by the /// VK_NV_low_latency2 extension. /// /// /// // Provided by VK_NV_low_latency /// void vkSetLatencySleepModeLegacyNV( /// VkDevice device, /// VkBool32 lowLatencyMode, /// VkBool32 lowLatencyBoost, /// uint32_t minimumIntervalUs); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetLatencySleepModeLegacyNV( this VulkanHandleWrapper handle, Brutal.Bool32 lowLatencyMode, Brutal.Bool32 lowLatencyBoost, int minimumIntervalUs ) { handle.PInvoke.vkSetLatencySleepModeLegacyNV.Invoke( handle.Handle, lowLatencyMode, lowLatencyBoost, minimumIntervalUs ); } /// /// vkLatencySleepLegacyNV - Stub description of vkLatencySleepLegacyNV /// /// /// /// This is an undocumented legacy function and is superseded by the /// VK_NV_low_latency2 extension. /// /// /// // Provided by VK_NV_low_latency /// void vkLatencySleepLegacyNV( /// VkDevice device, /// VkSemaphore signalSemaphore, /// uint64_t value); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void LatencySleepLegacyNV( this VulkanHandleWrapper handle, VkSemaphore signalSemaphore, nint value ) { handle.PInvoke.vkLatencySleepLegacyNV.Invoke(handle.Handle, signalSemaphore, value); } /// /// vkSetLatencyMarkerLegacyNV - Stub description of vkSetLatencyMarkerLegacyNV /// /// /// /// This is an undocumented legacy function and is superseded by the /// VK_NV_low_latency2 extension. /// /// /// // Provided by VK_NV_low_latency /// void vkSetLatencyMarkerLegacyNV( /// VkDevice device, /// uint64_t frameID, /// uint32_t marker); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetLatencyMarkerLegacyNV( this VulkanHandleWrapper handle, nint frameID, int marker ) { handle.PInvoke.vkSetLatencyMarkerLegacyNV.Invoke(handle.Handle, frameID, marker); } /// /// vkGetLatencyTimingsLegacyNV - Stub description of vkGetLatencyTimingsLegacyNV /// /// /// /// This is an undocumented legacy function and is superseded by the /// VK_NV_low_latency2 extension. /// /// /// // Provided by VK_NV_low_latency /// void vkGetLatencyTimingsLegacyNV( /// VkDevice device, /// void* pTimings); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void* GetLatencyTimingsLegacyNV( this VulkanHandleWrapper handle ) { void* pTimingsLocal = default; handle.PInvoke.vkGetLatencyTimingsLegacyNV.Invoke(handle.Handle, pTimingsLocal); return pTimingsLocal; } /// /// vkQueueNotifyOutOfBandLegacyNV - Stub description of vkQueueNotifyOutOfBandLegacyNV /// /// /// /// This is an undocumented legacy function and is superseded by the /// VK_NV_low_latency2 extension. /// /// /// // Provided by VK_NV_low_latency /// void vkQueueNotifyOutOfBandLegacyNV( /// VkQueue queue, /// uint32_t queueType); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void NotifyOutOfBandLegacyNV( this VulkanHandleWrapper handle, int queueType ) { handle.PInvoke.vkQueueNotifyOutOfBandLegacyNV.Invoke(handle.Handle, queueType); } /// /// vkGetSleepStatusLegacyNV - Stub description of vkGetSleepStatusLegacyNV /// /// /// /// This is an undocumented legacy function and is superseded by the /// VK_NV_low_latency2 extension. /// /// /// // Provided by VK_NV_low_latency /// void vkGetSleepStatusLegacyNV( /// VkDevice device, /// VkBool32* pLowLatencyMode); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe Brutal.Bool32 GetSleepStatusLegacyNV( this VulkanHandleWrapper handle ) { Brutal.Bool32 pLowLatencyModeLocal = default; handle.PInvoke.vkGetSleepStatusLegacyNV.Invoke(handle.Handle, &pLowLatencyModeLocal); return pLowLatencyModeLocal; } /// /// vkShutdownLatencyDeviceLegacyNV - Stub description of vkShutdownLatencyDeviceLegacyNV /// /// /// /// This is an undocumented legacy function and is superseded by the /// VK_NV_low_latency2 extension. /// /// /// // Provided by VK_NV_low_latency /// void vkShutdownLatencyDeviceLegacyNV( /// VkDevice device); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ShutdownLatencyDeviceLegacyNV( this VulkanHandleWrapper handle ) { handle.PInvoke.vkShutdownLatencyDeviceLegacyNV.Invoke(handle.Handle); } /// /// vkGetDescriptorSetLayoutSizeEXT - Get the size of a descriptor set layout in memory /// /// /// /// To determine the amount of memory needed to store all descriptors with a /// given layout, call: /// /// /// // Provided by VK_EXT_descriptor_buffer /// void vkGetDescriptorSetLayoutSizeEXT( /// VkDevice device, /// VkDescriptorSetLayout layout, /// VkDeviceSize* pLayoutSizeInBytes); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe ByteSize64 GetDescriptorSetLayoutSizeEXT( this VulkanHandleWrapper handle, VkDescriptorSetLayout layout ) { ByteSize64 pLayoutSizeInBytesLocal = default; handle.PInvoke.vkGetDescriptorSetLayoutSizeEXT.Invoke(handle.Handle, layout, &pLayoutSizeInBytesLocal); return pLayoutSizeInBytesLocal; } /// /// vkGetDescriptorSetLayoutBindingOffsetEXT - Get the offset of a binding within a descriptor set layout /// /// /// /// To get the offset of a binding within a descriptor set layout in memory, /// call: /// /// /// // Provided by VK_EXT_descriptor_buffer /// void vkGetDescriptorSetLayoutBindingOffsetEXT( /// VkDevice device, /// VkDescriptorSetLayout layout, /// uint32_t binding, /// VkDeviceSize* pOffset); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe ByteSize64 GetDescriptorSetLayoutBindingOffsetEXT( this VulkanHandleWrapper handle, VkDescriptorSetLayout layout, int binding ) { ByteSize64 pOffsetLocal = default; handle.PInvoke.vkGetDescriptorSetLayoutBindingOffsetEXT.Invoke( handle.Handle, layout, binding, &pOffsetLocal ); return pOffsetLocal; } /// /// vkGetDescriptorEXT - To get a descriptor to place in a buffer /// /// /// /// To get descriptor data to place in a buffer, call: /// /// /// // Provided by VK_EXT_descriptor_buffer /// void vkGetDescriptorEXT( /// VkDevice device, /// const VkDescriptorGetInfoEXT* pDescriptorInfo, /// size_t dataSize, /// void* pDescriptor); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetDescriptorEXT( this VulkanHandleWrapper handle, in VkDescriptorGetInfoEXT pDescriptorInfo, scoped ReadOnlySpan pDescriptor ) { fixed (byte* pDescriptorFixed = pDescriptor) fixed (VkDescriptorGetInfoEXT* pDescriptorInfoFixed = &pDescriptorInfo) { handle.PInvoke.vkGetDescriptorEXT.Invoke( handle.Handle, pDescriptorInfoFixed, (nuint)pDescriptor.Length, pDescriptorFixed ); } } /// /// vkCmdBindDescriptorBuffersEXT - Binding descriptor buffers to a command buffer /// /// /// /// :refpage: vkCmdBindDescriptorBuffersEXT /// /// /// To bind descriptor buffers to a command buffer, call: /// /// /// // Provided by VK_EXT_descriptor_buffer /// void vkCmdBindDescriptorBuffersEXT( /// VkCommandBuffer commandBuffer, /// uint32_t bufferCount, /// const VkDescriptorBufferBindingInfoEXT* pBindingInfos); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindDescriptorBuffersEXT( this T handle, scoped ReadOnlySpan pBindingInfos ) where T : VulkanHandleWrapper { fixed (VkDescriptorBufferBindingInfoEXT* pBindingInfosFixed = pBindingInfos) { handle.PInvoke.vkCmdBindDescriptorBuffersEXT.Invoke( handle.Handle, pBindingInfos.Length, pBindingInfosFixed ); } } /// /// vkCmdSetDescriptorBufferOffsetsEXT - Setting descriptor buffer offsets in a command buffer /// /// /// /// :refpage: vkCmdSetDescriptorBufferOffsetsEXT /// /// /// To set descriptor buffer offsets in a command buffer, call: /// /// /// // Provided by VK_EXT_descriptor_buffer /// void vkCmdSetDescriptorBufferOffsetsEXT( /// VkCommandBuffer commandBuffer, /// VkPipelineBindPoint pipelineBindPoint, /// VkPipelineLayout layout, /// uint32_t firstSet, /// uint32_t setCount, /// const uint32_t* pBufferIndices, /// const VkDeviceSize* pOffsets); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetDescriptorBufferOffsetsEXT( this T handle, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, int firstSet, scoped ReadOnlySpan pBufferIndices, scoped ReadOnlySpan pOffsets ) where T : VulkanHandleWrapper { fixed (ByteSize64* pOffsetsFixed = pOffsets) fixed (int* pBufferIndicesFixed = pBufferIndices) { handle.PInvoke.vkCmdSetDescriptorBufferOffsetsEXT.Invoke( handle.Handle, pipelineBindPoint, layout, firstSet, pBufferIndices.Length, pBufferIndicesFixed, pOffsetsFixed ); } } /// /// vkCmdBindDescriptorBufferEmbeddedSamplersEXT - Setting embedded immutable samplers offsets in a command buffer /// /// /// /// :refpage: vkCmdBindDescriptorBufferEmbeddedSamplersEXT /// /// /// To bind an embedded immutable sampler set to a command buffer, call: /// /// /// // Provided by VK_EXT_descriptor_buffer /// void vkCmdBindDescriptorBufferEmbeddedSamplersEXT( /// VkCommandBuffer commandBuffer, /// VkPipelineBindPoint pipelineBindPoint, /// VkPipelineLayout layout, /// uint32_t set); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void BindDescriptorBufferEmbeddedSamplersEXT( this T handle, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, int set ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdBindDescriptorBufferEmbeddedSamplersEXT.Invoke( handle.Handle, pipelineBindPoint, layout, set ); } /// /// vkGetBufferOpaqueCaptureDescriptorDataEXT - Get buffer opaque capture descriptor data /// /// /// /// To get the opaque descriptor data for a buffer, call: /// /// /// // Provided by VK_EXT_descriptor_buffer /// VkResult vkGetBufferOpaqueCaptureDescriptorDataEXT( /// VkDevice device, /// const VkBufferCaptureDescriptorDataInfoEXT* pInfo, /// void* pData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void* GetBufferOpaqueCaptureDescriptorDataEXT( this VulkanHandleWrapper handle, in VkBufferCaptureDescriptorDataInfoEXT pInfo ) { fixed (VkBufferCaptureDescriptorDataInfoEXT* pInfoFixed = &pInfo) { void* pDataLocal = default; VkResult result = handle.PInvoke.vkGetBufferOpaqueCaptureDescriptorDataEXT.Invoke( handle.Handle, pInfoFixed, pDataLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetBufferOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetBufferOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetBufferOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetBufferOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pDataLocal; } } /// /// vkGetImageOpaqueCaptureDescriptorDataEXT - Get image opaque capture descriptor data /// /// /// /// To get the opaque capture descriptor data for an image, call: /// /// /// // Provided by VK_EXT_descriptor_buffer /// VkResult vkGetImageOpaqueCaptureDescriptorDataEXT( /// VkDevice device, /// const VkImageCaptureDescriptorDataInfoEXT* pInfo, /// void* pData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void* GetImageOpaqueCaptureDescriptorDataEXT( this VulkanHandleWrapper handle, in VkImageCaptureDescriptorDataInfoEXT pInfo ) { fixed (VkImageCaptureDescriptorDataInfoEXT* pInfoFixed = &pInfo) { void* pDataLocal = default; VkResult result = handle.PInvoke.vkGetImageOpaqueCaptureDescriptorDataEXT.Invoke( handle.Handle, pInfoFixed, pDataLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetImageOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetImageOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetImageOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetImageOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pDataLocal; } } /// /// vkGetImageViewOpaqueCaptureDescriptorDataEXT - Get image view opaque capture descriptor data /// /// /// /// To get the opaque capture descriptor data for an image view, call: /// /// /// // Provided by VK_EXT_descriptor_buffer /// VkResult vkGetImageViewOpaqueCaptureDescriptorDataEXT( /// VkDevice device, /// const VkImageViewCaptureDescriptorDataInfoEXT* pInfo, /// void* pData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void* GetImageViewOpaqueCaptureDescriptorDataEXT( this VulkanHandleWrapper handle, in VkImageViewCaptureDescriptorDataInfoEXT pInfo ) { fixed (VkImageViewCaptureDescriptorDataInfoEXT* pInfoFixed = &pInfo) { void* pDataLocal = default; VkResult result = handle.PInvoke.vkGetImageViewOpaqueCaptureDescriptorDataEXT.Invoke( handle.Handle, pInfoFixed, pDataLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetImageViewOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetImageViewOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetImageViewOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetImageViewOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pDataLocal; } } /// /// vkGetSamplerOpaqueCaptureDescriptorDataEXT - Get sampler opaque capture descriptor data /// /// /// /// To get the opaque capture descriptor data for a sampler, call: /// /// /// // Provided by VK_EXT_descriptor_buffer /// VkResult vkGetSamplerOpaqueCaptureDescriptorDataEXT( /// VkDevice device, /// const VkSamplerCaptureDescriptorDataInfoEXT* pInfo, /// void* pData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void* GetSamplerOpaqueCaptureDescriptorDataEXT( this VulkanHandleWrapper handle, in VkSamplerCaptureDescriptorDataInfoEXT pInfo ) { fixed (VkSamplerCaptureDescriptorDataInfoEXT* pInfoFixed = &pInfo) { void* pDataLocal = default; VkResult result = handle.PInvoke.vkGetSamplerOpaqueCaptureDescriptorDataEXT.Invoke( handle.Handle, pInfoFixed, pDataLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetSamplerOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetSamplerOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetSamplerOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetSamplerOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pDataLocal; } } /// /// vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT - Get acceleration structure opaque capture descriptor data /// /// /// /// To get the opaque capture descriptor data for an acceleration structure, /// call: /// /// /// // Provided by VK_EXT_descriptor_buffer with VK_KHR_acceleration_structure or VK_NV_ray_tracing /// VkResult vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( /// VkDevice device, /// const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, /// void* pData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void* GetAccelerationStructureOpaqueCaptureDescriptorDataEXT( this VulkanHandleWrapper handle, in VkAccelerationStructureCaptureDescriptorDataInfoEXT pInfo ) { fixed (VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfoFixed = &pInfo) { void* pDataLocal = default; VkResult result = handle.PInvoke.vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT.Invoke( handle.Handle, pInfoFixed, pDataLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pDataLocal; } } /// /// vkCmdSetFragmentShadingRateEnumNV - Set pipeline fragment shading rate dynamically for a command buffer using enums /// /// /// /// To dynamically set^ the pipeline fragment /// shading rate and combiner operation, call: /// /// /// // Provided by VK_NV_fragment_shading_rate_enums /// void vkCmdSetFragmentShadingRateEnumNV( /// VkCommandBuffer commandBuffer, /// VkFragmentShadingRateNV shadingRate, /// const VkFragmentShadingRateCombinerOpKHR combinerOps[2]); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetFragmentShadingRateEnumNV( this T handle, VkFragmentShadingRateNV shadingRate, VkFragmentShadingRateCombinerOpKHR* combinerOps ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetFragmentShadingRateEnumNV.Invoke(handle.Handle, shadingRate, combinerOps); } /// /// vkGetDeviceFaultInfoEXT - Reports fault information for the specified device /// /// /// /// To retrieve diagnostic information about faults that may: have caused device /// loss, call: /// /// /// // Provided by VK_EXT_device_fault /// VkResult vkGetDeviceFaultInfoEXT( /// VkDevice device, /// VkDeviceFaultCountsEXT* pFaultCounts, /// VkDeviceFaultInfoEXT* pFaultInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult GetFaultInfoEXT( this VulkanHandleWrapper handle, VkDeviceFaultCountsEXT* pFaultCounts, in VkDeviceFaultInfoEXT pFaultInfo ) { fixed (VkDeviceFaultInfoEXT* pFaultInfoFixed = &pFaultInfo) { VkResult result = handle.PInvoke.vkGetDeviceFaultInfoEXT.Invoke( handle.Handle, pFaultCounts, pFaultInfoFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetDeviceFaultInfoEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetDeviceFaultInfoEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetDeviceFaultInfoEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// /// vkCmdSetVertexInputEXT - Set the vertex input state dynamically for a command buffer /// /// /// /// To dynamically set^ the vertex input attribute /// and vertex input binding descriptions, call: /// /// /// // Provided by VK_EXT_shader_object, VK_EXT_vertex_input_dynamic_state /// void vkCmdSetVertexInputEXT( /// VkCommandBuffer commandBuffer, /// uint32_t vertexBindingDescriptionCount, /// const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, /// uint32_t vertexAttributeDescriptionCount, /// const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetVertexInputEXT( this T handle, scoped ReadOnlySpan pVertexBindingDescriptions, scoped ReadOnlySpan pVertexAttributeDescriptions ) where T : VulkanHandleWrapper { fixed ( VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptionsFixed = pVertexAttributeDescriptions ) fixed (VkVertexInputBindingDescription2EXT* pVertexBindingDescriptionsFixed = pVertexBindingDescriptions) { handle.PInvoke.vkCmdSetVertexInputEXT.Invoke( handle.Handle, pVertexBindingDescriptions.Length, pVertexBindingDescriptionsFixed, pVertexAttributeDescriptions.Length, pVertexAttributeDescriptionsFixed ); } } /// /// vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI - Query maximum supported subpass shading workgroup size for a give render pass /// /// /// /// A subpass shading pipeline's workgroup size is a 2D vector with number of /// power-of-two in width and height. /// The maximum number of width and height is implementation-dependent, and may: /// vary for different formats and sample counts of attachments in a render /// pass. /// /// /// To query the maximum workgroup size, call: /// /// /// // Provided by VK_HUAWEI_subpass_shading /// VkResult vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI( /// VkDevice device, /// VkRenderPass renderpass, /// VkExtent2D* pMaxWorkgroupSize); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetSubpassShadingMaxWorkgroupSizeHUAWEI( this VulkanHandleWrapper handle, VkRenderPass renderpass, scoped ReadOnlySpan pMaxWorkgroupSize ) { fixed (VkExtent2D* pMaxWorkgroupSizeFixed = pMaxWorkgroupSize) { VkResult result = handle.PInvoke.vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI.Invoke( handle.Handle, renderpass, pMaxWorkgroupSizeFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorSurfaceLostKHR: throw new VkResultError( VkResult.ErrorSurfaceLostKHR, "Vulkan call to vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI failed with error: VK_ERROR_SURFACE_LOST_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCmdSubpassShadingHUAWEI - Dispatch compute work items /// /// /// /// :refpage: vkCmdSubpassShadingHUAWEI /// /// /// A subpass shading dispatches a compute pipeline work with the work dimension /// of render area of the calling subpass and work groups are partitioned by /// specified work group size. /// Subpass operations like subpassLoad are allowed to be used. /// /// /// To record a subpass shading, call: /// /// /// // Provided by VK_HUAWEI_subpass_shading /// void vkCmdSubpassShadingHUAWEI( /// VkCommandBuffer commandBuffer); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SubpassShadingHUAWEI(this T handle) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSubpassShadingHUAWEI.Invoke(handle.Handle); } /// /// vkCmdBindInvocationMaskHUAWEI - Bind an invocation mask image on a command buffer /// /// /// /// When invocation mask image usage is enabled in the bound ray tracing /// pipeline, the pipeline uses an invocation mask image specified by the /// command: /// /// /// // Provided by VK_HUAWEI_invocation_mask /// void vkCmdBindInvocationMaskHUAWEI( /// VkCommandBuffer commandBuffer, /// VkImageView imageView, /// VkImageLayout imageLayout); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void BindInvocationMaskHUAWEI(this T handle, VkImageView imageView, VkImageLayout imageLayout) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdBindInvocationMaskHUAWEI.Invoke(handle.Handle, imageView, imageLayout); } /// /// vkGetMemoryRemoteAddressNV - Get an address for a memory object accessible by remote devices /// /// /// /// To export an address representing the payload of a Vulkan device memory /// object accessible by remote devices, call: /// /// /// // Provided by VK_NV_external_memory_rdma /// VkResult vkGetMemoryRemoteAddressNV( /// VkDevice device, /// const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, /// VkRemoteAddressNV* pAddress); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkRemoteAddressNV GetMemoryRemoteAddressNV( this VulkanHandleWrapper handle, in VkMemoryGetRemoteAddressInfoNV pMemoryGetRemoteAddressInfo ) { fixed (VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfoFixed = &pMemoryGetRemoteAddressInfo) { VkRemoteAddressNV pAddressLocal = default; VkResult result = handle.PInvoke.vkGetMemoryRemoteAddressNV.Invoke( handle.Handle, pMemoryGetRemoteAddressInfoFixed, &pAddressLocal ); switch (result) { case VkResult.ErrorInvalidExternalHandle: throw new VkResultError( VkResult.ErrorInvalidExternalHandle, "Vulkan call to vkGetMemoryRemoteAddressNV failed with error: VK_ERROR_INVALID_EXTERNAL_HANDLE" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetMemoryRemoteAddressNV failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetMemoryRemoteAddressNV failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pAddressLocal; } } /// /// vkGetPipelinePropertiesEXT - Query pipeline properties /// /// /// /// To query the pipeline properties call: /// /// /// // Provided by VK_EXT_pipeline_properties /// VkResult vkGetPipelinePropertiesEXT( /// VkDevice device, /// const VkPipelineInfoKHR* pPipelineInfo, /// VkBaseOutStructure* pPipelineProperties); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetPipelinePropertiesEXT( this VulkanHandleWrapper handle, in VkPipelineInfoKHR pPipelineInfo, ref VkBaseOutStructure pPipelineProperties ) { fixed (VkBaseOutStructure* pPipelinePropertiesFixed = &pPipelineProperties) fixed (VkPipelineInfoKHR* pPipelineInfoFixed = &pPipelineInfo) { VkResult result = handle.PInvoke.vkGetPipelinePropertiesEXT.Invoke( handle.Handle, pPipelineInfoFixed, pPipelinePropertiesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetPipelinePropertiesEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetPipelinePropertiesEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetPipelinePropertiesEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkBaseOutStructure. public static VkBaseOutStructure GetPipelinePropertiesEXT( this VulkanHandleWrapper handle, in VkPipelineInfoKHR pPipelineInfo ) { VkBaseOutStructure outValue = new(); GetPipelinePropertiesEXT(handle, pPipelineInfo, ref outValue); return outValue; } /// /// vkCmdSetPatchControlPointsEXT - Specify the number of control points per patch dynamically for a command buffer /// /// /// /// To dynamically set^ the number of control points /// per patch, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state2, VK_EXT_shader_object /// void vkCmdSetPatchControlPointsEXT( /// VkCommandBuffer commandBuffer, /// uint32_t patchControlPoints); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetPatchControlPointsEXT(this T handle, int patchControlPoints) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetPatchControlPointsEXT.Invoke(handle.Handle, patchControlPoints); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetRasterizerDiscardEnableEXT(this T handle, Brutal.Bool32 rasterizerDiscardEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetRasterizerDiscardEnableEXT.Invoke(handle.Handle, rasterizerDiscardEnable); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDepthBiasEnableEXT(this T handle, Brutal.Bool32 depthBiasEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDepthBiasEnableEXT.Invoke(handle.Handle, depthBiasEnable); } /// /// vkCmdSetLogicOpEXT - Select which logical operation to apply for blend state dynamically for a command buffer /// /// /// /// To dynamically set^ the logical operation to /// apply for blend state, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state2, VK_EXT_shader_object /// void vkCmdSetLogicOpEXT( /// VkCommandBuffer commandBuffer, /// VkLogicOp logicOp); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetLogicOpEXT(this T handle, VkLogicOp logicOp) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetLogicOpEXT.Invoke(handle.Handle, logicOp); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetPrimitiveRestartEnableEXT(this T handle, Brutal.Bool32 primitiveRestartEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetPrimitiveRestartEnableEXT.Invoke(handle.Handle, primitiveRestartEnable); } /// /// vkCmdSetColorWriteEnableEXT - Enable or disable writes to a color attachment dynamically for a command buffer /// /// /// /// To dynamically enable or disable^ writes to a /// color attachment, call: /// /// /// // Provided by VK_EXT_color_write_enable /// void vkCmdSetColorWriteEnableEXT( /// VkCommandBuffer commandBuffer, /// uint32_t attachmentCount, /// const VkBool32* pColorWriteEnables); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetColorWriteEnableEXT( this T handle, scoped ReadOnlySpan pColorWriteEnables ) where T : VulkanHandleWrapper { fixed (Brutal.Bool32* pColorWriteEnablesFixed = pColorWriteEnables) { handle.PInvoke.vkCmdSetColorWriteEnableEXT.Invoke( handle.Handle, pColorWriteEnables.Length, pColorWriteEnablesFixed ); } } /// /// vkCmdDrawMultiEXT - Draw primitives /// /// /// /// :refpage: vkCmdDrawMultiEXT /// /// /// To record an ordered sequence of draws which have no state changes between /// them, call: /// /// /// // Provided by VK_EXT_multi_draw /// void vkCmdDrawMultiEXT( /// VkCommandBuffer commandBuffer, /// uint32_t drawCount, /// const VkMultiDrawInfoEXT* pVertexInfo, /// uint32_t instanceCount, /// uint32_t firstInstance, /// uint32_t stride); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DrawMultiEXT( this T handle, scoped ReadOnlySpan pVertexInfo, int instanceCount, int firstInstance, int stride ) where T : VulkanHandleWrapper { fixed (VkMultiDrawInfoEXT* pVertexInfoFixed = pVertexInfo) { handle.PInvoke.vkCmdDrawMultiEXT.Invoke( handle.Handle, pVertexInfo.Length, pVertexInfoFixed, instanceCount, firstInstance, stride ); } } /// /// vkCmdDrawMultiIndexedEXT - Draw primitives /// /// /// /// :refpage: vkCmdDrawMultiIndexedEXT /// /// /// To record an ordered sequence of indexed draws which have no state changes /// between them, call: /// /// /// // Provided by VK_EXT_multi_draw /// void vkCmdDrawMultiIndexedEXT( /// VkCommandBuffer commandBuffer, /// uint32_t drawCount, /// const VkMultiDrawIndexedInfoEXT* pIndexInfo, /// uint32_t instanceCount, /// uint32_t firstInstance, /// uint32_t stride, /// const int32_t* pVertexOffset); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DrawMultiIndexedEXT( this T handle, scoped ReadOnlySpan pIndexInfo, int instanceCount, int firstInstance, int stride, int* pVertexOffset ) where T : VulkanHandleWrapper { fixed (VkMultiDrawIndexedInfoEXT* pIndexInfoFixed = pIndexInfo) { handle.PInvoke.vkCmdDrawMultiIndexedEXT.Invoke( handle.Handle, pIndexInfo.Length, pIndexInfoFixed, instanceCount, firstInstance, stride, pVertexOffset ); } } /// /// vkCreateMicromapEXT - Create a new micromap object /// /// /// /// :refpage: vkCreateMicromapEXT /// /// /// To create a micromap, call: /// /// /// // Provided by VK_EXT_opacity_micromap /// VkResult vkCreateMicromapEXT( /// VkDevice device, /// const VkMicromapCreateInfoEXT* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkMicromapEXT* pMicromap); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkMicromapEXT CreateMicromapEXT( this VulkanHandleWrapper handle, in VkMicromapCreateInfoEXT pCreateInfo, VkAllocator? pAllocator ) { fixed (VkMicromapCreateInfoEXT* pCreateInfoFixed = &pCreateInfo) { VkMicromapEXT pMicromapLocal = default; VkResult result = handle.PInvoke.vkCreateMicromapEXT.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pMicromapLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateMicromapEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: throw new VkResultError( VkResult.ErrorInvalidOpaqueCaptureAddressKHR, "Vulkan call to vkCreateMicromapEXT failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateMicromapEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateMicromapEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pMicromapLocal; } } /// /// vkDestroyMicromapEXT - Destroy a micromap object /// /// /// /// :refpage: vkDestroyMicromapEXT /// /// /// To destroy a micromap, call: /// /// /// // Provided by VK_EXT_opacity_micromap /// void vkDestroyMicromapEXT( /// VkDevice device, /// VkMicromapEXT micromap, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyMicromapEXT( this VulkanHandleWrapper handle, VkMicromapEXT micromap, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyMicromapEXT.Invoke(handle.Handle, micromap, pAllocator); } /// /// vkCmdBuildMicromapsEXT - Build a micromap /// /// /// /// :refpage: vkCmdBuildMicromapsEXT /// /// /// To build micromaps represented as a VkMicromapEXT object call: /// /// /// // Provided by VK_EXT_opacity_micromap /// void vkCmdBuildMicromapsEXT( /// VkCommandBuffer commandBuffer, /// uint32_t infoCount, /// const VkMicromapBuildInfoEXT* pInfos); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BuildMicromapsEXT( this T handle, scoped ReadOnlySpan pInfos ) where T : VulkanHandleWrapper { fixed (VkMicromapBuildInfoEXT* pInfosFixed = pInfos) { handle.PInvoke.vkCmdBuildMicromapsEXT.Invoke(handle.Handle, pInfos.Length, pInfosFixed); } } /// /// vkBuildMicromapsEXT - Build a micromap on the host /// /// /// /// :refpage: vkBuildMicromapsEXT /// /// /// To build VkMicromapEXT on the host, call: /// /// /// // Provided by VK_EXT_opacity_micromap /// VkResult vkBuildMicromapsEXT( /// VkDevice device, /// VkDeferredOperationKHR deferredOperation, /// uint32_t infoCount, /// const VkMicromapBuildInfoEXT* pInfos); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult BuildMicromapsEXT( this VulkanHandleWrapper handle, VkDeferredOperationKHR deferredOperation, scoped ReadOnlySpan pInfos ) { fixed (VkMicromapBuildInfoEXT* pInfosFixed = pInfos) { VkResult result = handle.PInvoke.vkBuildMicromapsEXT.Invoke( handle.Handle, deferredOperation, pInfos.Length, pInfosFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkBuildMicromapsEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkBuildMicromapsEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkBuildMicromapsEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkBuildMicromapsEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.OperationDeferredKHR: case VkResult.OperationNotDeferredKHR: default: break; } return result; } } /// /// vkCopyMicromapEXT - Copy a micromap on the host /// /// /// /// :refpage: vkCopyMicromapEXT /// /// /// To copy or compact a VkMicromapEXT on the host, call: /// /// /// // Provided by VK_EXT_opacity_micromap /// VkResult vkCopyMicromapEXT( /// VkDevice device, /// VkDeferredOperationKHR deferredOperation, /// const VkCopyMicromapInfoEXT* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CopyMicromapEXT( this VulkanHandleWrapper handle, VkDeferredOperationKHR deferredOperation, in VkCopyMicromapInfoEXT pInfo ) { fixed (VkCopyMicromapInfoEXT* pInfoFixed = &pInfo) { VkResult result = handle.PInvoke.vkCopyMicromapEXT.Invoke(handle.Handle, deferredOperation, pInfoFixed); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCopyMicromapEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCopyMicromapEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCopyMicromapEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCopyMicromapEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.OperationDeferredKHR: case VkResult.OperationNotDeferredKHR: default: break; } return result; } } /// /// vkCopyMicromapToMemoryEXT - Serialize a micromap on the host /// /// /// /// :refpage: vkCopyMicromapToMemoryEXT /// /// /// To copy a VkMicromapEXT to host accessible memory, call: /// /// /// // Provided by VK_EXT_opacity_micromap /// VkResult vkCopyMicromapToMemoryEXT( /// VkDevice device, /// VkDeferredOperationKHR deferredOperation, /// const VkCopyMicromapToMemoryInfoEXT* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CopyMicromapToMemoryEXT( this VulkanHandleWrapper handle, VkDeferredOperationKHR deferredOperation, in VkCopyMicromapToMemoryInfoEXT pInfo ) { fixed (VkCopyMicromapToMemoryInfoEXT* pInfoFixed = &pInfo) { VkResult result = handle.PInvoke.vkCopyMicromapToMemoryEXT.Invoke( handle.Handle, deferredOperation, pInfoFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCopyMicromapToMemoryEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCopyMicromapToMemoryEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCopyMicromapToMemoryEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCopyMicromapToMemoryEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.OperationDeferredKHR: case VkResult.OperationNotDeferredKHR: default: break; } return result; } } /// /// vkCopyMemoryToMicromapEXT - Deserialize a micromap on the host /// /// /// /// :refpage: vkCopyMemoryToMicromapEXT /// /// /// To copy host accessible VkMicromapEXT to a micromap, call: /// /// /// // Provided by VK_EXT_opacity_micromap /// VkResult vkCopyMemoryToMicromapEXT( /// VkDevice device, /// VkDeferredOperationKHR deferredOperation, /// const VkCopyMemoryToMicromapInfoEXT* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CopyMemoryToMicromapEXT( this VulkanHandleWrapper handle, VkDeferredOperationKHR deferredOperation, in VkCopyMemoryToMicromapInfoEXT pInfo ) { fixed (VkCopyMemoryToMicromapInfoEXT* pInfoFixed = &pInfo) { VkResult result = handle.PInvoke.vkCopyMemoryToMicromapEXT.Invoke( handle.Handle, deferredOperation, pInfoFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCopyMemoryToMicromapEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCopyMemoryToMicromapEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCopyMemoryToMicromapEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCopyMemoryToMicromapEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.OperationDeferredKHR: case VkResult.OperationNotDeferredKHR: default: break; } return result; } } /// /// vkWriteMicromapsPropertiesEXT - Query micromap meta-data on the host /// /// /// /// :refpage: vkWriteMicromapsPropertiesEXT /// /// /// To query VkMicromapEXT size parameters on the host, call: /// /// /// // Provided by VK_EXT_opacity_micromap /// VkResult vkWriteMicromapsPropertiesEXT( /// VkDevice device, /// uint32_t micromapCount, /// const VkMicromapEXT* pMicromaps, /// VkQueryType queryType, /// size_t dataSize, /// void* pData, /// size_t stride); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void WriteMicromapsPropertiesEXT( this VulkanHandleWrapper handle, scoped ReadOnlySpan pMicromaps, VkQueryType queryType, scoped ReadOnlySpan pData, nuint stride ) { fixed (byte* pDataFixed = pData) fixed (VkMicromapEXT* pMicromapsFixed = pMicromaps) { VkResult result = handle.PInvoke.vkWriteMicromapsPropertiesEXT.Invoke( handle.Handle, pMicromaps.Length, pMicromapsFixed, queryType, (nuint)pData.Length, pDataFixed, stride ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkWriteMicromapsPropertiesEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkWriteMicromapsPropertiesEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkWriteMicromapsPropertiesEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkWriteMicromapsPropertiesEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCmdCopyMicromapEXT - Copy a micromap /// /// /// /// :refpage: vkCmdCopyMicromapEXT /// /// /// To copy a VkMicromapEXT call: /// /// /// // Provided by VK_EXT_opacity_micromap /// void vkCmdCopyMicromapEXT( /// VkCommandBuffer commandBuffer, /// const VkCopyMicromapInfoEXT* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyMicromapEXT(this T handle, in VkCopyMicromapInfoEXT pInfo) where T : VulkanHandleWrapper { fixed (VkCopyMicromapInfoEXT* pInfoFixed = &pInfo) { handle.PInvoke.vkCmdCopyMicromapEXT.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCmdCopyMicromapToMemoryEXT - Copy a micromap to device memory /// /// /// /// :refpage: vkCmdCopyMicromapToMemoryEXT /// /// /// To copy a VkMicromapEXT to device memory call: /// /// /// // Provided by VK_EXT_opacity_micromap /// void vkCmdCopyMicromapToMemoryEXT( /// VkCommandBuffer commandBuffer, /// const VkCopyMicromapToMemoryInfoEXT* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyMicromapToMemoryEXT(this T handle, in VkCopyMicromapToMemoryInfoEXT pInfo) where T : VulkanHandleWrapper { fixed (VkCopyMicromapToMemoryInfoEXT* pInfoFixed = &pInfo) { handle.PInvoke.vkCmdCopyMicromapToMemoryEXT.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCmdCopyMemoryToMicromapEXT - Copy device memory to a micromap /// /// /// /// :refpage: vkCmdCopyMemoryToMicromapEXT /// /// /// To copy device memory to a micromap call: /// /// /// // Provided by VK_EXT_opacity_micromap /// void vkCmdCopyMemoryToMicromapEXT( /// VkCommandBuffer commandBuffer, /// const VkCopyMemoryToMicromapInfoEXT* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyMemoryToMicromapEXT(this T handle, in VkCopyMemoryToMicromapInfoEXT pInfo) where T : VulkanHandleWrapper { fixed (VkCopyMemoryToMicromapInfoEXT* pInfoFixed = &pInfo) { handle.PInvoke.vkCmdCopyMemoryToMicromapEXT.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCmdWriteMicromapsPropertiesEXT - Write micromap result parameters to query results. /// /// /// /// :refpage: vkCmdWriteMicromapsPropertiesEXT /// /// /// To query VkMicromapEXT size parameters call: /// /// /// // Provided by VK_EXT_opacity_micromap /// void vkCmdWriteMicromapsPropertiesEXT( /// VkCommandBuffer commandBuffer, /// uint32_t micromapCount, /// const VkMicromapEXT* pMicromaps, /// VkQueryType queryType, /// VkQueryPool queryPool, /// uint32_t firstQuery); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void WriteMicromapsPropertiesEXT( this T handle, scoped ReadOnlySpan pMicromaps, VkQueryType queryType, VkQueryPool queryPool, int firstQuery ) where T : VulkanHandleWrapper { fixed (VkMicromapEXT* pMicromapsFixed = pMicromaps) { handle.PInvoke.vkCmdWriteMicromapsPropertiesEXT.Invoke( handle.Handle, pMicromaps.Length, pMicromapsFixed, queryType, queryPool, firstQuery ); } } /// /// vkGetDeviceMicromapCompatibilityEXT - Check if a serialized micromap is compatible with the current device /// /// /// /// :refpage: vkGetDeviceMicromapCompatibilityEXT /// /// /// To check if a serialized VkMicromapEXT is compatible with the current /// device call: /// /// /// // Provided by VK_EXT_opacity_micromap /// void vkGetDeviceMicromapCompatibilityEXT( /// VkDevice device, /// const VkMicromapVersionInfoEXT* pVersionInfo, /// VkAccelerationStructureCompatibilityKHR* pCompatibility); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkAccelerationStructureCompatibilityKHR GetMicromapCompatibilityEXT( this VulkanHandleWrapper handle, in VkMicromapVersionInfoEXT pVersionInfo ) { fixed (VkMicromapVersionInfoEXT* pVersionInfoFixed = &pVersionInfo) { VkAccelerationStructureCompatibilityKHR pCompatibilityLocal = default; handle.PInvoke.vkGetDeviceMicromapCompatibilityEXT.Invoke( handle.Handle, pVersionInfoFixed, &pCompatibilityLocal ); return pCompatibilityLocal; } } /// /// vkGetMicromapBuildSizesEXT - Retrieve the required size for a micromap /// /// /// /// :refpage: vkGetMicromapBuildSizesEXT /// /// /// To get the build sizes for a micromap, call: /// /// /// // Provided by VK_EXT_opacity_micromap /// void vkGetMicromapBuildSizesEXT( /// VkDevice device, /// VkAccelerationStructureBuildTypeKHR buildType, /// const VkMicromapBuildInfoEXT* pBuildInfo, /// VkMicromapBuildSizesInfoEXT* pSizeInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetMicromapBuildSizesEXT( this VulkanHandleWrapper handle, VkAccelerationStructureBuildTypeKHR buildType, in VkMicromapBuildInfoEXT pBuildInfo, in VkMicromapBuildSizesInfoEXT pSizeInfo ) { fixed (VkMicromapBuildSizesInfoEXT* pSizeInfoFixed = &pSizeInfo) fixed (VkMicromapBuildInfoEXT* pBuildInfoFixed = &pBuildInfo) { handle.PInvoke.vkGetMicromapBuildSizesEXT.Invoke( handle.Handle, buildType, pBuildInfoFixed, pSizeInfoFixed ); } } /// /// vkCmdDrawClusterHUAWEI - Draw cluster culling work items /// /// /// /// :refpage: vkCmdDrawClusterHUAWEI /// /// /// To record a cluster culling shader drawing command, call: /// /// /// // Provided by VK_HUAWEI_cluster_culling_shader /// void vkCmdDrawClusterHUAWEI( /// VkCommandBuffer commandBuffer, /// uint32_t groupCountX, /// uint32_t groupCountY, /// uint32_t groupCountZ); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawClusterHUAWEI(this T handle, int groupCountX, int groupCountY, int groupCountZ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawClusterHUAWEI.Invoke(handle.Handle, groupCountX, groupCountY, groupCountZ); } /// /// vkCmdDrawClusterIndirectHUAWEI - Issue an indirect cluster culling draw into a command buffer /// /// /// /// :refpage: vkCmdDrawClusterIndirectHUAWEI /// /// /// To record an indirect cluster culling drawing command, call: /// /// /// // Provided by VK_HUAWEI_cluster_culling_shader /// void vkCmdDrawClusterIndirectHUAWEI( /// VkCommandBuffer commandBuffer, /// VkBuffer buffer, /// VkDeviceSize offset); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawClusterIndirectHUAWEI(this T handle, VkBuffer buffer, ByteSize64 offset) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawClusterIndirectHUAWEI.Invoke(handle.Handle, buffer, offset); } /// /// vkSetDeviceMemoryPriorityEXT - Change a memory allocation priority /// /// /// /// To modify the priority of an existing memory allocation, call: /// /// /// // Provided by VK_EXT_pageable_device_local_memory /// void vkSetDeviceMemoryPriorityEXT( /// VkDevice device, /// VkDeviceMemory memory, /// float priority); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDeviceMemoryPriorityEXT( this VulkanHandleWrapper handle, VkDeviceMemory memory, float priority ) { handle.PInvoke.vkSetDeviceMemoryPriorityEXT.Invoke(handle.Handle, memory, priority); } /// /// vkCmdSetDispatchParametersARM - Set parameters that affect dispatch commands /// /// /// /// :refpage: vkCmdSetDispatchParametersARM /// /// /// To set parameters that affect dispatch commands, call: /// /// /// // Provided by VK_ARM_scheduling_controls /// void vkCmdSetDispatchParametersARM( /// VkCommandBuffer commandBuffer, /// const VkDispatchParametersARM* pDispatchParameters); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetDispatchParametersARM( this T handle, VkDispatchParametersARM* pDispatchParameters ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDispatchParametersARM.Invoke(handle.Handle, pDispatchParameters); } /// /// vkGetDescriptorSetLayoutHostMappingInfoVALVE - Stub description of vkGetDescriptorSetLayoutHostMappingInfoVALVE /// /// /// /// [[features-descriptorSetHostMapping]] /// There is currently no specification language written for this command. /// This section acts only as placeholder and to avoid dead links in the /// specification and reference pages. /// /// /// // Provided by VK_VALVE_descriptor_set_host_mapping /// void vkGetDescriptorSetLayoutHostMappingInfoVALVE( /// VkDevice device, /// const VkDescriptorSetBindingReferenceVALVE* pBindingReference, /// VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetDescriptorSetLayoutHostMappingInfoVALVE( this VulkanHandleWrapper handle, VkDescriptorSetBindingReferenceVALVE* pBindingReference, ref VkDescriptorSetLayoutHostMappingInfoVALVE pHostMapping ) { fixed (VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMappingFixed = &pHostMapping) { handle.PInvoke.vkGetDescriptorSetLayoutHostMappingInfoVALVE.Invoke( handle.Handle, pBindingReference, pHostMappingFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkDescriptorSetLayoutHostMappingInfoVALVE. public static unsafe VkDescriptorSetLayoutHostMappingInfoVALVE GetDescriptorSetLayoutHostMappingInfoVALVE( this VulkanHandleWrapper handle, VkDescriptorSetBindingReferenceVALVE* pBindingReference ) { VkDescriptorSetLayoutHostMappingInfoVALVE outValue = new(); GetDescriptorSetLayoutHostMappingInfoVALVE(handle, pBindingReference, ref outValue); return outValue; } /// /// vkGetDescriptorSetHostMappingVALVE - Stub description of vkGetDescriptorSetHostMappingVALVE /// /// /// /// There is currently no specification language written for this command. /// This section acts only as placeholder and to avoid dead links in the /// specification and reference pages. /// /// /// // Provided by VK_VALVE_descriptor_set_host_mapping /// void vkGetDescriptorSetHostMappingVALVE( /// VkDevice device, /// VkDescriptorSet descriptorSet, /// void** ppData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void* GetDescriptorSetHostMappingVALVE( this VulkanHandleWrapper handle, VkDescriptorSet descriptorSet ) { void* ppDataLocal = default; handle.PInvoke.vkGetDescriptorSetHostMappingVALVE.Invoke(handle.Handle, descriptorSet, &ppDataLocal); return ppDataLocal; } /// /// vkCmdCopyMemoryIndirectNV - Copy data between memory regions /// /// /// /// To copy data between two memory regions by specifying copy parameters /// indirectly in memory, call: /// /// /// // Provided by VK_NV_copy_memory_indirect /// void vkCmdCopyMemoryIndirectNV( /// VkCommandBuffer commandBuffer, /// VkDeviceAddress copyBufferAddress, /// uint32_t copyCount, /// uint32_t stride); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void CopyMemoryIndirectNV( this T handle, VkDeviceAddress copyBufferAddress, int copyCount, int stride ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdCopyMemoryIndirectNV.Invoke(handle.Handle, copyBufferAddress, copyCount, stride); } /// /// vkCmdCopyMemoryToImageIndirectNV - Copy data from a memory region to an image object /// /// /// /// :refpage: vkCmdCopyMemoryToImageIndirectNV /// /// /// To copy data from a memory region to an image object by specifying copy /// parameters in memory, call: /// /// /// // Provided by VK_NV_copy_memory_indirect /// void vkCmdCopyMemoryToImageIndirectNV( /// VkCommandBuffer commandBuffer, /// VkDeviceAddress copyBufferAddress, /// uint32_t copyCount, /// uint32_t stride, /// VkImage dstImage, /// VkImageLayout dstImageLayout, /// const VkImageSubresourceLayers* pImageSubresources); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyMemoryToImageIndirectNV( this T handle, VkDeviceAddress copyBufferAddress, int stride, VkImage dstImage, VkImageLayout dstImageLayout, scoped ReadOnlySpan pImageSubresources ) where T : VulkanHandleWrapper { fixed (VkImageSubresourceLayers* pImageSubresourcesFixed = pImageSubresources) { handle.PInvoke.vkCmdCopyMemoryToImageIndirectNV.Invoke( handle.Handle, copyBufferAddress, pImageSubresources.Length, stride, dstImage, dstImageLayout, pImageSubresourcesFixed ); } } /// /// vkCmdDecompressMemoryNV - Decompress memory containing compressed data /// /// /// /// :refpage: vkCmdDecompressMemoryNV /// To decompress memory containing compressed data, call: /// /// /// // Provided by VK_NV_memory_decompression /// void vkCmdDecompressMemoryNV( /// VkCommandBuffer commandBuffer, /// uint32_t decompressRegionCount, /// const VkDecompressMemoryRegionNV* pDecompressMemoryRegions); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DecompressMemoryNV( this T handle, scoped ReadOnlySpan pDecompressMemoryRegions ) where T : VulkanHandleWrapper { fixed (VkDecompressMemoryRegionNV* pDecompressMemoryRegionsFixed = pDecompressMemoryRegions) { handle.PInvoke.vkCmdDecompressMemoryNV.Invoke( handle.Handle, pDecompressMemoryRegions.Length, pDecompressMemoryRegionsFixed ); } } /// /// vkCmdDecompressMemoryIndirectCountNV - Indirect decompress data between memory regions /// /// /// /// :refpage: vkCmdDecompressMemoryIndirectCountNV /// /// /// To decompress data between one or more memory regions by specifying /// decompression parameters indirectly in a buffer, call: /// /// /// // Provided by VK_NV_memory_decompression /// void vkCmdDecompressMemoryIndirectCountNV( /// VkCommandBuffer commandBuffer, /// VkDeviceAddress indirectCommandsAddress, /// VkDeviceAddress indirectCommandsCountAddress, /// uint32_t stride); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DecompressMemoryIndirectCountNV( this T handle, VkDeviceAddress indirectCommandsAddress, VkDeviceAddress indirectCommandsCountAddress, int stride ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDecompressMemoryIndirectCountNV.Invoke( handle.Handle, indirectCommandsAddress, indirectCommandsCountAddress, stride ); } /// /// vkGetPipelineIndirectMemoryRequirementsNV - Get the memory requirements for the compute indirect pipeline /// /// /// /// :refpage: vkGetPipelineIndirectMemoryRequirementsNV /// /// /// To determine the memory requirements for a compute pipeline's metadata, /// call: /// /// /// // Provided by VK_NV_device_generated_commands_compute /// void vkGetPipelineIndirectMemoryRequirementsNV( /// VkDevice device, /// const VkComputePipelineCreateInfo* pCreateInfo, /// VkMemoryRequirements2* pMemoryRequirements); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetPipelineIndirectMemoryRequirementsNV( this VulkanHandleWrapper handle, in VkComputePipelineCreateInfo pCreateInfo, ref VkMemoryRequirements2 pMemoryRequirements ) { fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) fixed (VkComputePipelineCreateInfo* pCreateInfoFixed = &pCreateInfo) { handle.PInvoke.vkGetPipelineIndirectMemoryRequirementsNV.Invoke( handle.Handle, pCreateInfoFixed, pMemoryRequirementsFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryRequirements2. public static VkMemoryRequirements2 GetPipelineIndirectMemoryRequirementsNV( this VulkanHandleWrapper handle, in VkComputePipelineCreateInfo pCreateInfo ) { VkMemoryRequirements2 outValue = new(); GetPipelineIndirectMemoryRequirementsNV(handle, pCreateInfo, ref outValue); return outValue; } /// /// vkCmdUpdatePipelineIndirectBufferNV - Update the indirect compute pipeline&apos;s metadata /// /// /// /// To save a compute pipeline's metadata at a device address call: /// /// /// // Provided by VK_NV_device_generated_commands_compute /// void vkCmdUpdatePipelineIndirectBufferNV( /// VkCommandBuffer commandBuffer, /// VkPipelineBindPoint pipelineBindPoint, /// VkPipeline pipeline); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void UpdatePipelineIndirectBufferNV( this T handle, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdUpdatePipelineIndirectBufferNV.Invoke(handle.Handle, pipelineBindPoint, pipeline); } /// /// vkGetPipelineIndirectDeviceAddressNV - Get pipeline&apos;s 64-bit device address /// /// /// /// :refpage: vkGetPipelineIndirectDeviceAddressNV /// /// /// To query a compute pipeline's 64-bit device address, call: /// /// /// // Provided by VK_NV_device_generated_commands_compute /// VkDeviceAddress vkGetPipelineIndirectDeviceAddressNV( /// VkDevice device, /// const VkPipelineIndirectDeviceAddressInfoNV* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkDeviceAddress GetPipelineIndirectDeviceAddressNV( this VulkanHandleWrapper handle, in VkPipelineIndirectDeviceAddressInfoNV pInfo ) { fixed (VkPipelineIndirectDeviceAddressInfoNV* pInfoFixed = &pInfo) { return handle.PInvoke.vkGetPipelineIndirectDeviceAddressNV.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCmdSetDepthClampEnableEXT - Specify dynamically whether depth clamping is enabled in the command buffer /// /// /// /// To dynamically set^ enable or disable depth /// clamping, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object /// void vkCmdSetDepthClampEnableEXT( /// VkCommandBuffer commandBuffer, /// VkBool32 depthClampEnable); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDepthClampEnableEXT(this T handle, Brutal.Bool32 depthClampEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDepthClampEnableEXT.Invoke(handle.Handle, depthClampEnable); } /// /// vkCmdSetPolygonModeEXT - Specify polygon mode dynamically for a command buffer /// /// /// /// To dynamically set^ the polygon mode, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object /// void vkCmdSetPolygonModeEXT( /// VkCommandBuffer commandBuffer, /// VkPolygonMode polygonMode); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetPolygonModeEXT(this T handle, VkPolygonMode polygonMode) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetPolygonModeEXT.Invoke(handle.Handle, polygonMode); } /// /// vkCmdSetRasterizationSamplesEXT - Specify the rasterization samples dynamically for a command buffer /// /// /// /// To dynamically set^ the /// rasterizationSamples, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object /// void vkCmdSetRasterizationSamplesEXT( /// VkCommandBuffer commandBuffer, /// VkSampleCountFlagBits rasterizationSamples); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetRasterizationSamplesEXT(this T handle, VkSampleCountFlags rasterizationSamples) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetRasterizationSamplesEXT.Invoke(handle.Handle, rasterizationSamples); } /// /// vkCmdSetSampleMaskEXT - Specify the sample mask dynamically for a command buffer /// /// /// /// To dynamically set^ the sample mask, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object /// void vkCmdSetSampleMaskEXT( /// VkCommandBuffer commandBuffer, /// VkSampleCountFlagBits samples, /// const VkSampleMask* pSampleMask); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetSampleMaskEXT( this T handle, VkSampleCountFlags samples, scoped ReadOnlySpan pSampleMask ) where T : VulkanHandleWrapper { fixed (VkSampleMask* pSampleMaskFixed = pSampleMask) { handle.PInvoke.vkCmdSetSampleMaskEXT.Invoke(handle.Handle, samples, pSampleMaskFixed); } } /// /// vkCmdSetAlphaToCoverageEnableEXT - Specify the alpha to coverage enable state dynamically for a command buffer /// /// /// /// To dynamically set^ the /// alphaToCoverageEnable state, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object /// void vkCmdSetAlphaToCoverageEnableEXT( /// VkCommandBuffer commandBuffer, /// VkBool32 alphaToCoverageEnable); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetAlphaToCoverageEnableEXT(this T handle, Brutal.Bool32 alphaToCoverageEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetAlphaToCoverageEnableEXT.Invoke(handle.Handle, alphaToCoverageEnable); } /// /// vkCmdSetAlphaToOneEnableEXT - Specify the alpha to one enable state dynamically for a command buffer /// /// /// /// To dynamically set^ the alphaToOneEnable /// state, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object /// void vkCmdSetAlphaToOneEnableEXT( /// VkCommandBuffer commandBuffer, /// VkBool32 alphaToOneEnable); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetAlphaToOneEnableEXT(this T handle, Brutal.Bool32 alphaToOneEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetAlphaToOneEnableEXT.Invoke(handle.Handle, alphaToOneEnable); } /// /// vkCmdSetLogicOpEnableEXT - Specify dynamically whether logical operations are enabled for a command buffer /// /// /// /// To dynamically set^ whether logical operations /// are enabled, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object /// void vkCmdSetLogicOpEnableEXT( /// VkCommandBuffer commandBuffer, /// VkBool32 logicOpEnable); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetLogicOpEnableEXT(this T handle, Brutal.Bool32 logicOpEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetLogicOpEnableEXT.Invoke(handle.Handle, logicOpEnable); } /// /// vkCmdSetColorBlendEnableEXT - Specify the <c>blendEnable</c> for each attachment dynamically for a command buffer /// /// /// /// To dynamically set^ blendEnable, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object /// void vkCmdSetColorBlendEnableEXT( /// VkCommandBuffer commandBuffer, /// uint32_t firstAttachment, /// uint32_t attachmentCount, /// const VkBool32* pColorBlendEnables); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetColorBlendEnableEXT( this T handle, int firstAttachment, scoped ReadOnlySpan pColorBlendEnables ) where T : VulkanHandleWrapper { fixed (Brutal.Bool32* pColorBlendEnablesFixed = pColorBlendEnables) { handle.PInvoke.vkCmdSetColorBlendEnableEXT.Invoke( handle.Handle, firstAttachment, pColorBlendEnables.Length, pColorBlendEnablesFixed ); } } /// /// vkCmdSetColorBlendEquationEXT - Specify the blend factors and operations dynamically for a command buffer /// /// /// /// To dynamically set^ color blend factors and /// operations, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object /// void vkCmdSetColorBlendEquationEXT( /// VkCommandBuffer commandBuffer, /// uint32_t firstAttachment, /// uint32_t attachmentCount, /// const VkColorBlendEquationEXT* pColorBlendEquations); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetColorBlendEquationEXT( this T handle, int firstAttachment, scoped ReadOnlySpan pColorBlendEquations ) where T : VulkanHandleWrapper { fixed (VkColorBlendEquationEXT* pColorBlendEquationsFixed = pColorBlendEquations) { handle.PInvoke.vkCmdSetColorBlendEquationEXT.Invoke( handle.Handle, firstAttachment, pColorBlendEquations.Length, pColorBlendEquationsFixed ); } } /// /// vkCmdSetColorWriteMaskEXT - Specify the color write masks for each attachment dynamically for a command buffer /// /// /// /// To dynamically set^ the color write masks, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object /// void vkCmdSetColorWriteMaskEXT( /// VkCommandBuffer commandBuffer, /// uint32_t firstAttachment, /// uint32_t attachmentCount, /// const VkColorComponentFlags* pColorWriteMasks); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetColorWriteMaskEXT( this T handle, int firstAttachment, scoped ReadOnlySpan pColorWriteMasks ) where T : VulkanHandleWrapper { fixed (VkColorComponentFlags* pColorWriteMasksFixed = pColorWriteMasks) { handle.PInvoke.vkCmdSetColorWriteMaskEXT.Invoke( handle.Handle, firstAttachment, pColorWriteMasks.Length, pColorWriteMasksFixed ); } } /// /// vkCmdSetTessellationDomainOriginEXT - Specify the origin of the tessellation domain space dynamically for a command buffer /// /// /// /// To dynamically set^ the origin of the /// tessellation domain space, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3 with VK_KHR_maintenance2 or VK_VERSION_1_1, VK_EXT_shader_object /// void vkCmdSetTessellationDomainOriginEXT( /// VkCommandBuffer commandBuffer, /// VkTessellationDomainOrigin domainOrigin); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetTessellationDomainOriginEXT(this T handle, VkTessellationDomainOrigin domainOrigin) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetTessellationDomainOriginEXT.Invoke(handle.Handle, domainOrigin); } /// /// vkCmdSetRasterizationStreamEXT - Specify the rasterization stream dynamically for a command buffer /// /// /// /// To dynamically set^ the /// rasterizationStream state, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3 with VK_EXT_transform_feedback, VK_EXT_shader_object with VK_EXT_transform_feedback /// void vkCmdSetRasterizationStreamEXT( /// VkCommandBuffer commandBuffer, /// uint32_t rasterizationStream); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetRasterizationStreamEXT(this T handle, int rasterizationStream) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetRasterizationStreamEXT.Invoke(handle.Handle, rasterizationStream); } /// /// vkCmdSetConservativeRasterizationModeEXT - Specify the conservative rasterization mode dynamically for a command buffer /// /// /// /// To dynamically set^ the /// conservativeRasterizationMode, call: /// /// /// // Provided by VK_EXT_conservative_rasterization with VK_EXT_extended_dynamic_state3, VK_EXT_conservative_rasterization with VK_EXT_shader_object /// void vkCmdSetConservativeRasterizationModeEXT( /// VkCommandBuffer commandBuffer, /// VkConservativeRasterizationModeEXT conservativeRasterizationMode); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetConservativeRasterizationModeEXT( this T handle, VkConservativeRasterizationModeEXT conservativeRasterizationMode ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetConservativeRasterizationModeEXT.Invoke( handle.Handle, conservativeRasterizationMode ); } /// /// vkCmdSetExtraPrimitiveOverestimationSizeEXT - Specify the conservative rasterization extra primitive overestimation size dynamically for a command buffer /// /// /// /// To dynamically set^ the /// extraPrimitiveOverestimationSize, call: /// /// /// // Provided by VK_EXT_conservative_rasterization with VK_EXT_extended_dynamic_state3, VK_EXT_conservative_rasterization with VK_EXT_shader_object /// void vkCmdSetExtraPrimitiveOverestimationSizeEXT( /// VkCommandBuffer commandBuffer, /// float extraPrimitiveOverestimationSize); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetExtraPrimitiveOverestimationSizeEXT( this T handle, float extraPrimitiveOverestimationSize ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetExtraPrimitiveOverestimationSizeEXT.Invoke( handle.Handle, extraPrimitiveOverestimationSize ); } /// /// vkCmdSetDepthClipEnableEXT - Specify dynamically whether depth clipping is enabled in the command buffer /// /// /// /// To dynamically set^ enable or disable depth /// clipping, call: /// /// /// // Provided by VK_EXT_depth_clip_enable with VK_EXT_extended_dynamic_state3, VK_EXT_depth_clip_enable with VK_EXT_shader_object /// void vkCmdSetDepthClipEnableEXT( /// VkCommandBuffer commandBuffer, /// VkBool32 depthClipEnable); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDepthClipEnableEXT(this T handle, Brutal.Bool32 depthClipEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDepthClipEnableEXT.Invoke(handle.Handle, depthClipEnable); } /// /// vkCmdSetSampleLocationsEnableEXT - Specify the samples locations enable state dynamically for a command buffer /// /// /// /// To dynamically set^ the /// sampleLocationsEnable state, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3 with VK_EXT_sample_locations, VK_EXT_sample_locations with VK_EXT_shader_object /// void vkCmdSetSampleLocationsEnableEXT( /// VkCommandBuffer commandBuffer, /// VkBool32 sampleLocationsEnable); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetSampleLocationsEnableEXT(this T handle, Brutal.Bool32 sampleLocationsEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetSampleLocationsEnableEXT.Invoke(handle.Handle, sampleLocationsEnable); } /// /// vkCmdSetColorBlendAdvancedEXT - Specify the advanced color blend state dynamically for a command buffer /// /// /// /// To dynamically set^ the advanced blend state, /// call: /// /// /// // Provided by VK_EXT_blend_operation_advanced with VK_EXT_extended_dynamic_state3, VK_EXT_blend_operation_advanced with VK_EXT_shader_object /// void vkCmdSetColorBlendAdvancedEXT( /// VkCommandBuffer commandBuffer, /// uint32_t firstAttachment, /// uint32_t attachmentCount, /// const VkColorBlendAdvancedEXT* pColorBlendAdvanced); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetColorBlendAdvancedEXT( this T handle, int firstAttachment, scoped ReadOnlySpan pColorBlendAdvanced ) where T : VulkanHandleWrapper { fixed (VkColorBlendAdvancedEXT* pColorBlendAdvancedFixed = pColorBlendAdvanced) { handle.PInvoke.vkCmdSetColorBlendAdvancedEXT.Invoke( handle.Handle, firstAttachment, pColorBlendAdvanced.Length, pColorBlendAdvancedFixed ); } } /// /// vkCmdSetProvokingVertexModeEXT - Specify the provoking vertex mode dynamically for a command buffer /// /// /// /// To dynamically set^ the /// provokingVertexMode state, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3 with VK_EXT_provoking_vertex, VK_EXT_provoking_vertex with VK_EXT_shader_object /// void vkCmdSetProvokingVertexModeEXT( /// VkCommandBuffer commandBuffer, /// VkProvokingVertexModeEXT provokingVertexMode); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetProvokingVertexModeEXT(this T handle, VkProvokingVertexModeEXT provokingVertexMode) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetProvokingVertexModeEXT.Invoke(handle.Handle, provokingVertexMode); } /// /// vkCmdSetLineRasterizationModeEXT - Specify the line rasterization mode dynamically for a command buffer /// /// /// /// To dynamically set^ the /// lineRasterizationMode state, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3 with VK_VERSION_1_4 or VK_KHR_line_rasterization or VK_EXT_line_rasterization, VK_EXT_shader_object with VK_VERSION_1_4 or VK_KHR_line_rasterization or VK_EXT_line_rasterization /// void vkCmdSetLineRasterizationModeEXT( /// VkCommandBuffer commandBuffer, /// VkLineRasterizationModeEXT lineRasterizationMode); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetLineRasterizationModeEXT( this T handle, VkLineRasterizationModeEXT lineRasterizationMode ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetLineRasterizationModeEXT.Invoke(handle.Handle, lineRasterizationMode); } /// /// vkCmdSetLineStippleEnableEXT - Specify the line stipple enable dynamically for a command buffer /// /// /// /// To dynamically set^ the stippledLineEnable /// state, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3 with VK_VERSION_1_4 or VK_KHR_line_rasterization or VK_EXT_line_rasterization, VK_EXT_shader_object with VK_VERSION_1_4 or VK_KHR_line_rasterization or VK_EXT_line_rasterization /// void vkCmdSetLineStippleEnableEXT( /// VkCommandBuffer commandBuffer, /// VkBool32 stippledLineEnable); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetLineStippleEnableEXT(this T handle, Brutal.Bool32 stippledLineEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetLineStippleEnableEXT.Invoke(handle.Handle, stippledLineEnable); } /// /// vkCmdSetDepthClipNegativeOneToOneEXT - Specify the negative one to one depth clip mode dynamically for a command buffer /// /// /// /// To dynamically set^ negativeOneToOne, /// call: /// /// /// // Provided by VK_EXT_depth_clip_control with VK_EXT_extended_dynamic_state3, VK_EXT_depth_clip_control with VK_EXT_shader_object /// void vkCmdSetDepthClipNegativeOneToOneEXT( /// VkCommandBuffer commandBuffer, /// VkBool32 negativeOneToOne); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetDepthClipNegativeOneToOneEXT(this T handle, Brutal.Bool32 negativeOneToOne) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDepthClipNegativeOneToOneEXT.Invoke(handle.Handle, negativeOneToOne); } /// /// vkCmdSetViewportWScalingEnableNV - Specify the viewport W scaling enable state dynamically for a command buffer /// /// /// /// To dynamically set^ the /// viewportWScalingEnable state, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_clip_space_w_scaling, VK_EXT_shader_object with VK_NV_clip_space_w_scaling /// void vkCmdSetViewportWScalingEnableNV( /// VkCommandBuffer commandBuffer, /// VkBool32 viewportWScalingEnable); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetViewportWScalingEnableNV(this T handle, Brutal.Bool32 viewportWScalingEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetViewportWScalingEnableNV.Invoke(handle.Handle, viewportWScalingEnable); } /// /// vkCmdSetViewportSwizzleNV - Specify the viewport swizzle state dynamically for a command buffer /// /// /// /// To dynamically set^ the viewport swizzle state, /// call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_viewport_swizzle, VK_EXT_shader_object with VK_NV_viewport_swizzle /// void vkCmdSetViewportSwizzleNV( /// VkCommandBuffer commandBuffer, /// uint32_t firstViewport, /// uint32_t viewportCount, /// const VkViewportSwizzleNV* pViewportSwizzles); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetViewportSwizzleNV( this T handle, int firstViewport, scoped ReadOnlySpan pViewportSwizzles ) where T : VulkanHandleWrapper { fixed (VkViewportSwizzleNV* pViewportSwizzlesFixed = pViewportSwizzles) { handle.PInvoke.vkCmdSetViewportSwizzleNV.Invoke( handle.Handle, firstViewport, pViewportSwizzles.Length, pViewportSwizzlesFixed ); } } /// /// vkCmdSetCoverageToColorEnableNV - Specify the coverage to color enable state dynamically for a command buffer /// /// /// /// To dynamically set^ the /// coverageToColorEnable state, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_fragment_coverage_to_color, VK_EXT_shader_object with VK_NV_fragment_coverage_to_color /// void vkCmdSetCoverageToColorEnableNV( /// VkCommandBuffer commandBuffer, /// VkBool32 coverageToColorEnable); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetCoverageToColorEnableNV(this T handle, Brutal.Bool32 coverageToColorEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetCoverageToColorEnableNV.Invoke(handle.Handle, coverageToColorEnable); } /// /// vkCmdSetCoverageToColorLocationNV - Specify the coverage to color location dynamically for a command buffer /// /// /// /// To dynamically set^ the /// coverageToColorLocation state, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_fragment_coverage_to_color, VK_EXT_shader_object with VK_NV_fragment_coverage_to_color /// void vkCmdSetCoverageToColorLocationNV( /// VkCommandBuffer commandBuffer, /// uint32_t coverageToColorLocation); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetCoverageToColorLocationNV(this T handle, int coverageToColorLocation) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetCoverageToColorLocationNV.Invoke(handle.Handle, coverageToColorLocation); } /// /// vkCmdSetCoverageModulationModeNV - Specify the coverage modulation mode dynamically for a command buffer /// /// /// /// To dynamically set^ the /// coverageModulationMode state, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_framebuffer_mixed_samples, VK_EXT_shader_object with VK_NV_framebuffer_mixed_samples /// void vkCmdSetCoverageModulationModeNV( /// VkCommandBuffer commandBuffer, /// VkCoverageModulationModeNV coverageModulationMode); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetCoverageModulationModeNV( this T handle, VkCoverageModulationModeNV coverageModulationMode ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetCoverageModulationModeNV.Invoke(handle.Handle, coverageModulationMode); } /// /// vkCmdSetCoverageModulationTableEnableNV - Specify the coverage modulation table enable state dynamically for a command buffer /// /// /// /// To dynamically set^ the /// coverageModulationTableEnable state, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_framebuffer_mixed_samples, VK_EXT_shader_object with VK_NV_framebuffer_mixed_samples /// void vkCmdSetCoverageModulationTableEnableNV( /// VkCommandBuffer commandBuffer, /// VkBool32 coverageModulationTableEnable); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetCoverageModulationTableEnableNV( this T handle, Brutal.Bool32 coverageModulationTableEnable ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetCoverageModulationTableEnableNV.Invoke(handle.Handle, coverageModulationTableEnable); } /// /// vkCmdSetCoverageModulationTableNV - Specify the coverage modulation table dynamically for a command buffer /// /// /// /// To dynamically set^ the /// pCoverageModulationTable state, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_framebuffer_mixed_samples, VK_EXT_shader_object with VK_NV_framebuffer_mixed_samples /// void vkCmdSetCoverageModulationTableNV( /// VkCommandBuffer commandBuffer, /// uint32_t coverageModulationTableCount, /// const float* pCoverageModulationTable); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetCoverageModulationTableNV( this T handle, scoped ReadOnlySpan pCoverageModulationTable ) where T : VulkanHandleWrapper { fixed (float* pCoverageModulationTableFixed = pCoverageModulationTable) { handle.PInvoke.vkCmdSetCoverageModulationTableNV.Invoke( handle.Handle, pCoverageModulationTable.Length, pCoverageModulationTableFixed ); } } /// /// vkCmdSetShadingRateImageEnableNV - Specify the shading rate image enable state dynamically for a command buffer /// /// /// /// To dynamically set^ the /// shadingRateImageEnable state, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_shading_rate_image, VK_EXT_shader_object with VK_NV_shading_rate_image /// void vkCmdSetShadingRateImageEnableNV( /// VkCommandBuffer commandBuffer, /// VkBool32 shadingRateImageEnable); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetShadingRateImageEnableNV(this T handle, Brutal.Bool32 shadingRateImageEnable) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetShadingRateImageEnableNV.Invoke(handle.Handle, shadingRateImageEnable); } /// /// vkCmdSetRepresentativeFragmentTestEnableNV - Specify the representative fragment test enable dynamically for a command buffer /// /// /// /// To dynamically set^ the /// representativeFragmentTestEnable state, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_representative_fragment_test, VK_EXT_shader_object with VK_NV_representative_fragment_test /// void vkCmdSetRepresentativeFragmentTestEnableNV( /// VkCommandBuffer commandBuffer, /// VkBool32 representativeFragmentTestEnable); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetRepresentativeFragmentTestEnableNV( this T handle, Brutal.Bool32 representativeFragmentTestEnable ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetRepresentativeFragmentTestEnableNV.Invoke( handle.Handle, representativeFragmentTestEnable ); } /// /// vkCmdSetCoverageReductionModeNV - Specify the coverage reduction mode dynamically for a command buffer /// /// /// /// To dynamically set^ the /// coverageReductionMode state, call: /// /// /// // Provided by VK_EXT_extended_dynamic_state3 with VK_NV_coverage_reduction_mode, VK_EXT_shader_object with VK_NV_coverage_reduction_mode /// void vkCmdSetCoverageReductionModeNV( /// VkCommandBuffer commandBuffer, /// VkCoverageReductionModeNV coverageReductionMode); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetCoverageReductionModeNV(this T handle, VkCoverageReductionModeNV coverageReductionMode) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetCoverageReductionModeNV.Invoke(handle.Handle, coverageReductionMode); } /// /// vkCreateTensorARM - Create a new tensor object /// /// /// /// To create tensors, call: /// /// /// // Provided by VK_ARM_tensors /// VkResult vkCreateTensorARM( /// VkDevice device, /// const VkTensorCreateInfoARM* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkTensorARM* pTensor); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkTensorARM CreateTensorARM( this VulkanHandleWrapper handle, in VkTensorCreateInfoARM pCreateInfo, VkAllocator? pAllocator ) { fixed (VkTensorCreateInfoARM* pCreateInfoFixed = &pCreateInfo) { VkTensorARM pTensorLocal = default; VkResult result = handle.PInvoke.vkCreateTensorARM.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pTensorLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateTensorARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateTensorARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateTensorARM failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateTensorARM failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pTensorLocal; } } /// /// vkDestroyTensorARM - Destroy a tensor object /// /// /// /// To destroy a tensor, call: /// /// /// // Provided by VK_ARM_tensors /// void vkDestroyTensorARM( /// VkDevice device, /// VkTensorARM tensor, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyTensorARM( this VulkanHandleWrapper handle, VkTensorARM tensor, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyTensorARM.Invoke(handle.Handle, tensor, pAllocator); } /// /// vkCreateTensorViewARM - Create an tensor view from an existing tensor /// /// /// /// To create a tensor view, call: /// /// /// // Provided by VK_ARM_tensors /// VkResult vkCreateTensorViewARM( /// VkDevice device, /// const VkTensorViewCreateInfoARM* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkTensorViewARM* pView); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkTensorViewARM CreateTensorViewARM( this VulkanHandleWrapper handle, in VkTensorViewCreateInfoARM pCreateInfo, VkAllocator? pAllocator ) { fixed (VkTensorViewCreateInfoARM* pCreateInfoFixed = &pCreateInfo) { VkTensorViewARM pViewLocal = default; VkResult result = handle.PInvoke.vkCreateTensorViewARM.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pViewLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateTensorViewARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateTensorViewARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateTensorViewARM failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateTensorViewARM failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pViewLocal; } } /// /// vkDestroyTensorViewARM - Destroy a tensor view object /// /// /// /// To destroy a tensor view, call: /// /// /// // Provided by VK_ARM_tensors /// void vkDestroyTensorViewARM( /// VkDevice device, /// VkTensorViewARM tensorView, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyTensorViewARM( this VulkanHandleWrapper handle, VkTensorViewARM tensorView, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyTensorViewARM.Invoke(handle.Handle, tensorView, pAllocator); } /// /// vkGetTensorMemoryRequirementsARM - Returns the memory requirements for specified Vulkan object /// /// /// /// To determine the memory requirements for a tensor resource, call: /// /// /// // Provided by VK_ARM_tensors /// void vkGetTensorMemoryRequirementsARM( /// VkDevice device, /// const VkTensorMemoryRequirementsInfoARM* pInfo, /// VkMemoryRequirements2* pMemoryRequirements); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetTensorMemoryRequirementsARM( this VulkanHandleWrapper handle, in VkTensorMemoryRequirementsInfoARM pInfo, ref VkMemoryRequirements2 pMemoryRequirements ) { fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) fixed (VkTensorMemoryRequirementsInfoARM* pInfoFixed = &pInfo) { handle.PInvoke.vkGetTensorMemoryRequirementsARM.Invoke( handle.Handle, pInfoFixed, pMemoryRequirementsFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryRequirements2. public static VkMemoryRequirements2 GetTensorMemoryRequirementsARM( this VulkanHandleWrapper handle, in VkTensorMemoryRequirementsInfoARM pInfo ) { VkMemoryRequirements2 outValue = new(); GetTensorMemoryRequirementsARM(handle, pInfo, ref outValue); return outValue; } /// /// vkBindTensorMemoryARM - Bind device memory to tensor objects /// /// /// /// To attach memory to tensor objects call: /// /// /// // Provided by VK_ARM_tensors /// VkResult vkBindTensorMemoryARM( /// VkDevice device, /// uint32_t bindInfoCount, /// const VkBindTensorMemoryInfoARM* pBindInfos); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindTensorMemoryARM( this VulkanHandleWrapper handle, scoped ReadOnlySpan pBindInfos ) { fixed (VkBindTensorMemoryInfoARM* pBindInfosFixed = pBindInfos) { VkResult result = handle.PInvoke.vkBindTensorMemoryARM.Invoke( handle.Handle, pBindInfos.Length, pBindInfosFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkBindTensorMemoryARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkBindTensorMemoryARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkBindTensorMemoryARM failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkBindTensorMemoryARM failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkGetDeviceTensorMemoryRequirementsARM - Returns the memory requirements for specified tensor creation infos /// /// /// /// To determine the memory requirements for a tensor resource without creating /// an object, call: /// /// /// // Provided by VK_ARM_tensors /// void vkGetDeviceTensorMemoryRequirementsARM( /// VkDevice device, /// const VkDeviceTensorMemoryRequirementsARM* pInfo, /// VkMemoryRequirements2* pMemoryRequirements); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetTensorMemoryRequirementsARM( this VulkanHandleWrapper handle, in VkDeviceTensorMemoryRequirementsARM pInfo, ref VkMemoryRequirements2 pMemoryRequirements ) { fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) fixed (VkDeviceTensorMemoryRequirementsARM* pInfoFixed = &pInfo) { handle.PInvoke.vkGetDeviceTensorMemoryRequirementsARM.Invoke( handle.Handle, pInfoFixed, pMemoryRequirementsFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryRequirements2. public static VkMemoryRequirements2 GetTensorMemoryRequirementsARM( this VulkanHandleWrapper handle, in VkDeviceTensorMemoryRequirementsARM pInfo ) { VkMemoryRequirements2 outValue = new(); GetTensorMemoryRequirementsARM(handle, pInfo, ref outValue); return outValue; } /// /// vkCmdCopyTensorARM - Copy data between tensors /// /// /// /// To copy data between tensor objects, call: /// /// /// // Provided by VK_ARM_tensors /// void vkCmdCopyTensorARM( /// VkCommandBuffer commandBuffer, /// const VkCopyTensorInfoARM* pCopyTensorInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyTensorARM(this T handle, in VkCopyTensorInfoARM pCopyTensorInfo) where T : VulkanHandleWrapper { fixed (VkCopyTensorInfoARM* pCopyTensorInfoFixed = &pCopyTensorInfo) { handle.PInvoke.vkCmdCopyTensorARM.Invoke(handle.Handle, pCopyTensorInfoFixed); } } /// /// vkGetTensorOpaqueCaptureDescriptorDataARM - Get tensor opaque capture descriptor data /// /// /// /// To get the opaque capture descriptor data for a tensor, call: /// /// /// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors /// VkResult vkGetTensorOpaqueCaptureDescriptorDataARM( /// VkDevice device, /// const VkTensorCaptureDescriptorDataInfoARM* pInfo, /// void* pData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void* GetTensorOpaqueCaptureDescriptorDataARM( this VulkanHandleWrapper handle, in VkTensorCaptureDescriptorDataInfoARM pInfo ) { fixed (VkTensorCaptureDescriptorDataInfoARM* pInfoFixed = &pInfo) { void* pDataLocal = default; VkResult result = handle.PInvoke.vkGetTensorOpaqueCaptureDescriptorDataARM.Invoke( handle.Handle, pInfoFixed, pDataLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetTensorOpaqueCaptureDescriptorDataARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetTensorOpaqueCaptureDescriptorDataARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetTensorOpaqueCaptureDescriptorDataARM failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetTensorOpaqueCaptureDescriptorDataARM failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pDataLocal; } } /// /// vkGetTensorViewOpaqueCaptureDescriptorDataARM - Get tensor view opaque capture descriptor data /// /// /// /// To get the opaque capture descriptor data for a tensor view, call: /// /// /// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors /// VkResult vkGetTensorViewOpaqueCaptureDescriptorDataARM( /// VkDevice device, /// const VkTensorViewCaptureDescriptorDataInfoARM* pInfo, /// void* pData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void* GetTensorViewOpaqueCaptureDescriptorDataARM( this VulkanHandleWrapper handle, in VkTensorViewCaptureDescriptorDataInfoARM pInfo ) { fixed (VkTensorViewCaptureDescriptorDataInfoARM* pInfoFixed = &pInfo) { void* pDataLocal = default; VkResult result = handle.PInvoke.vkGetTensorViewOpaqueCaptureDescriptorDataARM.Invoke( handle.Handle, pInfoFixed, pDataLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetTensorViewOpaqueCaptureDescriptorDataARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetTensorViewOpaqueCaptureDescriptorDataARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetTensorViewOpaqueCaptureDescriptorDataARM failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetTensorViewOpaqueCaptureDescriptorDataARM failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pDataLocal; } } /// /// vkGetShaderModuleIdentifierEXT - Query a unique identifier for a shader module /// /// /// /// Shader modules have unique identifiers associated with them. /// To query an implementation provided identifier, call: /// /// /// // Provided by VK_EXT_shader_module_identifier /// void vkGetShaderModuleIdentifierEXT( /// VkDevice device, /// VkShaderModule shaderModule, /// VkShaderModuleIdentifierEXT* pIdentifier); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetShaderModuleIdentifierEXT( this VulkanHandleWrapper handle, VkShaderModule shaderModule, ref VkShaderModuleIdentifierEXT pIdentifier ) { fixed (VkShaderModuleIdentifierEXT* pIdentifierFixed = &pIdentifier) { handle.PInvoke.vkGetShaderModuleIdentifierEXT.Invoke(handle.Handle, shaderModule, pIdentifierFixed); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkShaderModuleIdentifierEXT. public static VkShaderModuleIdentifierEXT GetShaderModuleIdentifierEXT( this VulkanHandleWrapper handle, VkShaderModule shaderModule ) { VkShaderModuleIdentifierEXT outValue = new(); GetShaderModuleIdentifierEXT(handle, shaderModule, ref outValue); return outValue; } /// /// vkGetShaderModuleCreateInfoIdentifierEXT - Query a unique identifier for a shader module create info /// /// /// /// VkShaderModuleCreateInfo structures have unique identifiers associated /// with them. /// To query an implementation provided identifier, call: /// /// /// // Provided by VK_EXT_shader_module_identifier /// void vkGetShaderModuleCreateInfoIdentifierEXT( /// VkDevice device, /// const VkShaderModuleCreateInfo* pCreateInfo, /// VkShaderModuleIdentifierEXT* pIdentifier); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetShaderModuleCreateInfoIdentifierEXT( this VulkanHandleWrapper handle, in VkShaderModuleCreateInfo pCreateInfo, ref VkShaderModuleIdentifierEXT pIdentifier ) { fixed (VkShaderModuleIdentifierEXT* pIdentifierFixed = &pIdentifier) fixed (VkShaderModuleCreateInfo* pCreateInfoFixed = &pCreateInfo) { handle.PInvoke.vkGetShaderModuleCreateInfoIdentifierEXT.Invoke( handle.Handle, pCreateInfoFixed, pIdentifierFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkShaderModuleIdentifierEXT. public static VkShaderModuleIdentifierEXT GetShaderModuleCreateInfoIdentifierEXT( this VulkanHandleWrapper handle, in VkShaderModuleCreateInfo pCreateInfo ) { VkShaderModuleIdentifierEXT outValue = new(); GetShaderModuleCreateInfoIdentifierEXT(handle, pCreateInfo, ref outValue); return outValue; } /// /// vkCreateOpticalFlowSessionNV - Creates an optical flow session object /// /// /// /// To create an optical flow session object, call: /// /// /// // Provided by VK_NV_optical_flow /// VkResult vkCreateOpticalFlowSessionNV( /// VkDevice device, /// const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkOpticalFlowSessionNV* pSession); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkOpticalFlowSessionNV CreateOpticalFlowSessionNV( this VulkanHandleWrapper handle, in VkOpticalFlowSessionCreateInfoNV pCreateInfo, VkAllocator? pAllocator ) { fixed (VkOpticalFlowSessionCreateInfoNV* pCreateInfoFixed = &pCreateInfo) { VkOpticalFlowSessionNV pSessionLocal = default; VkResult result = handle.PInvoke.vkCreateOpticalFlowSessionNV.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pSessionLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateOpticalFlowSessionNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorInitializationFailed: throw new VkResultError( VkResult.ErrorInitializationFailed, "Vulkan call to vkCreateOpticalFlowSessionNV failed with error: VK_ERROR_INITIALIZATION_FAILED" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateOpticalFlowSessionNV failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateOpticalFlowSessionNV failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pSessionLocal; } } /// /// vkDestroyOpticalFlowSessionNV - Destroy optical flow session object /// /// /// /// To destroy an optical flow session object, call: /// /// /// // Provided by VK_NV_optical_flow /// void vkDestroyOpticalFlowSessionNV( /// VkDevice device, /// VkOpticalFlowSessionNV session, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyOpticalFlowSessionNV( this VulkanHandleWrapper handle, VkOpticalFlowSessionNV session, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyOpticalFlowSessionNV.Invoke(handle.Handle, session, pAllocator); } /// /// vkBindOpticalFlowSessionImageNV - Bind image to an optical flow session /// /// /// /// To bind a Vulkan image to an optical flow session object, call: /// /// /// // Provided by VK_NV_optical_flow /// VkResult vkBindOpticalFlowSessionImageNV( /// VkDevice device, /// VkOpticalFlowSessionNV session, /// VkOpticalFlowSessionBindingPointNV bindingPoint, /// VkImageView view, /// VkImageLayout layout); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void BindOpticalFlowSessionImageNV( this VulkanHandleWrapper handle, VkOpticalFlowSessionNV session, VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, VkImageLayout layout ) { VkResult result = handle.PInvoke.vkBindOpticalFlowSessionImageNV.Invoke( handle.Handle, session, bindingPoint, view, layout ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkBindOpticalFlowSessionImageNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorInitializationFailed: throw new VkResultError( VkResult.ErrorInitializationFailed, "Vulkan call to vkBindOpticalFlowSessionImageNV failed with error: VK_ERROR_INITIALIZATION_FAILED" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkBindOpticalFlowSessionImageNV failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkBindOpticalFlowSessionImageNV failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } /// /// vkCmdOpticalFlowExecuteNV - Calculate optical flow vectors /// /// /// /// Default direction of flow estimation is forward which calculates the optical /// flow from input frame to reference frame. /// Optionally backward flow estimation can be additionally calculated. /// An output flow vector (Vx, Vy) means that current pixel (x, y) of input /// frame can be found at location (x+Vx, y+Vy) in reference frame. /// A backward flow vector (Vx, Vy) means that current pixel (x, y) of reference /// frame can be found at location (x+Vx, y+Vy) in input frame. /// /// /// To calculate optical flow vectors from two input frames, call: /// /// /// // Provided by VK_NV_optical_flow /// void vkCmdOpticalFlowExecuteNV( /// VkCommandBuffer commandBuffer, /// VkOpticalFlowSessionNV session, /// const VkOpticalFlowExecuteInfoNV* pExecuteInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void OpticalFlowExecuteNV( this T handle, VkOpticalFlowSessionNV session, in VkOpticalFlowExecuteInfoNV pExecuteInfo ) where T : VulkanHandleWrapper { fixed (VkOpticalFlowExecuteInfoNV* pExecuteInfoFixed = &pExecuteInfo) { handle.PInvoke.vkCmdOpticalFlowExecuteNV.Invoke(handle.Handle, session, pExecuteInfoFixed); } } /// /// vkAntiLagUpdateAMD - Provide information to reduce latency /// /// /// /// To lower latency, call: /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void AntiLagUpdateAMD( this VulkanHandleWrapper handle, VkAntiLagDataAMD* pData ) { handle.PInvoke.vkAntiLagUpdateAMD.Invoke(handle.Handle, pData); } /// /// vkCreateShadersEXT - Create one or more new shaders /// /// /// /// To create one or more shader objects, call: /// /// /// // Provided by VK_EXT_shader_object /// VkResult vkCreateShadersEXT( /// VkDevice device, /// uint32_t createInfoCount, /// const VkShaderCreateInfoEXT* pCreateInfos, /// const VkAllocationCallbacks* pAllocator, /// VkShaderEXT* pShaders); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CreateShadersEXT( this VulkanHandleWrapper handle, scoped ReadOnlySpan pCreateInfos, VkAllocator? pAllocator, scoped ReadOnlySpan pShaders ) { fixed (VkShaderEXT* pShadersFixed = pShaders) fixed (VkShaderCreateInfoEXT* pCreateInfosFixed = pCreateInfos) { VkResult result = handle.PInvoke.vkCreateShadersEXT.Invoke( handle.Handle, pCreateInfos.Length, pCreateInfosFixed, pAllocator, pShadersFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateShadersEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateShadersEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorInitializationFailed: throw new VkResultError( VkResult.ErrorInitializationFailed, "Vulkan call to vkCreateShadersEXT failed with error: VK_ERROR_INITIALIZATION_FAILED" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateShadersEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateShadersEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.IncompatibleShaderBinaryEXT: default: break; } return result; } } /// /// vkDestroyShaderEXT - Destroy a shader object /// /// /// /// To destroy a shader object, call: /// /// /// // Provided by VK_EXT_shader_object /// void vkDestroyShaderEXT( /// VkDevice device, /// VkShaderEXT shader, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyShaderEXT( this VulkanHandleWrapper handle, VkShaderEXT shader, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyShaderEXT.Invoke(handle.Handle, shader, pAllocator); } /// /// vkGetShaderBinaryDataEXT - Get the binary shader code from a shader object /// /// /// /// Binary shader code can be retrieved from a shader object using the command: /// /// /// // Provided by VK_EXT_shader_object /// VkResult vkGetShaderBinaryDataEXT( /// VkDevice device, /// VkShaderEXT shader, /// size_t* pDataSize, /// void* pData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe VkResult GetShaderBinaryDataEXT( this VulkanHandleWrapper handle, VkShaderEXT shader, ref nuint pDataSize, scoped ReadOnlySpan pData ) { fixed (byte* pDataFixed = pData) fixed (nuint* pDataSizeFixed = &pDataSize) { VkResult result = handle.PInvoke.vkGetShaderBinaryDataEXT.Invoke( handle.Handle, shader, pDataSizeFixed, pDataFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetShaderBinaryDataEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetShaderBinaryDataEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetShaderBinaryDataEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetShaderBinaryDataEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// Queries the required length. /// The required length. public static nuint GetShaderBinaryDataEXT_Count( this VulkanHandleWrapper handle, VkShaderEXT shader ) { nuint pDataSize = default; GetShaderBinaryDataEXT(handle, shader, ref pDataSize, null); return pDataSize; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static VkResult GetShaderBinaryDataEXT_Write( this VulkanHandleWrapper handle, VkShaderEXT shader, scoped ReadOnlySpan pData ) { nuint pDataSize = (nuint)pData.Length; return GetShaderBinaryDataEXT(handle, shader, ref pDataSize, pData); } /// /// vkCmdBindShadersEXT - Bind shader objects to a command buffer /// /// /// /// Once shader objects have been created, they can be bound to the command /// buffer using the command: /// /// /// // Provided by VK_EXT_shader_object /// void vkCmdBindShadersEXT( /// VkCommandBuffer commandBuffer, /// uint32_t stageCount, /// const VkShaderStageFlagBits* pStages, /// const VkShaderEXT* pShaders); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindShadersEXT( this T handle, scoped ReadOnlySpan pStages, scoped ReadOnlySpan pShaders ) where T : VulkanHandleWrapper { fixed (VkShaderEXT* pShadersFixed = pShaders) fixed (VkShaderStageFlags* pStagesFixed = pStages) { handle.PInvoke.vkCmdBindShadersEXT.Invoke(handle.Handle, pStages.Length, pStagesFixed, pShadersFixed); } } /// /// vkCmdSetDepthClampRangeEXT - Set the viewport depth clamp range dynamically for a command buffer /// /// /// /// To dynamically set^ the viewport depth clamp /// range parameters, call: /// /// /// // Provided by VK_EXT_depth_clamp_control, VK_EXT_depth_clamp_control with VK_EXT_shader_object /// void vkCmdSetDepthClampRangeEXT( /// VkCommandBuffer commandBuffer, /// VkDepthClampModeEXT depthClampMode, /// const VkDepthClampRangeEXT* pDepthClampRange); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetDepthClampRangeEXT( this T handle, VkDepthClampModeEXT depthClampMode, VkDepthClampRangeEXT* pDepthClampRange ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetDepthClampRangeEXT.Invoke(handle.Handle, depthClampMode, pDepthClampRange); } /// /// vkGetFramebufferTilePropertiesQCOM - Get tile properties from the attachments in framebuffer /// /// /// /// To query the tile properties from the attachments in framebuffer, call: /// /// /// // Provided by VK_QCOM_tile_properties /// VkResult vkGetFramebufferTilePropertiesQCOM( /// VkDevice device, /// VkFramebuffer framebuffer, /// uint32_t* pPropertiesCount, /// VkTilePropertiesQCOM* pProperties); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe VkResult GetFramebufferTilePropertiesQCOM( this VulkanHandleWrapper handle, VkFramebuffer framebuffer, ref int pPropertiesCount, scoped ReadOnlySpan pProperties ) { fixed (VkTilePropertiesQCOM* pPropertiesFixed = pProperties) fixed (int* pPropertiesCountFixed = &pPropertiesCount) { VkResult result = handle.PInvoke.vkGetFramebufferTilePropertiesQCOM.Invoke( handle.Handle, framebuffer, pPropertiesCountFixed, pPropertiesFixed ); switch (result) { case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetFramebufferTilePropertiesQCOM failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetFramebufferTilePropertiesQCOM failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// Queries the required length. /// The required length. public static int GetFramebufferTilePropertiesQCOM_Count( this VulkanHandleWrapper handle, VkFramebuffer framebuffer ) { int pPropertiesCount = default; GetFramebufferTilePropertiesQCOM(handle, framebuffer, ref pPropertiesCount, null); return pPropertiesCount; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static VkResult GetFramebufferTilePropertiesQCOM_Write( this VulkanHandleWrapper handle, VkFramebuffer framebuffer, scoped ReadOnlySpan pProperties ) { int pPropertiesCount = pProperties.Length; return GetFramebufferTilePropertiesQCOM(handle, framebuffer, ref pPropertiesCount, pProperties); } /// /// vkGetDynamicRenderingTilePropertiesQCOM - Get the properties when using dynamic rendering /// /// /// /// To query the tile properties when using dynamic rendering, call: /// /// /// // Provided by VK_QCOM_tile_properties /// VkResult vkGetDynamicRenderingTilePropertiesQCOM( /// VkDevice device, /// const VkRenderingInfo* pRenderingInfo, /// VkTilePropertiesQCOM* pProperties); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetDynamicRenderingTilePropertiesQCOM( this VulkanHandleWrapper handle, in VkRenderingInfo pRenderingInfo, ref VkTilePropertiesQCOM pProperties ) { fixed (VkTilePropertiesQCOM* pPropertiesFixed = &pProperties) fixed (VkRenderingInfo* pRenderingInfoFixed = &pRenderingInfo) { VkResult result = handle.PInvoke.vkGetDynamicRenderingTilePropertiesQCOM.Invoke( handle.Handle, pRenderingInfoFixed, pPropertiesFixed ); switch (result) { case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetDynamicRenderingTilePropertiesQCOM failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetDynamicRenderingTilePropertiesQCOM failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkTilePropertiesQCOM. public static VkTilePropertiesQCOM GetDynamicRenderingTilePropertiesQCOM( this VulkanHandleWrapper handle, in VkRenderingInfo pRenderingInfo ) { VkTilePropertiesQCOM outValue = new(); GetDynamicRenderingTilePropertiesQCOM(handle, pRenderingInfo, ref outValue); return outValue; } /// /// vkConvertCooperativeVectorMatrixNV - Convert a cooperative vector matrix from one layout and type to another /// /// /// /// To query the size of a cooperative vector matrix, or to convert a matrix to /// another layout and type, call: /// /// /// // Provided by VK_NV_cooperative_vector /// VkResult vkConvertCooperativeVectorMatrixNV( /// VkDevice device, /// const VkConvertCooperativeVectorMatrixInfoNV* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult ConvertCooperativeVectorMatrixNV( this VulkanHandleWrapper handle, in VkConvertCooperativeVectorMatrixInfoNV pInfo ) { fixed (VkConvertCooperativeVectorMatrixInfoNV* pInfoFixed = &pInfo) { VkResult result = handle.PInvoke.vkConvertCooperativeVectorMatrixNV.Invoke(handle.Handle, pInfoFixed); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkConvertCooperativeVectorMatrixNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkConvertCooperativeVectorMatrixNV failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkConvertCooperativeVectorMatrixNV failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// /// vkCmdConvertCooperativeVectorMatrixNV - Convert a cooperative vector matrix from one layout and type to another /// /// /// /// To convert a matrix to another layout and type, call: /// /// /// // Provided by VK_NV_cooperative_vector /// void vkCmdConvertCooperativeVectorMatrixNV( /// VkCommandBuffer commandBuffer, /// uint32_t infoCount, /// const VkConvertCooperativeVectorMatrixInfoNV* pInfos); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void ConvertCooperativeVectorMatrixNV( this T handle, scoped ReadOnlySpan pInfos ) where T : VulkanHandleWrapper { fixed (VkConvertCooperativeVectorMatrixInfoNV* pInfosFixed = pInfos) { handle.PInvoke.vkCmdConvertCooperativeVectorMatrixNV.Invoke(handle.Handle, pInfos.Length, pInfosFixed); } } /// /// vkSetLatencySleepModeNV - Enable or Disable low latency mode on a swapchain /// /// /// /// To enable or disable low latency mode on a swapchain, call: /// /// /// // Provided by VK_NV_low_latency2 /// VkResult vkSetLatencySleepModeNV( /// VkDevice device, /// VkSwapchainKHR swapchain, /// const VkLatencySleepModeInfoNV* pSleepModeInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetLatencySleepModeNV( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain, in VkLatencySleepModeInfoNV pSleepModeInfo ) { fixed (VkLatencySleepModeInfoNV* pSleepModeInfoFixed = &pSleepModeInfo) { VkResult result = handle.PInvoke.vkSetLatencySleepModeNV.Invoke( handle.Handle, swapchain, pSleepModeInfoFixed ); switch (result) { case VkResult.ErrorInitializationFailed: throw new VkResultError( VkResult.ErrorInitializationFailed, "Vulkan call to vkSetLatencySleepModeNV failed with error: VK_ERROR_INITIALIZATION_FAILED" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkSetLatencySleepModeNV failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkSetLatencySleepModeNV failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkLatencySleepNV - Trigger low latency mode Sleep /// /// /// /// To provide the synchronization primitive used to delay host CPU work for /// lower latency rendering, call: /// /// /// // Provided by VK_NV_low_latency2 /// VkResult vkLatencySleepNV( /// VkDevice device, /// VkSwapchainKHR swapchain, /// const VkLatencySleepInfoNV* pSleepInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void LatencySleepNV( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain, in VkLatencySleepInfoNV pSleepInfo ) { fixed (VkLatencySleepInfoNV* pSleepInfoFixed = &pSleepInfo) { VkResult result = handle.PInvoke.vkLatencySleepNV.Invoke(handle.Handle, swapchain, pSleepInfoFixed); switch (result) { case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkLatencySleepNV failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkLatencySleepNV failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkSetLatencyMarkerNV - Pass in marker for timing info /// /// /// /// An application can provide timestamps at various stages of its frame /// generation work by calling: /// /// /// // Provided by VK_NV_low_latency2 /// void vkSetLatencyMarkerNV( /// VkDevice device, /// VkSwapchainKHR swapchain, /// const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetLatencyMarkerNV( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain, in VkSetLatencyMarkerInfoNV pLatencyMarkerInfo ) { fixed (VkSetLatencyMarkerInfoNV* pLatencyMarkerInfoFixed = &pLatencyMarkerInfo) { handle.PInvoke.vkSetLatencyMarkerNV.Invoke(handle.Handle, swapchain, pLatencyMarkerInfoFixed); } } /// /// vkGetLatencyTimingsNV - Get latency marker results /// /// /// /// To get an array containing the newest collected latency data, call: /// /// /// // Provided by VK_NV_low_latency2 /// void vkGetLatencyTimingsNV( /// VkDevice device, /// VkSwapchainKHR swapchain, /// VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetLatencyTimingsNV( this VulkanHandleWrapper handle, VkSwapchainKHR swapchain, in VkGetLatencyMarkerInfoNV pLatencyMarkerInfo ) { fixed (VkGetLatencyMarkerInfoNV* pLatencyMarkerInfoFixed = &pLatencyMarkerInfo) { handle.PInvoke.vkGetLatencyTimingsNV.Invoke(handle.Handle, swapchain, pLatencyMarkerInfoFixed); } } /// /// vkQueueNotifyOutOfBandNV - Notify out of band queue /// /// /// /// To mark a queue as out of band, so that all vkQueueSubmit calls on /// the queue are ignored for latency evaluation, call: /// /// /// // Provided by VK_NV_low_latency2 /// void vkQueueNotifyOutOfBandNV( /// VkQueue queue, /// const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void NotifyOutOfBandNV( this VulkanHandleWrapper handle, in VkOutOfBandQueueTypeInfoNV pQueueTypeInfo ) { fixed (VkOutOfBandQueueTypeInfoNV* pQueueTypeInfoFixed = &pQueueTypeInfo) { handle.PInvoke.vkQueueNotifyOutOfBandNV.Invoke(handle.Handle, pQueueTypeInfoFixed); } } /// /// vkCreateDataGraphPipelinesARM - Create data graph pipeline objects /// /// /// /// :refpage: vkCreateDataGraphPipelinesARM /// /// /// To create data graph pipelines, call: /// /// /// // Provided by VK_ARM_data_graph /// VkResult vkCreateDataGraphPipelinesARM( /// VkDevice device, /// VkDeferredOperationKHR deferredOperation, /// VkPipelineCache pipelineCache, /// uint32_t createInfoCount, /// const VkDataGraphPipelineCreateInfoARM* pCreateInfos, /// const VkAllocationCallbacks* pAllocator, /// VkPipeline* pPipelines); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CreateDataGraphPipelinesARM( this VulkanHandleWrapper handle, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, scoped ReadOnlySpan pCreateInfos, VkAllocator? pAllocator, scoped ReadOnlySpan pPipelines ) { fixed (VkPipeline* pPipelinesFixed = pPipelines) fixed (VkDataGraphPipelineCreateInfoARM* pCreateInfosFixed = pCreateInfos) { VkResult result = handle.PInvoke.vkCreateDataGraphPipelinesARM.Invoke( handle.Handle, deferredOperation, pipelineCache, pCreateInfos.Length, pCreateInfosFixed, pAllocator, pPipelinesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateDataGraphPipelinesARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateDataGraphPipelinesARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateDataGraphPipelinesARM failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateDataGraphPipelinesARM failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.PipelineCompileRequiredEXT: default: break; } return result; } } /// /// vkCreateDataGraphPipelineSessionARM - Create a data graph pipeline session /// /// /// /// :refpage: vkCreateDataGraphPipelineSessionARM /// /// /// To create a data graph pipeline session, call /// /// /// // Provided by VK_ARM_data_graph /// VkResult vkCreateDataGraphPipelineSessionARM( /// VkDevice device, /// const VkDataGraphPipelineSessionCreateInfoARM* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkDataGraphPipelineSessionARM* pSession); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkDataGraphPipelineSessionARM CreateDataGraphPipelineSessionARM( this VulkanHandleWrapper handle, in VkDataGraphPipelineSessionCreateInfoARM pCreateInfo, VkAllocator? pAllocator ) { fixed (VkDataGraphPipelineSessionCreateInfoARM* pCreateInfoFixed = &pCreateInfo) { VkDataGraphPipelineSessionARM pSessionLocal = default; VkResult result = handle.PInvoke.vkCreateDataGraphPipelineSessionARM.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pSessionLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateDataGraphPipelineSessionARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateDataGraphPipelineSessionARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateDataGraphPipelineSessionARM failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateDataGraphPipelineSessionARM failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pSessionLocal; } } /// /// vkGetDataGraphPipelineSessionBindPointRequirementsARM - Get the bind point requirements of a data graph pipeline session /// /// /// /// :refpage: vkGetDataGraphPipelineSessionBindPointRequirementsARM /// /// /// To determine the bind point requirements for a data graph pipeline session, /// call: /// /// /// // Provided by VK_ARM_data_graph /// VkResult vkGetDataGraphPipelineSessionBindPointRequirementsARM( /// VkDevice device, /// const VkDataGraphPipelineSessionBindPointRequirementsInfoARM* pInfo, /// uint32_t* pBindPointRequirementCount, /// VkDataGraphPipelineSessionBindPointRequirementARM* pBindPointRequirements); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe VkResult GetDataGraphPipelineSessionBindPointRequirementsARM( this VulkanHandleWrapper handle, in VkDataGraphPipelineSessionBindPointRequirementsInfoARM pInfo, ref int pBindPointRequirementCount, scoped ReadOnlySpan pBindPointRequirements ) { fixed ( VkDataGraphPipelineSessionBindPointRequirementARM* pBindPointRequirementsFixed = pBindPointRequirements ) fixed (VkDataGraphPipelineSessionBindPointRequirementsInfoARM* pInfoFixed = &pInfo) fixed (int* pBindPointRequirementCountFixed = &pBindPointRequirementCount) { VkResult result = handle.PInvoke.vkGetDataGraphPipelineSessionBindPointRequirementsARM.Invoke( handle.Handle, pInfoFixed, pBindPointRequirementCountFixed, pBindPointRequirementsFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetDataGraphPipelineSessionBindPointRequirementsARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetDataGraphPipelineSessionBindPointRequirementsARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetDataGraphPipelineSessionBindPointRequirementsARM failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetDataGraphPipelineSessionBindPointRequirementsARM failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// Queries the required length. /// The required length. public static int GetDataGraphPipelineSessionBindPointRequirementsARM_Count( this VulkanHandleWrapper handle, in VkDataGraphPipelineSessionBindPointRequirementsInfoARM pInfo ) { int pBindPointRequirementCount = default; GetDataGraphPipelineSessionBindPointRequirementsARM(handle, pInfo, ref pBindPointRequirementCount, null); return pBindPointRequirementCount; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static VkResult GetDataGraphPipelineSessionBindPointRequirementsARM_Write( this VulkanHandleWrapper handle, in VkDataGraphPipelineSessionBindPointRequirementsInfoARM pInfo, scoped ReadOnlySpan pBindPointRequirements ) { int pBindPointRequirementCount = pBindPointRequirements.Length; return GetDataGraphPipelineSessionBindPointRequirementsARM( handle, pInfo, ref pBindPointRequirementCount, pBindPointRequirements ); } /// /// vkGetDataGraphPipelineSessionMemoryRequirementsARM - Get the memory requirements of a data graph pipeline session /// /// /// /// :refpage: vkGetDataGraphPipelineSessionMemoryRequirementsARM /// /// /// To determine the memory requirements for a data graph pipeline session, /// call: /// /// /// // Provided by VK_ARM_data_graph /// void vkGetDataGraphPipelineSessionMemoryRequirementsARM( /// VkDevice device, /// const VkDataGraphPipelineSessionMemoryRequirementsInfoARM* pInfo, /// VkMemoryRequirements2* pMemoryRequirements); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetDataGraphPipelineSessionMemoryRequirementsARM( this VulkanHandleWrapper handle, in VkDataGraphPipelineSessionMemoryRequirementsInfoARM pInfo, ref VkMemoryRequirements2 pMemoryRequirements ) { fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) fixed (VkDataGraphPipelineSessionMemoryRequirementsInfoARM* pInfoFixed = &pInfo) { handle.PInvoke.vkGetDataGraphPipelineSessionMemoryRequirementsARM.Invoke( handle.Handle, pInfoFixed, pMemoryRequirementsFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryRequirements2. public static VkMemoryRequirements2 GetDataGraphPipelineSessionMemoryRequirementsARM( this VulkanHandleWrapper handle, in VkDataGraphPipelineSessionMemoryRequirementsInfoARM pInfo ) { VkMemoryRequirements2 outValue = new(); GetDataGraphPipelineSessionMemoryRequirementsARM(handle, pInfo, ref outValue); return outValue; } /// /// vkBindDataGraphPipelineSessionMemoryARM - Bind device memory to a data graph pipeline session object /// /// /// /// :refpage: vkBindDataGraphPipelineSessionMemoryARM /// /// /// To attach memory to a data graph pipeline session object, call: /// /// /// // Provided by VK_ARM_data_graph /// VkResult vkBindDataGraphPipelineSessionMemoryARM( /// VkDevice device, /// uint32_t bindInfoCount, /// const VkBindDataGraphPipelineSessionMemoryInfoARM* pBindInfos); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindDataGraphPipelineSessionMemoryARM( this VulkanHandleWrapper handle, scoped ReadOnlySpan pBindInfos ) { fixed (VkBindDataGraphPipelineSessionMemoryInfoARM* pBindInfosFixed = pBindInfos) { VkResult result = handle.PInvoke.vkBindDataGraphPipelineSessionMemoryARM.Invoke( handle.Handle, pBindInfos.Length, pBindInfosFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkBindDataGraphPipelineSessionMemoryARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkBindDataGraphPipelineSessionMemoryARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkBindDataGraphPipelineSessionMemoryARM failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkBindDataGraphPipelineSessionMemoryARM failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkDestroyDataGraphPipelineSessionARM - Destroy a data graph pipeline session object /// /// /// /// :refpage: vkDestroyDataGraphPipelineSessionARM /// /// /// To destroy a data graph pipeline session, call: /// /// /// // Provided by VK_ARM_data_graph /// void vkDestroyDataGraphPipelineSessionARM( /// VkDevice device, /// VkDataGraphPipelineSessionARM session, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyDataGraphPipelineSessionARM( this VulkanHandleWrapper handle, VkDataGraphPipelineSessionARM session, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyDataGraphPipelineSessionARM.Invoke(handle.Handle, session, pAllocator); } /// /// vkCmdDispatchDataGraphARM - Dispatch a data graph pipeline within a session /// /// /// /// :refpage: vkCmdDispatchDataGraphARM /// /// /// To record a data graph pipeline dispatch, call: /// /// /// // Provided by VK_ARM_data_graph /// void vkCmdDispatchDataGraphARM( /// VkCommandBuffer commandBuffer, /// VkDataGraphPipelineSessionARM session, /// const VkDataGraphPipelineDispatchInfoARM* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DispatchDataGraphARM( this T handle, VkDataGraphPipelineSessionARM session, in VkDataGraphPipelineDispatchInfoARM pInfo ) where T : VulkanHandleWrapper { fixed (VkDataGraphPipelineDispatchInfoARM* pInfoFixed = &pInfo) { handle.PInvoke.vkCmdDispatchDataGraphARM.Invoke(handle.Handle, session, pInfoFixed); } } /// /// vkGetDataGraphPipelineAvailablePropertiesARM - Query available properties of a data graph pipeline /// /// /// /// :refpage: vkGetDataGraphPipelineAvailablePropertiesARM /// /// /// To query the properties of a data graph pipeline that can be obtained, call: /// /// /// // Provided by VK_ARM_data_graph /// VkResult vkGetDataGraphPipelineAvailablePropertiesARM( /// VkDevice device, /// const VkDataGraphPipelineInfoARM* pPipelineInfo, /// uint32_t* pPropertiesCount, /// VkDataGraphPipelinePropertyARM* pProperties); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] private static unsafe VkResult GetDataGraphPipelineAvailablePropertiesARM( this VulkanHandleWrapper handle, in VkDataGraphPipelineInfoARM pPipelineInfo, ref int pPropertiesCount, scoped ReadOnlySpan pProperties ) { fixed (VkDataGraphPipelinePropertyARM* pPropertiesFixed = pProperties) fixed (VkDataGraphPipelineInfoARM* pPipelineInfoFixed = &pPipelineInfo) fixed (int* pPropertiesCountFixed = &pPropertiesCount) { VkResult result = handle.PInvoke.vkGetDataGraphPipelineAvailablePropertiesARM.Invoke( handle.Handle, pPipelineInfoFixed, pPropertiesCountFixed, pPropertiesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetDataGraphPipelineAvailablePropertiesARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetDataGraphPipelineAvailablePropertiesARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetDataGraphPipelineAvailablePropertiesARM failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetDataGraphPipelineAvailablePropertiesARM failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// Queries the required length. /// The required length. public static int GetDataGraphPipelineAvailablePropertiesARM_Count( this VulkanHandleWrapper handle, in VkDataGraphPipelineInfoARM pPipelineInfo ) { int pPropertiesCount = default; GetDataGraphPipelineAvailablePropertiesARM(handle, pPipelineInfo, ref pPropertiesCount, null); return pPropertiesCount; } /// Writes to a provided span. /// The span to write to. /// Return value of the underlying function. public static VkResult GetDataGraphPipelineAvailablePropertiesARM_Write( this VulkanHandleWrapper handle, in VkDataGraphPipelineInfoARM pPipelineInfo, scoped ReadOnlySpan pProperties ) { int pPropertiesCount = pProperties.Length; return GetDataGraphPipelineAvailablePropertiesARM(handle, pPipelineInfo, ref pPropertiesCount, pProperties); } /// /// vkGetDataGraphPipelinePropertiesARM - Query properties of a data graph pipeline /// /// /// /// :refpage: vkGetDataGraphPipelinePropertiesARM /// /// /// To query properties of a data graph pipeline, call: /// /// /// // Provided by VK_ARM_data_graph /// VkResult vkGetDataGraphPipelinePropertiesARM( /// VkDevice device, /// const VkDataGraphPipelineInfoARM* pPipelineInfo, /// uint32_t propertiesCount, /// VkDataGraphPipelinePropertyQueryResultARM* pProperties); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult GetDataGraphPipelinePropertiesARM( this VulkanHandleWrapper handle, in VkDataGraphPipelineInfoARM pPipelineInfo, scoped ReadOnlySpan pProperties ) { fixed (VkDataGraphPipelinePropertyQueryResultARM* pPropertiesFixed = pProperties) fixed (VkDataGraphPipelineInfoARM* pPipelineInfoFixed = &pPipelineInfo) { VkResult result = handle.PInvoke.vkGetDataGraphPipelinePropertiesARM.Invoke( handle.Handle, pPipelineInfoFixed, pProperties.Length, pPropertiesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetDataGraphPipelinePropertiesARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetDataGraphPipelinePropertiesARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetDataGraphPipelinePropertiesARM failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetDataGraphPipelinePropertiesARM failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } } /// /// vkCmdSetAttachmentFeedbackLoopEnableEXT - Specify whether attachment feedback loops are enabled dynamically on a command buffer /// /// /// /// :refpage: vkCmdSetAttachmentFeedbackLoopEnableEXT /// /// /// To dynamically set^ whether a pipeline can /// access a resource as a non-attachment while it is also used as an attachment /// that is written to, call: /// /// /// // Provided by VK_EXT_attachment_feedback_loop_dynamic_state /// void vkCmdSetAttachmentFeedbackLoopEnableEXT( /// VkCommandBuffer commandBuffer, /// VkImageAspectFlags aspectMask); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetAttachmentFeedbackLoopEnableEXT(this T handle, VkImageAspectFlags aspectMask) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetAttachmentFeedbackLoopEnableEXT.Invoke(handle.Handle, aspectMask); } /// /// vkCmdBindTileMemoryQCOM - Bind tile memory to a command buffer /// /// /// /// To bind a range of tile memory to the command buffer, call: /// /// /// // Provided by VK_QCOM_tile_memory_heap /// void vkCmdBindTileMemoryQCOM( /// VkCommandBuffer commandBuffer, /// const VkTileMemoryBindInfoQCOM* pTileMemoryBindInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BindTileMemoryQCOM(this T handle, in VkTileMemoryBindInfoQCOM pTileMemoryBindInfo) where T : VulkanHandleWrapper { fixed (VkTileMemoryBindInfoQCOM* pTileMemoryBindInfoFixed = &pTileMemoryBindInfo) { handle.PInvoke.vkCmdBindTileMemoryQCOM.Invoke(handle.Handle, pTileMemoryBindInfoFixed); } } /// /// vkCmdDecompressMemoryEXT - Decompress data between memory regions /// /// /// /// To decompress memory containing compressed data, call: /// /// /// // Provided by VK_EXT_memory_decompression /// void vkCmdDecompressMemoryEXT( /// VkCommandBuffer commandBuffer, /// const VkDecompressMemoryInfoEXT* pDecompressMemoryInfoEXT); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DecompressMemoryEXT( this T handle, VkDecompressMemoryInfoEXT* pDecompressMemoryInfoEXT ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDecompressMemoryEXT.Invoke(handle.Handle, pDecompressMemoryInfoEXT); } /// /// vkCmdDecompressMemoryIndirectCountEXT - Indirect decompress data between memory regions /// /// /// /// :refpage: vkCmdDecompressMemoryIndirectCountEXT /// /// /// To decompress data between one or more memory regions by specifying /// decompression parameters indirectly in a buffer, call: /// /// /// // Provided by VK_EXT_memory_decompression /// void vkCmdDecompressMemoryIndirectCountEXT( /// VkCommandBuffer commandBuffer, /// VkMemoryDecompressionMethodFlagsEXT decompressionMethod, /// VkDeviceAddress indirectCommandsAddress, /// VkDeviceAddress indirectCommandsCountAddress, /// uint32_t maxDecompressionCount, /// uint32_t stride); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DecompressMemoryIndirectCountEXT( this T handle, VkMemoryDecompressionMethodFlagsEXT decompressionMethod, VkDeviceAddress indirectCommandsAddress, VkDeviceAddress indirectCommandsCountAddress, int maxDecompressionCount, int stride ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDecompressMemoryIndirectCountEXT.Invoke( handle.Handle, decompressionMethod, indirectCommandsAddress, indirectCommandsCountAddress, maxDecompressionCount, stride ); } /// /// vkCreateExternalComputeQueueNV - Create an external compute queue for use by a compatible external API. /// /// /// /// To create an external compute queue for use by compatible external APIs /// call: /// /// /// // Provided by VK_NV_external_compute_queue /// VkResult vkCreateExternalComputeQueueNV( /// VkDevice device, /// const VkExternalComputeQueueCreateInfoNV* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkExternalComputeQueueNV* pExternalQueue); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkExternalComputeQueueNV CreateExternalComputeQueueNV( this VulkanHandleWrapper handle, in VkExternalComputeQueueCreateInfoNV pCreateInfo, VkAllocator? pAllocator ) { fixed (VkExternalComputeQueueCreateInfoNV* pCreateInfoFixed = &pCreateInfo) { VkExternalComputeQueueNV pExternalQueueLocal = default; VkResult result = handle.PInvoke.vkCreateExternalComputeQueueNV.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pExternalQueueLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateExternalComputeQueueNV failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorTooManyObjects: throw new VkResultError( VkResult.ErrorTooManyObjects, "Vulkan call to vkCreateExternalComputeQueueNV failed with error: VK_ERROR_TOO_MANY_OBJECTS" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateExternalComputeQueueNV failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateExternalComputeQueueNV failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pExternalQueueLocal; } } /// /// vkDestroyExternalComputeQueueNV - Destroys an external queue. /// /// /// /// To destroy a previously created external compute queue call: /// /// /// // Provided by VK_NV_external_compute_queue /// void vkDestroyExternalComputeQueueNV( /// VkDevice device, /// VkExternalComputeQueueNV externalQueue, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyExternalComputeQueueNV( this VulkanHandleWrapper handle, VkExternalComputeQueueNV externalQueue, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyExternalComputeQueueNV.Invoke(handle.Handle, externalQueue, pAllocator); } /// /// vkGetExternalComputeQueueDataNV - Retrieves data necessary for compatible external API initialization /// /// /// /// To query the implementation-specific data that must be passed to compatible /// external APIs during their initialization process call: /// /// /// // Provided by VK_NV_external_compute_queue /// void vkGetExternalComputeQueueDataNV( /// VkExternalComputeQueueNV externalQueue, /// VkExternalComputeQueueDataParamsNV* params, /// void* pData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void* GetExternalComputeQueueDataNV( this VulkanHandleWrapper handle, VkExternalComputeQueueDataParamsNV* @params ) { void* pDataLocal = default; handle.PInvoke.vkGetExternalComputeQueueDataNV.Invoke(handle.Handle, @params, pDataLocal); return pDataLocal; } /// /// vkGetClusterAccelerationStructureBuildSizesNV - Retrieve the buffer allocation requirements for cluster geometry command /// /// /// /// These cluster acceleration structures can be built or moved by a single /// versatile multi-indirect function /// vkCmdBuildClusterAccelerationStructureIndirectNV. /// To determine the memory requirements for executing this function, call: /// /// /// // Provided by VK_NV_cluster_acceleration_structure /// void vkGetClusterAccelerationStructureBuildSizesNV( /// VkDevice device, /// const VkClusterAccelerationStructureInputInfoNV* pInfo, /// VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetClusterAccelerationStructureBuildSizesNV( this VulkanHandleWrapper handle, in VkClusterAccelerationStructureInputInfoNV pInfo, in VkAccelerationStructureBuildSizesInfoKHR pSizeInfo ) { fixed (VkAccelerationStructureBuildSizesInfoKHR* pSizeInfoFixed = &pSizeInfo) fixed (VkClusterAccelerationStructureInputInfoNV* pInfoFixed = &pInfo) { handle.PInvoke.vkGetClusterAccelerationStructureBuildSizesNV.Invoke( handle.Handle, pInfoFixed, pSizeInfoFixed ); } } /// /// vkCmdBuildClusterAccelerationStructureIndirectNV - Build or move cluster acceleration structures /// /// /// /// To build or move a cluster acceleration structure or a cluster acceleration /// structure template call: /// /// /// // Provided by VK_NV_cluster_acceleration_structure /// void vkCmdBuildClusterAccelerationStructureIndirectNV( /// VkCommandBuffer commandBuffer, /// const VkClusterAccelerationStructureCommandsInfoNV* pCommandInfos); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BuildClusterAccelerationStructureIndirectNV( this T handle, VkClusterAccelerationStructureCommandsInfoNV* pCommandInfos ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdBuildClusterAccelerationStructureIndirectNV.Invoke(handle.Handle, pCommandInfos); } /// /// vkGetPartitionedAccelerationStructuresBuildSizesNV - Retrieve the buffer allocation requirements for partitioned acceleration structure command /// /// /// /// To determine the memory requirements for a PTAS, call: /// /// /// // Provided by VK_NV_partitioned_acceleration_structure /// void vkGetPartitionedAccelerationStructuresBuildSizesNV( /// VkDevice device, /// const VkPartitionedAccelerationStructureInstancesInputNV* pInfo, /// VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetPartitionedAccelerationStructuresBuildSizesNV( this VulkanHandleWrapper handle, in VkPartitionedAccelerationStructureInstancesInputNV pInfo, in VkAccelerationStructureBuildSizesInfoKHR pSizeInfo ) { fixed (VkAccelerationStructureBuildSizesInfoKHR* pSizeInfoFixed = &pSizeInfo) fixed (VkPartitionedAccelerationStructureInstancesInputNV* pInfoFixed = &pInfo) { handle.PInvoke.vkGetPartitionedAccelerationStructuresBuildSizesNV.Invoke( handle.Handle, pInfoFixed, pSizeInfoFixed ); } } /// /// vkCmdBuildPartitionedAccelerationStructuresNV - Command for building a PTLAS /// /// /// /// To build a partitioned top level acceleration structure, call: /// /// /// // Provided by VK_NV_partitioned_acceleration_structure /// void vkCmdBuildPartitionedAccelerationStructuresNV( /// VkCommandBuffer commandBuffer, /// const VkBuildPartitionedAccelerationStructureInfoNV* pBuildInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BuildPartitionedAccelerationStructuresNV( this T handle, in VkBuildPartitionedAccelerationStructureInfoNV pBuildInfo ) where T : VulkanHandleWrapper { fixed (VkBuildPartitionedAccelerationStructureInfoNV* pBuildInfoFixed = &pBuildInfo) { handle.PInvoke.vkCmdBuildPartitionedAccelerationStructuresNV.Invoke(handle.Handle, pBuildInfoFixed); } } /// /// vkGetGeneratedCommandsMemoryRequirementsEXT - Retrieve the buffer allocation requirements for generated commands /// /// /// /// With `VK_EXT_device_generated_commands`, to retrieve the memory size /// and alignment requirements of a particular execution state call: /// /// /// // Provided by VK_EXT_device_generated_commands /// void vkGetGeneratedCommandsMemoryRequirementsEXT( /// VkDevice device, /// const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, /// VkMemoryRequirements2* pMemoryRequirements); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetGeneratedCommandsMemoryRequirementsEXT( this VulkanHandleWrapper handle, in VkGeneratedCommandsMemoryRequirementsInfoEXT pInfo, ref VkMemoryRequirements2 pMemoryRequirements ) { fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements) fixed (VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfoFixed = &pInfo) { handle.PInvoke.vkGetGeneratedCommandsMemoryRequirementsEXT.Invoke( handle.Handle, pInfoFixed, pMemoryRequirementsFixed ); } } /// Wrapper that returns the struct instead of taking it as a ref parameter. /// The VkMemoryRequirements2. public static VkMemoryRequirements2 GetGeneratedCommandsMemoryRequirementsEXT( this VulkanHandleWrapper handle, in VkGeneratedCommandsMemoryRequirementsInfoEXT pInfo ) { VkMemoryRequirements2 outValue = new(); GetGeneratedCommandsMemoryRequirementsEXT(handle, pInfo, ref outValue); return outValue; } /// /// vkCmdPreprocessGeneratedCommandsEXT - Performs preprocessing for generated commands /// /// /// /// Commands can be preprocessed prior execution using the following command: /// /// /// // Provided by VK_EXT_device_generated_commands /// void vkCmdPreprocessGeneratedCommandsEXT( /// VkCommandBuffer commandBuffer, /// const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, /// VkCommandBuffer stateCommandBuffer); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void PreprocessGeneratedCommandsEXT( this T handle, in VkGeneratedCommandsInfoEXT pGeneratedCommandsInfo, VkCommandBuffer stateCommandBuffer ) where T : VulkanHandleWrapper { fixed (VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfoFixed = &pGeneratedCommandsInfo) { handle.PInvoke.vkCmdPreprocessGeneratedCommandsEXT.Invoke( handle.Handle, pGeneratedCommandsInfoFixed, stateCommandBuffer ); } } /// /// vkCmdExecuteGeneratedCommandsEXT - Generate and execute commands on the device /// /// /// /// :refpage: vkCmdExecuteGeneratedCommandsEXT /// /// /// With `VK_EXT_device_generated_commands`, the actual generation of /// commands as well as their execution on the device is handled as single /// action with: /// /// /// // Provided by VK_EXT_device_generated_commands /// void vkCmdExecuteGeneratedCommandsEXT( /// VkCommandBuffer commandBuffer, /// VkBool32 isPreprocessed, /// const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void ExecuteGeneratedCommandsEXT( this T handle, Brutal.Bool32 isPreprocessed, in VkGeneratedCommandsInfoEXT pGeneratedCommandsInfo ) where T : VulkanHandleWrapper { fixed (VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfoFixed = &pGeneratedCommandsInfo) { handle.PInvoke.vkCmdExecuteGeneratedCommandsEXT.Invoke( handle.Handle, isPreprocessed, pGeneratedCommandsInfoFixed ); } } /// /// vkCreateIndirectCommandsLayoutEXT - Create an indirect command layout object /// /// /// /// Indirect command layouts for `VK_EXT_device_generated_commands` are /// created by: /// /// /// // Provided by VK_EXT_device_generated_commands /// VkResult vkCreateIndirectCommandsLayoutEXT( /// VkDevice device, /// const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkIndirectCommandsLayoutEXT CreateIndirectCommandsLayoutEXT( this VulkanHandleWrapper handle, in VkIndirectCommandsLayoutCreateInfoEXT pCreateInfo, VkAllocator? pAllocator ) { fixed (VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfoFixed = &pCreateInfo) { VkIndirectCommandsLayoutEXT pIndirectCommandsLayoutLocal = default; VkResult result = handle.PInvoke.vkCreateIndirectCommandsLayoutEXT.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pIndirectCommandsLayoutLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateIndirectCommandsLayoutEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateIndirectCommandsLayoutEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateIndirectCommandsLayoutEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateIndirectCommandsLayoutEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pIndirectCommandsLayoutLocal; } } /// /// vkDestroyIndirectCommandsLayoutEXT - Destroy an indirect commands layout /// /// /// /// Indirect command layouts for `VK_EXT_device_generated_commands` are /// destroyed by: /// /// /// // Provided by VK_EXT_device_generated_commands /// void vkDestroyIndirectCommandsLayoutEXT( /// VkDevice device, /// VkIndirectCommandsLayoutEXT indirectCommandsLayout, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyIndirectCommandsLayoutEXT( this VulkanHandleWrapper handle, VkIndirectCommandsLayoutEXT indirectCommandsLayout, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyIndirectCommandsLayoutEXT.Invoke(handle.Handle, indirectCommandsLayout, pAllocator); } /// /// vkCreateIndirectExecutionSetEXT - Create an indirect execution set /// /// /// /// :refpage: vkCreateIndirectExecutionSetEXT /// /// /// Indirect Execution Sets are created by calling: /// /// /// // Provided by VK_EXT_device_generated_commands /// VkResult vkCreateIndirectExecutionSetEXT( /// VkDevice device, /// const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkIndirectExecutionSetEXT* pIndirectExecutionSet); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkIndirectExecutionSetEXT CreateIndirectExecutionSetEXT( this VulkanHandleWrapper handle, in VkIndirectExecutionSetCreateInfoEXT pCreateInfo, VkAllocator? pAllocator ) { fixed (VkIndirectExecutionSetCreateInfoEXT* pCreateInfoFixed = &pCreateInfo) { VkIndirectExecutionSetEXT pIndirectExecutionSetLocal = default; VkResult result = handle.PInvoke.vkCreateIndirectExecutionSetEXT.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pIndirectExecutionSetLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateIndirectExecutionSetEXT failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateIndirectExecutionSetEXT failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateIndirectExecutionSetEXT failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateIndirectExecutionSetEXT failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pIndirectExecutionSetLocal; } } /// /// vkDestroyIndirectExecutionSetEXT - Destroy an indirect execution set /// /// /// /// :refpage: vkDestroyIndirectExecutionSetEXT /// /// /// Destroy an Indirect Execution Set by calling: /// /// /// // Provided by VK_EXT_device_generated_commands /// void vkDestroyIndirectExecutionSetEXT( /// VkDevice device, /// VkIndirectExecutionSetEXT indirectExecutionSet, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyIndirectExecutionSetEXT( this VulkanHandleWrapper handle, VkIndirectExecutionSetEXT indirectExecutionSet, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyIndirectExecutionSetEXT.Invoke(handle.Handle, indirectExecutionSet, pAllocator); } /// /// vkUpdateIndirectExecutionSetPipelineEXT - Update the contents of an indirect execution set /// /// /// /// :refpage: vkUpdateIndirectExecutionSetPipelineEXT /// /// /// Pipeline elements in an Indirect Execution Set can be updated by calling: /// /// /// // Provided by VK_EXT_device_generated_commands /// void vkUpdateIndirectExecutionSetPipelineEXT( /// VkDevice device, /// VkIndirectExecutionSetEXT indirectExecutionSet, /// uint32_t executionSetWriteCount, /// const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void UpdateIndirectExecutionSetPipelineEXT( this VulkanHandleWrapper handle, VkIndirectExecutionSetEXT indirectExecutionSet, scoped ReadOnlySpan pExecutionSetWrites ) { fixed (VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWritesFixed = pExecutionSetWrites) { handle.PInvoke.vkUpdateIndirectExecutionSetPipelineEXT.Invoke( handle.Handle, indirectExecutionSet, pExecutionSetWrites.Length, pExecutionSetWritesFixed ); } } /// /// vkUpdateIndirectExecutionSetShaderEXT - Update the contents of an indirect execution set /// /// /// /// :refpage: vkUpdateIndirectExecutionSetShaderEXT /// /// /// Shader object elements in an Indirect Execution Set can be updated by /// calling: /// /// /// // Provided by VK_EXT_device_generated_commands /// void vkUpdateIndirectExecutionSetShaderEXT( /// VkDevice device, /// VkIndirectExecutionSetEXT indirectExecutionSet, /// uint32_t executionSetWriteCount, /// const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void UpdateIndirectExecutionSetShaderEXT( this VulkanHandleWrapper handle, VkIndirectExecutionSetEXT indirectExecutionSet, scoped ReadOnlySpan pExecutionSetWrites ) { fixed (VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWritesFixed = pExecutionSetWrites) { handle.PInvoke.vkUpdateIndirectExecutionSetShaderEXT.Invoke( handle.Handle, indirectExecutionSet, pExecutionSetWrites.Length, pExecutionSetWritesFixed ); } } /// /// vkCreateShaderInstrumentationARM - Create a new shader instrumentation object /// /// /// /// :refpage: vkCreateShaderInstrumentationARM /// :objectnameplural: shader instrumentation /// :objectnamecamelcase: shaderInstrumentation /// :objectnamestruct: VkDeviceObjectReservationCreateInfo /// :objectcount: 1 /// /// /// To create a shader instrumentation object, call: /// /// /// // Provided by VK_ARM_shader_instrumentation /// VkResult vkCreateShaderInstrumentationARM( /// VkDevice device, /// const VkShaderInstrumentationCreateInfoARM* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkShaderInstrumentationARM* pInstrumentation); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkShaderInstrumentationARM CreateShaderInstrumentationARM( this VulkanHandleWrapper handle, in VkShaderInstrumentationCreateInfoARM pCreateInfo, VkAllocator? pAllocator ) { fixed (VkShaderInstrumentationCreateInfoARM* pCreateInfoFixed = &pCreateInfo) { VkShaderInstrumentationARM pInstrumentationLocal = default; VkResult result = handle.PInvoke.vkCreateShaderInstrumentationARM.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pInstrumentationLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateShaderInstrumentationARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateShaderInstrumentationARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateShaderInstrumentationARM failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateShaderInstrumentationARM failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pInstrumentationLocal; } } /// /// vkDestroyShaderInstrumentationARM - Destroy a shader instrumentation object /// /// /// /// To destroy a shader instrumentation object, call: /// /// /// // Provided by VK_ARM_shader_instrumentation /// void vkDestroyShaderInstrumentationARM( /// VkDevice device, /// VkShaderInstrumentationARM instrumentation, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyShaderInstrumentationARM( this VulkanHandleWrapper handle, VkShaderInstrumentationARM instrumentation, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyShaderInstrumentationARM.Invoke(handle.Handle, instrumentation, pAllocator); } /// /// vkCmdBeginShaderInstrumentationARM - Begin shader instrumentation /// /// /// /// To begin shader instrumentation, call: /// /// /// // Provided by VK_ARM_shader_instrumentation /// void vkCmdBeginShaderInstrumentationARM( /// VkCommandBuffer commandBuffer, /// VkShaderInstrumentationARM instrumentation); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void BeginShaderInstrumentationARM(this T handle, VkShaderInstrumentationARM instrumentation) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdBeginShaderInstrumentationARM.Invoke(handle.Handle, instrumentation); } /// /// vkCmdEndShaderInstrumentationARM - End shader instrumentation /// /// /// /// To end shader instrumentation, call: /// /// /// // Provided by VK_ARM_shader_instrumentation /// void vkCmdEndShaderInstrumentationARM( /// VkCommandBuffer commandBuffer); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void EndShaderInstrumentationARM(this T handle) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdEndShaderInstrumentationARM.Invoke(handle.Handle); } /// /// vkGetShaderInstrumentationValuesARM - Retrieve shader instrumentation data /// /// /// /// Data can be retrieved from an instrumentation object in units of metric /// blocks. /// The size of each metric block in bytes is /// sizeof(VkShaderInstrumentationMetricDataHeaderARM) {plus} /// sizeof(uint64_t) {times} /// VkPhysicalDeviceShaderInstrumentationPropertiesARM::numMetrics. /// /// /// To retrieve metric blocks from an instrumentation object, call: /// /// /// // Provided by VK_ARM_shader_instrumentation /// VkResult vkGetShaderInstrumentationValuesARM( /// VkDevice device, /// VkShaderInstrumentationARM instrumentation, /// uint32_t* pMetricBlockCount, /// void* pMetricValues, /// VkShaderInstrumentationValuesFlagsARM flags); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult GetShaderInstrumentationValuesARM( this VulkanHandleWrapper handle, VkShaderInstrumentationARM instrumentation, int* pMetricBlockCount, void* pMetricValues, VkShaderInstrumentationValuesFlagsARM flags ) { VkResult result = handle.PInvoke.vkGetShaderInstrumentationValuesARM.Invoke( handle.Handle, instrumentation, pMetricBlockCount, pMetricValues, flags ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetShaderInstrumentationValuesARM failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetShaderInstrumentationValuesARM failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetShaderInstrumentationValuesARM failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetShaderInstrumentationValuesARM failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.Incomplete: default: break; } return result; } /// /// vkClearShaderInstrumentationMetricsARM - Clear shader instrumentation metrics to zero /// /// /// /// [[shaders-instrumentation-clear]] /// To clear the value of all metric blocks in an instrumentation object to /// zero, call: /// /// /// // Provided by VK_ARM_shader_instrumentation /// void vkClearShaderInstrumentationMetricsARM( /// VkDevice device, /// VkShaderInstrumentationARM instrumentation); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void ClearShaderInstrumentationMetricsARM( this VulkanHandleWrapper handle, VkShaderInstrumentationARM instrumentation ) { handle.PInvoke.vkClearShaderInstrumentationMetricsARM.Invoke(handle.Handle, instrumentation); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void EndRendering2EXT(this T handle, in VkRenderingEndInfoKHR pRenderingEndInfo) where T : VulkanHandleWrapper { fixed (VkRenderingEndInfoKHR* pRenderingEndInfoFixed = &pRenderingEndInfo) { handle.PInvoke.vkCmdEndRendering2EXT.Invoke(handle.Handle, pRenderingEndInfoFixed); } } /// /// vkCmdBeginCustomResolveEXT - Begins a shader resolve operation /// /// /// /// To begin resolving attachments using render pass draws, call: /// /// /// // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3 /// void vkCmdBeginCustomResolveEXT( /// VkCommandBuffer commandBuffer, /// const VkBeginCustomResolveInfoEXT* pBeginCustomResolveInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BeginCustomResolveEXT( this T handle, in VkBeginCustomResolveInfoEXT pBeginCustomResolveInfo ) where T : VulkanHandleWrapper { fixed (VkBeginCustomResolveInfoEXT* pBeginCustomResolveInfoFixed = &pBeginCustomResolveInfo) { handle.PInvoke.vkCmdBeginCustomResolveEXT.Invoke(handle.Handle, pBeginCustomResolveInfoFixed); } } /// /// vkCmdSetComputeOccupancyPriorityNV - Set the compute occupancy priority for subsequent compute dispatches /// /// /// /// To set the compute occupancy priority for subsequent compute dispatches, /// call: /// /// /// // Provided by VK_NV_compute_occupancy_priority /// void vkCmdSetComputeOccupancyPriorityNV( /// VkCommandBuffer commandBuffer, /// const VkComputeOccupancyPriorityParametersNV* pParameters); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void SetComputeOccupancyPriorityNV( this T handle, VkComputeOccupancyPriorityParametersNV* pParameters ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetComputeOccupancyPriorityNV.Invoke(handle.Handle, pParameters); } /// /// vkCmdSetPrimitiveRestartIndexEXT - Set primitive assembly restart index dynamically for a command buffer /// /// /// /// To dynamically control^ which special vertex /// index value is treated as restarting the assembly of primitives, call: /// /// /// // Provided by VK_EXT_primitive_restart_index /// void vkCmdSetPrimitiveRestartIndexEXT( /// VkCommandBuffer commandBuffer, /// uint32_t primitiveRestartIndex); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetPrimitiveRestartIndexEXT(this T handle, int primitiveRestartIndex) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetPrimitiveRestartIndexEXT.Invoke(handle.Handle, primitiveRestartIndex); } /// /// vkCreateAccelerationStructureKHR - Create a new acceleration structure object /// /// /// /// :refpage: vkCreateAccelerationStructureKHR /// /// /// To create an acceleration structure using a buffer, call: /// /// /// // Provided by VK_KHR_acceleration_structure /// VkResult vkCreateAccelerationStructureKHR( /// VkDevice device, /// const VkAccelerationStructureCreateInfoKHR* pCreateInfo, /// const VkAllocationCallbacks* pAllocator, /// VkAccelerationStructureKHR* pAccelerationStructure); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkAccelerationStructureKHR CreateAccelerationStructureKHR( this VulkanHandleWrapper handle, in VkAccelerationStructureCreateInfoKHR pCreateInfo, VkAllocator? pAllocator ) { fixed (VkAccelerationStructureCreateInfoKHR* pCreateInfoFixed = &pCreateInfo) { VkAccelerationStructureKHR pAccelerationStructureLocal = default; VkResult result = handle.PInvoke.vkCreateAccelerationStructureKHR.Invoke( handle.Handle, pCreateInfoFixed, pAllocator, &pAccelerationStructureLocal ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateAccelerationStructureKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorInvalidOpaqueCaptureAddressKHR: throw new VkResultError( VkResult.ErrorInvalidOpaqueCaptureAddressKHR, "Vulkan call to vkCreateAccelerationStructureKHR failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateAccelerationStructureKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateAccelerationStructureKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } return pAccelerationStructureLocal; } } /// /// vkDestroyAccelerationStructureKHR - Destroy an acceleration structure object /// /// /// /// :refpage: vkDestroyAccelerationStructureKHR /// /// /// To destroy an acceleration structure, call: /// /// /// // Provided by VK_KHR_acceleration_structure /// void vkDestroyAccelerationStructureKHR( /// VkDevice device, /// VkAccelerationStructureKHR accelerationStructure, /// const VkAllocationCallbacks* pAllocator); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyAccelerationStructureKHR( this VulkanHandleWrapper handle, VkAccelerationStructureKHR accelerationStructure, VkAllocator? pAllocator ) { handle.PInvoke.vkDestroyAccelerationStructureKHR.Invoke(handle.Handle, accelerationStructure, pAllocator); } /// /// vkCmdBuildAccelerationStructuresKHR - Build an acceleration structure /// /// /// /// :refpage: vkCmdBuildAccelerationStructuresKHR /// /// /// To build acceleration structures call: /// /// /// // Provided by VK_KHR_acceleration_structure /// void vkCmdBuildAccelerationStructuresKHR( /// VkCommandBuffer commandBuffer, /// uint32_t infoCount, /// const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, /// const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BuildAccelerationStructuresKHR( this T handle, scoped ReadOnlySpan pInfos, scoped ReadOnlySpan> ppBuildRangeInfos ) where T : VulkanHandleWrapper { fixed (Ptr* ppBuildRangeInfosFixed = ppBuildRangeInfos) fixed (VkAccelerationStructureBuildGeometryInfoKHR* pInfosFixed = pInfos) { handle.PInvoke.vkCmdBuildAccelerationStructuresKHR.Invoke( handle.Handle, pInfos.Length, pInfosFixed, (VkAccelerationStructureBuildRangeInfoKHR**)ppBuildRangeInfosFixed ); } } /// /// vkCmdBuildAccelerationStructuresIndirectKHR - Build an acceleration structure with some parameters provided on the device /// /// /// /// :refpage: vkCmdBuildAccelerationStructuresIndirectKHR /// /// /// To build acceleration structures with some parameters sourced on the device /// call: /// /// /// // Provided by VK_KHR_acceleration_structure /// void vkCmdBuildAccelerationStructuresIndirectKHR( /// VkCommandBuffer commandBuffer, /// uint32_t infoCount, /// const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, /// const VkDeviceAddress* pIndirectDeviceAddresses, /// const uint32_t* pIndirectStrides, /// const uint32_t* const* ppMaxPrimitiveCounts); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void BuildAccelerationStructuresIndirectKHR( this T handle, scoped ReadOnlySpan pInfos, scoped ReadOnlySpan pIndirectDeviceAddresses, scoped ReadOnlySpan pIndirectStrides, scoped ReadOnlySpan> ppMaxPrimitiveCounts ) where T : VulkanHandleWrapper { fixed (Ptr* ppMaxPrimitiveCountsFixed = ppMaxPrimitiveCounts) fixed (int* pIndirectStridesFixed = pIndirectStrides) fixed (VkDeviceAddress* pIndirectDeviceAddressesFixed = pIndirectDeviceAddresses) fixed (VkAccelerationStructureBuildGeometryInfoKHR* pInfosFixed = pInfos) { handle.PInvoke.vkCmdBuildAccelerationStructuresIndirectKHR.Invoke( handle.Handle, pInfos.Length, pInfosFixed, pIndirectDeviceAddressesFixed, pIndirectStridesFixed, (int**)ppMaxPrimitiveCountsFixed ); } } /// /// vkBuildAccelerationStructuresKHR - Build an acceleration structure on the host /// /// /// /// :refpage: vkBuildAccelerationStructuresKHR /// /// /// To build acceleration structures on the host, call: /// /// /// // Provided by VK_KHR_acceleration_structure /// VkResult vkBuildAccelerationStructuresKHR( /// VkDevice device, /// VkDeferredOperationKHR deferredOperation, /// uint32_t infoCount, /// const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, /// const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult BuildAccelerationStructuresKHR( this VulkanHandleWrapper handle, VkDeferredOperationKHR deferredOperation, scoped ReadOnlySpan pInfos, scoped ReadOnlySpan> ppBuildRangeInfos ) { fixed (Ptr* ppBuildRangeInfosFixed = ppBuildRangeInfos) fixed (VkAccelerationStructureBuildGeometryInfoKHR* pInfosFixed = pInfos) { VkResult result = handle.PInvoke.vkBuildAccelerationStructuresKHR.Invoke( handle.Handle, deferredOperation, pInfos.Length, pInfosFixed, (VkAccelerationStructureBuildRangeInfoKHR**)ppBuildRangeInfosFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkBuildAccelerationStructuresKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkBuildAccelerationStructuresKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkBuildAccelerationStructuresKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkBuildAccelerationStructuresKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.OperationDeferredKHR: case VkResult.OperationNotDeferredKHR: default: break; } return result; } } /// /// vkCopyAccelerationStructureKHR - Copy an acceleration structure on the host /// /// /// /// :refpage: vkCopyAccelerationStructureKHR /// /// /// To copy or compact an acceleration structure on the host, call: /// /// /// // Provided by VK_KHR_acceleration_structure /// VkResult vkCopyAccelerationStructureKHR( /// VkDevice device, /// VkDeferredOperationKHR deferredOperation, /// const VkCopyAccelerationStructureInfoKHR* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CopyAccelerationStructureKHR( this VulkanHandleWrapper handle, VkDeferredOperationKHR deferredOperation, in VkCopyAccelerationStructureInfoKHR pInfo ) { fixed (VkCopyAccelerationStructureInfoKHR* pInfoFixed = &pInfo) { VkResult result = handle.PInvoke.vkCopyAccelerationStructureKHR.Invoke( handle.Handle, deferredOperation, pInfoFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCopyAccelerationStructureKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCopyAccelerationStructureKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCopyAccelerationStructureKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCopyAccelerationStructureKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.OperationDeferredKHR: case VkResult.OperationNotDeferredKHR: default: break; } return result; } } /// /// vkCopyAccelerationStructureToMemoryKHR - Serialize an acceleration structure on the host /// /// /// /// :refpage: vkCopyAccelerationStructureToMemoryKHR /// /// /// To copy an acceleration structure to host accessible memory, call: /// /// /// // Provided by VK_KHR_acceleration_structure /// VkResult vkCopyAccelerationStructureToMemoryKHR( /// VkDevice device, /// VkDeferredOperationKHR deferredOperation, /// const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CopyAccelerationStructureToMemoryKHR( this VulkanHandleWrapper handle, VkDeferredOperationKHR deferredOperation, in VkCopyAccelerationStructureToMemoryInfoKHR pInfo ) { fixed (VkCopyAccelerationStructureToMemoryInfoKHR* pInfoFixed = &pInfo) { VkResult result = handle.PInvoke.vkCopyAccelerationStructureToMemoryKHR.Invoke( handle.Handle, deferredOperation, pInfoFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCopyAccelerationStructureToMemoryKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCopyAccelerationStructureToMemoryKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCopyAccelerationStructureToMemoryKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCopyAccelerationStructureToMemoryKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.OperationDeferredKHR: case VkResult.OperationNotDeferredKHR: default: break; } return result; } } /// /// vkCopyMemoryToAccelerationStructureKHR - Deserialize an acceleration structure on the host /// /// /// /// :refpage: vkCopyMemoryToAccelerationStructureKHR /// /// /// To copy host accessible memory to an acceleration structure, call: /// /// /// // Provided by VK_KHR_acceleration_structure /// VkResult vkCopyMemoryToAccelerationStructureKHR( /// VkDevice device, /// VkDeferredOperationKHR deferredOperation, /// const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CopyMemoryToAccelerationStructureKHR( this VulkanHandleWrapper handle, VkDeferredOperationKHR deferredOperation, in VkCopyMemoryToAccelerationStructureInfoKHR pInfo ) { fixed (VkCopyMemoryToAccelerationStructureInfoKHR* pInfoFixed = &pInfo) { VkResult result = handle.PInvoke.vkCopyMemoryToAccelerationStructureKHR.Invoke( handle.Handle, deferredOperation, pInfoFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCopyMemoryToAccelerationStructureKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCopyMemoryToAccelerationStructureKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCopyMemoryToAccelerationStructureKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCopyMemoryToAccelerationStructureKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.OperationDeferredKHR: case VkResult.OperationNotDeferredKHR: default: break; } return result; } } /// /// vkWriteAccelerationStructuresPropertiesKHR - Query acceleration structure meta-data on the host /// /// /// /// :refpage: vkWriteAccelerationStructuresPropertiesKHR /// /// /// To query acceleration structure size parameters on the host, call: /// /// /// // Provided by VK_KHR_acceleration_structure /// VkResult vkWriteAccelerationStructuresPropertiesKHR( /// VkDevice device, /// uint32_t accelerationStructureCount, /// const VkAccelerationStructureKHR* pAccelerationStructures, /// VkQueryType queryType, /// size_t dataSize, /// void* pData, /// size_t stride); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void WriteAccelerationStructuresPropertiesKHR( this VulkanHandleWrapper handle, scoped ReadOnlySpan pAccelerationStructures, VkQueryType queryType, scoped ReadOnlySpan pData, nuint stride ) { fixed (byte* pDataFixed = pData) fixed (VkAccelerationStructureKHR* pAccelerationStructuresFixed = pAccelerationStructures) { VkResult result = handle.PInvoke.vkWriteAccelerationStructuresPropertiesKHR.Invoke( handle.Handle, pAccelerationStructures.Length, pAccelerationStructuresFixed, queryType, (nuint)pData.Length, pDataFixed, stride ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkWriteAccelerationStructuresPropertiesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkWriteAccelerationStructuresPropertiesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkWriteAccelerationStructuresPropertiesKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkWriteAccelerationStructuresPropertiesKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCmdCopyAccelerationStructureKHR - Copy an acceleration structure /// /// /// /// :refpage: vkCmdCopyAccelerationStructureKHR /// /// /// To copy an acceleration structure call: /// /// /// // Provided by VK_KHR_acceleration_structure /// void vkCmdCopyAccelerationStructureKHR( /// VkCommandBuffer commandBuffer, /// const VkCopyAccelerationStructureInfoKHR* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyAccelerationStructureKHR( this T handle, in VkCopyAccelerationStructureInfoKHR pInfo ) where T : VulkanHandleWrapper { fixed (VkCopyAccelerationStructureInfoKHR* pInfoFixed = &pInfo) { handle.PInvoke.vkCmdCopyAccelerationStructureKHR.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCmdCopyAccelerationStructureToMemoryKHR - Copy an acceleration structure to device memory /// /// /// /// :refpage: vkCmdCopyAccelerationStructureToMemoryKHR /// /// /// To copy an acceleration structure to device memory call: /// /// /// // Provided by VK_KHR_acceleration_structure /// void vkCmdCopyAccelerationStructureToMemoryKHR( /// VkCommandBuffer commandBuffer, /// const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyAccelerationStructureToMemoryKHR( this T handle, in VkCopyAccelerationStructureToMemoryInfoKHR pInfo ) where T : VulkanHandleWrapper { fixed (VkCopyAccelerationStructureToMemoryInfoKHR* pInfoFixed = &pInfo) { handle.PInvoke.vkCmdCopyAccelerationStructureToMemoryKHR.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCmdCopyMemoryToAccelerationStructureKHR - Copy device memory to an acceleration structure /// /// /// /// :refpage: vkCmdCopyMemoryToAccelerationStructureKHR /// /// /// To copy device memory to an acceleration structure call: /// /// /// // Provided by VK_KHR_acceleration_structure /// void vkCmdCopyMemoryToAccelerationStructureKHR( /// VkCommandBuffer commandBuffer, /// const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyMemoryToAccelerationStructureKHR( this T handle, in VkCopyMemoryToAccelerationStructureInfoKHR pInfo ) where T : VulkanHandleWrapper { fixed (VkCopyMemoryToAccelerationStructureInfoKHR* pInfoFixed = &pInfo) { handle.PInvoke.vkCmdCopyMemoryToAccelerationStructureKHR.Invoke(handle.Handle, pInfoFixed); } } /// /// vkGetAccelerationStructureDeviceAddressKHR - Query an address of an acceleration structure /// /// /// /// :refpage: vkGetAccelerationStructureDeviceAddressKHR /// /// /// To query the 64-bit device address for an acceleration structure, call: /// /// /// // Provided by VK_KHR_acceleration_structure /// VkDeviceAddress vkGetAccelerationStructureDeviceAddressKHR( /// VkDevice device, /// const VkAccelerationStructureDeviceAddressInfoKHR* pInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkDeviceAddress GetAccelerationStructureDeviceAddressKHR( this VulkanHandleWrapper handle, in VkAccelerationStructureDeviceAddressInfoKHR pInfo ) { fixed (VkAccelerationStructureDeviceAddressInfoKHR* pInfoFixed = &pInfo) { return handle.PInvoke.vkGetAccelerationStructureDeviceAddressKHR.Invoke(handle.Handle, pInfoFixed); } } /// /// vkCmdWriteAccelerationStructuresPropertiesKHR - Write acceleration structure result parameters to query results. /// /// /// /// :refpage: vkCmdWriteAccelerationStructuresPropertiesKHR /// /// /// To query acceleration structure size parameters call: /// /// /// // Provided by VK_KHR_acceleration_structure /// void vkCmdWriteAccelerationStructuresPropertiesKHR( /// VkCommandBuffer commandBuffer, /// uint32_t accelerationStructureCount, /// const VkAccelerationStructureKHR* pAccelerationStructures, /// VkQueryType queryType, /// VkQueryPool queryPool, /// uint32_t firstQuery); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void WriteAccelerationStructuresPropertiesKHR( this T handle, scoped ReadOnlySpan pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, int firstQuery ) where T : VulkanHandleWrapper { fixed (VkAccelerationStructureKHR* pAccelerationStructuresFixed = pAccelerationStructures) { handle.PInvoke.vkCmdWriteAccelerationStructuresPropertiesKHR.Invoke( handle.Handle, pAccelerationStructures.Length, pAccelerationStructuresFixed, queryType, queryPool, firstQuery ); } } /// /// vkGetDeviceAccelerationStructureCompatibilityKHR - Check if a serialized acceleration structure is compatible with the current device /// /// /// /// :refpage: vkGetDeviceAccelerationStructureCompatibilityKHR /// /// /// To check if a serialized acceleration structure is compatible with the /// current device call: /// /// /// // Provided by VK_KHR_acceleration_structure /// void vkGetDeviceAccelerationStructureCompatibilityKHR( /// VkDevice device, /// const VkAccelerationStructureVersionInfoKHR* pVersionInfo, /// VkAccelerationStructureCompatibilityKHR* pCompatibility); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkAccelerationStructureCompatibilityKHR GetAccelerationStructureCompatibilityKHR( this VulkanHandleWrapper handle, in VkAccelerationStructureVersionInfoKHR pVersionInfo ) { fixed (VkAccelerationStructureVersionInfoKHR* pVersionInfoFixed = &pVersionInfo) { VkAccelerationStructureCompatibilityKHR pCompatibilityLocal = default; handle.PInvoke.vkGetDeviceAccelerationStructureCompatibilityKHR.Invoke( handle.Handle, pVersionInfoFixed, &pCompatibilityLocal ); return pCompatibilityLocal; } } /// /// vkGetAccelerationStructureBuildSizesKHR - Retrieve the required size for an acceleration structure /// /// /// /// :refpage: vkGetAccelerationStructureBuildSizesKHR /// /// /// To get the build sizes for an acceleration structure, call: /// /// /// // Provided by VK_KHR_acceleration_structure /// void vkGetAccelerationStructureBuildSizesKHR( /// VkDevice device, /// VkAccelerationStructureBuildTypeKHR buildType, /// const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, /// const uint32_t* pMaxPrimitiveCounts, /// VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetAccelerationStructureBuildSizesKHR( this VulkanHandleWrapper handle, VkAccelerationStructureBuildTypeKHR buildType, in VkAccelerationStructureBuildGeometryInfoKHR pBuildInfo, scoped ReadOnlySpan pMaxPrimitiveCounts, in VkAccelerationStructureBuildSizesInfoKHR pSizeInfo ) { fixed (VkAccelerationStructureBuildSizesInfoKHR* pSizeInfoFixed = &pSizeInfo) fixed (int* pMaxPrimitiveCountsFixed = pMaxPrimitiveCounts) fixed (VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfoFixed = &pBuildInfo) { handle.PInvoke.vkGetAccelerationStructureBuildSizesKHR.Invoke( handle.Handle, buildType, pBuildInfoFixed, pMaxPrimitiveCountsFixed, pSizeInfoFixed ); } } /// /// vkCmdTraceRaysKHR - Initialize a ray tracing dispatch /// /// /// /// :refpage: vkCmdTraceRaysKHR /// /// /// To dispatch ray tracing use: /// /// /// // Provided by VK_KHR_ray_tracing_pipeline /// void vkCmdTraceRaysKHR( /// VkCommandBuffer commandBuffer, /// const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, /// const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, /// const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, /// const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, /// uint32_t width, /// uint32_t height, /// uint32_t depth); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void TraceRaysKHR( this T handle, VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, int width, int height, int depth ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdTraceRaysKHR.Invoke( handle.Handle, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, pCallableShaderBindingTable, width, height, depth ); } /// /// vkCreateRayTracingPipelinesKHR - Creates a new ray tracing pipeline object /// /// /// /// :refpage: vkCreateRayTracingPipelinesKHR /// /// /// To create ray tracing pipelines, call: /// /// /// // Provided by VK_KHR_ray_tracing_pipeline /// VkResult vkCreateRayTracingPipelinesKHR( /// VkDevice device, /// VkDeferredOperationKHR deferredOperation, /// VkPipelineCache pipelineCache, /// uint32_t createInfoCount, /// const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, /// const VkAllocationCallbacks* pAllocator, /// VkPipeline* pPipelines); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe VkResult CreateRayTracingPipelinesKHR( this VulkanHandleWrapper handle, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, scoped ReadOnlySpan pCreateInfos, VkAllocator? pAllocator, scoped ReadOnlySpan pPipelines ) { fixed (VkPipeline* pPipelinesFixed = pPipelines) fixed (VkRayTracingPipelineCreateInfoKHR* pCreateInfosFixed = pCreateInfos) { VkResult result = handle.PInvoke.vkCreateRayTracingPipelinesKHR.Invoke( handle.Handle, deferredOperation, pipelineCache, pCreateInfos.Length, pCreateInfosFixed, pAllocator, pPipelinesFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkCreateRayTracingPipelinesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkCreateRayTracingPipelinesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorInvalidOpaqueCaptureAddress: throw new VkResultError( VkResult.ErrorInvalidOpaqueCaptureAddress, "Vulkan call to vkCreateRayTracingPipelinesKHR failed with error: VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkCreateRayTracingPipelinesKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkCreateRayTracingPipelinesKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: case VkResult.OperationDeferredKHR: case VkResult.OperationNotDeferredKHR: case VkResult.PipelineCompileRequiredEXT: default: break; } return result; } } /// /// vkGetRayTracingCaptureReplayShaderGroupHandlesKHR - Query opaque capture replay data for pipeline shader group handles /// /// /// /// :refpage: vkGetRayTracingCaptureReplayShaderGroupHandlesKHR /// /// /// To query the opaque capture data of shader groups in a ray tracing pipeline, /// call: /// /// /// // Provided by VK_KHR_ray_tracing_pipeline /// VkResult vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( /// VkDevice device, /// VkPipeline pipeline, /// uint32_t firstGroup, /// uint32_t groupCount, /// size_t dataSize, /// void* pData); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void GetRayTracingCaptureReplayShaderGroupHandlesKHR( this VulkanHandleWrapper handle, VkPipeline pipeline, int firstGroup, int groupCount, scoped ReadOnlySpan pData ) { fixed (byte* pDataFixed = pData) { VkResult result = handle.PInvoke.vkGetRayTracingCaptureReplayShaderGroupHandlesKHR.Invoke( handle.Handle, pipeline, firstGroup, groupCount, (nuint)pData.Length, pDataFixed ); switch (result) { case VkResult.ErrorOutOfHostMemory: throw new VkResultError( VkResult.ErrorOutOfHostMemory, "Vulkan call to vkGetRayTracingCaptureReplayShaderGroupHandlesKHR failed with error: VK_ERROR_OUT_OF_HOST_MEMORY" ); case VkResult.ErrorOutOfDeviceMemory: throw new VkResultError( VkResult.ErrorOutOfDeviceMemory, "Vulkan call to vkGetRayTracingCaptureReplayShaderGroupHandlesKHR failed with error: VK_ERROR_OUT_OF_DEVICE_MEMORY" ); case VkResult.ErrorUnknown: throw new VkResultError( VkResult.ErrorUnknown, "Vulkan call to vkGetRayTracingCaptureReplayShaderGroupHandlesKHR failed with error: VK_ERROR_UNKNOWN" ); case VkResult.ErrorValidationFailed: throw new VkResultError( VkResult.ErrorValidationFailed, "Vulkan call to vkGetRayTracingCaptureReplayShaderGroupHandlesKHR failed with error: VK_ERROR_VALIDATION_FAILED" ); case VkResult.Success: default: break; } } } /// /// vkCmdTraceRaysIndirectKHR - Initialize an indirect ray tracing dispatch /// /// /// /// :refpage: vkCmdTraceRaysIndirectKHR /// /// /// To dispatch ray tracing, with some parameters sourced on the device, use: /// /// /// // Provided by VK_KHR_ray_tracing_pipeline /// void vkCmdTraceRaysIndirectKHR( /// VkCommandBuffer commandBuffer, /// const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, /// const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, /// const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, /// const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, /// VkDeviceAddress indirectDeviceAddress); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void TraceRaysIndirectKHR( this T handle, VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, VkDeviceAddress indirectDeviceAddress ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdTraceRaysIndirectKHR.Invoke( handle.Handle, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, pCallableShaderBindingTable, indirectDeviceAddress ); } /// /// vkGetRayTracingShaderGroupStackSizeKHR - Query ray tracing pipeline shader group shader stack size /// /// /// /// To query the pipeline stack size of shaders in a shader group in the ray /// tracing pipeline, call: /// /// /// // Provided by VK_KHR_ray_tracing_pipeline /// VkDeviceSize vkGetRayTracingShaderGroupStackSizeKHR( /// VkDevice device, /// VkPipeline pipeline, /// uint32_t group, /// VkShaderGroupShaderKHR groupShader); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ByteSize64 GetRayTracingShaderGroupStackSizeKHR( this VulkanHandleWrapper handle, VkPipeline pipeline, int group, VkShaderGroupShaderKHR groupShader ) { return handle.PInvoke.vkGetRayTracingShaderGroupStackSizeKHR.Invoke( handle.Handle, pipeline, group, groupShader ); } /// /// vkCmdSetRayTracingPipelineStackSizeKHR - Set the stack size dynamically for a ray tracing pipeline /// /// /// /// :refpage: vkCmdSetRayTracingPipelineStackSizeKHR /// /// /// To dynamically set^ the stack size for a ray /// tracing pipeline, call: /// /// /// // Provided by VK_KHR_ray_tracing_pipeline /// void vkCmdSetRayTracingPipelineStackSizeKHR( /// VkCommandBuffer commandBuffer, /// uint32_t pipelineStackSize); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void SetRayTracingPipelineStackSizeKHR(this T handle, int pipelineStackSize) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdSetRayTracingPipelineStackSizeKHR.Invoke(handle.Handle, pipelineStackSize); } /// /// vkCmdDrawMeshTasksEXT - Draw mesh task work items /// /// /// /// :refpage: vkCmdDrawMeshTasksEXT /// /// /// To record a mesh tasks drawing command, call: /// /// /// // Provided by VK_EXT_mesh_shader /// void vkCmdDrawMeshTasksEXT( /// VkCommandBuffer commandBuffer, /// uint32_t groupCountX, /// uint32_t groupCountY, /// uint32_t groupCountZ); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawMeshTasksEXT(this T handle, int groupCountX, int groupCountY, int groupCountZ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawMeshTasksEXT.Invoke(handle.Handle, groupCountX, groupCountY, groupCountZ); } /// /// vkCmdDrawMeshTasksIndirectEXT - Issue an indirect mesh tasks draw into a command buffer /// /// /// /// :refpage: vkCmdDrawMeshTasksIndirectEXT /// /// /// To record an indirect mesh tasks drawing command, call: /// /// /// // Provided by VK_EXT_mesh_shader /// void vkCmdDrawMeshTasksIndirectEXT( /// VkCommandBuffer commandBuffer, /// VkBuffer buffer, /// VkDeviceSize offset, /// uint32_t drawCount, /// uint32_t stride); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawMeshTasksIndirectEXT( this T handle, VkBuffer buffer, ByteSize64 offset, int drawCount, int stride ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawMeshTasksIndirectEXT.Invoke(handle.Handle, buffer, offset, drawCount, stride); } /// /// vkCmdDrawMeshTasksIndirectCountEXT - Perform an indirect mesh tasks draw with the draw count sourced from a buffer /// /// /// /// :refpage: vkCmdDrawMeshTasksIndirectCountEXT /// /// /// To record an indirect mesh tasks drawing command with the draw count sourced /// from a buffer, call: /// /// /// // Provided by VK_EXT_mesh_shader with VK_VERSION_1_2 or VK_KHR_draw_indirect_count or VK_AMD_draw_indirect_count /// void vkCmdDrawMeshTasksIndirectCountEXT( /// VkCommandBuffer commandBuffer, /// VkBuffer buffer, /// VkDeviceSize offset, /// VkBuffer countBuffer, /// VkDeviceSize countBufferOffset, /// uint32_t maxDrawCount, /// uint32_t stride); /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void DrawMeshTasksIndirectCountEXT( this T handle, VkBuffer buffer, ByteSize64 offset, VkBuffer countBuffer, ByteSize64 countBufferOffset, int maxDrawCount, int stride ) where T : VulkanHandleWrapper { handle.PInvoke.vkCmdDrawMeshTasksIndirectCountEXT.Invoke( handle.Handle, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride ); } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyImages( this VulkanHandleWrapper handle, scoped ReadOnlySpan pImages, VkAllocator? pAllocator ) { fixed (VkImage* pImagesFixed = pImages) { handle.PInvoke.vxDestroyImages.Invoke(handle.Handle, pImagesFixed, pImages.Length, pAllocator); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyImageViews( this VulkanHandleWrapper handle, scoped ReadOnlySpan pImageViews, VkAllocator? pAllocator ) { fixed (VkImageView* pImageViewsFixed = pImageViews) { handle.PInvoke.vxDestroyImageViews.Invoke( handle.Handle, pImageViewsFixed, pImageViews.Length, pAllocator ); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyBuffers( this VulkanHandleWrapper handle, scoped ReadOnlySpan pBuffers, VkAllocator? pAllocator ) { fixed (VkBuffer* pBuffersFixed = pBuffers) { handle.PInvoke.vxDestroyBuffers.Invoke(handle.Handle, pBuffersFixed, pBuffers.Length, pAllocator); } } /// /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void DestroyBufferViews( this VulkanHandleWrapper handle, scoped ReadOnlySpan pBufferViews, VkAllocator? pAllocator ) { fixed (VkBufferView* pBufferViewsFixed = pBufferViews) { handle.PInvoke.vxDestroyBufferViews.Invoke( handle.Handle, pBufferViewsFixed, pBufferViews.Length, pAllocator ); } } } }