brutal/Brutal.Vulkan/Generated/Extensions/VkDeviceExtensions.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

26687 lines
1.3 MiB

namespace Brutal.VulkanApi
{
public static unsafe partial class VkDeviceExtensions
{
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceProcAddr.html">vkGetDeviceProcAddr</see> - Return a function pointer for a command
/// </summary>
/// <remarks>
/// <para>
/// In order to support systems with multiple Vulkan implementations, the
/// function pointers returned by <c>vkGetInstanceProcAddr</c> may: point to
/// dispatch code that calls a different real implementation for different
/// <c>VkDevice</c> objects or their child objects.
/// The overhead of the internal dispatch for <c>VkDevice</c> 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 <i>can</i> be obtained by calling:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// PFN_vkVoidFunction vkGetDeviceProcAddr(
/// VkDevice device,
/// const char* pName);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe PfnVkVoidFunction GetProcAddr(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<byte> pName
)
{
fixed (byte* pNameFixed = pName)
{
return handle.PInvoke.vkGetDeviceProcAddr.Invoke(handle.Handle, pNameFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyDevice.html">vkDestroyDevice</see> - Destroy a logical device
/// </summary>
/// <remarks>
/// <para>
/// To destroy a device, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroyDevice(
/// VkDevice device,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe void DestroyDeviceInternal(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyDevice.Invoke(handle.Handle, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceQueue.html">vkGetDeviceQueue</see> - Get a queue handle from a device
/// </summary>
/// <remarks>
/// <para>
/// To retrieve a handle to a <c>VkQueue</c> object, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkGetDeviceQueue(
/// VkDevice device,
/// uint32_t queueFamilyIndex,
/// uint32_t queueIndex,
/// VkQueue* pQueue);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe VkQueue GetQueueInternal(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
int queueFamilyIndex,
int queueIndex
)
{
VkQueue pQueueLocal = default;
handle.PInvoke.vkGetDeviceQueue.Invoke(handle.Handle, queueFamilyIndex, queueIndex, &pQueueLocal);
return pQueueLocal;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueueSubmit.html">vkQueueSubmit</see> - Submits a sequence of semaphores or command buffers to a queue
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkQueueSubmit
/// </para>
/// <para>
/// To submit command buffers to a queue, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkQueueSubmit(
/// VkQueue queue,
/// uint32_t submitCount,
/// const VkSubmitInfo* pSubmits,
/// VkFence fence);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe void SubmitInternal(
this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkSubmitInfo> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueueWaitIdle.html">vkQueueWaitIdle</see> - Wait for a queue to become idle
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkQueueWaitIdle
/// </para>
/// <para>
/// To wait on the host for the completion of outstanding queue operations for a
/// given queue, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkQueueWaitIdle(
/// VkQueue queue);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static void WaitIdleInternal(this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDeviceWaitIdle.html">vkDeviceWaitIdle</see> - Wait for a device to become idle
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkDeviceWaitIdle
/// </para>
/// <para>
/// To wait on the host for the completion of outstanding queue operations for
/// all queues on a given logical device, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkDeviceWaitIdle(
/// VkDevice device);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void WaitIdle(this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkAllocateMemory.html">vkAllocateMemory</see> - Allocate device memory
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkAllocateMemory
/// :objectnameplural: device memory objects
/// :objectnamecamelcase: deviceMemory
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To allocate memory objects, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkAllocateMemory(
/// VkDevice device,
/// const VkMemoryAllocateInfo* pAllocateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkDeviceMemory* pMemory);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkDeviceMemory AllocateMemory(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkFreeMemory.html">vkFreeMemory</see> - Free device memory
/// </summary>
/// <remarks>
/// <para>
/// To free a memory object, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkFreeMemory(
/// VkDevice device,
/// VkDeviceMemory memory,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void FreeMemory(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDeviceMemory memory,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkFreeMemory.Invoke(handle.Handle, memory, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkMapMemory.html">vkMapMemory</see> - Map a memory object into application address space
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkMapMemory
/// </para>
/// <para>
/// To retrieve a host virtual address pointer to a region of a mappable memory
/// object, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkMapMemory(
/// VkDevice device,
/// VkDeviceMemory memory,
/// VkDeviceSize offset,
/// VkDeviceSize size,
/// VkMemoryMapFlags flags,
/// void** ppData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe void* MapMemory(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkUnmapMemory.html">vkUnmapMemory</see> - Unmap a previously mapped memory object
/// </summary>
/// <remarks>
/// <para>
/// To unmap a memory object once host access to it is no longer needed by the
/// application, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkUnmapMemory(
/// VkDevice device,
/// VkDeviceMemory memory);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void UnmapMemory(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDeviceMemory memory
)
{
handle.PInvoke.vkUnmapMemory.Invoke(handle.Handle, memory);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkFlushMappedMemoryRanges.html">vkFlushMappedMemoryRanges</see> - Flush mapped memory ranges
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkFlushMappedMemoryRanges
/// </para>
/// <para>
/// To flush ranges of non-coherent memory from the host caches, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkFlushMappedMemoryRanges(
/// VkDevice device,
/// uint32_t memoryRangeCount,
/// const VkMappedMemoryRange* pMemoryRanges);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void FlushMappedMemoryRanges(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkMappedMemoryRange> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkInvalidateMappedMemoryRanges.html">vkInvalidateMappedMemoryRanges</see> - Invalidate ranges of mapped memory objects
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkInvalidateMappedMemoryRanges
/// </para>
/// <para>
/// To invalidate ranges of non-coherent memory from the host caches, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkInvalidateMappedMemoryRanges(
/// VkDevice device,
/// uint32_t memoryRangeCount,
/// const VkMappedMemoryRange* pMemoryRanges);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void InvalidateMappedMemoryRanges(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkMappedMemoryRange> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceMemoryCommitment.html">vkGetDeviceMemoryCommitment</see> - Query the current commitment for a VkDeviceMemory
/// </summary>
/// <remarks>
/// <para>
/// To determine the amount of lazily-allocated memory that is currently
/// committed for a memory object, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkGetDeviceMemoryCommitment(
/// VkDevice device,
/// VkDeviceMemory memory,
/// VkDeviceSize* pCommittedMemoryInBytes);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe ByteSize64 GetMemoryCommitment(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDeviceMemory memory
)
{
ByteSize64 pCommittedMemoryInBytesLocal = default;
handle.PInvoke.vkGetDeviceMemoryCommitment.Invoke(handle.Handle, memory, &pCommittedMemoryInBytesLocal);
return pCommittedMemoryInBytesLocal;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkBindBufferMemory.html">vkBindBufferMemory</see> - Bind device memory to a buffer object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkBindBufferMemory
/// </para>
/// <para>
/// To attach memory to a buffer object, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkBindBufferMemory(
/// VkDevice device,
/// VkBuffer buffer,
/// VkDeviceMemory memory,
/// VkDeviceSize memoryOffset);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void BindBufferMemory(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkBindImageMemory.html">vkBindImageMemory</see> - Bind device memory to an image object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkBindImageMemory
/// </para>
/// <para>
/// To attach memory to an image object, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkBindImageMemory(
/// VkDevice device,
/// VkImage image,
/// VkDeviceMemory memory,
/// VkDeviceSize memoryOffset);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void BindImageMemory(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetBufferMemoryRequirements.html">vkGetBufferMemoryRequirements</see> - Returns the memory requirements for specified Vulkan object
/// </summary>
/// <remarks>
/// <para>
/// To determine the memory requirements for a buffer resource, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkGetBufferMemoryRequirements(
/// VkDevice device,
/// VkBuffer buffer,
/// VkMemoryRequirements* pMemoryRequirements);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetBufferMemoryRequirements(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkBuffer buffer,
ref VkMemoryRequirements pMemoryRequirements
)
{
fixed (VkMemoryRequirements* pMemoryRequirementsFixed = &pMemoryRequirements)
{
handle.PInvoke.vkGetBufferMemoryRequirements.Invoke(handle.Handle, buffer, pMemoryRequirementsFixed);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryRequirements.</returns>
public static VkMemoryRequirements GetBufferMemoryRequirements(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkBuffer buffer
)
{
VkMemoryRequirements outValue = new();
GetBufferMemoryRequirements(handle, buffer, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetImageMemoryRequirements.html">vkGetImageMemoryRequirements</see> - Returns the memory requirements for specified Vulkan object
/// </summary>
/// <remarks>
/// <para>
/// To determine the memory requirements for an image resource, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkGetImageMemoryRequirements(
/// VkDevice device,
/// VkImage image,
/// VkMemoryRequirements* pMemoryRequirements);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetImageMemoryRequirements(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkImage image,
ref VkMemoryRequirements pMemoryRequirements
)
{
fixed (VkMemoryRequirements* pMemoryRequirementsFixed = &pMemoryRequirements)
{
handle.PInvoke.vkGetImageMemoryRequirements.Invoke(handle.Handle, image, pMemoryRequirementsFixed);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryRequirements.</returns>
public static VkMemoryRequirements GetImageMemoryRequirements(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkImage image
)
{
VkMemoryRequirements outValue = new();
GetImageMemoryRequirements(handle, image, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetImageSparseMemoryRequirements.html">vkGetImageSparseMemoryRequirements</see> - Query the memory requirements for a sparse image
/// </summary>
/// <remarks>
/// <para>
/// To query sparse memory requirements for an image, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkGetImageSparseMemoryRequirements(
/// VkDevice device,
/// VkImage image,
/// uint32_t* pSparseMemoryRequirementCount,
/// VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe void GetImageSparseMemoryRequirements(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkImage image,
ref int pSparseMemoryRequirementCount,
scoped ReadOnlySpan<VkSparseImageMemoryRequirements> pSparseMemoryRequirements
)
{
fixed (VkSparseImageMemoryRequirements* pSparseMemoryRequirementsFixed = pSparseMemoryRequirements)
fixed (int* pSparseMemoryRequirementCountFixed = &pSparseMemoryRequirementCount)
{
handle.PInvoke.vkGetImageSparseMemoryRequirements.Invoke(
handle.Handle,
image,
pSparseMemoryRequirementCountFixed,
pSparseMemoryRequirementsFixed
);
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static int GetImageSparseMemoryRequirements_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkImage image
)
{
int pSparseMemoryRequirementCount = default;
GetImageSparseMemoryRequirements(handle, image, ref pSparseMemoryRequirementCount, null);
return pSparseMemoryRequirementCount;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pSparseMemoryRequirements">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static void GetImageSparseMemoryRequirements_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkImage image,
scoped ReadOnlySpan<VkSparseImageMemoryRequirements> pSparseMemoryRequirements
)
{
int pSparseMemoryRequirementCount = pSparseMemoryRequirements.Length;
GetImageSparseMemoryRequirements(
handle,
image,
ref pSparseMemoryRequirementCount,
pSparseMemoryRequirements
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueueBindSparse.html">vkQueueBindSparse</see> - Bind device memory to a sparse resource object
/// </summary>
/// <remarks>
/// <para>
/// To submit sparse binding operations to a queue, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkQueueBindSparse(
/// VkQueue queue,
/// uint32_t bindInfoCount,
/// const VkBindSparseInfo* pBindInfo,
/// VkFence fence);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe void BindSparseInternal(
this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkBindSparseInfo> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateFence.html">vkCreateFence</see> - Create a new fence object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateFence
/// :objectnameplural: fences
/// :objectnamecamelcase: fence
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create a fence, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreateFence(
/// VkDevice device,
/// const VkFenceCreateInfo* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkFence* pFence);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkFence CreateFence(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyFence.html">vkDestroyFence</see> - Destroy a fence object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a fence, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroyFence(
/// VkDevice device,
/// VkFence fence,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyFence(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkFence fence,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyFence.Invoke(handle.Handle, fence, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkResetFences.html">vkResetFences</see> - Resets one or more fence objects
/// </summary>
/// <remarks>
/// <para>
/// To set the state of fences to unsignaled from the host, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkResetFences(
/// VkDevice device,
/// uint32_t fenceCount,
/// const VkFence* pFences);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void ResetFences(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkFence> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetFenceStatus.html">vkGetFenceStatus</see> - Return the status of a fence
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetFenceStatus
/// </para>
/// <para>
/// To query the status of a fence from the host, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkGetFenceStatus(
/// VkDevice device,
/// VkFence fence);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static VkResult GetFenceStatus(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkWaitForFences.html">vkWaitForFences</see> - Wait for one or more fences to become signaled
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkWaitForFences
/// </para>
/// <para>
/// To wait for one or more fences to enter the signaled state on the host,
/// call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkWaitForFences(
/// VkDevice device,
/// uint32_t fenceCount,
/// const VkFence* pFences,
/// VkBool32 waitAll,
/// uint64_t timeout);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult WaitForFences(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkFence> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateSemaphore.html">vkCreateSemaphore</see> - Create a new queue semaphore object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateSemaphore
/// :objectnameplural: semaphores
/// :objectnamecamelcase: semaphore
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create a semaphore, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreateSemaphore(
/// VkDevice device,
/// const VkSemaphoreCreateInfo* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkSemaphore* pSemaphore);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkSemaphore CreateSemaphore(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroySemaphore.html">vkDestroySemaphore</see> - Destroy a semaphore object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a semaphore, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroySemaphore(
/// VkDevice device,
/// VkSemaphore semaphore,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroySemaphore(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSemaphore semaphore,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroySemaphore.Invoke(handle.Handle, semaphore, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateQueryPool.html">vkCreateQueryPool</see> - Create a new query pool object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateQueryPool
/// :objectnameplural: query pools
/// :objectnamecamelcase: queryPool
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create a query pool, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreateQueryPool(
/// VkDevice device,
/// const VkQueryPoolCreateInfo* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkQueryPool* pQueryPool);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkQueryPool CreateQueryPool(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyQueryPool.html">vkDestroyQueryPool</see> - Destroy a query pool object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a query pool, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroyQueryPool(
/// VkDevice device,
/// VkQueryPool queryPool,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyQueryPool(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkQueryPool queryPool,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyQueryPool.Invoke(handle.Handle, queryPool, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetQueryPoolResults.html">vkGetQueryPoolResults</see> - Copy results of queries in a query pool to a host memory region
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetQueryPoolResults
/// </para>
/// <para>
/// To retrieve status and results for a set of queries, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult GetQueryPoolResults(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkQueryPool queryPool,
int firstQuery,
int queryCount,
scoped ReadOnlySpan<byte> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateBuffer.html">vkCreateBuffer</see> - Create a new buffer object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateBuffer
/// :objectnameplural: buffers
/// :objectnamecamelcase: buffer
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create buffers, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreateBuffer(
/// VkDevice device,
/// const VkBufferCreateInfo* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkBuffer* pBuffer);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkBuffer CreateBuffer(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyBuffer.html">vkDestroyBuffer</see> - Destroy a buffer object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a buffer, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroyBuffer(
/// VkDevice device,
/// VkBuffer buffer,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyBuffer(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkBuffer buffer,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyBuffer.Invoke(handle.Handle, buffer, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateImage.html">vkCreateImage</see> - Create a new image object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateImage
/// :objectnameplural: images
/// :objectnamecamelcase: image
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create images, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreateImage(
/// VkDevice device,
/// const VkImageCreateInfo* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkImage* pImage);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkImage CreateImage(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyImage.html">vkDestroyImage</see> - Destroy an image object
/// </summary>
/// <remarks>
/// <para>
/// To destroy an image, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroyImage(
/// VkDevice device,
/// VkImage image,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyImage(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkImage image,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyImage.Invoke(handle.Handle, image, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetImageSubresourceLayout.html">vkGetImageSubresourceLayout</see> - Retrieve information about an image subresource
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetImageSubresourceLayout
/// </para>
/// <para>
/// To query the memory layout of an image subresource, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkGetImageSubresourceLayout(
/// VkDevice device,
/// VkImage image,
/// const VkImageSubresource* pSubresource,
/// VkSubresourceLayout* pLayout);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetImageSubresourceLayout(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkImage image,
VkImageSubresource* pSubresource,
ref VkSubresourceLayout pLayout
)
{
fixed (VkSubresourceLayout* pLayoutFixed = &pLayout)
{
handle.PInvoke.vkGetImageSubresourceLayout.Invoke(handle.Handle, image, pSubresource, pLayoutFixed);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkSubresourceLayout.</returns>
public static unsafe VkSubresourceLayout GetImageSubresourceLayout(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkImage image,
VkImageSubresource* pSubresource
)
{
VkSubresourceLayout outValue = new();
GetImageSubresourceLayout(handle, image, pSubresource, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateImageView.html">vkCreateImageView</see> - Create an image view from an existing image
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateImageView
/// :objectnameplural: image views
/// :objectnamecamelcase: imageView
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create an image view, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreateImageView(
/// VkDevice device,
/// const VkImageViewCreateInfo* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkImageView* pView);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkImageView CreateImageView(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyImageView.html">vkDestroyImageView</see> - Destroy an image view object
/// </summary>
/// <remarks>
/// <para>
/// To destroy an image view, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroyImageView(
/// VkDevice device,
/// VkImageView imageView,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyImageView(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkImageView imageView,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyImageView.Invoke(handle.Handle, imageView, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateCommandPool.html">vkCreateCommandPool</see> - Create a new command pool object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateCommandPool
/// :objectnameplural: command pools
/// :objectnamecamelcase: commandPool
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create a command pool, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreateCommandPool(
/// VkDevice device,
/// const VkCommandPoolCreateInfo* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkCommandPool* pCommandPool);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkCommandPool CreateCommandPool(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyCommandPool.html">vkDestroyCommandPool</see> - Destroy a command pool object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a command pool, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroyCommandPool(
/// VkDevice device,
/// VkCommandPool commandPool,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyCommandPool(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkCommandPool commandPool,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyCommandPool.Invoke(handle.Handle, commandPool, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkResetCommandPool.html">vkResetCommandPool</see> - Reset a command pool
/// </summary>
/// <remarks>
/// <para>
/// To reset a command pool, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkResetCommandPool(
/// VkDevice device,
/// VkCommandPool commandPool,
/// VkCommandPoolResetFlags flags);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ResetCommandPool(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkAllocateCommandBuffers.html">vkAllocateCommandBuffers</see> - Allocate command buffers from an existing command pool
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkAllocateCommandBuffers
/// </para>
/// <para>
/// To allocate command buffers, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkAllocateCommandBuffers(
/// VkDevice device,
/// const VkCommandBufferAllocateInfo* pAllocateInfo,
/// VkCommandBuffer* pCommandBuffers);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe void AllocateCommandBuffersInternal(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkCommandBufferAllocateInfo pAllocateInfo,
scoped ReadOnlySpan<VkCommandBuffer> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkFreeCommandBuffers.html">vkFreeCommandBuffers</see> - Free command buffers
/// </summary>
/// <remarks>
/// <para>
/// To free command buffers, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkFreeCommandBuffers(
/// VkDevice device,
/// VkCommandPool commandPool,
/// uint32_t commandBufferCount,
/// const VkCommandBuffer* pCommandBuffers);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe void FreeCommandBuffersInternal(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkCommandPool commandPool,
scoped ReadOnlySpan<VkCommandBuffer> pCommandBuffers
)
{
fixed (VkCommandBuffer* pCommandBuffersFixed = pCommandBuffers)
{
handle.PInvoke.vkFreeCommandBuffers.Invoke(
handle.Handle,
commandPool,
pCommandBuffers.Length,
pCommandBuffersFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkBeginCommandBuffer.html">vkBeginCommandBuffer</see> - Start recording a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkBeginCommandBuffer
/// </para>
/// <para>
/// To begin recording a command buffer, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkBeginCommandBuffer(
/// VkCommandBuffer commandBuffer,
/// const VkCommandBufferBeginInfo* pBeginInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void Begin<T>(this T handle, in VkCommandBufferBeginInfo pBeginInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkEndCommandBuffer.html">vkEndCommandBuffer</see> - Finish recording a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkEndCommandBuffer
/// </para>
/// <para>
/// To complete recording of a command buffer, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkEndCommandBuffer(
/// VkCommandBuffer commandBuffer);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void End<T>(this T handle)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkResetCommandBuffer.html">vkResetCommandBuffer</see> - Reset a command buffer to the initial state
/// </summary>
/// <remarks>
/// <para>
/// To reset a command buffer, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkResetCommandBuffer(
/// VkCommandBuffer commandBuffer,
/// VkCommandBufferResetFlags flags);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void Reset<T>(this T handle, VkCommandBufferResetFlags flags)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyBuffer.html">vkCmdCopyBuffer</see> - Copy data between buffer regions
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyBuffer
/// </para>
/// <para>
/// To copy data between buffer objects, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdCopyBuffer(
/// VkCommandBuffer commandBuffer,
/// VkBuffer srcBuffer,
/// VkBuffer dstBuffer,
/// uint32_t regionCount,
/// const VkBufferCopy* pRegions);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyBuffer<T>(
this T handle,
VkBuffer srcBuffer,
VkBuffer dstBuffer,
scoped ReadOnlySpan<VkBufferCopy> pRegions
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkBufferCopy* pRegionsFixed = pRegions)
{
handle.PInvoke.vkCmdCopyBuffer.Invoke(
handle.Handle,
srcBuffer,
dstBuffer,
pRegions.Length,
pRegionsFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyImage.html">vkCmdCopyImage</see> - Copy data between images
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyImage
/// </para>
/// <para>
/// To copy data between image objects, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdCopyImage(
/// VkCommandBuffer commandBuffer,
/// VkImage srcImage,
/// VkImageLayout srcImageLayout,
/// VkImage dstImage,
/// VkImageLayout dstImageLayout,
/// uint32_t regionCount,
/// const VkImageCopy* pRegions);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyImage<T>(
this T handle,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage dstImage,
VkImageLayout dstImageLayout,
scoped ReadOnlySpan<VkImageCopy> pRegions
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkImageCopy* pRegionsFixed = pRegions)
{
handle.PInvoke.vkCmdCopyImage.Invoke(
handle.Handle,
srcImage,
srcImageLayout,
dstImage,
dstImageLayout,
pRegions.Length,
pRegionsFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyBufferToImage.html">vkCmdCopyBufferToImage</see> - Copy data from a buffer into an image
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyBufferToImage
/// </para>
/// <para>
/// To copy data from a buffer object to an image object, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdCopyBufferToImage(
/// VkCommandBuffer commandBuffer,
/// VkBuffer srcBuffer,
/// VkImage dstImage,
/// VkImageLayout dstImageLayout,
/// uint32_t regionCount,
/// const VkBufferImageCopy* pRegions);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyBufferToImage<T>(
this T handle,
VkBuffer srcBuffer,
VkImage dstImage,
VkImageLayout dstImageLayout,
scoped ReadOnlySpan<VkBufferImageCopy> pRegions
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkBufferImageCopy* pRegionsFixed = pRegions)
{
handle.PInvoke.vkCmdCopyBufferToImage.Invoke(
handle.Handle,
srcBuffer,
dstImage,
dstImageLayout,
pRegions.Length,
pRegionsFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyImageToBuffer.html">vkCmdCopyImageToBuffer</see> - Copy image data into a buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyImageToBuffer
/// </para>
/// <para>
/// To copy data from an image object to a buffer object, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdCopyImageToBuffer(
/// VkCommandBuffer commandBuffer,
/// VkImage srcImage,
/// VkImageLayout srcImageLayout,
/// VkBuffer dstBuffer,
/// uint32_t regionCount,
/// const VkBufferImageCopy* pRegions);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyImageToBuffer<T>(
this T handle,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkBuffer dstBuffer,
scoped ReadOnlySpan<VkBufferImageCopy> pRegions
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkBufferImageCopy* pRegionsFixed = pRegions)
{
handle.PInvoke.vkCmdCopyImageToBuffer.Invoke(
handle.Handle,
srcImage,
srcImageLayout,
dstBuffer,
pRegions.Length,
pRegionsFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdUpdateBuffer.html">vkCmdUpdateBuffer</see> - Update a buffer&amp;apos;s contents from host memory
/// </summary>
/// <remarks>
/// <para>
/// To update buffer data inline in a command buffer, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdUpdateBuffer(
/// VkCommandBuffer commandBuffer,
/// VkBuffer dstBuffer,
/// VkDeviceSize dstOffset,
/// VkDeviceSize dataSize,
/// const void* pData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void UpdateBuffer<T>(
this T handle,
VkBuffer dstBuffer,
ByteSize64 dstOffset,
scoped ReadOnlySpan<byte> pData
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (byte* pDataFixed = pData)
{
handle.PInvoke.vkCmdUpdateBuffer.Invoke(
handle.Handle,
dstBuffer,
dstOffset,
(ByteSize64)pData.Length,
pDataFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdFillBuffer.html">vkCmdFillBuffer</see> - Fill a region of a buffer with a fixed value
/// </summary>
/// <remarks>
/// <para>
/// To clear buffer data, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdFillBuffer(
/// VkCommandBuffer commandBuffer,
/// VkBuffer dstBuffer,
/// VkDeviceSize dstOffset,
/// VkDeviceSize size,
/// uint32_t data);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void FillBuffer<T>(
this T handle,
VkBuffer dstBuffer,
ByteSize64 dstOffset,
ByteSize64 size,
int data
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdFillBuffer.Invoke(handle.Handle, dstBuffer, dstOffset, size, data);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPipelineBarrier.html">vkCmdPipelineBarrier</see> - Insert a memory dependency
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdPipelineBarrier
/// </para>
/// <para>
/// To record a pipeline barrier, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void PipelineBarrier<T>(
this T handle,
VkPipelineStageFlags srcStageMask,
VkPipelineStageFlags dstStageMask,
VkDependencyFlags dependencyFlags,
scoped ReadOnlySpan<VkMemoryBarrier> pMemoryBarriers,
scoped ReadOnlySpan<VkBufferMemoryBarrier> pBufferMemoryBarriers,
scoped ReadOnlySpan<VkImageMemoryBarrier> pImageMemoryBarriers
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
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
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBeginQuery.html">vkCmdBeginQuery</see> - Begin a query
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBeginQuery
/// </para>
/// <para>
/// To begin a query, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdBeginQuery(
/// VkCommandBuffer commandBuffer,
/// VkQueryPool queryPool,
/// uint32_t query,
/// VkQueryControlFlags flags);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void BeginQuery<T>(this T handle, VkQueryPool queryPool, int query, VkQueryControlFlags flags)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdBeginQuery.Invoke(handle.Handle, queryPool, query, flags);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEndQuery.html">vkCmdEndQuery</see> - Ends a query
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdEndQuery
/// </para>
/// <para>
/// To end a query after the set of desired commands is recorded, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdEndQuery(
/// VkCommandBuffer commandBuffer,
/// VkQueryPool queryPool,
/// uint32_t query);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void EndQuery<T>(this T handle, VkQueryPool queryPool, int query)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdEndQuery.Invoke(handle.Handle, queryPool, query);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdResetQueryPool.html">vkCmdResetQueryPool</see> - Reset queries in a query pool
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdResetQueryPool
/// </para>
/// <para>
/// To reset a range of queries in a query pool on a queue, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdResetQueryPool(
/// VkCommandBuffer commandBuffer,
/// VkQueryPool queryPool,
/// uint32_t firstQuery,
/// uint32_t queryCount);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ResetQueryPool<T>(this T handle, VkQueryPool queryPool, int firstQuery, int queryCount)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdResetQueryPool.Invoke(handle.Handle, queryPool, firstQuery, queryCount);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdWriteTimestamp.html">vkCmdWriteTimestamp</see> - Write a device timestamp into a query object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdWriteTimestamp
/// </para>
/// <para>
/// To request a timestamp and write the value to memory, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdWriteTimestamp(
/// VkCommandBuffer commandBuffer,
/// VkPipelineStageFlagBits pipelineStage,
/// VkQueryPool queryPool,
/// uint32_t query);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void WriteTimestamp<T>(
this T handle,
VkPipelineStageFlags pipelineStage,
VkQueryPool queryPool,
int query
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdWriteTimestamp.Invoke(handle.Handle, pipelineStage, queryPool, query);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyQueryPoolResults.html">vkCmdCopyQueryPoolResults</see> - Copy the results of queries in a query pool to a buffer object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyQueryPoolResults
/// </para>
/// <para>
/// To copy query statuses and numerical results directly to buffer memory,
/// call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyQueryPoolResults<T>(
this T handle,
VkQueryPool queryPool,
int firstQuery,
int queryCount,
VkBuffer dstBuffer,
ByteSize64 dstOffset,
ByteSize64 stride,
VkQueryResultFlags flags
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdCopyQueryPoolResults.Invoke(
handle.Handle,
queryPool,
firstQuery,
queryCount,
dstBuffer,
dstOffset,
stride,
flags
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdExecuteCommands.html">vkCmdExecuteCommands</see> - Execute a secondary command buffer from a primary command buffer
/// </summary>
/// <remarks>
/// <para>
/// Secondary command buffers <i>must</i> not be directly submitted to a queue.
/// To record a secondary command buffer to execute as part of a primary command
/// buffer, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdExecuteCommands(
/// VkCommandBuffer commandBuffer,
/// uint32_t commandBufferCount,
/// const VkCommandBuffer* pCommandBuffers);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe void CmdExecuteCommandsInternal<T>(
this T handle,
scoped ReadOnlySpan<VkCommandBuffer> pCommandBuffers
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCommandBuffer* pCommandBuffersFixed = pCommandBuffers)
{
handle.PInvoke.vkCmdExecuteCommands.Invoke(handle.Handle, pCommandBuffers.Length, pCommandBuffersFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateEvent.html">vkCreateEvent</see> - Create a new event object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateEvent
/// :objectnameplural: events
/// :objectnamecamelcase: event
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create an event, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreateEvent(
/// VkDevice device,
/// const VkEventCreateInfo* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkEvent* pEvent);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkEvent CreateEvent(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyEvent.html">vkDestroyEvent</see> - Destroy an event object
/// </summary>
/// <remarks>
/// <para>
/// To destroy an event, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroyEvent(
/// VkDevice device,
/// VkEvent event,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyEvent(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkEvent @event,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyEvent.Invoke(handle.Handle, @event, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetEventStatus.html">vkGetEventStatus</see> - Retrieve the status of an event object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetEventStatus
/// </para>
/// <para>
/// To query the state of an event from the host, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkGetEventStatus(
/// VkDevice device,
/// VkEvent event);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static VkResult GetEventStatus(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkSetEvent.html">vkSetEvent</see> - Set an event to signaled state
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkSetEvent
/// </para>
/// <para>
/// To set the state of an event to signaled from the host, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkSetEvent(
/// VkDevice device,
/// VkEvent event);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetEvent(this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkResetEvent.html">vkResetEvent</see> - Reset an event to non-signaled state
/// </summary>
/// <remarks>
/// <para>
/// To set the state of an event to unsignaled from the host, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkResetEvent(
/// VkDevice device,
/// VkEvent event);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ResetEvent(this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateBufferView.html">vkCreateBufferView</see> - Create a new buffer view object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateBufferView
/// :objectnameplural: buffer views
/// :objectnamecamelcase: bufferView
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create a buffer view, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreateBufferView(
/// VkDevice device,
/// const VkBufferViewCreateInfo* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkBufferView* pView);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkBufferView CreateBufferView(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyBufferView.html">vkDestroyBufferView</see> - Destroy a buffer view object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a buffer view, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroyBufferView(
/// VkDevice device,
/// VkBufferView bufferView,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyBufferView(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkBufferView bufferView,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyBufferView.Invoke(handle.Handle, bufferView, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateShaderModule.html">vkCreateShaderModule</see> - Creates a new shader module object
/// </summary>
/// <remarks>
/// <para>
/// To create a shader module, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreateShaderModule(
/// VkDevice device,
/// const VkShaderModuleCreateInfo* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkShaderModule* pShaderModule);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkShaderModule CreateShaderModule(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyShaderModule.html">vkDestroyShaderModule</see> - Destroy a shader module
/// </summary>
/// <remarks>
/// <para>
/// To destroy a shader module, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroyShaderModule(
/// VkDevice device,
/// VkShaderModule shaderModule,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyShaderModule(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkShaderModule shaderModule,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyShaderModule.Invoke(handle.Handle, shaderModule, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreatePipelineCache.html">vkCreatePipelineCache</see> - Creates a new pipeline cache
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreatePipelineCache
/// :objectnameplural: pipeline caches
/// :objectnamecamelcase: pipelineCache
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create pipeline cache objects, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreatePipelineCache(
/// VkDevice device,
/// const VkPipelineCacheCreateInfo* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkPipelineCache* pPipelineCache);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkPipelineCache CreatePipelineCache(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyPipelineCache.html">vkDestroyPipelineCache</see> - Destroy a pipeline cache object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a pipeline cache, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroyPipelineCache(
/// VkDevice device,
/// VkPipelineCache pipelineCache,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyPipelineCache(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipelineCache pipelineCache,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyPipelineCache.Invoke(handle.Handle, pipelineCache, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetPipelineCacheData.html">vkGetPipelineCacheData</see> - Get the data store from a pipeline cache
/// </summary>
/// <remarks>
/// <para>
/// Data <i>can</i> be retrieved from a pipeline cache object using the command:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkGetPipelineCacheData(
/// VkDevice device,
/// VkPipelineCache pipelineCache,
/// size_t* pDataSize,
/// void* pData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe VkResult GetPipelineCacheData(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipelineCache pipelineCache,
ref nuint pDataSize,
scoped ReadOnlySpan<byte> 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;
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static nuint GetPipelineCacheData_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipelineCache pipelineCache
)
{
nuint pDataSize = default;
GetPipelineCacheData(handle, pipelineCache, ref pDataSize, null);
return pDataSize;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pData">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static VkResult GetPipelineCacheData_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipelineCache pipelineCache,
scoped ReadOnlySpan<byte> pData
)
{
nuint pDataSize = (nuint)pData.Length;
return GetPipelineCacheData(handle, pipelineCache, ref pDataSize, pData);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkMergePipelineCaches.html">vkMergePipelineCaches</see> - Combine the data stores of pipeline caches
/// </summary>
/// <remarks>
/// <para>
/// Pipeline cache objects <i>can</i> be merged using the command:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkMergePipelineCaches(
/// VkDevice device,
/// VkPipelineCache dstCache,
/// uint32_t srcCacheCount,
/// const VkPipelineCache* pSrcCaches);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void MergePipelineCaches(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipelineCache dstCache,
scoped ReadOnlySpan<VkPipelineCache> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateComputePipelines.html">vkCreateComputePipelines</see> - Creates a new compute pipeline object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateComputePipelines
/// :objectnameplural: compute pipelines
/// :objectnamecamelcase: computePipeline
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: <c>createInfoCount</c>
/// </para>
/// <para>
/// To create compute pipelines, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreateComputePipelines(
/// VkDevice device,
/// VkPipelineCache pipelineCache,
/// uint32_t createInfoCount,
/// const VkComputePipelineCreateInfo* pCreateInfos,
/// const VkAllocationCallbacks* pAllocator,
/// VkPipeline* pPipelines);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CreateComputePipelines(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipelineCache pipelineCache,
scoped ReadOnlySpan<VkComputePipelineCreateInfo> pCreateInfos,
VkAllocator? pAllocator,
scoped ReadOnlySpan<VkPipeline> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyPipeline.html">vkDestroyPipeline</see> - Destroy a pipeline object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a pipeline, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroyPipeline(
/// VkDevice device,
/// VkPipeline pipeline,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyPipeline(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipeline pipeline,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyPipeline.Invoke(handle.Handle, pipeline, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreatePipelineLayout.html">vkCreatePipelineLayout</see> - Creates a new pipeline layout object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreatePipelineLayout
/// :objectnameplural: pipeline layouts
/// :objectnamecamelcase: pipelineLayout
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create a pipeline layout, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreatePipelineLayout(
/// VkDevice device,
/// const VkPipelineLayoutCreateInfo* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkPipelineLayout* pPipelineLayout);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkPipelineLayout CreatePipelineLayout(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyPipelineLayout.html">vkDestroyPipelineLayout</see> - Destroy a pipeline layout object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a pipeline layout, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroyPipelineLayout(
/// VkDevice device,
/// VkPipelineLayout pipelineLayout,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyPipelineLayout(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipelineLayout pipelineLayout,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyPipelineLayout.Invoke(handle.Handle, pipelineLayout, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateSampler.html">vkCreateSampler</see> - Create a new sampler object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateSampler
/// :objectnameplural: samplers
/// :objectnamecamelcase: sampler
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create a sampler object, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreateSampler(
/// VkDevice device,
/// const VkSamplerCreateInfo* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkSampler* pSampler);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkSampler CreateSampler(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroySampler.html">vkDestroySampler</see> - Destroy a sampler object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a sampler, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroySampler(
/// VkDevice device,
/// VkSampler sampler,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroySampler(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSampler sampler,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroySampler.Invoke(handle.Handle, sampler, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateDescriptorSetLayout.html">vkCreateDescriptorSetLayout</see> - Create a new descriptor set layout
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateDescriptorSetLayout
/// :objectnameplural: descriptor set layouts
/// :objectnamecamelcase: descriptorSetLayout
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create descriptor set layout objects, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreateDescriptorSetLayout(
/// VkDevice device,
/// const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkDescriptorSetLayout* pSetLayout);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkDescriptorSetLayout CreateDescriptorSetLayout(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyDescriptorSetLayout.html">vkDestroyDescriptorSetLayout</see> - Destroy a descriptor set layout object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a descriptor set layout, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroyDescriptorSetLayout(
/// VkDevice device,
/// VkDescriptorSetLayout descriptorSetLayout,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyDescriptorSetLayout(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDescriptorSetLayout descriptorSetLayout,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyDescriptorSetLayout.Invoke(handle.Handle, descriptorSetLayout, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateDescriptorPool.html">vkCreateDescriptorPool</see> - Creates a descriptor pool object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateDescriptorPool
/// :objectnameplural: descriptor pools
/// :objectnamecamelcase: descriptorPool
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create a descriptor pool object, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreateDescriptorPool(
/// VkDevice device,
/// const VkDescriptorPoolCreateInfo* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkDescriptorPool* pDescriptorPool);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkDescriptorPool CreateDescriptorPool(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyDescriptorPool.html">vkDestroyDescriptorPool</see> - Destroy a descriptor pool object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a descriptor pool, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroyDescriptorPool(
/// VkDevice device,
/// VkDescriptorPool descriptorPool,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyDescriptorPool(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDescriptorPool descriptorPool,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyDescriptorPool.Invoke(handle.Handle, descriptorPool, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkResetDescriptorPool.html">vkResetDescriptorPool</see> - Resets a descriptor pool object
/// </summary>
/// <remarks>
/// <para>
/// To return all descriptor sets allocated from a given pool to the pool,
/// rather than freeing individual descriptor sets, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkResetDescriptorPool(
/// VkDevice device,
/// VkDescriptorPool descriptorPool,
/// VkDescriptorPoolResetFlags flags);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ResetDescriptorPool(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkAllocateDescriptorSets.html">vkAllocateDescriptorSets</see> - Allocate one or more descriptor sets
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkAllocateDescriptorSets
/// :objectnameplural: descriptor sets
/// :objectnamecamelcase: descriptorSet
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: <c>VkDescriptorSetAllocateInfo::descriptorSetCount</c>
/// </para>
/// <para>
/// To allocate descriptor sets from a descriptor pool, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkAllocateDescriptorSets(
/// VkDevice device,
/// const VkDescriptorSetAllocateInfo* pAllocateInfo,
/// VkDescriptorSet* pDescriptorSets);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void AllocateDescriptorSets(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDescriptorSetAllocateInfo pAllocateInfo,
scoped ReadOnlySpan<VkDescriptorSet> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkFreeDescriptorSets.html">vkFreeDescriptorSets</see> - Free one or more descriptor sets
/// </summary>
/// <remarks>
/// <para>
/// To free allocated descriptor sets, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkFreeDescriptorSets(
/// VkDevice device,
/// VkDescriptorPool descriptorPool,
/// uint32_t descriptorSetCount,
/// const VkDescriptorSet* pDescriptorSets);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe void FreeDescriptorSetsInternal(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDescriptorPool descriptorPool,
scoped ReadOnlySpan<VkDescriptorSet> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkUpdateDescriptorSets.html">vkUpdateDescriptorSets</see> - Update the contents of a descriptor set object
/// </summary>
/// <remarks>
/// <para>
/// Once allocated, descriptor sets <i>can</i> be updated with a combination of write
/// and copy operations.
/// To update descriptor sets, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkUpdateDescriptorSets(
/// VkDevice device,
/// uint32_t descriptorWriteCount,
/// const VkWriteDescriptorSet* pDescriptorWrites,
/// uint32_t descriptorCopyCount,
/// const VkCopyDescriptorSet* pDescriptorCopies);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void UpdateDescriptorSets(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkWriteDescriptorSet> pDescriptorWrites,
scoped ReadOnlySpan<VkCopyDescriptorSet> pDescriptorCopies
)
{
fixed (VkCopyDescriptorSet* pDescriptorCopiesFixed = pDescriptorCopies)
fixed (VkWriteDescriptorSet* pDescriptorWritesFixed = pDescriptorWrites)
{
handle.PInvoke.vkUpdateDescriptorSets.Invoke(
handle.Handle,
pDescriptorWrites.Length,
pDescriptorWritesFixed,
pDescriptorCopies.Length,
pDescriptorCopiesFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindPipeline.html">vkCmdBindPipeline</see> - Bind a pipeline object to a command buffer
/// </summary>
/// <remarks>
/// <para>
/// Once a pipeline has been created, it <i>can</i> be bound to the command buffer
/// using the command:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdBindPipeline(
/// VkCommandBuffer commandBuffer,
/// VkPipelineBindPoint pipelineBindPoint,
/// VkPipeline pipeline);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void BindPipeline<T>(this T handle, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdBindPipeline.Invoke(handle.Handle, pipelineBindPoint, pipeline);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindDescriptorSets.html">vkCmdBindDescriptorSets</see> - Binds descriptor sets to a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBindDescriptorSets
/// </para>
/// <para>
/// To bind one or more descriptor sets to a command buffer, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindDescriptorSets<T>(
this T handle,
VkPipelineBindPoint pipelineBindPoint,
VkPipelineLayout layout,
int firstSet,
scoped ReadOnlySpan<VkDescriptorSet> pDescriptorSets,
scoped Span<ByteSize32> pDynamicOffsets
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (ByteSize32* pDynamicOffsetsFixed = pDynamicOffsets)
fixed (VkDescriptorSet* pDescriptorSetsFixed = pDescriptorSets)
{
handle.PInvoke.vkCmdBindDescriptorSets.Invoke(
handle.Handle,
pipelineBindPoint,
layout,
firstSet,
pDescriptorSets.Length,
pDescriptorSetsFixed,
pDynamicOffsets.Length,
(int*)pDynamicOffsetsFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdClearColorImage.html">vkCmdClearColorImage</see> - Clear regions of a color image
/// </summary>
/// <remarks>
/// <para>
/// To clear one or more subranges of a color image, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdClearColorImage(
/// VkCommandBuffer commandBuffer,
/// VkImage image,
/// VkImageLayout imageLayout,
/// const VkClearColorValue* pColor,
/// uint32_t rangeCount,
/// const VkImageSubresourceRange* pRanges);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void ClearColorImage<T>(
this T handle,
VkImage image,
VkImageLayout imageLayout,
VkClearColorValue* pColor,
scoped ReadOnlySpan<VkImageSubresourceRange> pRanges
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkImageSubresourceRange* pRangesFixed = pRanges)
{
handle.PInvoke.vkCmdClearColorImage.Invoke(
handle.Handle,
image,
imageLayout,
pColor,
pRanges.Length,
pRangesFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDispatch.html">vkCmdDispatch</see> - Dispatch compute work items
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDispatch
/// </para>
/// <para>
/// To record a dispatch, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdDispatch(
/// VkCommandBuffer commandBuffer,
/// uint32_t groupCountX,
/// uint32_t groupCountY,
/// uint32_t groupCountZ);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void Dispatch<T>(this T handle, int groupCountX, int groupCountY, int groupCountZ)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDispatch.Invoke(handle.Handle, groupCountX, groupCountY, groupCountZ);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDispatchIndirect.html">vkCmdDispatchIndirect</see> - Dispatch compute work items with indirect parameters
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDispatchIndirect
/// </para>
/// <para>
/// To record an indirect dispatching command, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdDispatchIndirect(
/// VkCommandBuffer commandBuffer,
/// VkBuffer buffer,
/// VkDeviceSize offset);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DispatchIndirect<T>(this T handle, VkBuffer buffer, ByteSize64 offset)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDispatchIndirect.Invoke(handle.Handle, buffer, offset);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetEvent.html">vkCmdSetEvent</see> - Set an event object to signaled state
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdSetEvent
/// </para>
/// <para>
/// To set the state of an event to signaled from a device, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdSetEvent(
/// VkCommandBuffer commandBuffer,
/// VkEvent event,
/// VkPipelineStageFlags stageMask);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetEvent<T>(this T handle, VkEvent @event, VkPipelineStageFlags stageMask)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetEvent.Invoke(handle.Handle, @event, stageMask);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdResetEvent.html">vkCmdResetEvent</see> - Reset an event object to non-signaled state
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdResetEvent
/// </para>
/// <para>
/// To set the state of an event to unsignaled from a device, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdResetEvent(
/// VkCommandBuffer commandBuffer,
/// VkEvent event,
/// VkPipelineStageFlags stageMask);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ResetEvent<T>(this T handle, VkEvent @event, VkPipelineStageFlags stageMask)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdResetEvent.Invoke(handle.Handle, @event, stageMask);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdWaitEvents.html">vkCmdWaitEvents</see> - Wait for one or more events and insert a set of memory
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdWaitEvents
/// </para>
/// <para>
/// To wait for one or more events to enter the signaled state on a device,
/// call:
/// </para>
/// <para>
/// [[synchronization-events-waiting-device]]
/// <code>
/// // 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);
/// </code>
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void WaitEvents<T>(
this T handle,
scoped ReadOnlySpan<VkEvent> pEvents,
VkPipelineStageFlags srcStageMask,
VkPipelineStageFlags dstStageMask,
scoped ReadOnlySpan<VkMemoryBarrier> pMemoryBarriers,
scoped ReadOnlySpan<VkBufferMemoryBarrier> pBufferMemoryBarriers,
scoped ReadOnlySpan<VkImageMemoryBarrier> pImageMemoryBarriers
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
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
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPushConstants.html">vkCmdPushConstants</see> - Update the values of push constants
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdPushConstants
/// </para>
/// <para>
/// To update push constants, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdPushConstants(
/// VkCommandBuffer commandBuffer,
/// VkPipelineLayout layout,
/// VkShaderStageFlags stageFlags,
/// uint32_t offset,
/// uint32_t size,
/// const void* pValues);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void PushConstants<T>(
this T handle,
VkPipelineLayout layout,
VkShaderStageFlags stageFlags,
int offset,
scoped ReadOnlySpan<byte> pValues
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (byte* pValuesFixed = pValues)
{
handle.PInvoke.vkCmdPushConstants.Invoke(
handle.Handle,
layout,
stageFlags,
offset,
pValues.Length,
pValuesFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateGraphicsPipelines.html">vkCreateGraphicsPipelines</see> - Create graphics pipelines
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateGraphicsPipelines
/// :objectnameplural: graphics pipelines
/// :objectnamecamelcase: graphicsPipeline
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: <c>createInfoCount</c>
/// </para>
/// <para>
/// To create graphics pipelines, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreateGraphicsPipelines(
/// VkDevice device,
/// VkPipelineCache pipelineCache,
/// uint32_t createInfoCount,
/// const VkGraphicsPipelineCreateInfo* pCreateInfos,
/// const VkAllocationCallbacks* pAllocator,
/// VkPipeline* pPipelines);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CreateGraphicsPipelines(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipelineCache pipelineCache,
scoped ReadOnlySpan<VkGraphicsPipelineCreateInfo> pCreateInfos,
VkAllocator? pAllocator,
scoped ReadOnlySpan<VkPipeline> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateFramebuffer.html">vkCreateFramebuffer</see> - Create a new framebuffer object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateFramebuffer
/// :objectnameplural: framebuffers
/// :objectnamecamelcase: framebuffer
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create a framebuffer, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreateFramebuffer(
/// VkDevice device,
/// const VkFramebufferCreateInfo* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkFramebuffer* pFramebuffer);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkFramebuffer CreateFramebuffer(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyFramebuffer.html">vkDestroyFramebuffer</see> - Destroy a framebuffer object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a framebuffer, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroyFramebuffer(
/// VkDevice device,
/// VkFramebuffer framebuffer,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyFramebuffer(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkFramebuffer framebuffer,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyFramebuffer.Invoke(handle.Handle, framebuffer, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateRenderPass.html">vkCreateRenderPass</see> - Create a new render pass object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateRenderPass
/// :objectnameplural: render passes
/// :objectnamecamelcase: renderPass
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create a render pass, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// VkResult vkCreateRenderPass(
/// VkDevice device,
/// const VkRenderPassCreateInfo* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkRenderPass* pRenderPass);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkRenderPass CreateRenderPass(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyRenderPass.html">vkDestroyRenderPass</see> - Destroy a render pass object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a render pass, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkDestroyRenderPass(
/// VkDevice device,
/// VkRenderPass renderPass,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyRenderPass(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkRenderPass renderPass,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyRenderPass.Invoke(handle.Handle, renderPass, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetRenderAreaGranularity.html">vkGetRenderAreaGranularity</see> - Returns the granularity for optimal render area
/// </summary>
/// <remarks>
/// <para>
/// To query the render area granularity, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkGetRenderAreaGranularity(
/// VkDevice device,
/// VkRenderPass renderPass,
/// VkExtent2D* pGranularity);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetRenderAreaGranularity(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkRenderPass renderPass,
ref VkExtent2D pGranularity
)
{
fixed (VkExtent2D* pGranularityFixed = &pGranularity)
{
handle.PInvoke.vkGetRenderAreaGranularity.Invoke(handle.Handle, renderPass, pGranularityFixed);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkExtent2D.</returns>
public static VkExtent2D GetRenderAreaGranularity(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkRenderPass renderPass
)
{
VkExtent2D outValue = new();
GetRenderAreaGranularity(handle, renderPass, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetViewport.html">vkCmdSetViewport</see> - Set the viewport dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the viewport transformation
/// parameters, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdSetViewport(
/// VkCommandBuffer commandBuffer,
/// uint32_t firstViewport,
/// uint32_t viewportCount,
/// const VkViewport* pViewports);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetViewport<T>(
this T handle,
int firstViewport,
scoped ReadOnlySpan<VkViewport> pViewports
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkViewport* pViewportsFixed = pViewports)
{
handle.PInvoke.vkCmdSetViewport.Invoke(
handle.Handle,
firstViewport,
pViewports.Length,
pViewportsFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetScissor.html">vkCmdSetScissor</see> - Set scissor rectangles dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the scissor rectangles,
/// call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdSetScissor(
/// VkCommandBuffer commandBuffer,
/// uint32_t firstScissor,
/// uint32_t scissorCount,
/// const VkRect2D* pScissors);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetScissor<T>(
this T handle,
int firstScissor,
scoped ReadOnlySpan<VkRect2D> pScissors
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkRect2D* pScissorsFixed = pScissors)
{
handle.PInvoke.vkCmdSetScissor.Invoke(handle.Handle, firstScissor, pScissors.Length, pScissorsFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetLineWidth.html">vkCmdSetLineWidth</see> - Set line width dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the line width, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdSetLineWidth(
/// VkCommandBuffer commandBuffer,
/// float lineWidth);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetLineWidth<T>(this T handle, float lineWidth)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetLineWidth.Invoke(handle.Handle, lineWidth);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDepthBias.html">vkCmdSetDepthBias</see> - Set depth bias factors and clamp dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the depth bias parameters,
/// call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdSetDepthBias(
/// VkCommandBuffer commandBuffer,
/// float depthBiasConstantFactor,
/// float depthBiasClamp,
/// float depthBiasSlopeFactor);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDepthBias<T>(
this T handle,
float depthBiasConstantFactor,
float depthBiasClamp,
float depthBiasSlopeFactor
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDepthBias.Invoke(
handle.Handle,
depthBiasConstantFactor,
depthBiasClamp,
depthBiasSlopeFactor
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetBlendConstants.html">vkCmdSetBlendConstants</see> - Set the values of blend constants
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set and change^</see> the blend
/// constants, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdSetBlendConstants(
/// VkCommandBuffer commandBuffer,
/// const float blendConstants[4]);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetBlendConstants<T>(this T handle, float* blendConstants)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetBlendConstants.Invoke(handle.Handle, blendConstants);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDepthBounds.html">vkCmdSetDepthBounds</see> - Set depth bounds range dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the depth bounds range,
/// call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdSetDepthBounds(
/// VkCommandBuffer commandBuffer,
/// float minDepthBounds,
/// float maxDepthBounds);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDepthBounds<T>(this T handle, float minDepthBounds, float maxDepthBounds)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDepthBounds.Invoke(handle.Handle, minDepthBounds, maxDepthBounds);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetStencilCompareMask.html">vkCmdSetStencilCompareMask</see> - Set stencil compare mask dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the stencil compare mask,
/// call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdSetStencilCompareMask(
/// VkCommandBuffer commandBuffer,
/// VkStencilFaceFlags faceMask,
/// uint32_t compareMask);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetStencilCompareMask<T>(this T handle, VkStencilFaceFlags faceMask, int compareMask)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetStencilCompareMask.Invoke(handle.Handle, faceMask, compareMask);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetStencilWriteMask.html">vkCmdSetStencilWriteMask</see> - Set stencil write mask dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the stencil write mask,
/// call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdSetStencilWriteMask(
/// VkCommandBuffer commandBuffer,
/// VkStencilFaceFlags faceMask,
/// uint32_t writeMask);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetStencilWriteMask<T>(this T handle, VkStencilFaceFlags faceMask, int writeMask)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetStencilWriteMask.Invoke(handle.Handle, faceMask, writeMask);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetStencilReference.html">vkCmdSetStencilReference</see> - Set stencil reference value dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the stencil reference value,
/// call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdSetStencilReference(
/// VkCommandBuffer commandBuffer,
/// VkStencilFaceFlags faceMask,
/// uint32_t reference);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetStencilReference<T>(this T handle, VkStencilFaceFlags faceMask, int reference)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetStencilReference.Invoke(handle.Handle, faceMask, reference);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindIndexBuffer.html">vkCmdBindIndexBuffer</see> - Bind an index buffer to a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBindIndexBuffer
/// </para>
/// <para>
/// To bind an index buffer to a command buffer, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdBindIndexBuffer(
/// VkCommandBuffer commandBuffer,
/// VkBuffer buffer,
/// VkDeviceSize offset,
/// VkIndexType indexType);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void BindIndexBuffer<T>(this T handle, VkBuffer buffer, ByteSize64 offset, VkIndexType indexType)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdBindIndexBuffer.Invoke(handle.Handle, buffer, offset, indexType);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindVertexBuffers.html">vkCmdBindVertexBuffers</see> - Bind vertex buffers to a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To bind vertex buffers to a command buffer for use in subsequent drawing
/// commands, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdBindVertexBuffers(
/// VkCommandBuffer commandBuffer,
/// uint32_t firstBinding,
/// uint32_t bindingCount,
/// const VkBuffer* pBuffers,
/// const VkDeviceSize* pOffsets);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindVertexBuffers<T>(
this T handle,
int firstBinding,
scoped ReadOnlySpan<VkBuffer> pBuffers,
scoped ReadOnlySpan<ByteSize64> pOffsets
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (ByteSize64* pOffsetsFixed = pOffsets)
fixed (VkBuffer* pBuffersFixed = pBuffers)
{
handle.PInvoke.vkCmdBindVertexBuffers.Invoke(
handle.Handle,
firstBinding,
pBuffers.Length,
pBuffersFixed,
pOffsetsFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDraw.html">vkCmdDraw</see> - Draw primitives
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDraw
/// </para>
/// <para>
/// To record a non-indexed draw, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdDraw(
/// VkCommandBuffer commandBuffer,
/// uint32_t vertexCount,
/// uint32_t instanceCount,
/// uint32_t firstVertex,
/// uint32_t firstInstance);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void Draw<T>(
this T handle,
int vertexCount,
int instanceCount,
int firstVertex,
int firstInstance
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDraw.Invoke(handle.Handle, vertexCount, instanceCount, firstVertex, firstInstance);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawIndexed.html">vkCmdDrawIndexed</see> - Draw primitives with indexed vertices
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawIndexed
/// </para>
/// <para>
/// To record an indexed draw, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawIndexed<T>(
this T handle,
int indexCount,
int instanceCount,
int firstIndex,
int vertexOffset,
int firstInstance
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawIndexed.Invoke(
handle.Handle,
indexCount,
instanceCount,
firstIndex,
vertexOffset,
firstInstance
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawIndirect.html">vkCmdDrawIndirect</see> - Draw primitives with indirect parameters
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawIndirect
/// </para>
/// <para>
/// To record a non-indexed indirect drawing command, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdDrawIndirect(
/// VkCommandBuffer commandBuffer,
/// VkBuffer buffer,
/// VkDeviceSize offset,
/// uint32_t drawCount,
/// uint32_t stride);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawIndirect<T>(
this T handle,
VkBuffer buffer,
ByteSize64 offset,
int drawCount,
ByteSize32 stride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawIndirect.Invoke(handle.Handle, buffer, offset, drawCount, stride);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawIndexedIndirect.html">vkCmdDrawIndexedIndirect</see> - Draw primitives with indirect parameters and indexed vertices
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawIndexedIndirect
/// </para>
/// <para>
/// To record an indexed indirect drawing command, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdDrawIndexedIndirect(
/// VkCommandBuffer commandBuffer,
/// VkBuffer buffer,
/// VkDeviceSize offset,
/// uint32_t drawCount,
/// uint32_t stride);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawIndexedIndirect<T>(
this T handle,
VkBuffer buffer,
ByteSize64 offset,
int drawCount,
ByteSize32 stride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawIndexedIndirect.Invoke(handle.Handle, buffer, offset, drawCount, stride);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBlitImage.html">vkCmdBlitImage</see> - Copy regions of an image, potentially performing format conversion,
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBlitImage
/// </para>
/// <para>
/// To copy regions of a source image into a destination image, potentially
/// performing format conversion, arbitrary scaling, and filtering, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BlitImage<T>(
this T handle,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage dstImage,
VkImageLayout dstImageLayout,
scoped ReadOnlySpan<VkImageBlit> pRegions,
VkFilter filter
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkImageBlit* pRegionsFixed = pRegions)
{
handle.PInvoke.vkCmdBlitImage.Invoke(
handle.Handle,
srcImage,
srcImageLayout,
dstImage,
dstImageLayout,
pRegions.Length,
pRegionsFixed,
filter
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdClearDepthStencilImage.html">vkCmdClearDepthStencilImage</see> - Fill regions of a combined depth/stencil image
/// </summary>
/// <remarks>
/// <para>
/// To clear one or more subranges of a depth/stencil image, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdClearDepthStencilImage(
/// VkCommandBuffer commandBuffer,
/// VkImage image,
/// VkImageLayout imageLayout,
/// const VkClearDepthStencilValue* pDepthStencil,
/// uint32_t rangeCount,
/// const VkImageSubresourceRange* pRanges);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void ClearDepthStencilImage<T>(
this T handle,
VkImage image,
VkImageLayout imageLayout,
VkClearDepthStencilValue* pDepthStencil,
scoped ReadOnlySpan<VkImageSubresourceRange> pRanges
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkImageSubresourceRange* pRangesFixed = pRanges)
{
handle.PInvoke.vkCmdClearDepthStencilImage.Invoke(
handle.Handle,
image,
imageLayout,
pDepthStencil,
pRanges.Length,
pRangesFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdClearAttachments.html">vkCmdClearAttachments</see> - Clear regions within bound framebuffer attachments
/// </summary>
/// <remarks>
/// <para>
/// To clear one or more regions of color and depth/stencil attachments inside a
/// render pass instance, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdClearAttachments(
/// VkCommandBuffer commandBuffer,
/// uint32_t attachmentCount,
/// const VkClearAttachment* pAttachments,
/// uint32_t rectCount,
/// const VkClearRect* pRects);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void ClearAttachments<T>(
this T handle,
scoped ReadOnlySpan<VkClearAttachment> pAttachments,
scoped ReadOnlySpan<VkClearRect> pRects
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkClearRect* pRectsFixed = pRects)
fixed (VkClearAttachment* pAttachmentsFixed = pAttachments)
{
handle.PInvoke.vkCmdClearAttachments.Invoke(
handle.Handle,
pAttachments.Length,
pAttachmentsFixed,
pRects.Length,
pRectsFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdResolveImage.html">vkCmdResolveImage</see> - Resolve regions of an image
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdResolveImage
/// </para>
/// <para>
/// To resolve a multisample color image to a non-multisample color image, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdResolveImage(
/// VkCommandBuffer commandBuffer,
/// VkImage srcImage,
/// VkImageLayout srcImageLayout,
/// VkImage dstImage,
/// VkImageLayout dstImageLayout,
/// uint32_t regionCount,
/// const VkImageResolve* pRegions);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void ResolveImage<T>(
this T handle,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage dstImage,
VkImageLayout dstImageLayout,
scoped ReadOnlySpan<VkImageResolve> pRegions
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkImageResolve* pRegionsFixed = pRegions)
{
handle.PInvoke.vkCmdResolveImage.Invoke(
handle.Handle,
srcImage,
srcImageLayout,
dstImage,
dstImageLayout,
pRegions.Length,
pRegionsFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBeginRenderPass.html">vkCmdBeginRenderPass</see> - Begin a new render pass
/// </summary>
/// <remarks>
/// <para>
/// To begin a render pass instance, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdBeginRenderPass(
/// VkCommandBuffer commandBuffer,
/// const VkRenderPassBeginInfo* pRenderPassBegin,
/// VkSubpassContents contents);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BeginRenderPass<T>(
this T handle,
in VkRenderPassBeginInfo pRenderPassBegin,
VkSubpassContents contents
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkRenderPassBeginInfo* pRenderPassBeginFixed = &pRenderPassBegin)
{
handle.PInvoke.vkCmdBeginRenderPass.Invoke(handle.Handle, pRenderPassBeginFixed, contents);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdNextSubpass.html">vkCmdNextSubpass</see> - Transition to the next subpass of a render pass
/// </summary>
/// <remarks>
/// <para>
/// To transition to the next subpass in the render pass instance after
/// recording the commands for a subpass, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdNextSubpass(
/// VkCommandBuffer commandBuffer,
/// VkSubpassContents contents);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void NextSubpass<T>(this T handle, VkSubpassContents contents)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdNextSubpass.Invoke(handle.Handle, contents);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEndRenderPass.html">vkCmdEndRenderPass</see> - End the current render pass
/// </summary>
/// <remarks>
/// <para>
/// To record a command to end a render pass instance after recording the
/// commands for the last subpass, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_0
/// void vkCmdEndRenderPass(
/// VkCommandBuffer commandBuffer);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void EndRenderPass<T>(this T handle)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdEndRenderPass.Invoke(handle.Handle);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkBindBufferMemory2.html">vkBindBufferMemory2</see> - Bind device memory to buffer objects
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkBindBufferMemory2
/// </para>
/// <para>
/// To attach memory to buffer objects for one or more buffers at a time, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindBufferMemory2(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkBindBufferMemoryInfo> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkBindImageMemory2.html">vkBindImageMemory2</see> - Bind device memory to image objects
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkBindImageMemory2
/// </para>
/// <para>
/// To attach memory to image objects for one or more images at a time, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindImageMemory2(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkBindImageMemoryInfo> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceGroupPeerMemoryFeatures.html">vkGetDeviceGroupPeerMemoryFeatures</see> - Query supported peer memory features of a device
/// </summary>
/// <remarks>
/// <para>
/// <i>Peer memory</i> 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.
/// </para>
/// <para>
/// To determine how peer memory <i>can</i> be accessed, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkPeerMemoryFeatureFlags GetGroupPeerMemoryFeatures(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
int heapIndex,
int localDeviceIndex,
int remoteDeviceIndex
)
{
VkPeerMemoryFeatureFlags pPeerMemoryFeaturesLocal = default;
handle.PInvoke.vkGetDeviceGroupPeerMemoryFeatures.Invoke(
handle.Handle,
heapIndex,
localDeviceIndex,
remoteDeviceIndex,
&pPeerMemoryFeaturesLocal
);
return pPeerMemoryFeaturesLocal;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDeviceMask.html">vkCmdSetDeviceMask</see> - Modify device mask of a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To update the current device mask of a command buffer, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDeviceMask<T>(this T handle, int deviceMask)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDeviceMask.Invoke(handle.Handle, deviceMask);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetImageMemoryRequirements2.html">vkGetImageMemoryRequirements2</see> - Returns the memory requirements for specified Vulkan object
/// </summary>
/// <remarks>
/// <para>
/// To determine the memory requirements for an image resource, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetImageMemoryRequirements2(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkImageMemoryRequirementsInfo2 pInfo,
ref VkMemoryRequirements2 pMemoryRequirements
)
{
fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements)
fixed (VkImageMemoryRequirementsInfo2* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetImageMemoryRequirements2.Invoke(
handle.Handle,
pInfoFixed,
pMemoryRequirementsFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryRequirements2.</returns>
public static VkMemoryRequirements2 GetImageMemoryRequirements2(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkImageMemoryRequirementsInfo2 pInfo
)
{
VkMemoryRequirements2 outValue = new();
GetImageMemoryRequirements2(handle, pInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetBufferMemoryRequirements2.html">vkGetBufferMemoryRequirements2</see> - Returns the memory requirements for specified Vulkan object
/// </summary>
/// <remarks>
/// <para>
/// To determine the memory requirements for a buffer resource, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetBufferMemoryRequirements2(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkBufferMemoryRequirementsInfo2 pInfo,
ref VkMemoryRequirements2 pMemoryRequirements
)
{
fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements)
fixed (VkBufferMemoryRequirementsInfo2* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetBufferMemoryRequirements2.Invoke(
handle.Handle,
pInfoFixed,
pMemoryRequirementsFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryRequirements2.</returns>
public static VkMemoryRequirements2 GetBufferMemoryRequirements2(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkBufferMemoryRequirementsInfo2 pInfo
)
{
VkMemoryRequirements2 outValue = new();
GetBufferMemoryRequirements2(handle, pInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetImageSparseMemoryRequirements2.html">vkGetImageSparseMemoryRequirements2</see> - Query the memory requirements for a sparse image
/// </summary>
/// <remarks>
/// <para>
/// To query sparse memory requirements for an image, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe void GetImageSparseMemoryRequirements2(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkImageSparseMemoryRequirementsInfo2 pInfo,
ref int pSparseMemoryRequirementCount,
scoped ReadOnlySpan<VkSparseImageMemoryRequirements2> pSparseMemoryRequirements
)
{
fixed (VkSparseImageMemoryRequirements2* pSparseMemoryRequirementsFixed = pSparseMemoryRequirements)
fixed (VkImageSparseMemoryRequirementsInfo2* pInfoFixed = &pInfo)
fixed (int* pSparseMemoryRequirementCountFixed = &pSparseMemoryRequirementCount)
{
handle.PInvoke.vkGetImageSparseMemoryRequirements2.Invoke(
handle.Handle,
pInfoFixed,
pSparseMemoryRequirementCountFixed,
pSparseMemoryRequirementsFixed
);
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static int GetImageSparseMemoryRequirements2_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkImageSparseMemoryRequirementsInfo2 pInfo
)
{
int pSparseMemoryRequirementCount = default;
GetImageSparseMemoryRequirements2(handle, pInfo, ref pSparseMemoryRequirementCount, null);
return pSparseMemoryRequirementCount;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pSparseMemoryRequirements">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static void GetImageSparseMemoryRequirements2_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkImageSparseMemoryRequirementsInfo2 pInfo,
scoped ReadOnlySpan<VkSparseImageMemoryRequirements2> pSparseMemoryRequirements
)
{
int pSparseMemoryRequirementCount = pSparseMemoryRequirements.Length;
GetImageSparseMemoryRequirements2(
handle,
pInfo,
ref pSparseMemoryRequirementCount,
pSparseMemoryRequirements
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkTrimCommandPool.html">vkTrimCommandPool</see> - Trim a command pool
/// </summary>
/// <remarks>
/// <para>
/// To trim a command pool, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void TrimCommandPool(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkCommandPool commandPool,
VkCommandPoolTrimFlags flags
)
{
handle.PInvoke.vkTrimCommandPool.Invoke(handle.Handle, commandPool, flags);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceQueue2.html">vkGetDeviceQueue2</see> - Get a queue handle from a device
/// </summary>
/// <remarks>
/// <para>
/// To retrieve a handle to a <c>VkQueue</c> object with specific
/// <c>VkDeviceQueueCreateFlags</c> creation flags, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_1
/// void vkGetDeviceQueue2(
/// VkDevice device,
/// const VkDeviceQueueInfo2* pQueueInfo,
/// VkQueue* pQueue);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkQueue GetQueue2(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceQueueInfo2 pQueueInfo
)
{
fixed (VkDeviceQueueInfo2* pQueueInfoFixed = &pQueueInfo)
{
VkQueue pQueueLocal = default;
handle.PInvoke.vkGetDeviceQueue2.Invoke(handle.Handle, pQueueInfoFixed, &pQueueLocal);
return pQueueLocal;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDispatchBase.html">vkCmdDispatchBase</see> - Dispatch compute work items with non-zero base values for the workgroup IDs
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDispatchBase
/// </para>
/// <para>
/// To record a dispatch using non-zero base values for the components of
/// <c>WorkgroupId</c>, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DispatchBase<T>(
this T handle,
int baseGroupX,
int baseGroupY,
int baseGroupZ,
int groupCountX,
int groupCountY,
int groupCountZ
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDispatchBase.Invoke(
handle.Handle,
baseGroupX,
baseGroupY,
baseGroupZ,
groupCountX,
groupCountY,
groupCountZ
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateDescriptorUpdateTemplate.html">vkCreateDescriptorUpdateTemplate</see> - Create a new descriptor update template
/// </summary>
/// <remarks>
/// <para>
/// Updating a large <c>VkDescriptorSet</c> array <i>can</i> be an expensive operation
/// since an application <i>must</i> specify one <c>VkWriteDescriptorSet</c> 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
/// <c>VkDescriptorSetLayout</c>, <c>vkUpdateDescriptorSetWithTemplate</c> <i>can</i> be
/// used as a replacement for <c>vkUpdateDescriptorSets</c>.
/// </para>
/// <para>
/// <c>VkDescriptorUpdateTemplate</c> allows implementations to convert a set of
/// descriptor update operations on a single descriptor set to an internal
/// format.
/// In conjunction with
/// <c>vkUpdateDescriptorSetWithTemplate</c>, this <i>can</i> be more efficient
/// compared to calling
/// <c>vkUpdateDescriptorSets</c>.
/// The descriptors themselves are not specified in the
/// <c>VkDescriptorUpdateTemplate</c>, rather, offsets into an application
/// provided pointer to host memory are specified, which are combined with a
/// pointer passed to
/// <c>vkUpdateDescriptorSetWithTemplate</c>.
/// This allows large batches of updates to be executed without having to
/// convert application data structures into a strictly-defined Vulkan data
/// structure.
/// </para>
/// <para>
/// To create a descriptor update template, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkDescriptorUpdateTemplate CreateDescriptorUpdateTemplate(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyDescriptorUpdateTemplate.html">vkDestroyDescriptorUpdateTemplate</see> - Destroy a descriptor update template object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a descriptor update template, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyDescriptorUpdateTemplate(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDescriptorUpdateTemplate descriptorUpdateTemplate,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyDescriptorUpdateTemplate.Invoke(
handle.Handle,
descriptorUpdateTemplate,
pAllocator
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkUpdateDescriptorSetWithTemplate.html">vkUpdateDescriptorSetWithTemplate</see> - Update the contents of a descriptor set object using an update template
/// </summary>
/// <remarks>
/// <para>
/// Once a <c>VkDescriptorUpdateTemplate</c> has been created, descriptor sets
/// <i>can</i> be updated by calling:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void UpdateDescriptorSetWithTemplate(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDescriptorSet descriptorSet,
VkDescriptorUpdateTemplate descriptorUpdateTemplate,
void* pData
)
{
handle.PInvoke.vkUpdateDescriptorSetWithTemplate.Invoke(
handle.Handle,
descriptorSet,
descriptorUpdateTemplate,
pData
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDescriptorSetLayoutSupport.html">vkGetDescriptorSetLayoutSupport</see> - Query whether a descriptor set layout can be created
/// </summary>
/// <remarks>
/// <para>
/// To query information about whether a descriptor set layout <i>can</i> be created,
/// call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetDescriptorSetLayoutSupport(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDescriptorSetLayoutCreateInfo pCreateInfo,
ref VkDescriptorSetLayoutSupport pSupport
)
{
fixed (VkDescriptorSetLayoutSupport* pSupportFixed = &pSupport)
fixed (VkDescriptorSetLayoutCreateInfo* pCreateInfoFixed = &pCreateInfo)
{
handle.PInvoke.vkGetDescriptorSetLayoutSupport.Invoke(handle.Handle, pCreateInfoFixed, pSupportFixed);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkDescriptorSetLayoutSupport.</returns>
public static VkDescriptorSetLayoutSupport GetDescriptorSetLayoutSupport(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDescriptorSetLayoutCreateInfo pCreateInfo
)
{
VkDescriptorSetLayoutSupport outValue = new();
GetDescriptorSetLayoutSupport(handle, pCreateInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateSamplerYcbcrConversion.html">vkCreateSamplerYcbcrConversion</see> - Create a new {YCbCr} conversion
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateSamplerYcbcrConversion
/// :objectnameplural: sampler conversions
/// :objectnamecamelcase: samplerYcbcrConversion
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create a <c>VkSamplerYcbcrConversion</c>, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkSamplerYCbCrConversion CreateSamplerYcbcrConversion(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroySamplerYcbcrConversion.html">vkDestroySamplerYcbcrConversion</see> - Destroy a created {YCbCr} conversion
/// </summary>
/// <remarks>
/// <para>
/// To destroy a sampler {YCbCr} conversion, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroySamplerYcbcrConversion(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSamplerYCbCrConversion ycbcrConversion,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroySamplerYcbcrConversion.Invoke(handle.Handle, ycbcrConversion, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkResetQueryPool.html">vkResetQueryPool</see> - Reset queries in a query pool
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkResetQueryPool
/// </para>
/// <para>
/// To reset a range of queries in a query pool on the host, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ResetQueryPool(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkQueryPool queryPool,
int firstQuery,
int queryCount
)
{
handle.PInvoke.vkResetQueryPool.Invoke(handle.Handle, queryPool, firstQuery, queryCount);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetSemaphoreCounterValue.html">vkGetSemaphoreCounterValue</see> - Query the current state of a timeline semaphore
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetSemaphoreCounterValue
/// </para>
/// <para>
/// To query the current counter value of a semaphore created with a
/// <c>VkSemaphoreType</c> of <c>VK_SEMAPHORE_TYPE_TIMELINE</c> from the host,
/// call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe nint GetSemaphoreCounterValue(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkWaitSemaphores.html">vkWaitSemaphores</see> - Wait for timeline semaphores on the host
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkWaitSemaphores
/// </para>
/// <para>
/// To wait for a set of semaphores created with a <c>VkSemaphoreType</c> of
/// <c>VK_SEMAPHORE_TYPE_TIMELINE</c> to reach particular counter values on the
/// host, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult WaitSemaphores(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkSignalSemaphore.html">vkSignalSemaphore</see> - Signal a timeline semaphore on the host
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkSignalSemaphore
/// </para>
/// <para>
/// To signal a semaphore created with a <c>VkSemaphoreType</c> of
/// <c>VK_SEMAPHORE_TYPE_TIMELINE</c> with a particular counter value, on the
/// host, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SignalSemaphore(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetBufferDeviceAddress.html">vkGetBufferDeviceAddress</see> - Query an address of a buffer
/// </summary>
/// <remarks>
/// <para>
/// 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 <i>can</i> be accessed,
/// call:
/// </para>
/// <para>
/// // Jon: 3-way conditional logic here is wrong
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkDeviceAddress GetBufferDeviceAddress(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkBufferDeviceAddressInfo pInfo
)
{
fixed (VkBufferDeviceAddressInfo* pInfoFixed = &pInfo)
{
return handle.PInvoke.vkGetBufferDeviceAddress.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetBufferOpaqueCaptureAddress.html">vkGetBufferOpaqueCaptureAddress</see> - Query an opaque capture address of a buffer
/// </summary>
/// <remarks>
/// <para>
/// To query a 64-bit buffer opaque capture address, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe nint GetBufferOpaqueCaptureAddress(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkBufferDeviceAddressInfo pInfo
)
{
fixed (VkBufferDeviceAddressInfo* pInfoFixed = &pInfo)
{
return handle.PInvoke.vkGetBufferOpaqueCaptureAddress.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceMemoryOpaqueCaptureAddress.html">vkGetDeviceMemoryOpaqueCaptureAddress</see> - Query an opaque capture address of a memory object
/// </summary>
/// <remarks>
/// <para>
/// To query a 64-bit opaque capture address value from a memory object, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe nint GetMemoryOpaqueCaptureAddress(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceMemoryOpaqueCaptureAddressInfo pInfo
)
{
fixed (VkDeviceMemoryOpaqueCaptureAddressInfo* pInfoFixed = &pInfo)
{
return handle.PInvoke.vkGetDeviceMemoryOpaqueCaptureAddress.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawIndirectCount.html">vkCmdDrawIndirectCount</see> - Draw primitives with indirect parameters and draw count
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawIndirectCount
/// </para>
/// <para>
/// To record a non-indexed draw call with a draw call count sourced from a
/// buffer, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawIndirectCount<T>(
this T handle,
VkBuffer buffer,
ByteSize64 offset,
VkBuffer countBuffer,
ByteSize64 countBufferOffset,
int maxDrawCount,
int stride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawIndirectCount.Invoke(
handle.Handle,
buffer,
offset,
countBuffer,
countBufferOffset,
maxDrawCount,
stride
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawIndexedIndirectCount.html">vkCmdDrawIndexedIndirectCount</see> - Draw parameters with indirect parameters, indexed vertices, and draw count
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawIndexedIndirectCount
/// </para>
/// <para>
/// To record an indexed draw call with a draw call count sourced from a buffer,
/// call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawIndexedIndirectCount<T>(
this T handle,
VkBuffer buffer,
ByteSize64 offset,
VkBuffer countBuffer,
ByteSize64 countBufferOffset,
int maxDrawCount,
int stride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawIndexedIndirectCount.Invoke(
handle.Handle,
buffer,
offset,
countBuffer,
countBufferOffset,
maxDrawCount,
stride
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateRenderPass2.html">vkCreateRenderPass2</see> - Create a new render pass object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateRenderPass2
/// :objectnameplural: render passes
/// :objectnamecamelcase: renderPass
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create a render pass, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkRenderPass CreateRenderPass2(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBeginRenderPass2.html">vkCmdBeginRenderPass2</see> - Begin a new render pass
/// </summary>
/// <remarks>
/// <para>
/// To begin a render pass, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BeginRenderPass2<T>(
this T handle,
VkRenderPassBeginInfo* pRenderPassBegin,
in VkSubpassBeginInfo pSubpassBeginInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkSubpassBeginInfo* pSubpassBeginInfoFixed = &pSubpassBeginInfo)
{
handle.PInvoke.vkCmdBeginRenderPass2.Invoke(handle.Handle, pRenderPassBegin, pSubpassBeginInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdNextSubpass2.html">vkCmdNextSubpass2</see> - Transition to the next subpass of a render pass
/// </summary>
/// <remarks>
/// <para>
/// To transition to the next subpass in the render pass instance after
/// recording the commands for a subpass, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void NextSubpass2<T>(
this T handle,
in VkSubpassBeginInfo pSubpassBeginInfo,
in VkSubpassEndInfo pSubpassEndInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkSubpassEndInfo* pSubpassEndInfoFixed = &pSubpassEndInfo)
fixed (VkSubpassBeginInfo* pSubpassBeginInfoFixed = &pSubpassBeginInfo)
{
handle.PInvoke.vkCmdNextSubpass2.Invoke(handle.Handle, pSubpassBeginInfoFixed, pSubpassEndInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEndRenderPass2.html">vkCmdEndRenderPass2</see> - End the current render pass
/// </summary>
/// <remarks>
/// <para>
/// To record a command to end a render pass instance after recording the
/// commands for the last subpass, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void EndRenderPass2<T>(this T handle, in VkSubpassEndInfo pSubpassEndInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkSubpassEndInfo* pSubpassEndInfoFixed = &pSubpassEndInfo)
{
handle.PInvoke.vkCmdEndRenderPass2.Invoke(handle.Handle, pSubpassEndInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreatePrivateDataSlot.html">vkCreatePrivateDataSlot</see> - Create a slot for private data storage
/// </summary>
/// <remarks>
/// <para>
/// To create a private data slot, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkPrivateDataSlot CreatePrivateDataSlot(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyPrivateDataSlot.html">vkDestroyPrivateDataSlot</see> - Destroy a private data slot
/// </summary>
/// <remarks>
/// <para>
/// To destroy a private data slot, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyPrivateDataSlot(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPrivateDataSlot privateDataSlot,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyPrivateDataSlot.Invoke(handle.Handle, privateDataSlot, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkSetPrivateData.html">vkSetPrivateData</see> - Associate data with a Vulkan object
/// </summary>
/// <remarks>
/// <para>
/// To store application-defined data in a slot associated with a Vulkan object,
/// call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetPrivateData(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetPrivateData.html">vkGetPrivateData</see> - Retrieve data associated with a Vulkan object
/// </summary>
/// <remarks>
/// <para>
/// To retrieve application-defined data from a slot associated with a Vulkan
/// object, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe nint GetPrivateData(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkObjectType objectType,
nint objectHandle,
VkPrivateDataSlot privateDataSlot
)
{
nint pDataLocal = default;
handle.PInvoke.vkGetPrivateData.Invoke(
handle.Handle,
objectType,
objectHandle,
privateDataSlot,
&pDataLocal
);
return pDataLocal;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPipelineBarrier2.html">vkCmdPipelineBarrier2</see> - Insert a memory dependency
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdPipelineBarrier2
/// </para>
/// <para>
/// To record a pipeline barrier, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void PipelineBarrier2<T>(this T handle, in VkDependencyInfo pDependencyInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDependencyInfo* pDependencyInfoFixed = &pDependencyInfo)
{
handle.PInvoke.vkCmdPipelineBarrier2.Invoke(handle.Handle, pDependencyInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdWriteTimestamp2.html">vkCmdWriteTimestamp2</see> - Write a device timestamp into a query object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdWriteTimestamp2
/// </para>
/// <para>
/// To request a timestamp and write the value to memory, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void WriteTimestamp2<T>(
this T handle,
VkPipelineStageFlags2 stage,
VkQueryPool queryPool,
int query
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdWriteTimestamp2.Invoke(handle.Handle, stage, queryPool, query);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueueSubmit2.html">vkQueueSubmit2</see> - Submits command buffers to a queue
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkQueueSubmit2KHR
/// </para>
/// <para>
/// To submit command buffers to a queue, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe void Submit2Internal(
this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkSubmitInfo2> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyBuffer2.html">vkCmdCopyBuffer2</see> - Copy data between buffer regions
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyBuffer2
/// </para>
/// <para>
/// To copy data between buffer objects, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyBuffer2<T>(this T handle, in VkCopyBufferInfo2 pCopyBufferInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyBufferInfo2* pCopyBufferInfoFixed = &pCopyBufferInfo)
{
handle.PInvoke.vkCmdCopyBuffer2.Invoke(handle.Handle, pCopyBufferInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyImage2.html">vkCmdCopyImage2</see> - Copy data between images
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyImage2
/// </para>
/// <para>
/// To copy data between image objects, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyImage2<T>(this T handle, in VkCopyImageInfo2 pCopyImageInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyImageInfo2* pCopyImageInfoFixed = &pCopyImageInfo)
{
handle.PInvoke.vkCmdCopyImage2.Invoke(handle.Handle, pCopyImageInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyBufferToImage2.html">vkCmdCopyBufferToImage2</see> - Copy data from a buffer into an image
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyBufferToImage2
/// </para>
/// <para>
/// To copy data from a buffer object to an image object, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyBufferToImage2<T>(
this T handle,
in VkCopyBufferToImageInfo2 pCopyBufferToImageInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyBufferToImageInfo2* pCopyBufferToImageInfoFixed = &pCopyBufferToImageInfo)
{
handle.PInvoke.vkCmdCopyBufferToImage2.Invoke(handle.Handle, pCopyBufferToImageInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyImageToBuffer2.html">vkCmdCopyImageToBuffer2</see> - Copy image data into a buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyImageToBuffer2
/// </para>
/// <para>
/// To copy data from an image object to a buffer object, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyImageToBuffer2<T>(
this T handle,
in VkCopyImageToBufferInfo2 pCopyImageToBufferInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyImageToBufferInfo2* pCopyImageToBufferInfoFixed = &pCopyImageToBufferInfo)
{
handle.PInvoke.vkCmdCopyImageToBuffer2.Invoke(handle.Handle, pCopyImageToBufferInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceBufferMemoryRequirements.html">vkGetDeviceBufferMemoryRequirements</see> - Returns the memory requirements for specified Vulkan object
/// </summary>
/// <remarks>
/// <para>
/// To determine the memory requirements for a buffer resource without creating
/// an object, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetBufferMemoryRequirements(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceBufferMemoryRequirements pInfo,
ref VkMemoryRequirements2 pMemoryRequirements
)
{
fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements)
fixed (VkDeviceBufferMemoryRequirements* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetDeviceBufferMemoryRequirements.Invoke(
handle.Handle,
pInfoFixed,
pMemoryRequirementsFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryRequirements2.</returns>
public static VkMemoryRequirements2 GetBufferMemoryRequirements(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceBufferMemoryRequirements pInfo
)
{
VkMemoryRequirements2 outValue = new();
GetBufferMemoryRequirements(handle, pInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceImageMemoryRequirements.html">vkGetDeviceImageMemoryRequirements</see> - Returns the memory requirements for specified Vulkan object
/// </summary>
/// <remarks>
/// <para>
/// To determine the memory requirements for an image resource without creating
/// an object, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetImageMemoryRequirements(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceImageMemoryRequirements pInfo,
ref VkMemoryRequirements2 pMemoryRequirements
)
{
fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements)
fixed (VkDeviceImageMemoryRequirements* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetDeviceImageMemoryRequirements.Invoke(
handle.Handle,
pInfoFixed,
pMemoryRequirementsFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryRequirements2.</returns>
public static VkMemoryRequirements2 GetImageMemoryRequirements(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceImageMemoryRequirements pInfo
)
{
VkMemoryRequirements2 outValue = new();
GetImageMemoryRequirements(handle, pInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceImageSparseMemoryRequirements.html">vkGetDeviceImageSparseMemoryRequirements</see> - Query the memory requirements for a sparse image
/// </summary>
/// <remarks>
/// <para>
/// To determine the sparse memory requirements for an image resource without
/// creating an object, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe void GetImageSparseMemoryRequirements(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceImageMemoryRequirements pInfo,
ref int pSparseMemoryRequirementCount,
scoped ReadOnlySpan<VkSparseImageMemoryRequirements2> pSparseMemoryRequirements
)
{
fixed (VkSparseImageMemoryRequirements2* pSparseMemoryRequirementsFixed = pSparseMemoryRequirements)
fixed (VkDeviceImageMemoryRequirements* pInfoFixed = &pInfo)
fixed (int* pSparseMemoryRequirementCountFixed = &pSparseMemoryRequirementCount)
{
handle.PInvoke.vkGetDeviceImageSparseMemoryRequirements.Invoke(
handle.Handle,
pInfoFixed,
pSparseMemoryRequirementCountFixed,
pSparseMemoryRequirementsFixed
);
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static int GetImageSparseMemoryRequirements_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceImageMemoryRequirements pInfo
)
{
int pSparseMemoryRequirementCount = default;
GetImageSparseMemoryRequirements(handle, pInfo, ref pSparseMemoryRequirementCount, null);
return pSparseMemoryRequirementCount;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pSparseMemoryRequirements">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static void GetImageSparseMemoryRequirements_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceImageMemoryRequirements pInfo,
scoped ReadOnlySpan<VkSparseImageMemoryRequirements2> pSparseMemoryRequirements
)
{
int pSparseMemoryRequirementCount = pSparseMemoryRequirements.Length;
GetImageSparseMemoryRequirements(
handle,
pInfo,
ref pSparseMemoryRequirementCount,
pSparseMemoryRequirements
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetEvent2.html">vkCmdSetEvent2</see> - Set an event object to signaled state
/// </summary>
/// <remarks>
/// <para>
/// To signal an event from a device, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetEvent2<T>(this T handle, VkEvent @event, in VkDependencyInfo pDependencyInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDependencyInfo* pDependencyInfoFixed = &pDependencyInfo)
{
handle.PInvoke.vkCmdSetEvent2.Invoke(handle.Handle, @event, pDependencyInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdResetEvent2.html">vkCmdResetEvent2</see> - Reset an event object to non-signaled state
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdResetEvent2
/// </para>
/// <para>
/// To unsignal the event from a device, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ResetEvent2<T>(this T handle, VkEvent @event, VkPipelineStageFlags2 stageMask)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdResetEvent2.Invoke(handle.Handle, @event, stageMask);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdWaitEvents2.html">vkCmdWaitEvents2</see> - Wait for one or more events
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdWaitEvents2
/// </para>
/// <para>
/// To wait for one or more events to enter the signaled state on a device,
/// call:
/// </para>
/// <para>
/// [[synchronization-events-waiting-device]]
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void WaitEvents2<T>(
this T handle,
scoped ReadOnlySpan<VkEvent> pEvents,
scoped ReadOnlySpan<VkDependencyInfo> pDependencyInfos
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDependencyInfo* pDependencyInfosFixed = pDependencyInfos)
fixed (VkEvent* pEventsFixed = pEvents)
{
handle.PInvoke.vkCmdWaitEvents2.Invoke(
handle.Handle,
pEvents.Length,
pEventsFixed,
pDependencyInfosFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBlitImage2.html">vkCmdBlitImage2</see> - Copy regions of an image, potentially performing format conversion,
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBlitImage2
/// </para>
/// <para>
/// To copy regions of a source image into a destination image, potentially
/// performing format conversion, arbitrary scaling, and filtering, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BlitImage2<T>(this T handle, in VkBlitImageInfo2 pBlitImageInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkBlitImageInfo2* pBlitImageInfoFixed = &pBlitImageInfo)
{
handle.PInvoke.vkCmdBlitImage2.Invoke(handle.Handle, pBlitImageInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdResolveImage2.html">vkCmdResolveImage2</see> - Resolve regions of an image
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdResolveImage2
/// </para>
/// <para>
/// To resolve a multisample image to a non-multisample image, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void ResolveImage2<T>(this T handle, in VkResolveImageInfo2 pResolveImageInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkResolveImageInfo2* pResolveImageInfoFixed = &pResolveImageInfo)
{
handle.PInvoke.vkCmdResolveImage2.Invoke(handle.Handle, pResolveImageInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBeginRendering.html">vkCmdBeginRendering</see> - Begin a dynamic render pass instance
/// </summary>
/// <remarks>
/// <para>
/// To begin a render pass instance, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BeginRendering<T>(this T handle, in VkRenderingInfo pRenderingInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkRenderingInfo* pRenderingInfoFixed = &pRenderingInfo)
{
handle.PInvoke.vkCmdBeginRendering.Invoke(handle.Handle, pRenderingInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEndRendering.html">vkCmdEndRendering</see> - End a dynamic render pass instance
/// </summary>
/// <remarks>
/// <para>
/// To end a render pass instance, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void EndRendering<T>(this T handle)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdEndRendering.Invoke(handle.Handle);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetCullMode.html">vkCmdSetCullMode</see> - Set cull mode dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the cull mode, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetCullMode<T>(this T handle, VkCullModeFlags cullMode)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetCullMode.Invoke(handle.Handle, cullMode);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetFrontFace.html">vkCmdSetFrontFace</see> - Set front face orientation dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the front face orientation,
/// call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetFrontFace<T>(this T handle, VkFrontFace frontFace)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetFrontFace.Invoke(handle.Handle, frontFace);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetPrimitiveTopology.html">vkCmdSetPrimitiveTopology</see> - Set primitive topology state dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> primitive topology, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetPrimitiveTopology<T>(this T handle, VkPrimitiveTopology primitiveTopology)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetPrimitiveTopology.Invoke(handle.Handle, primitiveTopology);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetViewportWithCount.html">vkCmdSetViewportWithCount</see> - Set the viewport count and viewports dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the viewport count and
/// viewports, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetViewportWithCount<T>(this T handle, scoped ReadOnlySpan<VkViewport> pViewports)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkViewport* pViewportsFixed = pViewports)
{
handle.PInvoke.vkCmdSetViewportWithCount.Invoke(handle.Handle, pViewports.Length, pViewportsFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetScissorWithCount.html">vkCmdSetScissorWithCount</see> - Set the scissor count and scissor rectangular bounds dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the scissor count and
/// scissor rectangular bounds, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetScissorWithCount<T>(this T handle, scoped ReadOnlySpan<VkRect2D> pScissors)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkRect2D* pScissorsFixed = pScissors)
{
handle.PInvoke.vkCmdSetScissorWithCount.Invoke(handle.Handle, pScissors.Length, pScissorsFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindVertexBuffers2.html">vkCmdBindVertexBuffers2</see> - Bind vertex buffers to a command buffer and dynamically set strides
/// </summary>
/// <remarks>
/// <para>
/// To bind vertex buffers, along with their sizes and strides, to a command
/// buffer for use in subsequent drawing commands, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindVertexBuffers2<T>(
this T handle,
int firstBinding,
scoped ReadOnlySpan<VkBuffer> pBuffers,
scoped ReadOnlySpan<ByteSize64> pOffsets,
scoped ReadOnlySpan<ByteSize64> pSizes,
scoped ReadOnlySpan<ByteSize64> pStrides
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
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
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDepthTestEnable.html">vkCmdSetDepthTestEnable</see> - Set depth test enable dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically enable or disable^</see> the depth
/// test, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDepthTestEnable<T>(this T handle, Brutal.Bool32 depthTestEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDepthTestEnable.Invoke(handle.Handle, depthTestEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDepthWriteEnable.html">vkCmdSetDepthWriteEnable</see> - Set depth write enable dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the depth write enable,
/// call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDepthWriteEnable<T>(this T handle, Brutal.Bool32 depthWriteEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDepthWriteEnable.Invoke(handle.Handle, depthWriteEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDepthCompareOp.html">vkCmdSetDepthCompareOp</see> - Set depth comparison operator dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the depth compare operator,
/// call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDepthCompareOp<T>(this T handle, VkCompareOp depthCompareOp)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDepthCompareOp.Invoke(handle.Handle, depthCompareOp);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDepthBoundsTestEnable.html">vkCmdSetDepthBoundsTestEnable</see> - Set depth bounds test enable dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically enable or disable^</see> the depth
/// bounds test, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDepthBoundsTestEnable<T>(this T handle, Brutal.Bool32 depthBoundsTestEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDepthBoundsTestEnable.Invoke(handle.Handle, depthBoundsTestEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetStencilTestEnable.html">vkCmdSetStencilTestEnable</see> - Set stencil test enable dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically enable or disable^</see> the stencil
/// test, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetStencilTestEnable<T>(this T handle, Brutal.Bool32 stencilTestEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetStencilTestEnable.Invoke(handle.Handle, stencilTestEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetStencilOp.html">vkCmdSetStencilOp</see> - Set stencil operation dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the stencil operation, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetStencilOp<T>(
this T handle,
VkStencilFaceFlags faceMask,
VkStencilOp failOp,
VkStencilOp passOp,
VkStencilOp depthFailOp,
VkCompareOp compareOp
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetStencilOp.Invoke(handle.Handle, faceMask, failOp, passOp, depthFailOp, compareOp);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetRasterizerDiscardEnable.html">vkCmdSetRasterizerDiscardEnable</see> - Control whether primitives are discarded before the rasterization stage dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically enable^</see> whether primitives are
/// discarded before the rasterization stage, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetRasterizerDiscardEnable<T>(this T handle, Brutal.Bool32 rasterizerDiscardEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetRasterizerDiscardEnable.Invoke(handle.Handle, rasterizerDiscardEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDepthBiasEnable.html">vkCmdSetDepthBiasEnable</see> - Control whether to bias fragment depth values dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically enable^</see> whether to bias fragment
/// depth values, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDepthBiasEnable<T>(this T handle, Brutal.Bool32 depthBiasEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDepthBiasEnable.Invoke(handle.Handle, depthBiasEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetPrimitiveRestartEnable.html">vkCmdSetPrimitiveRestartEnable</see> - Set primitive assembly restart state dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically control^</see> whether a special vertex
/// index value is treated as restarting the assembly of primitives, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetPrimitiveRestartEnable<T>(this T handle, Brutal.Bool32 primitiveRestartEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetPrimitiveRestartEnable.Invoke(handle.Handle, primitiveRestartEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkMapMemory2.html">vkMapMemory2</see> - Map a memory object into application address space
/// </summary>
/// <remarks>
/// <para>
/// To retrieve a host virtual address pointer to a region of a mappable memory
/// object, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void MapMemory2(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkUnmapMemory2.html">vkUnmapMemory2</see> - Unmap a previously mapped memory object
/// </summary>
/// <remarks>
/// <para>
/// To unmap a memory object once host access to it is no longer needed by the
/// application, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void UnmapMemory2(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceImageSubresourceLayout.html">vkGetDeviceImageSubresourceLayout</see> - Retrieve information about an image subresource without an image object
/// </summary>
/// <remarks>
/// <para>
/// To query the memory layout of an image subresource, without an image object,
/// call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetImageSubresourceLayout(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceImageSubresourceInfo pInfo,
ref VkSubresourceLayout2 pLayout
)
{
fixed (VkSubresourceLayout2* pLayoutFixed = &pLayout)
fixed (VkDeviceImageSubresourceInfo* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetDeviceImageSubresourceLayout.Invoke(handle.Handle, pInfoFixed, pLayoutFixed);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkSubresourceLayout2.</returns>
public static VkSubresourceLayout2 GetImageSubresourceLayout(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceImageSubresourceInfo pInfo
)
{
VkSubresourceLayout2 outValue = new();
GetImageSubresourceLayout(handle, pInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetImageSubresourceLayout2.html">vkGetImageSubresourceLayout2</see> - Retrieve information about an image subresource
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetImageSubresourceLayout2
/// </para>
/// <para>
/// To query the memory layout of an image subresource, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetImageSubresourceLayout2(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkImage image,
VkImageSubresource2* pSubresource,
ref VkSubresourceLayout2 pLayout
)
{
fixed (VkSubresourceLayout2* pLayoutFixed = &pLayout)
{
handle.PInvoke.vkGetImageSubresourceLayout2.Invoke(handle.Handle, image, pSubresource, pLayoutFixed);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkSubresourceLayout2.</returns>
public static unsafe VkSubresourceLayout2 GetImageSubresourceLayout2(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkImage image,
VkImageSubresource2* pSubresource
)
{
VkSubresourceLayout2 outValue = new();
GetImageSubresourceLayout2(handle, image, pSubresource, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCopyMemoryToImage.html">vkCopyMemoryToImage</see> - Copy data from host memory into an image
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCopyMemoryToImage
/// </para>
/// <para>
/// To copy data from host memory to an image object, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyMemoryToImage(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCopyImageToMemory.html">vkCopyImageToMemory</see> - Copy image data into host memory
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCopyImageToMemory
/// </para>
/// <para>
/// To copy data from an image object to host memory, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyImageToMemory(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCopyImageToImage.html">vkCopyImageToImage</see> - Copy image data using the host
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCopyImageToImage
/// </para>
/// <para>
/// To copy data from an image object to another image object using the host,
/// call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyImageToImage(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkTransitionImageLayout.html">vkTransitionImageLayout</see> - Perform an image layout transition on the host
/// </summary>
/// <remarks>
/// <para>
/// To perform an image layout transition on the host, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void TransitionImageLayout(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkHostImageLayoutTransitionInfo> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPushDescriptorSet.html">vkCmdPushDescriptorSet</see> - Pushes descriptor updates into a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdPushDescriptorSet
/// </para>
/// <para>
/// To push descriptor updates into a command buffer, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void PushDescriptorSet<T>(
this T handle,
VkPipelineBindPoint pipelineBindPoint,
VkPipelineLayout layout,
int set,
scoped ReadOnlySpan<VkWriteDescriptorSet> pDescriptorWrites
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkWriteDescriptorSet* pDescriptorWritesFixed = pDescriptorWrites)
{
handle.PInvoke.vkCmdPushDescriptorSet.Invoke(
handle.Handle,
pipelineBindPoint,
layout,
set,
pDescriptorWrites.Length,
pDescriptorWritesFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPushDescriptorSetWithTemplate.html">vkCmdPushDescriptorSetWithTemplate</see> - Pushes descriptor updates into a command buffer using a descriptor update template
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdPushDescriptorSetWithTemplate
/// </para>
/// <para>
/// To use a descriptor update template to specify the push descriptors to
/// update in a command buffer, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void PushDescriptorSetWithTemplate<T>(
this T handle,
VkDescriptorUpdateTemplate descriptorUpdateTemplate,
VkPipelineLayout layout,
int set,
void* pData
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdPushDescriptorSetWithTemplate.Invoke(
handle.Handle,
descriptorUpdateTemplate,
layout,
set,
pData
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindDescriptorSets2.html">vkCmdBindDescriptorSets2</see> - Binds descriptor sets to a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBindDescriptorSets2
/// </para>
/// <para>
/// To bind one or more descriptor sets to a command buffer, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindDescriptorSets2<T>(
this T handle,
in VkBindDescriptorSetsInfo pBindDescriptorSetsInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkBindDescriptorSetsInfo* pBindDescriptorSetsInfoFixed = &pBindDescriptorSetsInfo)
{
handle.PInvoke.vkCmdBindDescriptorSets2.Invoke(handle.Handle, pBindDescriptorSetsInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPushConstants2.html">vkCmdPushConstants2</see> - Update the values of push constants
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdPushConstants2
/// </para>
/// <para>
/// To update push constants, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void PushConstants2<T>(this T handle, in VkPushConstantsInfo pPushConstantsInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkPushConstantsInfo* pPushConstantsInfoFixed = &pPushConstantsInfo)
{
handle.PInvoke.vkCmdPushConstants2.Invoke(handle.Handle, pPushConstantsInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPushDescriptorSet2.html">vkCmdPushDescriptorSet2</see> - Pushes descriptor updates into a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdPushDescriptorSet2
/// </para>
/// <para>
/// To push descriptor updates into a command buffer, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void PushDescriptorSet2<T>(
this T handle,
in VkPushDescriptorSetInfo pPushDescriptorSetInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkPushDescriptorSetInfo* pPushDescriptorSetInfoFixed = &pPushDescriptorSetInfo)
{
handle.PInvoke.vkCmdPushDescriptorSet2.Invoke(handle.Handle, pPushDescriptorSetInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPushDescriptorSetWithTemplate2.html">vkCmdPushDescriptorSetWithTemplate2</see> - Pushes descriptor updates into a command buffer using a descriptor update template
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdPushDescriptorSetWithTemplate2
/// </para>
/// <para>
/// To use a descriptor update template to specify the push descriptors to
/// update in a command buffer, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void PushDescriptorSetWithTemplate2<T>(
this T handle,
in VkPushDescriptorSetWithTemplateInfo pPushDescriptorSetWithTemplateInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (
VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfoFixed =
&pPushDescriptorSetWithTemplateInfo
)
{
handle.PInvoke.vkCmdPushDescriptorSetWithTemplate2.Invoke(
handle.Handle,
pPushDescriptorSetWithTemplateInfoFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetLineStipple.html">vkCmdSetLineStipple</see> - Set line stipple dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the line stipple state,
/// call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetLineStipple<T>(this T handle, int lineStippleFactor, ushort lineStipplePattern)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetLineStipple.Invoke(handle.Handle, lineStippleFactor, lineStipplePattern);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindIndexBuffer2.html">vkCmdBindIndexBuffer2</see> - Bind an index buffer to a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBindIndexBuffer2
/// </para>
/// <para>
/// To bind an index buffer, along with its size, to a command buffer, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void BindIndexBuffer2<T>(
this T handle,
VkBuffer buffer,
ByteSize64 offset,
ByteSize64 size,
VkIndexType indexType
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdBindIndexBuffer2.Invoke(handle.Handle, buffer, offset, size, indexType);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetRenderingAreaGranularity.html">vkGetRenderingAreaGranularity</see> - Returns the granularity for dynamic rendering optimal render area
/// </summary>
/// <remarks>
/// <para>
/// To query the render area granularity for a render pass instance, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetRenderingAreaGranularity(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkRenderingAreaInfo pRenderingAreaInfo,
ref VkExtent2D pGranularity
)
{
fixed (VkExtent2D* pGranularityFixed = &pGranularity)
fixed (VkRenderingAreaInfo* pRenderingAreaInfoFixed = &pRenderingAreaInfo)
{
handle.PInvoke.vkGetRenderingAreaGranularity.Invoke(
handle.Handle,
pRenderingAreaInfoFixed,
pGranularityFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkExtent2D.</returns>
public static VkExtent2D GetRenderingAreaGranularity(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkRenderingAreaInfo pRenderingAreaInfo
)
{
VkExtent2D outValue = new();
GetRenderingAreaGranularity(handle, pRenderingAreaInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetRenderingAttachmentLocations.html">vkCmdSetRenderingAttachmentLocations</see> - Set color attachment location mappings for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To set the fragment output location mappings during rendering, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetRenderingAttachmentLocations<T>(
this T handle,
in VkRenderingAttachmentLocationInfo pLocationInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkRenderingAttachmentLocationInfo* pLocationInfoFixed = &pLocationInfo)
{
handle.PInvoke.vkCmdSetRenderingAttachmentLocations.Invoke(handle.Handle, pLocationInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetRenderingInputAttachmentIndices.html">vkCmdSetRenderingInputAttachmentIndices</see> - Set input attachment index mappings for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To set the input attachment index mappings during dynamic rendering, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetRenderingInputAttachmentIndices<T>(
this T handle,
in VkRenderingInputAttachmentIndexInfo pInputAttachmentIndexInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfoFixed = &pInputAttachmentIndexInfo)
{
handle.PInvoke.vkCmdSetRenderingInputAttachmentIndices.Invoke(
handle.Handle,
pInputAttachmentIndexInfoFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateSwapchainKHR.html">vkCreateSwapchainKHR</see> - Create a swapchain
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateSwapchainKHR
/// :objectnameplural: swapchains
/// :objectnamecamelcase: swapchain
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create a swapchain, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_swapchain
/// VkResult vkCreateSwapchainKHR(
/// VkDevice device,
/// const VkSwapchainCreateInfoKHR* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkSwapchainKHR* pSwapchain);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkSwapchainKHR CreateSwapchainKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroySwapchainKHR.html">vkDestroySwapchainKHR</see> - Destroy a swapchain object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a swapchain object call:
/// </para>
/// <code>
/// // Provided by VK_KHR_swapchain
/// void vkDestroySwapchainKHR(
/// VkDevice device,
/// VkSwapchainKHR swapchain,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroySwapchainKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSwapchainKHR swapchain,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroySwapchainKHR.Invoke(handle.Handle, swapchain, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetSwapchainImagesKHR.html">vkGetSwapchainImagesKHR</see> - Obtain the array of presentable images associated with a swapchain
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetSwapchainImagesKHR
/// </para>
/// <para>
/// To obtain the array of presentable images associated with a swapchain, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_swapchain
/// VkResult vkGetSwapchainImagesKHR(
/// VkDevice device,
/// VkSwapchainKHR swapchain,
/// uint32_t* pSwapchainImageCount,
/// VkImage* pSwapchainImages);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe VkResult GetSwapchainImagesKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSwapchainKHR swapchain,
ref int pSwapchainImageCount,
scoped ReadOnlySpan<VkImage> 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;
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static int GetSwapchainImagesKHR_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSwapchainKHR swapchain
)
{
int pSwapchainImageCount = default;
GetSwapchainImagesKHR(handle, swapchain, ref pSwapchainImageCount, null);
return pSwapchainImageCount;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pSwapchainImages">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static VkResult GetSwapchainImagesKHR_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSwapchainKHR swapchain,
scoped ReadOnlySpan<VkImage> pSwapchainImages
)
{
int pSwapchainImageCount = pSwapchainImages.Length;
return GetSwapchainImagesKHR(handle, swapchain, ref pSwapchainImageCount, pSwapchainImages);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkAcquireNextImageKHR.html">vkAcquireNextImageKHR</see> - Retrieve the index of the next available presentable image
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkAcquireNextImageKHR
/// </para>
/// <para>
/// To acquire an available presentable image to use, and retrieve the index of
/// that image, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_swapchain
/// VkResult vkAcquireNextImageKHR(
/// VkDevice device,
/// VkSwapchainKHR swapchain,
/// uint64_t timeout,
/// VkSemaphore semaphore,
/// VkFence fence,
/// uint32_t* pImageIndex);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult AcquireNextImageKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueuePresentKHR.html">vkQueuePresentKHR</see> - Queue an image for presentation
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkQueuePresentKHR
/// </para>
/// <para>
/// After queueing all rendering commands and transitioning the image to the
/// correct layout, to queue an image for presentation, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_swapchain
/// VkResult vkQueuePresentKHR(
/// VkQueue queue,
/// const VkPresentInfoKHR* pPresentInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe VkResult PresentKHRInternal(
this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceGroupPresentCapabilitiesKHR.html">vkGetDeviceGroupPresentCapabilitiesKHR</see> - Query present capabilities from other physical devices
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetDeviceGroupPresentCapabilitiesKHR
/// </para>
/// <para>
/// 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.
/// </para>
/// <para>
/// To query these capabilities, call:
/// </para>
/// <code>
/// // Provided by VK_VERSION_1_1 with VK_KHR_swapchain, VK_KHR_device_group with VK_KHR_surface
/// VkResult vkGetDeviceGroupPresentCapabilitiesKHR(
/// VkDevice device,
/// VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetGroupPresentCapabilitiesKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkDeviceGroupPresentCapabilitiesKHR.</returns>
public static VkDeviceGroupPresentCapabilitiesKHR GetGroupPresentCapabilitiesKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle
)
{
VkDeviceGroupPresentCapabilitiesKHR outValue = new();
GetGroupPresentCapabilitiesKHR(handle, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceGroupSurfacePresentModesKHR.html">vkGetDeviceGroupSurfacePresentModesKHR</see> - Query present capabilities for a surface
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetDeviceGroupSurfacePresentModesKHR
/// </para>
/// <para>
/// Some surfaces may: not be capable of using all the device group present
/// modes.
/// </para>
/// <para>
/// To query the supported device group present modes for a particular surface,
/// call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkDeviceGroupPresentModeFlagsKHR GetGroupSurfacePresentModesKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkAcquireNextImage2KHR.html">vkAcquireNextImage2KHR</see> - Retrieve the index of the next available presentable image
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkAcquireNextImage2KHR
/// </para>
/// <para>
/// To acquire an available presentable image to use, and retrieve the index of
/// that image, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult AcquireNextImage2KHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateSharedSwapchainsKHR.html">vkCreateSharedSwapchainsKHR</see> - Create multiple swapchains that share presentable images
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateSharedSwapchainsKHR
/// :objectnameplural: swapchains
/// :objectnamecamelcase: swapchain
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: <c>swapchainCount</c>
/// </para>
/// <para>
/// When the `<c>VK_KHR_display_swapchain</c>` extension is enabled, multiple
/// swapchains that share presentable images are created by calling:
/// </para>
/// <code>
/// // Provided by VK_KHR_display_swapchain
/// VkResult vkCreateSharedSwapchainsKHR(
/// VkDevice device,
/// uint32_t swapchainCount,
/// const VkSwapchainCreateInfoKHR* pCreateInfos,
/// const VkAllocationCallbacks* pAllocator,
/// VkSwapchainKHR* pSwapchains);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CreateSharedSwapchainsKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSwapchainCreateInfoKHR* pCreateInfos,
VkAllocator? pAllocator,
scoped ReadOnlySpan<VkSwapchainKHR> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateVideoSessionKHR.html">vkCreateVideoSessionKHR</see> - Creates a video session object
/// </summary>
/// <remarks>
/// <para>
/// To create a video session object, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_video_queue
/// VkResult vkCreateVideoSessionKHR(
/// VkDevice device,
/// const VkVideoSessionCreateInfoKHR* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkVideoSessionKHR* pVideoSession);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkVideoSessionKHR CreateVideoSessionKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyVideoSessionKHR.html">vkDestroyVideoSessionKHR</see> - Destroy video session object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a video session, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_video_queue
/// void vkDestroyVideoSessionKHR(
/// VkDevice device,
/// VkVideoSessionKHR videoSession,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyVideoSessionKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkVideoSessionKHR videoSession,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyVideoSessionKHR.Invoke(handle.Handle, videoSession, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetVideoSessionMemoryRequirementsKHR.html">vkGetVideoSessionMemoryRequirementsKHR</see> - Get the memory requirements for a video session
/// </summary>
/// <remarks>
/// <para>
/// To determine the memory requirements for a video session object, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_video_queue
/// VkResult vkGetVideoSessionMemoryRequirementsKHR(
/// VkDevice device,
/// VkVideoSessionKHR videoSession,
/// uint32_t* pMemoryRequirementsCount,
/// VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe VkResult GetVideoSessionMemoryRequirementsKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkVideoSessionKHR videoSession,
ref int pMemoryRequirementsCount,
scoped ReadOnlySpan<VkVideoSessionMemoryRequirementsKHR> 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;
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static int GetVideoSessionMemoryRequirementsKHR_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkVideoSessionKHR videoSession
)
{
int pMemoryRequirementsCount = default;
GetVideoSessionMemoryRequirementsKHR(handle, videoSession, ref pMemoryRequirementsCount, null);
return pMemoryRequirementsCount;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pMemoryRequirements">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static VkResult GetVideoSessionMemoryRequirementsKHR_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkVideoSessionKHR videoSession,
scoped ReadOnlySpan<VkVideoSessionMemoryRequirementsKHR> pMemoryRequirements
)
{
int pMemoryRequirementsCount = pMemoryRequirements.Length;
return GetVideoSessionMemoryRequirementsKHR(
handle,
videoSession,
ref pMemoryRequirementsCount,
pMemoryRequirements
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkBindVideoSessionMemoryKHR.html">vkBindVideoSessionMemoryKHR</see> - Bind Video Memory
/// </summary>
/// <remarks>
/// <para>
/// To attach memory to a video session object, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_video_queue
/// VkResult vkBindVideoSessionMemoryKHR(
/// VkDevice device,
/// VkVideoSessionKHR videoSession,
/// uint32_t bindSessionMemoryInfoCount,
/// const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindVideoSessionMemoryKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkVideoSessionKHR videoSession,
scoped ReadOnlySpan<VkBindVideoSessionMemoryInfoKHR> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateVideoSessionParametersKHR.html">vkCreateVideoSessionParametersKHR</see> - Creates video session parameters object
/// </summary>
/// <remarks>
/// <para>
/// To create a video session parameters object, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_video_queue
/// VkResult vkCreateVideoSessionParametersKHR(
/// VkDevice device,
/// const VkVideoSessionParametersCreateInfoKHR* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkVideoSessionParametersKHR* pVideoSessionParameters);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkVideoSessionParametersKHR CreateVideoSessionParametersKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkUpdateVideoSessionParametersKHR.html">vkUpdateVideoSessionParametersKHR</see> - Update video session parameters object
/// </summary>
/// <remarks>
/// <para>
/// To update video session parameters object with new parameters, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_video_queue
/// VkResult vkUpdateVideoSessionParametersKHR(
/// VkDevice device,
/// VkVideoSessionParametersKHR videoSessionParameters,
/// const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void UpdateVideoSessionParametersKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyVideoSessionParametersKHR.html">vkDestroyVideoSessionParametersKHR</see> - Destroy video session parameters object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a video session parameters object, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_video_queue
/// void vkDestroyVideoSessionParametersKHR(
/// VkDevice device,
/// VkVideoSessionParametersKHR videoSessionParameters,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyVideoSessionParametersKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkVideoSessionParametersKHR videoSessionParameters,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyVideoSessionParametersKHR.Invoke(handle.Handle, videoSessionParameters, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBeginVideoCodingKHR.html">vkCmdBeginVideoCodingKHR</see> - Begin video coding scope
/// </summary>
/// <remarks>
/// <para>
/// To begin a video coding scope, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_video_queue
/// void vkCmdBeginVideoCodingKHR(
/// VkCommandBuffer commandBuffer,
/// const VkVideoBeginCodingInfoKHR* pBeginInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BeginVideoCodingKHR<T>(this T handle, in VkVideoBeginCodingInfoKHR pBeginInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkVideoBeginCodingInfoKHR* pBeginInfoFixed = &pBeginInfo)
{
handle.PInvoke.vkCmdBeginVideoCodingKHR.Invoke(handle.Handle, pBeginInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEndVideoCodingKHR.html">vkCmdEndVideoCodingKHR</see> - End video coding scope
/// </summary>
/// <remarks>
/// <para>
/// To end a video coding scope, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_video_queue
/// void vkCmdEndVideoCodingKHR(
/// VkCommandBuffer commandBuffer,
/// const VkVideoEndCodingInfoKHR* pEndCodingInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void EndVideoCodingKHR<T>(this T handle, in VkVideoEndCodingInfoKHR pEndCodingInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkVideoEndCodingInfoKHR* pEndCodingInfoFixed = &pEndCodingInfo)
{
handle.PInvoke.vkCmdEndVideoCodingKHR.Invoke(handle.Handle, pEndCodingInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdControlVideoCodingKHR.html">vkCmdControlVideoCodingKHR</see> - Control video coding parameters
/// </summary>
/// <remarks>
/// <para>
/// To apply dynamic controls to the bound video session object, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_video_queue
/// void vkCmdControlVideoCodingKHR(
/// VkCommandBuffer commandBuffer,
/// const VkVideoCodingControlInfoKHR* pCodingControlInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void ControlVideoCodingKHR<T>(
this T handle,
in VkVideoCodingControlInfoKHR pCodingControlInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkVideoCodingControlInfoKHR* pCodingControlInfoFixed = &pCodingControlInfo)
{
handle.PInvoke.vkCmdControlVideoCodingKHR.Invoke(handle.Handle, pCodingControlInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDecodeVideoKHR.html">vkCmdDecodeVideoKHR</see> - Launch a video decode operation
/// </summary>
/// <remarks>
/// <para>
/// To launch video decode operations, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_video_decode_queue
/// void vkCmdDecodeVideoKHR(
/// VkCommandBuffer commandBuffer,
/// const VkVideoDecodeInfoKHR* pDecodeInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DecodeVideoKHR<T>(this T handle, in VkVideoDecodeInfoKHR pDecodeInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkVideoDecodeInfoKHR* pDecodeInfoFixed = &pDecodeInfo)
{
handle.PInvoke.vkCmdDecodeVideoKHR.Invoke(handle.Handle, pDecodeInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BeginRenderingKHR<T>(this T handle, in VkRenderingInfo pRenderingInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkRenderingInfo* pRenderingInfoFixed = &pRenderingInfo)
{
handle.PInvoke.vkCmdBeginRenderingKHR.Invoke(handle.Handle, pRenderingInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void EndRenderingKHR<T>(this T handle)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdEndRenderingKHR.Invoke(handle.Handle);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkPeerMemoryFeatureFlags GetGroupPeerMemoryFeaturesKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
int heapIndex,
int localDeviceIndex,
int remoteDeviceIndex
)
{
VkPeerMemoryFeatureFlags pPeerMemoryFeaturesLocal = default;
handle.PInvoke.vkGetDeviceGroupPeerMemoryFeaturesKHR.Invoke(
handle.Handle,
heapIndex,
localDeviceIndex,
remoteDeviceIndex,
&pPeerMemoryFeaturesLocal
);
return pPeerMemoryFeaturesLocal;
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDeviceMaskKHR<T>(this T handle, int deviceMask)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDeviceMaskKHR.Invoke(handle.Handle, deviceMask);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DispatchBaseKHR<T>(
this T handle,
int baseGroupX,
int baseGroupY,
int baseGroupZ,
int groupCountX,
int groupCountY,
int groupCountZ
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDispatchBaseKHR.Invoke(
handle.Handle,
baseGroupX,
baseGroupY,
baseGroupZ,
groupCountX,
groupCountY,
groupCountZ
);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void TrimCommandPoolKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkCommandPool commandPool,
VkCommandPoolTrimFlags flags
)
{
handle.PInvoke.vkTrimCommandPoolKHR.Invoke(handle.Handle, commandPool, flags);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetMemoryFdKHR.html">vkGetMemoryFdKHR</see> - Get a POSIX file descriptor for a memory object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetMemoryFdKHR
/// </para>
/// <para>
/// To export a POSIX file descriptor referencing the payload of a Vulkan device
/// memory object, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_external_memory_fd
/// VkResult vkGetMemoryFdKHR(
/// VkDevice device,
/// const VkMemoryGetFdInfoKHR* pGetFdInfo,
/// int* pFd);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe int GetMemoryFdKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetMemoryFdPropertiesKHR.html">vkGetMemoryFdPropertiesKHR</see> - Get Properties of External Memory File Descriptors
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetMemoryFdPropertiesKHR
/// </para>
/// <para>
/// 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:
/// </para>
/// <code>
/// // Provided by VK_KHR_external_memory_fd
/// VkResult vkGetMemoryFdPropertiesKHR(
/// VkDevice device,
/// VkExternalMemoryHandleTypeFlagBits handleType,
/// int fd,
/// VkMemoryFdPropertiesKHR* pMemoryFdProperties);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetMemoryFdPropertiesKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryFdPropertiesKHR.</returns>
public static VkMemoryFdPropertiesKHR GetMemoryFdPropertiesKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkExternalMemoryHandleTypeFlags handleType,
int fd
)
{
VkMemoryFdPropertiesKHR outValue = new();
GetMemoryFdPropertiesKHR(handle, handleType, fd, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkImportSemaphoreFdKHR.html">vkImportSemaphoreFdKHR</see> - Import a semaphore from a POSIX file descriptor
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkImportSemaphoreFdKHR
/// </para>
/// <para>
/// To import a semaphore payload from a POSIX file descriptor, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_external_semaphore_fd
/// VkResult vkImportSemaphoreFdKHR(
/// VkDevice device,
/// const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void ImportSemaphoreFdKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetSemaphoreFdKHR.html">vkGetSemaphoreFdKHR</see> - Get a POSIX file descriptor handle for a semaphore
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetSemaphoreFdKHR
/// </para>
/// <para>
/// To export a POSIX file descriptor representing the payload of a semaphore,
/// call:
/// </para>
/// <code>
/// // Provided by VK_KHR_external_semaphore_fd
/// VkResult vkGetSemaphoreFdKHR(
/// VkDevice device,
/// const VkSemaphoreGetFdInfoKHR* pGetFdInfo,
/// int* pFd);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe int GetSemaphoreFdKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void PushDescriptorSetKHR<T>(
this T handle,
VkPipelineBindPoint pipelineBindPoint,
VkPipelineLayout layout,
int set,
int descriptorWriteCount,
VkWriteDescriptorSet* pDescriptorWrites
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdPushDescriptorSetKHR.Invoke(
handle.Handle,
pipelineBindPoint,
layout,
set,
descriptorWriteCount,
pDescriptorWrites
);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void PushDescriptorSetWithTemplateKHR<T>(
this T handle,
VkDescriptorUpdateTemplate descriptorUpdateTemplate,
VkPipelineLayout layout,
int set,
void* pData
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdPushDescriptorSetWithTemplateKHR.Invoke(
handle.Handle,
descriptorUpdateTemplate,
layout,
set,
pData
);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CreateDescriptorUpdateTemplateKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDescriptorUpdateTemplateCreateInfo pCreateInfo,
VkAllocator? pAllocator,
VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate
)
{
fixed (VkDescriptorUpdateTemplateCreateInfo* pCreateInfoFixed = &pCreateInfo)
{
return handle.PInvoke.vkCreateDescriptorUpdateTemplateKHR.Invoke(
handle.Handle,
pCreateInfoFixed,
pAllocator,
pDescriptorUpdateTemplate
);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyDescriptorUpdateTemplateKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDescriptorUpdateTemplate descriptorUpdateTemplate,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyDescriptorUpdateTemplateKHR.Invoke(
handle.Handle,
descriptorUpdateTemplate,
pAllocator
);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void UpdateDescriptorSetWithTemplateKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDescriptorSet descriptorSet,
VkDescriptorUpdateTemplate descriptorUpdateTemplate,
void* pData
)
{
handle.PInvoke.vkUpdateDescriptorSetWithTemplateKHR.Invoke(
handle.Handle,
descriptorSet,
descriptorUpdateTemplate,
pData
);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CreateRenderPass2KHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkRenderPassCreateInfo2 pCreateInfo,
VkAllocator? pAllocator,
VkRenderPass* pRenderPass
)
{
fixed (VkRenderPassCreateInfo2* pCreateInfoFixed = &pCreateInfo)
{
return handle.PInvoke.vkCreateRenderPass2KHR.Invoke(
handle.Handle,
pCreateInfoFixed,
pAllocator,
pRenderPass
);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BeginRenderPass2KHR<T>(
this T handle,
VkRenderPassBeginInfo* pRenderPassBegin,
in VkSubpassBeginInfo pSubpassBeginInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkSubpassBeginInfo* pSubpassBeginInfoFixed = &pSubpassBeginInfo)
{
handle.PInvoke.vkCmdBeginRenderPass2KHR.Invoke(handle.Handle, pRenderPassBegin, pSubpassBeginInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void NextSubpass2KHR<T>(
this T handle,
in VkSubpassBeginInfo pSubpassBeginInfo,
in VkSubpassEndInfo pSubpassEndInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkSubpassEndInfo* pSubpassEndInfoFixed = &pSubpassEndInfo)
fixed (VkSubpassBeginInfo* pSubpassBeginInfoFixed = &pSubpassBeginInfo)
{
handle.PInvoke.vkCmdNextSubpass2KHR.Invoke(handle.Handle, pSubpassBeginInfoFixed, pSubpassEndInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void EndRenderPass2KHR<T>(this T handle, in VkSubpassEndInfo pSubpassEndInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkSubpassEndInfo* pSubpassEndInfoFixed = &pSubpassEndInfo)
{
handle.PInvoke.vkCmdEndRenderPass2KHR.Invoke(handle.Handle, pSubpassEndInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetSwapchainStatusKHR.html">vkGetSwapchainStatusKHR</see> - Get a swapchain&amp;apos;s status
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetSwapchainStatusKHR
/// </para>
/// <para>
/// In order to query a swapchain&apos;s status when rendering to a shared
/// presentable image, call:
/// <code>
/// // Provided by VK_KHR_shared_presentable_image
/// VkResult vkGetSwapchainStatusKHR(
/// VkDevice device,
/// VkSwapchainKHR swapchain);
/// </code>
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static VkResult GetSwapchainStatusKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkImportFenceFdKHR.html">vkImportFenceFdKHR</see> - Import a fence from a POSIX file descriptor
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkImportFenceFdKHR
/// </para>
/// <para>
/// To import a fence payload from a POSIX file descriptor, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_external_fence_fd
/// VkResult vkImportFenceFdKHR(
/// VkDevice device,
/// const VkImportFenceFdInfoKHR* pImportFenceFdInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void ImportFenceFdKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetFenceFdKHR.html">vkGetFenceFdKHR</see> - Get a POSIX file descriptor handle for a fence
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetFenceFdKHR
/// </para>
/// <para>
/// To export a POSIX file descriptor representing the payload of a fence, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_external_fence_fd
/// VkResult vkGetFenceFdKHR(
/// VkDevice device,
/// const VkFenceGetFdInfoKHR* pGetFdInfo,
/// int* pFd);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe int GetFenceFdKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkAcquireProfilingLockKHR.html">vkAcquireProfilingLockKHR</see> - Acquires the profiling lock
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkAcquireProfilingLockKHR
/// </para>
/// <para>
/// To record and submit a command buffer containing a performance query pool
/// the profiling lock <i>must</i> be held.
/// The profiling lock <i>must</i> be acquired prior to any call to
/// <c>vkBeginCommandBuffer</c> that will be using a performance query pool.
/// The profiling lock <i>must</i> be held while any command buffer containing a
/// performance query pool is in the <i>recording</i>, <i>executable</i>, or _pending
/// state_.
/// To acquire the profiling lock, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_performance_query
/// VkResult vkAcquireProfilingLockKHR(
/// VkDevice device,
/// const VkAcquireProfilingLockInfoKHR* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void AcquireProfilingLockKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkReleaseProfilingLockKHR.html">vkReleaseProfilingLockKHR</see> - Releases the profiling lock
/// </summary>
/// <remarks>
/// <para>
/// To release the profiling lock, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_performance_query
/// void vkReleaseProfilingLockKHR(
/// VkDevice device);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ReleaseProfilingLockKHR(this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle)
{
handle.PInvoke.vkReleaseProfilingLockKHR.Invoke(handle.Handle);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetImageMemoryRequirements2KHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkImageMemoryRequirementsInfo2 pInfo,
ref VkMemoryRequirements2 pMemoryRequirements
)
{
fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements)
fixed (VkImageMemoryRequirementsInfo2* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetImageMemoryRequirements2KHR.Invoke(
handle.Handle,
pInfoFixed,
pMemoryRequirementsFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryRequirements2.</returns>
public static VkMemoryRequirements2 GetImageMemoryRequirements2KHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkImageMemoryRequirementsInfo2 pInfo
)
{
VkMemoryRequirements2 outValue = new();
GetImageMemoryRequirements2KHR(handle, pInfo, ref outValue);
return outValue;
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetBufferMemoryRequirements2KHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkBufferMemoryRequirementsInfo2 pInfo,
ref VkMemoryRequirements2 pMemoryRequirements
)
{
fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements)
fixed (VkBufferMemoryRequirementsInfo2* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetBufferMemoryRequirements2KHR.Invoke(
handle.Handle,
pInfoFixed,
pMemoryRequirementsFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryRequirements2.</returns>
public static VkMemoryRequirements2 GetBufferMemoryRequirements2KHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkBufferMemoryRequirementsInfo2 pInfo
)
{
VkMemoryRequirements2 outValue = new();
GetBufferMemoryRequirements2KHR(handle, pInfo, ref outValue);
return outValue;
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetImageSparseMemoryRequirements2KHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkSparseImageMemoryRequirements2.</returns>
public static unsafe VkSparseImageMemoryRequirements2 GetImageSparseMemoryRequirements2KHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkImageSparseMemoryRequirementsInfo2 pInfo,
int* pSparseMemoryRequirementCount
)
{
VkSparseImageMemoryRequirements2 outValue = new();
GetImageSparseMemoryRequirements2KHR(handle, pInfo, pSparseMemoryRequirementCount, ref outValue);
return outValue;
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CreateSamplerYcbcrConversionKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkSamplerYCbCrConversionCreateInfo pCreateInfo,
VkAllocator? pAllocator,
VkSamplerYCbCrConversion* pYcbcrConversion
)
{
fixed (VkSamplerYCbCrConversionCreateInfo* pCreateInfoFixed = &pCreateInfo)
{
return handle.PInvoke.vkCreateSamplerYcbcrConversionKHR.Invoke(
handle.Handle,
pCreateInfoFixed,
pAllocator,
pYcbcrConversion
);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroySamplerYcbcrConversionKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSamplerYCbCrConversion ycbcrConversion,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroySamplerYcbcrConversionKHR.Invoke(handle.Handle, ycbcrConversion, pAllocator);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult BindBufferMemory2KHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
int bindInfoCount,
VkBindBufferMemoryInfo* pBindInfos
)
{
return handle.PInvoke.vkBindBufferMemory2KHR.Invoke(handle.Handle, bindInfoCount, pBindInfos);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult BindImageMemory2KHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
int bindInfoCount,
VkBindImageMemoryInfo* pBindInfos
)
{
return handle.PInvoke.vkBindImageMemory2KHR.Invoke(handle.Handle, bindInfoCount, pBindInfos);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetDescriptorSetLayoutSupportKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDescriptorSetLayoutCreateInfo pCreateInfo,
ref VkDescriptorSetLayoutSupport pSupport
)
{
fixed (VkDescriptorSetLayoutSupport* pSupportFixed = &pSupport)
fixed (VkDescriptorSetLayoutCreateInfo* pCreateInfoFixed = &pCreateInfo)
{
handle.PInvoke.vkGetDescriptorSetLayoutSupportKHR.Invoke(
handle.Handle,
pCreateInfoFixed,
pSupportFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkDescriptorSetLayoutSupport.</returns>
public static VkDescriptorSetLayoutSupport GetDescriptorSetLayoutSupportKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDescriptorSetLayoutCreateInfo pCreateInfo
)
{
VkDescriptorSetLayoutSupport outValue = new();
GetDescriptorSetLayoutSupportKHR(handle, pCreateInfo, ref outValue);
return outValue;
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawIndirectCountKHR<T>(
this T handle,
VkBuffer buffer,
ByteSize64 offset,
VkBuffer countBuffer,
ByteSize64 countBufferOffset,
int maxDrawCount,
int stride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawIndirectCountKHR.Invoke(
handle.Handle,
buffer,
offset,
countBuffer,
countBufferOffset,
maxDrawCount,
stride
);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawIndexedIndirectCountKHR<T>(
this T handle,
VkBuffer buffer,
ByteSize64 offset,
VkBuffer countBuffer,
ByteSize64 countBufferOffset,
int maxDrawCount,
int stride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawIndexedIndirectCountKHR.Invoke(
handle.Handle,
buffer,
offset,
countBuffer,
countBufferOffset,
maxDrawCount,
stride
);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult GetSemaphoreCounterValueKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSemaphore semaphore,
nint* pValue
)
{
return handle.PInvoke.vkGetSemaphoreCounterValueKHR.Invoke(handle.Handle, semaphore, pValue);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult WaitSemaphoresKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkSemaphoreWaitInfo pWaitInfo,
nint timeout
)
{
fixed (VkSemaphoreWaitInfo* pWaitInfoFixed = &pWaitInfo)
{
return handle.PInvoke.vkWaitSemaphoresKHR.Invoke(handle.Handle, pWaitInfoFixed, timeout);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult SignalSemaphoreKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkSemaphoreSignalInfo pSignalInfo
)
{
fixed (VkSemaphoreSignalInfo* pSignalInfoFixed = &pSignalInfo)
{
return handle.PInvoke.vkSignalSemaphoreKHR.Invoke(handle.Handle, pSignalInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetFragmentShadingRateKHR.html">vkCmdSetFragmentShadingRateKHR</see> - Set pipeline fragment shading rate and combiner operation dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the pipeline fragment
/// shading rate and combiner operation, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_fragment_shading_rate
/// void vkCmdSetFragmentShadingRateKHR(
/// VkCommandBuffer commandBuffer,
/// const VkExtent2D* pFragmentSize,
/// const VkFragmentShadingRateCombinerOpKHR combinerOps[2]);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetFragmentShadingRateKHR<T>(
this T handle,
VkExtent2D* pFragmentSize,
VkFragmentShadingRateCombinerOpKHR* combinerOps
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetFragmentShadingRateKHR.Invoke(handle.Handle, pFragmentSize, combinerOps);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetRenderingAttachmentLocationsKHR<T>(
this T handle,
in VkRenderingAttachmentLocationInfo pLocationInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkRenderingAttachmentLocationInfo* pLocationInfoFixed = &pLocationInfo)
{
handle.PInvoke.vkCmdSetRenderingAttachmentLocationsKHR.Invoke(handle.Handle, pLocationInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetRenderingInputAttachmentIndicesKHR<T>(
this T handle,
in VkRenderingInputAttachmentIndexInfo pInputAttachmentIndexInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfoFixed = &pInputAttachmentIndexInfo)
{
handle.PInvoke.vkCmdSetRenderingInputAttachmentIndicesKHR.Invoke(
handle.Handle,
pInputAttachmentIndexInfoFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkWaitForPresentKHR.html">vkWaitForPresentKHR</see> - Wait for presentation
/// </summary>
/// <remarks>
/// <para>
/// When the <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-presentWait"><c>presentWait</c>^</see> feature is enabled, an
/// application <i>can</i> wait for an image to be presented to the user by first
/// specifying a presentId for the target presentation by adding a
/// <c>VkPresentIdKHR</c> structure to the <c>pNext</c> chain of the
/// <c>VkPresentInfoKHR</c> structure and then waiting for that presentation to
/// complete by calling:
/// </para>
/// <code>
/// // Provided by VK_KHR_present_wait
/// VkResult vkWaitForPresentKHR(
/// VkDevice device,
/// VkSwapchainKHR swapchain,
/// uint64_t presentId,
/// uint64_t timeout);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static VkResult WaitForPresentKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkDeviceAddress GetBufferDeviceAddressKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkBufferDeviceAddressInfo pInfo
)
{
fixed (VkBufferDeviceAddressInfo* pInfoFixed = &pInfo)
{
return handle.PInvoke.vkGetBufferDeviceAddressKHR.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe nint GetBufferOpaqueCaptureAddressKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkBufferDeviceAddressInfo pInfo
)
{
fixed (VkBufferDeviceAddressInfo* pInfoFixed = &pInfo)
{
return handle.PInvoke.vkGetBufferOpaqueCaptureAddressKHR.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe nint GetMemoryOpaqueCaptureAddressKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceMemoryOpaqueCaptureAddressInfo pInfo
)
{
fixed (VkDeviceMemoryOpaqueCaptureAddressInfo* pInfoFixed = &pInfo)
{
return handle.PInvoke.vkGetDeviceMemoryOpaqueCaptureAddressKHR.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateDeferredOperationKHR.html">vkCreateDeferredOperationKHR</see> - Create a deferred operation handle
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateDeferredOperationKHR
/// </para>
/// <para>
/// To construct the tracking object for a deferred command, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_deferred_host_operations
/// VkResult vkCreateDeferredOperationKHR(
/// VkDevice device,
/// const VkAllocationCallbacks* pAllocator,
/// VkDeferredOperationKHR* pDeferredOperation);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkDeferredOperationKHR CreateDeferredOperationKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyDeferredOperationKHR.html">vkDestroyDeferredOperationKHR</see> - Destroy a deferred operation handle
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkDestroyDeferredOperationKHR
/// </para>
/// <para>
/// When a deferred operation is completed, the application <i>can</i> destroy the
/// tracking object by calling:
/// </para>
/// <code>
/// // Provided by VK_KHR_deferred_host_operations
/// void vkDestroyDeferredOperationKHR(
/// VkDevice device,
/// VkDeferredOperationKHR operation,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyDeferredOperationKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDeferredOperationKHR operation,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyDeferredOperationKHR.Invoke(handle.Handle, operation, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeferredOperationMaxConcurrencyKHR.html">vkGetDeferredOperationMaxConcurrencyKHR</see> - Query the maximum concurrency on a deferred operation
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetDeferredOperationMaxConcurrencyKHR
/// </para>
/// <para>
/// To query the number of additional threads that can usefully be joined to a
/// deferred operation, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_deferred_host_operations
/// uint32_t vkGetDeferredOperationMaxConcurrencyKHR(
/// VkDevice device,
/// VkDeferredOperationKHR operation);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int GetDeferredOperationMaxConcurrencyKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDeferredOperationKHR operation
)
{
return handle.PInvoke.vkGetDeferredOperationMaxConcurrencyKHR.Invoke(handle.Handle, operation);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeferredOperationResultKHR.html">vkGetDeferredOperationResultKHR</see> - Query the result of a deferred operation
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetDeferredOperationResultKHR
/// </para>
/// <para>
/// The <c>vkGetDeferredOperationResultKHR</c> function is defined as:
/// </para>
/// <code>
/// // Provided by VK_KHR_deferred_host_operations
/// VkResult vkGetDeferredOperationResultKHR(
/// VkDevice device,
/// VkDeferredOperationKHR operation);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static VkResult GetDeferredOperationResultKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDeferredOperationJoinKHR.html">vkDeferredOperationJoinKHR</see> - Assign a thread to a deferred operation
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkDeferredOperationJoinKHR
/// </para>
/// <para>
/// To assign a thread to a deferred operation, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_deferred_host_operations
/// VkResult vkDeferredOperationJoinKHR(
/// VkDevice device,
/// VkDeferredOperationKHR operation);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static VkResult DeferredOperationJoinKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetPipelineExecutablePropertiesKHR.html">vkGetPipelineExecutablePropertiesKHR</see> - Get the executables associated with a pipeline
/// </summary>
/// <remarks>
/// <para>
/// 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:
/// </para>
/// <code>
/// // Provided by VK_KHR_pipeline_executable_properties
/// VkResult vkGetPipelineExecutablePropertiesKHR(
/// VkDevice device,
/// const VkPipelineInfoKHR* pPipelineInfo,
/// uint32_t* pExecutableCount,
/// VkPipelineExecutablePropertiesKHR* pProperties);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe VkResult GetPipelineExecutablePropertiesKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkPipelineInfoKHR pPipelineInfo,
ref int pExecutableCount,
scoped ReadOnlySpan<VkPipelineExecutablePropertiesKHR> 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;
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static int GetPipelineExecutablePropertiesKHR_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkPipelineInfoKHR pPipelineInfo
)
{
int pExecutableCount = default;
GetPipelineExecutablePropertiesKHR(handle, pPipelineInfo, ref pExecutableCount, null);
return pExecutableCount;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pProperties">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static VkResult GetPipelineExecutablePropertiesKHR_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkPipelineInfoKHR pPipelineInfo,
scoped ReadOnlySpan<VkPipelineExecutablePropertiesKHR> pProperties
)
{
int pExecutableCount = pProperties.Length;
return GetPipelineExecutablePropertiesKHR(handle, pPipelineInfo, ref pExecutableCount, pProperties);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetPipelineExecutableStatisticsKHR.html">vkGetPipelineExecutableStatisticsKHR</see> - Get compile time statistics associated with a pipeline executable
/// </summary>
/// <remarks>
/// <para>
/// 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:
/// </para>
/// <code>
/// // Provided by VK_KHR_pipeline_executable_properties
/// VkResult vkGetPipelineExecutableStatisticsKHR(
/// VkDevice device,
/// const VkPipelineExecutableInfoKHR* pExecutableInfo,
/// uint32_t* pStatisticCount,
/// VkPipelineExecutableStatisticKHR* pStatistics);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe VkResult GetPipelineExecutableStatisticsKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkPipelineExecutableInfoKHR pExecutableInfo,
ref int pStatisticCount,
scoped ReadOnlySpan<VkPipelineExecutableStatisticKHR> 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;
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static int GetPipelineExecutableStatisticsKHR_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkPipelineExecutableInfoKHR pExecutableInfo
)
{
int pStatisticCount = default;
GetPipelineExecutableStatisticsKHR(handle, pExecutableInfo, ref pStatisticCount, null);
return pStatisticCount;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pStatistics">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static VkResult GetPipelineExecutableStatisticsKHR_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkPipelineExecutableInfoKHR pExecutableInfo,
scoped ReadOnlySpan<VkPipelineExecutableStatisticKHR> pStatistics
)
{
int pStatisticCount = pStatistics.Length;
return GetPipelineExecutableStatisticsKHR(handle, pExecutableInfo, ref pStatisticCount, pStatistics);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetPipelineExecutableInternalRepresentationsKHR.html">vkGetPipelineExecutableInternalRepresentationsKHR</see> - Get internal representations of the pipeline executable
/// </summary>
/// <remarks>
/// <para>
/// 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&apos;s internal representation at any number of
/// intermediate compile steps.
/// To query the internal representations associated with a pipeline executable,
/// call:
/// </para>
/// <code>
/// // Provided by VK_KHR_pipeline_executable_properties
/// VkResult vkGetPipelineExecutableInternalRepresentationsKHR(
/// VkDevice device,
/// const VkPipelineExecutableInfoKHR* pExecutableInfo,
/// uint32_t* pInternalRepresentationCount,
/// VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe VkResult GetPipelineExecutableInternalRepresentationsKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkPipelineExecutableInfoKHR pExecutableInfo,
ref int pInternalRepresentationCount,
scoped ReadOnlySpan<VkPipelineExecutableInternalRepresentationKHR> 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;
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static int GetPipelineExecutableInternalRepresentationsKHR_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkPipelineExecutableInfoKHR pExecutableInfo
)
{
int pInternalRepresentationCount = default;
GetPipelineExecutableInternalRepresentationsKHR(
handle,
pExecutableInfo,
ref pInternalRepresentationCount,
null
);
return pInternalRepresentationCount;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pInternalRepresentations">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static VkResult GetPipelineExecutableInternalRepresentationsKHR_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkPipelineExecutableInfoKHR pExecutableInfo,
scoped ReadOnlySpan<VkPipelineExecutableInternalRepresentationKHR> pInternalRepresentations
)
{
int pInternalRepresentationCount = pInternalRepresentations.Length;
return GetPipelineExecutableInternalRepresentationsKHR(
handle,
pExecutableInfo,
ref pInternalRepresentationCount,
pInternalRepresentations
);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult MapMemory2KHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkMemoryMapInfo pMemoryMapInfo,
void** ppData
)
{
fixed (VkMemoryMapInfo* pMemoryMapInfoFixed = &pMemoryMapInfo)
{
return handle.PInvoke.vkMapMemory2KHR.Invoke(handle.Handle, pMemoryMapInfoFixed, ppData);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult UnmapMemory2KHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkMemoryUnmapInfo pMemoryUnmapInfo
)
{
fixed (VkMemoryUnmapInfo* pMemoryUnmapInfoFixed = &pMemoryUnmapInfo)
{
return handle.PInvoke.vkUnmapMemory2KHR.Invoke(handle.Handle, pMemoryUnmapInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetEncodedVideoSessionParametersKHR.html">vkGetEncodedVideoSessionParametersKHR</see> - Get encoded parameter sets from a video session parameters object
/// </summary>
/// <remarks>
/// <para>
/// Encoded parameter data <i>can</i> be retrieved from a video session parameters
/// object created with a video encode operation using the command:
/// </para>
/// <code>
/// // Provided by VK_KHR_video_encode_queue
/// VkResult vkGetEncodedVideoSessionParametersKHR(
/// VkDevice device,
/// const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo,
/// VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo,
/// size_t* pDataSize,
/// void* pData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe VkResult GetEncodedVideoSessionParametersKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkVideoEncodeSessionParametersGetInfoKHR pVideoSessionParametersInfo,
in VkVideoEncodeSessionParametersFeedbackInfoKHR pFeedbackInfo,
ref nuint pDataSize,
scoped ReadOnlySpan<byte> 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;
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static nuint GetEncodedVideoSessionParametersKHR_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkVideoEncodeSessionParametersGetInfoKHR pVideoSessionParametersInfo,
in VkVideoEncodeSessionParametersFeedbackInfoKHR pFeedbackInfo
)
{
nuint pDataSize = default;
GetEncodedVideoSessionParametersKHR(
handle,
pVideoSessionParametersInfo,
pFeedbackInfo,
ref pDataSize,
null
);
return pDataSize;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pData">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static VkResult GetEncodedVideoSessionParametersKHR_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkVideoEncodeSessionParametersGetInfoKHR pVideoSessionParametersInfo,
in VkVideoEncodeSessionParametersFeedbackInfoKHR pFeedbackInfo,
scoped ReadOnlySpan<byte> pData
)
{
nuint pDataSize = (nuint)pData.Length;
return GetEncodedVideoSessionParametersKHR(
handle,
pVideoSessionParametersInfo,
pFeedbackInfo,
ref pDataSize,
pData
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEncodeVideoKHR.html">vkCmdEncodeVideoKHR</see> - Launch video encode operations
/// </summary>
/// <remarks>
/// <para>
/// To launch video encode operations, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_video_encode_queue
/// void vkCmdEncodeVideoKHR(
/// VkCommandBuffer commandBuffer,
/// const VkVideoEncodeInfoKHR* pEncodeInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void EncodeVideoKHR<T>(this T handle, in VkVideoEncodeInfoKHR pEncodeInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkVideoEncodeInfoKHR* pEncodeInfoFixed = &pEncodeInfo)
{
handle.PInvoke.vkCmdEncodeVideoKHR.Invoke(handle.Handle, pEncodeInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetEvent2KHR<T>(this T handle, VkEvent @event, in VkDependencyInfo pDependencyInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDependencyInfo* pDependencyInfoFixed = &pDependencyInfo)
{
handle.PInvoke.vkCmdSetEvent2KHR.Invoke(handle.Handle, @event, pDependencyInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ResetEvent2KHR<T>(this T handle, VkEvent @event, VkPipelineStageFlags2 stageMask)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdResetEvent2KHR.Invoke(handle.Handle, @event, stageMask);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void WaitEvents2KHR<T>(
this T handle,
int eventCount,
VkEvent* pEvents,
VkDependencyInfo* pDependencyInfos
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdWaitEvents2KHR.Invoke(handle.Handle, eventCount, pEvents, pDependencyInfos);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void PipelineBarrier2KHR<T>(this T handle, in VkDependencyInfo pDependencyInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDependencyInfo* pDependencyInfoFixed = &pDependencyInfo)
{
handle.PInvoke.vkCmdPipelineBarrier2KHR.Invoke(handle.Handle, pDependencyInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void WriteTimestamp2KHR<T>(
this T handle,
VkPipelineStageFlags2 stage,
VkQueryPool queryPool,
int query
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdWriteTimestamp2KHR.Invoke(handle.Handle, stage, queryPool, query);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult Submit2KHR(
this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> handle,
int submitCount,
VkSubmitInfo2* pSubmits,
VkFence fence
)
{
return handle.PInvoke.vkQueueSubmit2KHR.Invoke(handle.Handle, submitCount, pSubmits, fence);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindIndexBuffer3KHR.html">vkCmdBindIndexBuffer3KHR</see> - Bind an address range as an index buffer to a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBindIndexBuffer3KHR
/// </para>
/// <para>
/// To bind an address range as an index buffer to a command buffer, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_device_address_commands
/// void vkCmdBindIndexBuffer3KHR(
/// VkCommandBuffer commandBuffer,
/// const VkBindIndexBuffer3InfoKHR* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindIndexBuffer3KHR<T>(this T handle, in VkBindIndexBuffer3InfoKHR pInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkBindIndexBuffer3InfoKHR* pInfoFixed = &pInfo)
{
handle.PInvoke.vkCmdBindIndexBuffer3KHR.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindVertexBuffers3KHR.html">vkCmdBindVertexBuffers3KHR</see> - Bind strided address ranges as vertex buffers to a command buffer and dynamically set strides
/// </summary>
/// <remarks>
/// <para>
/// To bind strided address ranges as vertex buffers to a command buffer for use
/// in subsequent drawing commands, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_device_address_commands
/// void vkCmdBindVertexBuffers3KHR(
/// VkCommandBuffer commandBuffer,
/// uint32_t firstBinding,
/// uint32_t bindingCount,
/// const VkBindVertexBuffer3InfoKHR* pBindingInfos);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindVertexBuffers3KHR<T>(
this T handle,
int firstBinding,
scoped ReadOnlySpan<VkBindVertexBuffer3InfoKHR> pBindingInfos
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkBindVertexBuffer3InfoKHR* pBindingInfosFixed = pBindingInfos)
{
handle.PInvoke.vkCmdBindVertexBuffers3KHR.Invoke(
handle.Handle,
firstBinding,
pBindingInfos.Length,
pBindingInfosFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawIndirect2KHR.html">vkCmdDrawIndirect2KHR</see> - Draw primitives with indirect parameters through an address range
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawIndirect2KHR
/// </para>
/// <para>
/// To record a non-indexed indirect drawing command, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_device_address_commands
/// void vkCmdDrawIndirect2KHR(
/// VkCommandBuffer commandBuffer,
/// const VkDrawIndirect2InfoKHR* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DrawIndirect2KHR<T>(this T handle, in VkDrawIndirect2InfoKHR pInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDrawIndirect2InfoKHR* pInfoFixed = &pInfo)
{
handle.PInvoke.vkCmdDrawIndirect2KHR.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawIndexedIndirect2KHR.html">vkCmdDrawIndexedIndirect2KHR</see> - Draw primitives with indirect parameters through an address range and with indexed vertices
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawIndexedIndirect2KHR
/// </para>
/// <para>
/// To record an indexed indirect drawing command, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_device_address_commands
/// void vkCmdDrawIndexedIndirect2KHR(
/// VkCommandBuffer commandBuffer,
/// const VkDrawIndirect2InfoKHR* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DrawIndexedIndirect2KHR<T>(this T handle, in VkDrawIndirect2InfoKHR pInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDrawIndirect2InfoKHR* pInfoFixed = &pInfo)
{
handle.PInvoke.vkCmdDrawIndexedIndirect2KHR.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDispatchIndirect2KHR.html">vkCmdDispatchIndirect2KHR</see> - Dispatch compute work items with indirect parameters through an address range
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDispatchIndirect2KHR
/// </para>
/// <para>
/// To record an indirect dispatching command, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_device_address_commands
/// void vkCmdDispatchIndirect2KHR(
/// VkCommandBuffer commandBuffer,
/// const VkDispatchIndirect2InfoKHR* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DispatchIndirect2KHR<T>(this T handle, in VkDispatchIndirect2InfoKHR pInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDispatchIndirect2InfoKHR* pInfoFixed = &pInfo)
{
handle.PInvoke.vkCmdDispatchIndirect2KHR.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyMemoryKHR.html">vkCmdCopyMemoryKHR</see> - Copy data between memory ranges
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyMemoryKHR
/// </para>
/// <para>
/// To copy data between memory ranges, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_device_address_commands
/// void vkCmdCopyMemoryKHR(
/// VkCommandBuffer commandBuffer,
/// const VkCopyDeviceMemoryInfoKHR* pCopyMemoryInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyMemoryKHR<T>(this T handle, in VkCopyDeviceMemoryInfoKHR pCopyMemoryInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyDeviceMemoryInfoKHR* pCopyMemoryInfoFixed = &pCopyMemoryInfo)
{
handle.PInvoke.vkCmdCopyMemoryKHR.Invoke(handle.Handle, pCopyMemoryInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyMemoryToImageKHR.html">vkCmdCopyMemoryToImageKHR</see> - Copy data from memory ranges to an image
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyMemoryToImageKHR
/// </para>
/// <para>
/// To copy data from an image to memory ranges, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_device_address_commands
/// void vkCmdCopyMemoryToImageKHR(
/// VkCommandBuffer commandBuffer,
/// const VkCopyDeviceMemoryImageInfoKHR* pCopyMemoryInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyMemoryToImageKHR<T>(
this T handle,
in VkCopyDeviceMemoryImageInfoKHR pCopyMemoryInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyDeviceMemoryImageInfoKHR* pCopyMemoryInfoFixed = &pCopyMemoryInfo)
{
handle.PInvoke.vkCmdCopyMemoryToImageKHR.Invoke(handle.Handle, pCopyMemoryInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyImageToMemoryKHR.html">vkCmdCopyImageToMemoryKHR</see> - Copy data from an image to memory ranges
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyImageToMemoryKHR
/// </para>
/// <para>
/// To copy data from an image to memory ranges, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_device_address_commands
/// void vkCmdCopyImageToMemoryKHR(
/// VkCommandBuffer commandBuffer,
/// const VkCopyDeviceMemoryImageInfoKHR* pCopyMemoryInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyImageToMemoryKHR<T>(
this T handle,
in VkCopyDeviceMemoryImageInfoKHR pCopyMemoryInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyDeviceMemoryImageInfoKHR* pCopyMemoryInfoFixed = &pCopyMemoryInfo)
{
handle.PInvoke.vkCmdCopyImageToMemoryKHR.Invoke(handle.Handle, pCopyMemoryInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdUpdateMemoryKHR.html">vkCmdUpdateMemoryKHR</see> - Update the content of device memory from host memory
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdUpdateMemoryKHR
/// </para>
/// <para>
/// To update device memory inline in a command buffer, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_device_address_commands
/// void vkCmdUpdateMemoryKHR(
/// VkCommandBuffer commandBuffer,
/// const VkDeviceAddressRangeKHR* pDstRange,
/// VkAddressCommandFlagsKHR dstFlags,
/// VkDeviceSize dataSize,
/// const void* pData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void UpdateMemoryKHR<T>(
this T handle,
VkDeviceAddressRangeKHR* pDstRange,
VkAddressCommandFlagsKHR dstFlags,
scoped ReadOnlySpan<byte> pData
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (byte* pDataFixed = pData)
{
handle.PInvoke.vkCmdUpdateMemoryKHR.Invoke(
handle.Handle,
pDstRange,
dstFlags,
(ByteSize64)pData.Length,
pDataFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdFillMemoryKHR.html">vkCmdFillMemoryKHR</see> - Fill a memory range with a fixed 4-byte bit pattern
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdFillMemoryKHR
/// </para>
/// <para>
/// To fill a memory range with a fixed 4-byte bit pattern, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_device_address_commands
/// void vkCmdFillMemoryKHR(
/// VkCommandBuffer commandBuffer,
/// const VkDeviceAddressRangeKHR* pDstRange,
/// VkAddressCommandFlagsKHR dstFlags,
/// uint32_t data);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void FillMemoryKHR<T>(
this T handle,
VkDeviceAddressRangeKHR* pDstRange,
VkAddressCommandFlagsKHR dstFlags,
int data
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdFillMemoryKHR.Invoke(handle.Handle, pDstRange, dstFlags, data);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyQueryPoolResultsToMemoryKHR.html">vkCmdCopyQueryPoolResultsToMemoryKHR</see> - Copy the results of queries in a query pool to a memory range
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyQueryPoolResultsToMemoryKHR
/// </para>
/// <para>
/// To copy query statuses and numerical results directly to buffer memory,
/// call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyQueryPoolResultsToMemoryKHR<T>(
this T handle,
VkQueryPool queryPool,
int firstQuery,
int queryCount,
VkStridedDeviceAddressRangeKHR* pDstRange,
VkAddressCommandFlagsKHR dstFlags,
VkQueryResultFlags queryResultFlags
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdCopyQueryPoolResultsToMemoryKHR.Invoke(
handle.Handle,
queryPool,
firstQuery,
queryCount,
pDstRange,
dstFlags,
queryResultFlags
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawIndirectCount2KHR.html">vkCmdDrawIndirectCount2KHR</see> - Draw primitives with indirect parameters and draw count through address ranges
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawIndirectCount2KHR
/// </para>
/// <para>
/// To record a non-indexed indirect drawing command, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DrawIndirectCount2KHR<T>(this T handle, in VkDrawIndirectCount2InfoKHR pInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDrawIndirectCount2InfoKHR* pInfoFixed = &pInfo)
{
handle.PInvoke.vkCmdDrawIndirectCount2KHR.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawIndexedIndirectCount2KHR.html">vkCmdDrawIndexedIndirectCount2KHR</see> - Draw primitives with indirect parameters and draw count through address ranges and with indexed vertices
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawIndexedIndirectCount2KHR
/// </para>
/// <para>
/// To record a non-indexed indirect drawing command, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DrawIndexedIndirectCount2KHR<T>(this T handle, in VkDrawIndirectCount2InfoKHR pInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDrawIndirectCount2InfoKHR* pInfoFixed = &pInfo)
{
handle.PInvoke.vkCmdDrawIndexedIndirectCount2KHR.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBeginConditionalRendering2EXT.html">vkCmdBeginConditionalRendering2EXT</see> - Define the beginning of a conditional rendering block
/// </summary>
/// <remarks>
/// <para>
/// To begin conditional rendering, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_device_address_commands with VK_EXT_conditional_rendering
/// void vkCmdBeginConditionalRendering2EXT(
/// VkCommandBuffer commandBuffer,
/// const VkConditionalRenderingBeginInfo2EXT* pConditionalRenderingBegin);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BeginConditionalRendering2EXT<T>(
this T handle,
VkConditionalRenderingBeginInfo2EXT* pConditionalRenderingBegin
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdBeginConditionalRendering2EXT.Invoke(handle.Handle, pConditionalRenderingBegin);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindTransformFeedbackBuffers2EXT.html">vkCmdBindTransformFeedbackBuffers2EXT</see> - Bind transform feedback memory ranges to a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBindTransformFeedbackBuffers2EXT
/// </para>
/// <para>
/// To bind transform feedback memory ranges to a command buffer for use in
/// subsequent drawing commands, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindTransformFeedbackBuffers2EXT<T>(
this T handle,
int firstBinding,
scoped ReadOnlySpan<VkBindTransformFeedbackBuffer2InfoEXT> pBindingInfos
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkBindTransformFeedbackBuffer2InfoEXT* pBindingInfosFixed = pBindingInfos)
{
handle.PInvoke.vkCmdBindTransformFeedbackBuffers2EXT.Invoke(
handle.Handle,
firstBinding,
pBindingInfos.Length,
pBindingInfosFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBeginTransformFeedback2EXT.html">vkCmdBeginTransformFeedback2EXT</see> - Make transform feedback active in the command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBeginTransformFeedback2EXT
/// :firstcounter: firstCounterRange
/// :countercount: counterRangeCount
/// :bindCommand: vkCmdBindTransformFeedbackBuffers2EXT
/// </para>
/// <para>
/// Transform feedback for specific transform feedback buffers is made active by
/// calling:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BeginTransformFeedback2EXT<T>(
this T handle,
int firstCounterRange,
scoped ReadOnlySpan<VkBindTransformFeedbackBuffer2InfoEXT> pCounterInfos
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfosFixed = pCounterInfos)
{
handle.PInvoke.vkCmdBeginTransformFeedback2EXT.Invoke(
handle.Handle,
firstCounterRange,
pCounterInfos.Length,
pCounterInfosFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEndTransformFeedback2EXT.html">vkCmdEndTransformFeedback2EXT</see> - Make transform feedback inactive in the command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdEndTransformFeedback2EXT
/// :countercount: counterRangeCount
/// </para>
/// <para>
/// Transform feedback for specific transform feedback buffers is made inactive
/// by calling:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void EndTransformFeedback2EXT<T>(
this T handle,
int firstCounterRange,
scoped ReadOnlySpan<VkBindTransformFeedbackBuffer2InfoEXT> pCounterInfos
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfosFixed = pCounterInfos)
{
handle.PInvoke.vkCmdEndTransformFeedback2EXT.Invoke(
handle.Handle,
firstCounterRange,
pCounterInfos.Length,
pCounterInfosFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawIndirectByteCount2EXT.html">vkCmdDrawIndirectByteCount2EXT</see> - Draw primitives with indirect parameters where the vertex count is derived from the counter byte value in the counter memory range
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawIndirectByteCount2EXT
/// </para>
/// <para>
/// 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:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DrawIndirectByteCount2EXT<T>(
this T handle,
int instanceCount,
int firstInstance,
in VkBindTransformFeedbackBuffer2InfoEXT pCounterInfo,
int counterOffset,
int vertexStride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkBindTransformFeedbackBuffer2InfoEXT* pCounterInfoFixed = &pCounterInfo)
{
handle.PInvoke.vkCmdDrawIndirectByteCount2EXT.Invoke(
handle.Handle,
instanceCount,
firstInstance,
pCounterInfoFixed,
counterOffset,
vertexStride
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawMeshTasksIndirect2EXT.html">vkCmdDrawMeshTasksIndirect2EXT</see> - Issue a mesh tasks draw with indirect parameters through an address range
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawMeshTasksIndirect2EXT
/// </para>
/// <para>
/// To record an indirect mesh tasks drawing command, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_device_address_commands with VK_EXT_mesh_shader
/// void vkCmdDrawMeshTasksIndirect2EXT(
/// VkCommandBuffer commandBuffer,
/// const VkDrawIndirect2InfoKHR* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DrawMeshTasksIndirect2EXT<T>(this T handle, in VkDrawIndirect2InfoKHR pInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDrawIndirect2InfoKHR* pInfoFixed = &pInfo)
{
handle.PInvoke.vkCmdDrawMeshTasksIndirect2EXT.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawMeshTasksIndirectCount2EXT.html">vkCmdDrawMeshTasksIndirectCount2EXT</see> - Perform an indirect mesh tasks draw with the draw count sourced from an address range
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawMeshTasksIndirectCount2EXT
/// </para>
/// <para>
/// To record an indirect mesh tasks drawing command with the draw count sourced
/// from an address range, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DrawMeshTasksIndirectCount2EXT<T>(this T handle, in VkDrawIndirectCount2InfoKHR pInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDrawIndirectCount2InfoKHR* pInfoFixed = &pInfo)
{
handle.PInvoke.vkCmdDrawMeshTasksIndirectCount2EXT.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdWriteMarkerToMemoryAMD.html">vkCmdWriteMarkerToMemoryAMD</see> - Execute a pipelined write of a marker value into a memory range
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdWriteMarkerToMemoryAMD
/// </para>
/// <para>
/// To write a 32-bit marker value into memory as a pipelined operation, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_device_address_commands with VK_AMD_buffer_marker
/// void vkCmdWriteMarkerToMemoryAMD(
/// VkCommandBuffer commandBuffer,
/// const VkMemoryMarkerInfoAMD* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void WriteMarkerToMemoryAMD<T>(this T handle, in VkMemoryMarkerInfoAMD pInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkMemoryMarkerInfoAMD* pInfoFixed = &pInfo)
{
handle.PInvoke.vkCmdWriteMarkerToMemoryAMD.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateAccelerationStructure2KHR.html">vkCreateAccelerationStructure2KHR</see> - Create a new acceleration structure object using a device address
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateAccelerationStructure2KHR
/// </para>
/// <para>
/// To create an acceleration structure using a device address, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_acceleration_structure with VK_KHR_device_address_commands
/// VkResult vkCreateAccelerationStructure2KHR(
/// VkDevice device,
/// const VkAccelerationStructureCreateInfo2KHR* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkAccelerationStructureKHR* pAccelerationStructure);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkAccelerationStructureKHR CreateAccelerationStructure2KHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyBuffer2KHR<T>(this T handle, in VkCopyBufferInfo2 pCopyBufferInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyBufferInfo2* pCopyBufferInfoFixed = &pCopyBufferInfo)
{
handle.PInvoke.vkCmdCopyBuffer2KHR.Invoke(handle.Handle, pCopyBufferInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyImage2KHR<T>(this T handle, in VkCopyImageInfo2 pCopyImageInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyImageInfo2* pCopyImageInfoFixed = &pCopyImageInfo)
{
handle.PInvoke.vkCmdCopyImage2KHR.Invoke(handle.Handle, pCopyImageInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyBufferToImage2KHR<T>(
this T handle,
in VkCopyBufferToImageInfo2 pCopyBufferToImageInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyBufferToImageInfo2* pCopyBufferToImageInfoFixed = &pCopyBufferToImageInfo)
{
handle.PInvoke.vkCmdCopyBufferToImage2KHR.Invoke(handle.Handle, pCopyBufferToImageInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyImageToBuffer2KHR<T>(
this T handle,
in VkCopyImageToBufferInfo2 pCopyImageToBufferInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyImageToBufferInfo2* pCopyImageToBufferInfoFixed = &pCopyImageToBufferInfo)
{
handle.PInvoke.vkCmdCopyImageToBuffer2KHR.Invoke(handle.Handle, pCopyImageToBufferInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BlitImage2KHR<T>(this T handle, in VkBlitImageInfo2 pBlitImageInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkBlitImageInfo2* pBlitImageInfoFixed = &pBlitImageInfo)
{
handle.PInvoke.vkCmdBlitImage2KHR.Invoke(handle.Handle, pBlitImageInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void ResolveImage2KHR<T>(this T handle, in VkResolveImageInfo2 pResolveImageInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkResolveImageInfo2* pResolveImageInfoFixed = &pResolveImageInfo)
{
handle.PInvoke.vkCmdResolveImage2KHR.Invoke(handle.Handle, pResolveImageInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdTraceRaysIndirect2KHR.html">vkCmdTraceRaysIndirect2KHR</see> - Initialize an indirect ray tracing dispatch with indirect shader binding tables
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdTraceRaysIndirect2KHR
/// </para>
/// <para>
/// To dispatch ray tracing, with some parameters sourced on the device, use:
/// </para>
/// <code>
/// // Provided by VK_KHR_ray_tracing_maintenance1 with VK_KHR_ray_tracing_pipeline
/// void vkCmdTraceRaysIndirect2KHR(
/// VkCommandBuffer commandBuffer,
/// VkDeviceAddress indirectDeviceAddress);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void TraceRaysIndirect2KHR<T>(this T handle, VkDeviceAddress indirectDeviceAddress)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdTraceRaysIndirect2KHR.Invoke(handle.Handle, indirectDeviceAddress);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetBufferMemoryRequirementsKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceBufferMemoryRequirements pInfo,
ref VkMemoryRequirements2 pMemoryRequirements
)
{
fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements)
fixed (VkDeviceBufferMemoryRequirements* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetDeviceBufferMemoryRequirementsKHR.Invoke(
handle.Handle,
pInfoFixed,
pMemoryRequirementsFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryRequirements2.</returns>
public static VkMemoryRequirements2 GetBufferMemoryRequirementsKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceBufferMemoryRequirements pInfo
)
{
VkMemoryRequirements2 outValue = new();
GetBufferMemoryRequirementsKHR(handle, pInfo, ref outValue);
return outValue;
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetImageMemoryRequirementsKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceImageMemoryRequirements pInfo,
ref VkMemoryRequirements2 pMemoryRequirements
)
{
fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements)
fixed (VkDeviceImageMemoryRequirements* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetDeviceImageMemoryRequirementsKHR.Invoke(
handle.Handle,
pInfoFixed,
pMemoryRequirementsFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryRequirements2.</returns>
public static VkMemoryRequirements2 GetImageMemoryRequirementsKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceImageMemoryRequirements pInfo
)
{
VkMemoryRequirements2 outValue = new();
GetImageMemoryRequirementsKHR(handle, pInfo, ref outValue);
return outValue;
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetImageSparseMemoryRequirementsKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkSparseImageMemoryRequirements2.</returns>
public static unsafe VkSparseImageMemoryRequirements2 GetImageSparseMemoryRequirementsKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceImageMemoryRequirements pInfo,
int* pSparseMemoryRequirementCount
)
{
VkSparseImageMemoryRequirements2 outValue = new();
GetImageSparseMemoryRequirementsKHR(handle, pInfo, pSparseMemoryRequirementCount, ref outValue);
return outValue;
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void BindIndexBuffer2KHR<T>(
this T handle,
VkBuffer buffer,
ByteSize64 offset,
ByteSize64 size,
VkIndexType indexType
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdBindIndexBuffer2KHR.Invoke(handle.Handle, buffer, offset, size, indexType);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetRenderingAreaGranularityKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkRenderingAreaInfo pRenderingAreaInfo,
ref VkExtent2D pGranularity
)
{
fixed (VkExtent2D* pGranularityFixed = &pGranularity)
fixed (VkRenderingAreaInfo* pRenderingAreaInfoFixed = &pRenderingAreaInfo)
{
handle.PInvoke.vkGetRenderingAreaGranularityKHR.Invoke(
handle.Handle,
pRenderingAreaInfoFixed,
pGranularityFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkExtent2D.</returns>
public static VkExtent2D GetRenderingAreaGranularityKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkRenderingAreaInfo pRenderingAreaInfo
)
{
VkExtent2D outValue = new();
GetRenderingAreaGranularityKHR(handle, pRenderingAreaInfo, ref outValue);
return outValue;
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetImageSubresourceLayoutKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceImageSubresourceInfo pInfo,
ref VkSubresourceLayout2 pLayout
)
{
fixed (VkSubresourceLayout2* pLayoutFixed = &pLayout)
fixed (VkDeviceImageSubresourceInfo* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetDeviceImageSubresourceLayoutKHR.Invoke(handle.Handle, pInfoFixed, pLayoutFixed);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkSubresourceLayout2.</returns>
public static VkSubresourceLayout2 GetImageSubresourceLayoutKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceImageSubresourceInfo pInfo
)
{
VkSubresourceLayout2 outValue = new();
GetImageSubresourceLayoutKHR(handle, pInfo, ref outValue);
return outValue;
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetImageSubresourceLayout2KHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkImage image,
VkImageSubresource2* pSubresource,
ref VkSubresourceLayout2 pLayout
)
{
fixed (VkSubresourceLayout2* pLayoutFixed = &pLayout)
{
handle.PInvoke.vkGetImageSubresourceLayout2KHR.Invoke(handle.Handle, image, pSubresource, pLayoutFixed);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkSubresourceLayout2.</returns>
public static unsafe VkSubresourceLayout2 GetImageSubresourceLayout2KHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkImage image,
VkImageSubresource2* pSubresource
)
{
VkSubresourceLayout2 outValue = new();
GetImageSubresourceLayout2KHR(handle, image, pSubresource, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkWaitForPresent2KHR.html">vkWaitForPresent2KHR</see> - Wait for presentation
/// </summary>
/// <remarks>
/// <para>
/// When the <c>VkSurfaceCapabilitiesPresentWait2KHR</c> surface capability is
/// present for a given surface, an application <i>can</i> wait for an image to be
/// presented to the user by first specifying a <c>presentId</c> for the target
/// presentation by adding a <c>VkPresentId2KHR</c> structure to the <c>pNext</c>
/// chain of the <c>VkPresentInfoKHR</c> structure and then waiting for that
/// presentation to complete by calling:
/// </para>
/// <code>
/// // Provided by VK_KHR_present_wait2
/// VkResult vkWaitForPresent2KHR(
/// VkDevice device,
/// VkSwapchainKHR swapchain,
/// const VkPresentWait2InfoKHR* pPresentWait2Info);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult WaitForPresent2KHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreatePipelineBinariesKHR.html">vkCreatePipelineBinariesKHR</see> - Create pipeline binaries from a pipeline or previously retrieved data
/// </summary>
/// <remarks>
/// <para>
/// To create pipeline binary objects, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_pipeline_binary
/// VkResult vkCreatePipelineBinariesKHR(
/// VkDevice device,
/// const VkPipelineBinaryCreateInfoKHR* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkPipelineBinaryHandlesInfoKHR* pBinaries);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CreatePipelineBinariesKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyPipelineBinaryKHR.html">vkDestroyPipelineBinaryKHR</see> - Destroy a pipeline binary
/// </summary>
/// <remarks>
/// <para>
/// To destroy a <c>VkPipelineBinaryKHR</c>, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_pipeline_binary
/// void vkDestroyPipelineBinaryKHR(
/// VkDevice device,
/// VkPipelineBinaryKHR pipelineBinary,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyPipelineBinaryKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipelineBinaryKHR pipelineBinary,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyPipelineBinaryKHR.Invoke(handle.Handle, pipelineBinary, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetPipelineKeyKHR.html">vkGetPipelineKeyKHR</see> - Generate the pipeline key from pipeline creation info
/// </summary>
/// <remarks>
/// <para>
/// To generate the key for a particular pipeline creation info, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_pipeline_binary
/// VkResult vkGetPipelineKeyKHR(
/// VkDevice device,
/// const VkPipelineCreateInfoKHR* pPipelineCreateInfo,
/// VkPipelineBinaryKeyKHR* pPipelineKey);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetPipelineKeyKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkPipelineBinaryKeyKHR.</returns>
public static VkPipelineBinaryKeyKHR GetPipelineKeyKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkPipelineCreateInfoKHR pPipelineCreateInfo
)
{
VkPipelineBinaryKeyKHR outValue = new();
GetPipelineKeyKHR(handle, pPipelineCreateInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetPipelineBinaryDataKHR.html">vkGetPipelineBinaryDataKHR</see> - Get the data store from a pipeline binary
/// </summary>
/// <remarks>
/// <para>
/// Data <i>can</i> be retrieved from a pipeline binary object using the command:
/// </para>
/// <code>
/// // Provided by VK_KHR_pipeline_binary
/// VkResult vkGetPipelineBinaryDataKHR(
/// VkDevice device,
/// const VkPipelineBinaryDataInfoKHR* pInfo,
/// VkPipelineBinaryKeyKHR* pPipelineBinaryKey,
/// size_t* pPipelineBinaryDataSize,
/// void* pPipelineBinaryData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe void GetPipelineBinaryDataKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkPipelineBinaryDataInfoKHR pInfo,
VkPipelineBinaryKeyKHR* pPipelineBinaryKey,
ref nuint pPipelineBinaryDataSize,
scoped ReadOnlySpan<byte> 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;
}
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static nuint GetPipelineBinaryDataKHR_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkPipelineBinaryDataInfoKHR pInfo,
VkPipelineBinaryKeyKHR* pPipelineBinaryKey
)
{
nuint pPipelineBinaryDataSize = default;
GetPipelineBinaryDataKHR(handle, pInfo, pPipelineBinaryKey, ref pPipelineBinaryDataSize, null);
return pPipelineBinaryDataSize;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pPipelineBinaryData">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static void GetPipelineBinaryDataKHR_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkPipelineBinaryDataInfoKHR pInfo,
VkPipelineBinaryKeyKHR* pPipelineBinaryKey,
scoped ReadOnlySpan<byte> pPipelineBinaryData
)
{
nuint pPipelineBinaryDataSize = (nuint)pPipelineBinaryData.Length;
GetPipelineBinaryDataKHR(
handle,
pInfo,
pPipelineBinaryKey,
ref pPipelineBinaryDataSize,
pPipelineBinaryData
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkReleaseCapturedPipelineDataKHR.html">vkReleaseCapturedPipelineDataKHR</see> - Release captured pipeline binary data
/// </summary>
/// <remarks>
/// <para>
/// To release pipeline resources captured with
/// <c>VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR</c>, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_pipeline_binary
/// VkResult vkReleaseCapturedPipelineDataKHR(
/// VkDevice device,
/// const VkReleaseCapturedPipelineDataInfoKHR* pInfo,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void ReleaseCapturedPipelineDataKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkReleaseSwapchainImagesKHR.html">vkReleaseSwapchainImagesKHR</see> - Release previously acquired but unused images
/// </summary>
/// <remarks>
/// <para>
/// To release images previously acquired through
/// <c>vkAcquireNextImageKHR</c>, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void ReleaseSwapchainImagesKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetLineStippleKHR<T>(this T handle, int lineStippleFactor, ushort lineStipplePattern)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetLineStippleKHR.Invoke(handle.Handle, lineStippleFactor, lineStipplePattern);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetCalibratedTimestampsKHR.html">vkGetCalibratedTimestampsKHR</see> - Query calibrated timestamps
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetCalibratedTimestampsKHR
/// </para>
/// <para>
/// 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.
/// </para>
/// <para>
/// To query calibrated timestamps from a set of time domains, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe nint GetCalibratedTimestampsKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkCalibratedTimestampInfoKHR> pTimestampInfos,
scoped ReadOnlySpan<nint> 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;
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindDescriptorSets2KHR<T>(
this T handle,
in VkBindDescriptorSetsInfo pBindDescriptorSetsInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkBindDescriptorSetsInfo* pBindDescriptorSetsInfoFixed = &pBindDescriptorSetsInfo)
{
handle.PInvoke.vkCmdBindDescriptorSets2KHR.Invoke(handle.Handle, pBindDescriptorSetsInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void PushConstants2KHR<T>(this T handle, in VkPushConstantsInfo pPushConstantsInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkPushConstantsInfo* pPushConstantsInfoFixed = &pPushConstantsInfo)
{
handle.PInvoke.vkCmdPushConstants2KHR.Invoke(handle.Handle, pPushConstantsInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void PushDescriptorSet2KHR<T>(
this T handle,
in VkPushDescriptorSetInfo pPushDescriptorSetInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkPushDescriptorSetInfo* pPushDescriptorSetInfoFixed = &pPushDescriptorSetInfo)
{
handle.PInvoke.vkCmdPushDescriptorSet2KHR.Invoke(handle.Handle, pPushDescriptorSetInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void PushDescriptorSetWithTemplate2KHR<T>(
this T handle,
in VkPushDescriptorSetWithTemplateInfo pPushDescriptorSetWithTemplateInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (
VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfoFixed =
&pPushDescriptorSetWithTemplateInfo
)
{
handle.PInvoke.vkCmdPushDescriptorSetWithTemplate2KHR.Invoke(
handle.Handle,
pPushDescriptorSetWithTemplateInfoFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDescriptorBufferOffsets2EXT.html">vkCmdSetDescriptorBufferOffsets2EXT</see> - Setting descriptor buffer offsets in a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdSetDescriptorBufferOffsets2EXT
/// </para>
/// <para>
/// To set descriptor buffer offsets in a command buffer, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer
/// void vkCmdSetDescriptorBufferOffsets2EXT(
/// VkCommandBuffer commandBuffer,
/// const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetDescriptorBufferOffsets2EXT<T>(
this T handle,
in VkSetDescriptorBufferOffsetsInfoEXT pSetDescriptorBufferOffsetsInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (
VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfoFixed =
&pSetDescriptorBufferOffsetsInfo
)
{
handle.PInvoke.vkCmdSetDescriptorBufferOffsets2EXT.Invoke(
handle.Handle,
pSetDescriptorBufferOffsetsInfoFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindDescriptorBufferEmbeddedSamplers2EXT.html">vkCmdBindDescriptorBufferEmbeddedSamplers2EXT</see> - Setting embedded immutable samplers offsets in a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBindDescriptorBufferEmbeddedSamplers2EXT
/// </para>
/// <para>
/// To bind an embedded immutable sampler set to a command buffer, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_maintenance6 with VK_EXT_descriptor_buffer
/// void vkCmdBindDescriptorBufferEmbeddedSamplers2EXT(
/// VkCommandBuffer commandBuffer,
/// const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindDescriptorBufferEmbeddedSamplers2EXT<T>(
this T handle,
in VkBindDescriptorBufferEmbeddedSamplersInfoEXT pBindDescriptorBufferEmbeddedSamplersInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (
VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfoFixed =
&pBindDescriptorBufferEmbeddedSamplersInfo
)
{
handle.PInvoke.vkCmdBindDescriptorBufferEmbeddedSamplers2EXT.Invoke(
handle.Handle,
pBindDescriptorBufferEmbeddedSamplersInfoFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyMemoryIndirectKHR.html">vkCmdCopyMemoryIndirectKHR</see> - Copy data between memory regions
/// </summary>
/// <remarks>
/// <para>
/// To copy data between two memory regions by specifying copy parameters
/// indirectly in memory, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_copy_memory_indirect
/// void vkCmdCopyMemoryIndirectKHR(
/// VkCommandBuffer commandBuffer,
/// const VkCopyMemoryIndirectInfoKHR* pCopyMemoryIndirectInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyMemoryIndirectKHR<T>(
this T handle,
in VkCopyMemoryIndirectInfoKHR pCopyMemoryIndirectInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyMemoryIndirectInfoKHR* pCopyMemoryIndirectInfoFixed = &pCopyMemoryIndirectInfo)
{
handle.PInvoke.vkCmdCopyMemoryIndirectKHR.Invoke(handle.Handle, pCopyMemoryIndirectInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyMemoryToImageIndirectKHR.html">vkCmdCopyMemoryToImageIndirectKHR</see> - Copy data from a memory region to an image object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyMemoryToImageIndirectKHR
/// </para>
/// <para>
/// To copy data from a memory region to an image object by specifying copy
/// parameters in memory, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_copy_memory_indirect
/// void vkCmdCopyMemoryToImageIndirectKHR(
/// VkCommandBuffer commandBuffer,
/// const VkCopyMemoryToImageIndirectInfoKHR* pCopyMemoryToImageIndirectInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyMemoryToImageIndirectKHR<T>(
this T handle,
in VkCopyMemoryToImageIndirectInfoKHR pCopyMemoryToImageIndirectInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (
VkCopyMemoryToImageIndirectInfoKHR* pCopyMemoryToImageIndirectInfoFixed =
&pCopyMemoryToImageIndirectInfo
)
{
handle.PInvoke.vkCmdCopyMemoryToImageIndirectKHR.Invoke(
handle.Handle,
pCopyMemoryToImageIndirectInfoFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceFaultReportsKHR.html">vkGetDeviceFaultReportsKHR</see> - Reports fault information for the specified device
/// </summary>
/// <remarks>
/// <para>
/// To retrieve diagnostic information about faults call:
/// </para>
/// <code>
/// // Provided by VK_KHR_device_fault
/// VkResult vkGetDeviceFaultReportsKHR(
/// VkDevice device,
/// uint64_t timeout,
/// uint32_t* pFaultCounts,
/// VkDeviceFaultInfoKHR* pFaultInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe VkResult GetFaultReportsKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
nint timeout,
ref int pFaultCounts,
scoped ReadOnlySpan<VkDeviceFaultInfoKHR> 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;
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static int GetFaultReportsKHR_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
nint timeout
)
{
int pFaultCounts = default;
GetFaultReportsKHR(handle, timeout, ref pFaultCounts, null);
return pFaultCounts;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pFaultInfo">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static VkResult GetFaultReportsKHR_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
nint timeout,
scoped ReadOnlySpan<VkDeviceFaultInfoKHR> pFaultInfo
)
{
int pFaultCounts = pFaultInfo.Length;
return GetFaultReportsKHR(handle, timeout, ref pFaultCounts, pFaultInfo);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceFaultDebugInfoKHR.html">vkGetDeviceFaultDebugInfoKHR</see> - Retrieve vendor-specific crash dump data for the specified logical device
/// </summary>
/// <remarks>
/// <para>
/// To retrieve a vendor-specific binary crash dump call:
/// </para>
/// <code>
/// // Provided by VK_KHR_device_fault
/// VkResult vkGetDeviceFaultDebugInfoKHR(
/// VkDevice device,
/// VkDeviceFaultDebugInfoKHR* pDebugInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult GetFaultDebugInfoKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEndRendering2KHR.html">vkCmdEndRendering2KHR</see> - End a dynamic render pass instance
/// </summary>
/// <remarks>
/// <para>
/// To end a render pass instance, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void EndRendering2KHR<T>(this T handle, in VkRenderingEndInfoKHR pRenderingEndInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkRenderingEndInfoKHR* pRenderingEndInfoFixed = &pRenderingEndInfo)
{
handle.PInvoke.vkCmdEndRendering2KHR.Invoke(handle.Handle, pRenderingEndInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDebugMarkerSetObjectTagEXT.html">vkDebugMarkerSetObjectTagEXT</see> - Attach arbitrary data to an object
/// </summary>
/// <remarks>
/// <para>
/// 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 <c>VkShaderModule</c> could have additional debugging data
/// attached to it to aid in offline shader tracing.
/// To attach data to an object, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_debug_marker
/// VkResult vkDebugMarkerSetObjectTagEXT(
/// VkDevice device,
/// const VkDebugMarkerObjectTagInfoEXT* pTagInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DebugMarkerSetObjectTagEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDebugMarkerSetObjectNameEXT.html">vkDebugMarkerSetObjectNameEXT</see> - Give an application-defined name to an object
/// </summary>
/// <remarks>
/// <para>
/// An object can be given an application-defined name by calling:
/// </para>
/// <code>
/// // Provided by VK_EXT_debug_marker
/// VkResult vkDebugMarkerSetObjectNameEXT(
/// VkDevice device,
/// const VkDebugMarkerObjectNameInfoEXT* pNameInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DebugMarkerSetObjectNameEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDebugMarkerBeginEXT.html">vkCmdDebugMarkerBeginEXT</see> - Open a command buffer marker region
/// </summary>
/// <remarks>
/// <para>
/// A marker region can be opened by calling:
/// </para>
/// <code>
/// // Provided by VK_EXT_debug_marker
/// void vkCmdDebugMarkerBeginEXT(
/// VkCommandBuffer commandBuffer,
/// const VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DebugMarkerBeginEXT<T>(this T handle, in VkDebugMarkerMarkerInfoEXT pMarkerInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDebugMarkerMarkerInfoEXT* pMarkerInfoFixed = &pMarkerInfo)
{
handle.PInvoke.vkCmdDebugMarkerBeginEXT.Invoke(handle.Handle, pMarkerInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDebugMarkerEndEXT.html">vkCmdDebugMarkerEndEXT</see> - Close a command buffer marker region
/// </summary>
/// <remarks>
/// <para>
/// A marker region can be closed by calling:
/// </para>
/// <code>
/// // Provided by VK_EXT_debug_marker
/// void vkCmdDebugMarkerEndEXT(
/// VkCommandBuffer commandBuffer);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DebugMarkerEndEXT<T>(this T handle)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDebugMarkerEndEXT.Invoke(handle.Handle);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDebugMarkerInsertEXT.html">vkCmdDebugMarkerInsertEXT</see> - Insert a marker label into a command buffer
/// </summary>
/// <remarks>
/// <para>
/// A single marker label can be inserted into a command buffer by calling:
/// </para>
/// <code>
/// // Provided by VK_EXT_debug_marker
/// void vkCmdDebugMarkerInsertEXT(
/// VkCommandBuffer commandBuffer,
/// const VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DebugMarkerInsertEXT<T>(this T handle, in VkDebugMarkerMarkerInfoEXT pMarkerInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDebugMarkerMarkerInfoEXT* pMarkerInfoFixed = &pMarkerInfo)
{
handle.PInvoke.vkCmdDebugMarkerInsertEXT.Invoke(handle.Handle, pMarkerInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindTransformFeedbackBuffersEXT.html">vkCmdBindTransformFeedbackBuffersEXT</see> - Bind transform feedback buffers to a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBindTransformFeedbackBuffersEXT
/// </para>
/// <para>
/// To bind transform feedback buffers to a command buffer for use in subsequent
/// drawing commands, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindTransformFeedbackBuffersEXT<T>(
this T handle,
int firstBinding,
scoped ReadOnlySpan<VkBuffer> pBuffers,
scoped ReadOnlySpan<ByteSize64> pOffsets,
scoped ReadOnlySpan<ByteSize64> pSizes
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (ByteSize64* pSizesFixed = pSizes)
fixed (ByteSize64* pOffsetsFixed = pOffsets)
fixed (VkBuffer* pBuffersFixed = pBuffers)
{
handle.PInvoke.vkCmdBindTransformFeedbackBuffersEXT.Invoke(
handle.Handle,
firstBinding,
pBuffers.Length,
pBuffersFixed,
pOffsetsFixed,
pSizesFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBeginTransformFeedbackEXT.html">vkCmdBeginTransformFeedbackEXT</see> - Make transform feedback active in the command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBeginTransformFeedbackEXT
/// :firstcounter: firstCounterBuffer
/// :countercount: counterBufferCount
/// :bindCommand: vkCmdBindTransformFeedbackBuffersEXT
/// </para>
/// <para>
/// Transform feedback for specific transform feedback buffers is made active by
/// calling:
/// </para>
/// <code>
/// // Provided by VK_EXT_transform_feedback
/// void vkCmdBeginTransformFeedbackEXT(
/// VkCommandBuffer commandBuffer,
/// uint32_t firstCounterBuffer,
/// uint32_t counterBufferCount,
/// const VkBuffer* pCounterBuffers,
/// const VkDeviceSize* pCounterBufferOffsets);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BeginTransformFeedbackEXT<T>(
this T handle,
int firstCounterBuffer,
scoped ReadOnlySpan<VkBuffer> pCounterBuffers,
scoped ReadOnlySpan<ByteSize64> pCounterBufferOffsets
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (ByteSize64* pCounterBufferOffsetsFixed = pCounterBufferOffsets)
fixed (VkBuffer* pCounterBuffersFixed = pCounterBuffers)
{
handle.PInvoke.vkCmdBeginTransformFeedbackEXT.Invoke(
handle.Handle,
firstCounterBuffer,
pCounterBuffers.Length,
pCounterBuffersFixed,
pCounterBufferOffsetsFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEndTransformFeedbackEXT.html">vkCmdEndTransformFeedbackEXT</see> - Make transform feedback inactive in the command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdEndTransformFeedbackEXT
/// :countercount: counterBufferCount
/// </para>
/// <para>
/// Transform feedback for specific transform feedback buffers is made inactive
/// by calling:
/// </para>
/// <code>
/// // Provided by VK_EXT_transform_feedback
/// void vkCmdEndTransformFeedbackEXT(
/// VkCommandBuffer commandBuffer,
/// uint32_t firstCounterBuffer,
/// uint32_t counterBufferCount,
/// const VkBuffer* pCounterBuffers,
/// const VkDeviceSize* pCounterBufferOffsets);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void EndTransformFeedbackEXT<T>(
this T handle,
int firstCounterBuffer,
scoped ReadOnlySpan<VkBuffer> pCounterBuffers,
scoped ReadOnlySpan<ByteSize64> pCounterBufferOffsets
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (ByteSize64* pCounterBufferOffsetsFixed = pCounterBufferOffsets)
fixed (VkBuffer* pCounterBuffersFixed = pCounterBuffers)
{
handle.PInvoke.vkCmdEndTransformFeedbackEXT.Invoke(
handle.Handle,
firstCounterBuffer,
pCounterBuffers.Length,
pCounterBuffersFixed,
pCounterBufferOffsetsFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBeginQueryIndexedEXT.html">vkCmdBeginQueryIndexedEXT</see> - Begin an indexed query
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBeginQueryIndexedEXT
/// </para>
/// <para>
/// To begin an indexed query, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_transform_feedback
/// void vkCmdBeginQueryIndexedEXT(
/// VkCommandBuffer commandBuffer,
/// VkQueryPool queryPool,
/// uint32_t query,
/// VkQueryControlFlags flags,
/// uint32_t index);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void BeginQueryIndexedEXT<T>(
this T handle,
VkQueryPool queryPool,
int query,
VkQueryControlFlags flags,
int index
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdBeginQueryIndexedEXT.Invoke(handle.Handle, queryPool, query, flags, index);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEndQueryIndexedEXT.html">vkCmdEndQueryIndexedEXT</see> - Ends a query
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdEndQueryIndexedEXT
/// </para>
/// <para>
/// To end an indexed query after the set of desired drawing or dispatching
/// commands is recorded, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_transform_feedback
/// void vkCmdEndQueryIndexedEXT(
/// VkCommandBuffer commandBuffer,
/// VkQueryPool queryPool,
/// uint32_t query,
/// uint32_t index);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void EndQueryIndexedEXT<T>(this T handle, VkQueryPool queryPool, int query, int index)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdEndQueryIndexedEXT.Invoke(handle.Handle, queryPool, query, index);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawIndirectByteCountEXT.html">vkCmdDrawIndirectByteCountEXT</see> - Draw primitives with indirect parameters where the vertex count is derived from the counter byte value in the counter buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawIndirectByteCountEXT
/// </para>
/// <para>
/// 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:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawIndirectByteCountEXT<T>(
this T handle,
int instanceCount,
int firstInstance,
VkBuffer counterBuffer,
ByteSize64 counterBufferOffset,
int counterOffset,
int vertexStride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawIndirectByteCountEXT.Invoke(
handle.Handle,
instanceCount,
firstInstance,
counterBuffer,
counterBufferOffset,
counterOffset,
vertexStride
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateCuModuleNVX.html">vkCreateCuModuleNVX</see> - Stub description of vkCreateCuModuleNVX
/// </summary>
/// <remarks>
/// <para>
/// 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.
/// </para>
/// <code>
/// // Provided by VK_NVX_binary_import
/// VkResult vkCreateCuModuleNVX(
/// VkDevice device,
/// const VkCuModuleCreateInfoNVX* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkCuModuleNVX* pModule);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkCuModuleNVX CreateCuModuleNVX(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateCuFunctionNVX.html">vkCreateCuFunctionNVX</see> - Stub description of vkCreateCuFunctionNVX
/// </summary>
/// <remarks>
/// <para>
/// 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.
/// </para>
/// <code>
/// // Provided by VK_NVX_binary_import
/// VkResult vkCreateCuFunctionNVX(
/// VkDevice device,
/// const VkCuFunctionCreateInfoNVX* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkCuFunctionNVX* pFunction);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkCuFunctionNVX CreateCuFunctionNVX(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyCuModuleNVX.html">vkDestroyCuModuleNVX</see> - Stub description of vkDestroyCuModuleNVX
/// </summary>
/// <remarks>
/// <para>
/// 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.
/// </para>
/// <code>
/// // Provided by VK_NVX_binary_import
/// void vkDestroyCuModuleNVX(
/// VkDevice device,
/// VkCuModuleNVX module,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyCuModuleNVX(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkCuModuleNVX module,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyCuModuleNVX.Invoke(handle.Handle, module, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyCuFunctionNVX.html">vkDestroyCuFunctionNVX</see> - Stub description of vkDestroyCuFunctionNVX
/// </summary>
/// <remarks>
/// <para>
/// 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.
/// </para>
/// <code>
/// // Provided by VK_NVX_binary_import
/// void vkDestroyCuFunctionNVX(
/// VkDevice device,
/// VkCuFunctionNVX function,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyCuFunctionNVX(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkCuFunctionNVX function,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyCuFunctionNVX.Invoke(handle.Handle, function, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCuLaunchKernelNVX.html">vkCmdCuLaunchKernelNVX</see> - Stub description of vkCmdCuLaunchKernelNVX
/// </summary>
/// <remarks>
/// <para>
/// 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.
/// </para>
/// <code>
/// // Provided by VK_NVX_binary_import
/// void vkCmdCuLaunchKernelNVX(
/// VkCommandBuffer commandBuffer,
/// const VkCuLaunchInfoNVX* pLaunchInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CuLaunchKernelNVX<T>(this T handle, in VkCuLaunchInfoNVX pLaunchInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCuLaunchInfoNVX* pLaunchInfoFixed = &pLaunchInfo)
{
handle.PInvoke.vkCmdCuLaunchKernelNVX.Invoke(handle.Handle, pLaunchInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetImageViewHandleNVX.html">vkGetImageViewHandleNVX</see> - Get the handle for an image view for a specific descriptor type
/// </summary>
/// <remarks>
/// <para>
/// To get the handle for an image view, call:
/// </para>
/// <code>
/// // Provided by VK_NVX_image_view_handle
/// uint32_t vkGetImageViewHandleNVX(
/// VkDevice device,
/// const VkImageViewHandleInfoNVX* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe int GetImageViewHandleNVX(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkImageViewHandleInfoNVX pInfo
)
{
fixed (VkImageViewHandleInfoNVX* pInfoFixed = &pInfo)
{
return handle.PInvoke.vkGetImageViewHandleNVX.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetImageViewHandle64NVX.html">vkGetImageViewHandle64NVX</see> - Get the 64-bit handle for an image view for a specific descriptor type
/// </summary>
/// <remarks>
/// <para>
/// To get the 64-bit handle for an image view, call:
/// </para>
/// <code>
/// // Provided by VK_NVX_image_view_handle
/// uint64_t vkGetImageViewHandle64NVX(
/// VkDevice device,
/// const VkImageViewHandleInfoNVX* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe nint GetImageViewHandle64NVX(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkImageViewHandleInfoNVX pInfo
)
{
fixed (VkImageViewHandleInfoNVX* pInfoFixed = &pInfo)
{
return handle.PInvoke.vkGetImageViewHandle64NVX.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetImageViewAddressNVX.html">vkGetImageViewAddressNVX</see> - Get the device address of an image view
/// </summary>
/// <remarks>
/// <para>
/// To get the device address for an image view, call:
/// </para>
/// <code>
/// // Provided by VK_NVX_image_view_handle
/// VkResult vkGetImageViewAddressNVX(
/// VkDevice device,
/// VkImageView imageView,
/// VkImageViewAddressPropertiesNVX* pProperties);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetImageViewAddressNVX(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkImageViewAddressPropertiesNVX.</returns>
public static VkImageViewAddressPropertiesNVX GetImageViewAddressNVX(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkImageView imageView
)
{
VkImageViewAddressPropertiesNVX outValue = new();
GetImageViewAddressNVX(handle, imageView, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceCombinedImageSamplerIndexNVX.html">vkGetDeviceCombinedImageSamplerIndexNVX</see> - Get the handle for an image view and sampler index
/// </summary>
/// <remarks>
/// <para>
/// To get the handle for a combined image sampler, call:
/// </para>
/// <code>
/// // Provided by VK_NVX_image_view_handle
/// uint64_t vkGetDeviceCombinedImageSamplerIndexNVX(
/// VkDevice device,
/// uint64_t imageViewIndex,
/// uint64_t samplerIndex);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static nint GetCombinedImageSamplerIndexNVX(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
nint imageViewIndex,
nint samplerIndex
)
{
return handle.PInvoke.vkGetDeviceCombinedImageSamplerIndexNVX.Invoke(
handle.Handle,
imageViewIndex,
samplerIndex
);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawIndirectCountAMD<T>(
this T handle,
VkBuffer buffer,
ByteSize64 offset,
VkBuffer countBuffer,
ByteSize64 countBufferOffset,
int maxDrawCount,
int stride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawIndirectCountAMD.Invoke(
handle.Handle,
buffer,
offset,
countBuffer,
countBufferOffset,
maxDrawCount,
stride
);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawIndexedIndirectCountAMD<T>(
this T handle,
VkBuffer buffer,
ByteSize64 offset,
VkBuffer countBuffer,
ByteSize64 countBufferOffset,
int maxDrawCount,
int stride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawIndexedIndirectCountAMD.Invoke(
handle.Handle,
buffer,
offset,
countBuffer,
countBufferOffset,
maxDrawCount,
stride
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetShaderInfoAMD.html">vkGetShaderInfoAMD</see> - Get information about a shader in a pipeline
/// </summary>
/// <remarks>
/// <para>
/// Information about a particular shader that has been compiled as part of a
/// pipeline object can be extracted by calling:
/// </para>
/// <code>
/// // Provided by VK_AMD_shader_info
/// VkResult vkGetShaderInfoAMD(
/// VkDevice device,
/// VkPipeline pipeline,
/// VkShaderStageFlagBits shaderStage,
/// VkShaderInfoTypeAMD infoType,
/// size_t* pInfoSize,
/// void* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe VkResult GetShaderInfoAMD(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipeline pipeline,
VkShaderStageFlags shaderStage,
VkShaderInfoTypeAMD infoType,
ref nuint pInfoSize,
scoped ReadOnlySpan<byte> 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;
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static nuint GetShaderInfoAMD_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipeline pipeline,
VkShaderStageFlags shaderStage,
VkShaderInfoTypeAMD infoType
)
{
nuint pInfoSize = default;
GetShaderInfoAMD(handle, pipeline, shaderStage, infoType, ref pInfoSize, null);
return pInfoSize;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pInfo">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static VkResult GetShaderInfoAMD_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipeline pipeline,
VkShaderStageFlags shaderStage,
VkShaderInfoTypeAMD infoType,
scoped ReadOnlySpan<byte> pInfo
)
{
nuint pInfoSize = (nuint)pInfo.Length;
return GetShaderInfoAMD(handle, pipeline, shaderStage, infoType, ref pInfoSize, pInfo);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBeginConditionalRenderingEXT.html">vkCmdBeginConditionalRenderingEXT</see> - Define the beginning of a conditional rendering block
/// </summary>
/// <remarks>
/// <para>
/// To begin conditional rendering, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_conditional_rendering
/// void vkCmdBeginConditionalRenderingEXT(
/// VkCommandBuffer commandBuffer,
/// const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BeginConditionalRenderingEXT<T>(
this T handle,
VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdBeginConditionalRenderingEXT.Invoke(handle.Handle, pConditionalRenderingBegin);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEndConditionalRenderingEXT.html">vkCmdEndConditionalRenderingEXT</see> - Define the end of a conditional rendering block
/// </summary>
/// <remarks>
/// <para>
/// To end conditional rendering, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_conditional_rendering
/// void vkCmdEndConditionalRenderingEXT(
/// VkCommandBuffer commandBuffer);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void EndConditionalRenderingEXT<T>(this T handle)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdEndConditionalRenderingEXT.Invoke(handle.Handle);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetViewportWScalingNV.html">vkCmdSetViewportWScalingNV</see> - Set the viewport W scaling dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the viewport *W* scaling
/// parameters, call:
/// </para>
/// <code>
/// // Provided by VK_NV_clip_space_w_scaling
/// void vkCmdSetViewportWScalingNV(
/// VkCommandBuffer commandBuffer,
/// uint32_t firstViewport,
/// uint32_t viewportCount,
/// const VkViewportWScalingNV* pViewportWScalings);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetViewportWScalingNV<T>(
this T handle,
int firstViewport,
scoped ReadOnlySpan<VkViewportWScalingNV> pViewportWScalings
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkViewportWScalingNV* pViewportWScalingsFixed = pViewportWScalings)
{
handle.PInvoke.vkCmdSetViewportWScalingNV.Invoke(
handle.Handle,
firstViewport,
pViewportWScalings.Length,
pViewportWScalingsFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDisplayPowerControlEXT.html">vkDisplayPowerControlEXT</see> - Set the power state of a display
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkDisplayPowerControlEXT
/// </para>
/// <para>
/// To set the power state of a display, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_display_control
/// VkResult vkDisplayPowerControlEXT(
/// VkDevice device,
/// VkDisplayKHR display,
/// const VkDisplayPowerInfoEXT* pDisplayPowerInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DisplayPowerControlEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkRegisterDeviceEventEXT.html">vkRegisterDeviceEventEXT</see> - Signal a fence when a device event occurs
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkRegisterDeviceEventEXT
/// </para>
/// <para>
/// To create a fence that will be signaled when an event occurs on a device,
/// call:
/// </para>
/// <code>
/// // Provided by VK_EXT_display_control
/// VkResult vkRegisterDeviceEventEXT(
/// VkDevice device,
/// const VkDeviceEventInfoEXT* pDeviceEventInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkFence* pFence);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void RegisterDeviceEventEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkRegisterDisplayEventEXT.html">vkRegisterDisplayEventEXT</see> - Signal a fence when a display event occurs
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkRegisterDisplayEventEXT
/// </para>
/// <para>
/// To create a fence that will be signaled when an event occurs on a
/// <c>VkDisplayKHR</c> object, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_display_control
/// VkResult vkRegisterDisplayEventEXT(
/// VkDevice device,
/// VkDisplayKHR display,
/// const VkDisplayEventInfoEXT* pDisplayEventInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkFence* pFence);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void RegisterDisplayEventEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetSwapchainCounterEXT.html">vkGetSwapchainCounterEXT</see> - Query the current value of a surface counter
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetSwapchainCounterEXT
/// </para>
/// <para>
/// 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:
/// </para>
/// <code>
/// // Provided by VK_EXT_display_control
/// VkResult vkGetSwapchainCounterEXT(
/// VkDevice device,
/// VkSwapchainKHR swapchain,
/// VkSurfaceCounterFlagBitsEXT counter,
/// uint64_t* pCounterValue);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe nint GetSwapchainCounterEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetRefreshCycleDurationGOOGLE.html">vkGetRefreshCycleDurationGOOGLE</see> - Obtain the RC duration of the PE&amp;apos;s display
/// </summary>
/// <remarks>
/// <para>
/// To query the duration of a refresh cycle (RC) for the presentation engine&apos;s
/// display, call:
/// </para>
/// <code>
/// // Provided by VK_GOOGLE_display_timing
/// VkResult vkGetRefreshCycleDurationGOOGLE(
/// VkDevice device,
/// VkSwapchainKHR swapchain,
/// VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetRefreshCycleDurationGOOGLE(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkRefreshCycleDurationGOOGLE.</returns>
public static VkRefreshCycleDurationGOOGLE GetRefreshCycleDurationGOOGLE(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSwapchainKHR swapchain
)
{
VkRefreshCycleDurationGOOGLE outValue = new();
GetRefreshCycleDurationGOOGLE(handle, swapchain, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetPastPresentationTimingGOOGLE.html">vkGetPastPresentationTimingGOOGLE</see> - Obtain timing of a previously-presented image
/// </summary>
/// <remarks>
/// <para>
/// 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 <c>vkQueuePresentKHR</c> 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).
/// </para>
/// <para>
/// To asynchronously query the presentation engine, for newly-available timing
/// information about one or more previous presents to a given swapchain, call:
/// </para>
/// <code>
/// // Provided by VK_GOOGLE_display_timing
/// VkResult vkGetPastPresentationTimingGOOGLE(
/// VkDevice device,
/// VkSwapchainKHR swapchain,
/// uint32_t* pPresentationTimingCount,
/// VkPastPresentationTimingGOOGLE* pPresentationTimings);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe VkResult GetPastPresentationTimingGOOGLE(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSwapchainKHR swapchain,
ref int pPresentationTimingCount,
scoped ReadOnlySpan<VkPastPresentationTimingGOOGLE> 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;
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static int GetPastPresentationTimingGOOGLE_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSwapchainKHR swapchain
)
{
int pPresentationTimingCount = default;
GetPastPresentationTimingGOOGLE(handle, swapchain, ref pPresentationTimingCount, null);
return pPresentationTimingCount;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pPresentationTimings">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static VkResult GetPastPresentationTimingGOOGLE_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSwapchainKHR swapchain,
scoped ReadOnlySpan<VkPastPresentationTimingGOOGLE> pPresentationTimings
)
{
int pPresentationTimingCount = pPresentationTimings.Length;
return GetPastPresentationTimingGOOGLE(
handle,
swapchain,
ref pPresentationTimingCount,
pPresentationTimings
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDiscardRectangleEXT.html">vkCmdSetDiscardRectangleEXT</see> - Set discard rectangles dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the discard rectangles,
/// call:
/// </para>
/// <code>
/// // Provided by VK_EXT_discard_rectangles
/// void vkCmdSetDiscardRectangleEXT(
/// VkCommandBuffer commandBuffer,
/// uint32_t firstDiscardRectangle,
/// uint32_t discardRectangleCount,
/// const VkRect2D* pDiscardRectangles);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetDiscardRectangleEXT<T>(
this T handle,
int firstDiscardRectangle,
scoped ReadOnlySpan<VkRect2D> pDiscardRectangles
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkRect2D* pDiscardRectanglesFixed = pDiscardRectangles)
{
handle.PInvoke.vkCmdSetDiscardRectangleEXT.Invoke(
handle.Handle,
firstDiscardRectangle,
pDiscardRectangles.Length,
pDiscardRectanglesFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDiscardRectangleEnableEXT.html">vkCmdSetDiscardRectangleEnableEXT</see> - Enable discard rectangles dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> whether discard rectangles
/// are enabled, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_discard_rectangles
/// void vkCmdSetDiscardRectangleEnableEXT(
/// VkCommandBuffer commandBuffer,
/// VkBool32 discardRectangleEnable);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDiscardRectangleEnableEXT<T>(this T handle, Brutal.Bool32 discardRectangleEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDiscardRectangleEnableEXT.Invoke(handle.Handle, discardRectangleEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDiscardRectangleModeEXT.html">vkCmdSetDiscardRectangleModeEXT</see> - Sets the discard rectangle mode dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the discard rectangle mode,
/// call:
/// </para>
/// <code>
/// // Provided by VK_EXT_discard_rectangles
/// void vkCmdSetDiscardRectangleModeEXT(
/// VkCommandBuffer commandBuffer,
/// VkDiscardRectangleModeEXT discardRectangleMode);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDiscardRectangleModeEXT<T>(this T handle, VkDiscardRectangleModeEXT discardRectangleMode)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDiscardRectangleModeEXT.Invoke(handle.Handle, discardRectangleMode);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkSetHdrMetadataEXT.html">vkSetHdrMetadataEXT</see> - Set HDR metadata
/// </summary>
/// <remarks>
/// <para>
/// To provide HDR metadata to an implementation, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_hdr_metadata
/// void vkSetHdrMetadataEXT(
/// VkDevice device,
/// uint32_t swapchainCount,
/// const VkSwapchainKHR* pSwapchains,
/// const VkHdrMetadataEXT* pMetadata);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetHdrMetadataEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkSwapchainKHR> pSwapchains,
scoped ReadOnlySpan<VkHdrMetadataEXT> pMetadata
)
{
fixed (VkHdrMetadataEXT* pMetadataFixed = pMetadata)
fixed (VkSwapchainKHR* pSwapchainsFixed = pSwapchains)
{
handle.PInvoke.vkSetHdrMetadataEXT.Invoke(
handle.Handle,
pSwapchains.Length,
pSwapchainsFixed,
pMetadataFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkSetDebugUtilsObjectNameEXT.html">vkSetDebugUtilsObjectNameEXT</see> - Give an application-defined name to an object
/// </summary>
/// <remarks>
/// <para>
/// An object can be given an application-defined name by calling:
/// </para>
/// <code>
/// // Provided by VK_EXT_debug_utils
/// VkResult vkSetDebugUtilsObjectNameEXT(
/// VkDevice device,
/// const VkDebugUtilsObjectNameInfoEXT* pNameInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetDebugUtilsObjectNameEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkSetDebugUtilsObjectTagEXT.html">vkSetDebugUtilsObjectTagEXT</see> - Attach arbitrary data to an object
/// </summary>
/// <remarks>
/// <code>
/// // Provided by VK_EXT_debug_utils
/// VkResult vkSetDebugUtilsObjectTagEXT(
/// VkDevice device,
/// const VkDebugUtilsObjectTagInfoEXT* pTagInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetDebugUtilsObjectTagEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueueBeginDebugUtilsLabelEXT.html">vkQueueBeginDebugUtilsLabelEXT</see> - Open a queue debug label region
/// </summary>
/// <remarks>
/// <para>
/// A queue debug label region is opened by calling:
/// </para>
/// <code>
/// // Provided by VK_EXT_debug_utils
/// void vkQueueBeginDebugUtilsLabelEXT(
/// VkQueue queue,
/// const VkDebugUtilsLabelEXT* pLabelInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe void BeginDebugUtilsLabelEXTInternal(
this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> handle,
in VkDebugUtilsLabelEXT pLabelInfo
)
{
fixed (VkDebugUtilsLabelEXT* pLabelInfoFixed = &pLabelInfo)
{
handle.PInvoke.vkQueueBeginDebugUtilsLabelEXT.Invoke(handle.Handle, pLabelInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueueEndDebugUtilsLabelEXT.html">vkQueueEndDebugUtilsLabelEXT</see> - Close a queue debug label region
/// </summary>
/// <remarks>
/// <para>
/// A queue debug label region is closed by calling:
/// </para>
/// <code>
/// // Provided by VK_EXT_debug_utils
/// void vkQueueEndDebugUtilsLabelEXT(
/// VkQueue queue);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static void EndDebugUtilsLabelEXTInternal(
this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> handle
)
{
handle.PInvoke.vkQueueEndDebugUtilsLabelEXT.Invoke(handle.Handle);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueueInsertDebugUtilsLabelEXT.html">vkQueueInsertDebugUtilsLabelEXT</see> - Insert a label into a queue
/// </summary>
/// <remarks>
/// <para>
/// A single label can be inserted into a queue by calling:
/// </para>
/// <code>
/// // Provided by VK_EXT_debug_utils
/// void vkQueueInsertDebugUtilsLabelEXT(
/// VkQueue queue,
/// const VkDebugUtilsLabelEXT* pLabelInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static unsafe void InsertDebugUtilsLabelEXTInternal(
this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> handle,
in VkDebugUtilsLabelEXT pLabelInfo
)
{
fixed (VkDebugUtilsLabelEXT* pLabelInfoFixed = &pLabelInfo)
{
handle.PInvoke.vkQueueInsertDebugUtilsLabelEXT.Invoke(handle.Handle, pLabelInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBeginDebugUtilsLabelEXT.html">vkCmdBeginDebugUtilsLabelEXT</see> - Open a command buffer debug label region
/// </summary>
/// <remarks>
/// <para>
/// A command buffer debug label region can be opened by calling:
/// </para>
/// <code>
/// // Provided by VK_EXT_debug_utils
/// void vkCmdBeginDebugUtilsLabelEXT(
/// VkCommandBuffer commandBuffer,
/// const VkDebugUtilsLabelEXT* pLabelInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BeginDebugUtilsLabelEXT<T>(this T handle, in VkDebugUtilsLabelEXT pLabelInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDebugUtilsLabelEXT* pLabelInfoFixed = &pLabelInfo)
{
handle.PInvoke.vkCmdBeginDebugUtilsLabelEXT.Invoke(handle.Handle, pLabelInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEndDebugUtilsLabelEXT.html">vkCmdEndDebugUtilsLabelEXT</see> - Close a command buffer label region
/// </summary>
/// <remarks>
/// <para>
/// A command buffer label region can be closed by calling:
/// </para>
/// <code>
/// // Provided by VK_EXT_debug_utils
/// void vkCmdEndDebugUtilsLabelEXT(
/// VkCommandBuffer commandBuffer);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void EndDebugUtilsLabelEXT<T>(this T handle)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdEndDebugUtilsLabelEXT.Invoke(handle.Handle);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdInsertDebugUtilsLabelEXT.html">vkCmdInsertDebugUtilsLabelEXT</see> - Insert a label into a command buffer
/// </summary>
/// <remarks>
/// <para>
/// A single debug label can be inserted into a command buffer by calling:
/// </para>
/// <code>
/// // Provided by VK_EXT_debug_utils
/// void vkCmdInsertDebugUtilsLabelEXT(
/// VkCommandBuffer commandBuffer,
/// const VkDebugUtilsLabelEXT* pLabelInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void InsertDebugUtilsLabelEXT<T>(this T handle, in VkDebugUtilsLabelEXT pLabelInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDebugUtilsLabelEXT* pLabelInfoFixed = &pLabelInfo)
{
handle.PInvoke.vkCmdInsertDebugUtilsLabelEXT.Invoke(handle.Handle, pLabelInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateGpaSessionAMD.html">vkCreateGpaSessionAMD</see> - Create a new GPA session object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateGpaSessionAMD
/// :objectnameplural: GPA sessions
/// :objectnamecamelcase: gpaSession
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create a GPA session object, call:
/// </para>
/// <code>
/// // Provided by VK_AMD_gpa_interface
/// VkResult vkCreateGpaSessionAMD(
/// VkDevice device,
/// const VkGpaSessionCreateInfoAMD* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkGpaSessionAMD* pGpaSession);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkGpaSessionAMD CreateGpaSessionAMD(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyGpaSessionAMD.html">vkDestroyGpaSessionAMD</see> - Destroy a GPA session object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a GPA session object, call:
/// </para>
/// <code>
/// // Provided by VK_AMD_gpa_interface
/// void vkDestroyGpaSessionAMD(
/// VkDevice device,
/// VkGpaSessionAMD gpaSession,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyGpaSessionAMD(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkGpaSessionAMD gpaSession,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyGpaSessionAMD.Invoke(handle.Handle, gpaSession, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkSetGpaDeviceClockModeAMD.html">vkSetGpaDeviceClockModeAMD</see> - Setting a device clock
/// </summary>
/// <remarks>
/// <para>
/// To set or query GPU clocks, call:
/// </para>
/// <code>
/// // Provided by VK_AMD_gpa_interface
/// VkResult vkSetGpaDeviceClockModeAMD(
/// VkDevice device,
/// VkGpaDeviceClockModeInfoAMD* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetGpaDeviceClockModeAMD(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetGpaDeviceClockInfoAMD.html">vkGetGpaDeviceClockInfoAMD</see> - Getting device clocks and ratios
/// </summary>
/// <remarks>
/// <para>
/// To query the GPU clock current values and their ratios to their maximums,
/// call:
/// </para>
/// <code>
/// // Provided by VK_AMD_gpa_interface
/// VkResult vkGetGpaDeviceClockInfoAMD(
/// VkDevice device,
/// VkGpaDeviceGetClockInfoAMD* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetGpaDeviceClockInfoAMD(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkGpaDeviceGetClockInfoAMD.</returns>
public static VkGpaDeviceGetClockInfoAMD GetGpaDeviceClockInfoAMD(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle
)
{
VkGpaDeviceGetClockInfoAMD outValue = new();
GetGpaDeviceClockInfoAMD(handle, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBeginGpaSessionAMD.html">vkCmdBeginGpaSessionAMD</see> - Begin a GPA session
/// </summary>
/// <remarks>
/// <para>
/// To begin a GPA session, call:
/// </para>
/// <code>
/// // Provided by VK_AMD_gpa_interface
/// VkResult vkCmdBeginGpaSessionAMD(
/// VkCommandBuffer commandBuffer,
/// VkGpaSessionAMD gpaSession);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void BeginGpaSessionAMD<T>(this T handle, VkGpaSessionAMD gpaSession)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEndGpaSessionAMD.html">vkCmdEndGpaSessionAMD</see> - End a GPA session
/// </summary>
/// <remarks>
/// <para>
/// To end a GPA session, call:
/// </para>
/// <code>
/// // Provided by VK_AMD_gpa_interface
/// VkResult vkCmdEndGpaSessionAMD(
/// VkCommandBuffer commandBuffer,
/// VkGpaSessionAMD gpaSession);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void EndGpaSessionAMD<T>(this T handle, VkGpaSessionAMD gpaSession)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBeginGpaSampleAMD.html">vkCmdBeginGpaSampleAMD</see> - Beginning a sample
/// </summary>
/// <remarks>
/// <para>
/// To begin a GPA sample, call:
/// </para>
/// <code>
/// // Provided by VK_AMD_gpa_interface
/// VkResult vkCmdBeginGpaSampleAMD(
/// VkCommandBuffer commandBuffer,
/// VkGpaSessionAMD gpaSession,
/// const VkGpaSampleBeginInfoAMD* pGpaSampleBeginInfo,
/// uint32_t* pSampleID);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BeginGpaSampleAMD<T>(
this T handle,
VkGpaSessionAMD gpaSession,
in VkGpaSampleBeginInfoAMD pGpaSampleBeginInfo,
int* pSampleID
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEndGpaSampleAMD.html">vkCmdEndGpaSampleAMD</see> - Ending a sample
/// </summary>
/// <remarks>
/// <para>
/// To end a GPA sample, call:
/// </para>
/// <code>
/// // Provided by VK_AMD_gpa_interface
/// void vkCmdEndGpaSampleAMD(
/// VkCommandBuffer commandBuffer,
/// VkGpaSessionAMD gpaSession,
/// uint32_t sampleID);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void EndGpaSampleAMD<T>(this T handle, VkGpaSessionAMD gpaSession, int sampleID)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdEndGpaSampleAMD.Invoke(handle.Handle, gpaSession, sampleID);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetGpaSessionStatusAMD.html">vkGetGpaSessionStatusAMD</see> - Getting the status of a GPA session
/// </summary>
/// <remarks>
/// <para>
/// Once a GPA session has ended, its status can be queried by:
/// </para>
/// <code>
/// // Provided by VK_AMD_gpa_interface
/// VkResult vkGetGpaSessionStatusAMD(
/// VkDevice device,
/// VkGpaSessionAMD gpaSession);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void GetGpaSessionStatusAMD(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetGpaSessionResultsAMD.html">vkGetGpaSessionResultsAMD</see> - Getting the status of a GPA session
/// </summary>
/// <remarks>
/// <para>
/// Once a GPA session&apos;s results are available, they can be obtained by:
/// </para>
/// <code>
/// // Provided by VK_AMD_gpa_interface
/// VkResult vkGetGpaSessionResultsAMD(
/// VkDevice device,
/// VkGpaSessionAMD gpaSession,
/// uint32_t sampleID,
/// size_t* pSizeInBytes,
/// void* pData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe void GetGpaSessionResultsAMD(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkGpaSessionAMD gpaSession,
int sampleID,
ref nuint pSizeInBytes,
scoped ReadOnlySpan<byte> 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;
}
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static nuint GetGpaSessionResultsAMD_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkGpaSessionAMD gpaSession,
int sampleID
)
{
nuint pSizeInBytes = default;
GetGpaSessionResultsAMD(handle, gpaSession, sampleID, ref pSizeInBytes, null);
return pSizeInBytes;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pData">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static void GetGpaSessionResultsAMD_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkGpaSessionAMD gpaSession,
int sampleID,
scoped ReadOnlySpan<byte> pData
)
{
nuint pSizeInBytes = (nuint)pData.Length;
GetGpaSessionResultsAMD(handle, gpaSession, sampleID, ref pSizeInBytes, pData);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkResetGpaSessionAMD.html">vkResetGpaSessionAMD</see> - Reset a GPA session
/// </summary>
/// <remarks>
/// <para>
/// To reset a GPA session for reuse, call:
/// </para>
/// <code>
/// // Provided by VK_AMD_gpa_interface
/// VkResult vkResetGpaSessionAMD(
/// VkDevice device,
/// VkGpaSessionAMD gpaSession);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ResetGpaSessionAMD(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyGpaSessionResultsAMD.html">vkCmdCopyGpaSessionResultsAMD</see> - Copying GPA session results
/// </summary>
/// <remarks>
/// <para>
/// To copy the results of a GPA session into another, call:
/// </para>
/// <code>
/// // Provided by VK_AMD_gpa_interface
/// void vkCmdCopyGpaSessionResultsAMD(
/// VkCommandBuffer commandBuffer,
/// VkGpaSessionAMD gpaSession);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyGpaSessionResultsAMD<T>(this T handle, VkGpaSessionAMD gpaSession)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdCopyGpaSessionResultsAMD.Invoke(handle.Handle, gpaSession);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkWriteSamplerDescriptorsEXT.html">vkWriteSamplerDescriptorsEXT</see> - Write sampler descriptors to memory
/// </summary>
/// <remarks>
/// <para>
/// To write sampler descriptors to memory, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_heap
/// VkResult vkWriteSamplerDescriptorsEXT(
/// VkDevice device,
/// uint32_t samplerCount,
/// const VkSamplerCreateInfo* pSamplers,
/// const VkHostAddressRangeEXT* pDescriptors);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void WriteSamplerDescriptorsEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkSamplerCreateInfo> pSamplers,
scoped ReadOnlySpan<VkHostAddressRangeEXT> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkWriteResourceDescriptorsEXT.html">vkWriteResourceDescriptorsEXT</see> - Write resource descriptors to memory
/// </summary>
/// <remarks>
/// <para>
/// To write resource descriptors to memory, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_heap
/// VkResult vkWriteResourceDescriptorsEXT(
/// VkDevice device,
/// uint32_t resourceCount,
/// const VkResourceDescriptorInfoEXT* pResources,
/// const VkHostAddressRangeEXT* pDescriptors);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void WriteResourceDescriptorsEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkResourceDescriptorInfoEXT> pResources,
scoped ReadOnlySpan<VkHostAddressRangeEXT> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindSamplerHeapEXT.html">vkCmdBindSamplerHeapEXT</see> - Binds a sampler heap to a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBindSamplerHeapEXT
/// </para>
/// <para>
/// To bind a sampler heap to a command buffer, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_heap
/// void vkCmdBindSamplerHeapEXT(
/// VkCommandBuffer commandBuffer,
/// const VkBindHeapInfoEXT* pBindInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindSamplerHeapEXT<T>(this T handle, in VkBindHeapInfoEXT pBindInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkBindHeapInfoEXT* pBindInfoFixed = &pBindInfo)
{
handle.PInvoke.vkCmdBindSamplerHeapEXT.Invoke(handle.Handle, pBindInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindResourceHeapEXT.html">vkCmdBindResourceHeapEXT</see> - Binds a resource heap to a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBindResourceHeapEXT
/// </para>
/// <para>
/// To bind a resource heap to a command buffer, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_heap
/// void vkCmdBindResourceHeapEXT(
/// VkCommandBuffer commandBuffer,
/// const VkBindHeapInfoEXT* pBindInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindResourceHeapEXT<T>(this T handle, in VkBindHeapInfoEXT pBindInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkBindHeapInfoEXT* pBindInfoFixed = &pBindInfo)
{
handle.PInvoke.vkCmdBindResourceHeapEXT.Invoke(handle.Handle, pBindInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPushDataEXT.html">vkCmdPushDataEXT</see> - Update the values of push data
/// </summary>
/// <remarks>
/// <para>
/// To update push data when using descriptor heaps, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_heap
/// void vkCmdPushDataEXT(
/// VkCommandBuffer commandBuffer,
/// const VkPushDataInfoEXT* pPushDataInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void PushDataEXT<T>(this T handle, in VkPushDataInfoEXT pPushDataInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkPushDataInfoEXT* pPushDataInfoFixed = &pPushDataInfo)
{
handle.PInvoke.vkCmdPushDataEXT.Invoke(handle.Handle, pPushDataInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetImageOpaqueCaptureDataEXT.html">vkGetImageOpaqueCaptureDataEXT</see> - Get image opaque capture descriptor data for descriptor heap replay
/// </summary>
/// <remarks>
/// <para>
/// To get the opaque capture descriptor data for images, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_heap
/// VkResult vkGetImageOpaqueCaptureDataEXT(
/// VkDevice device,
/// uint32_t imageCount,
/// const VkImage* pImages,
/// VkHostAddressRangeEXT* pDatas);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetImageOpaqueCaptureDataEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkImage> pImages,
scoped ReadOnlySpan<VkHostAddressRangeEXT> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkRegisterCustomBorderColorEXT.html">vkRegisterCustomBorderColorEXT</see> - Register a custom border color
/// </summary>
/// <remarks>
/// <para>
/// To register a custom border color, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_custom_border_color with VK_EXT_descriptor_heap
/// VkResult vkRegisterCustomBorderColorEXT(
/// VkDevice device,
/// const VkSamplerCustomBorderColorCreateInfoEXT* pBorderColor,
/// VkBool32 requestIndex,
/// uint32_t* pIndex);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void RegisterCustomBorderColorEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkUnregisterCustomBorderColorEXT.html">vkUnregisterCustomBorderColorEXT</see> - Unregister a custom border color
/// </summary>
/// <remarks>
/// <para>
/// To unregister a custom border color, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_custom_border_color with VK_EXT_descriptor_heap
/// void vkUnregisterCustomBorderColorEXT(
/// VkDevice device,
/// uint32_t index);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void UnregisterCustomBorderColorEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
int index
)
{
handle.PInvoke.vkUnregisterCustomBorderColorEXT.Invoke(handle.Handle, index);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetTensorOpaqueCaptureDataARM.html">vkGetTensorOpaqueCaptureDataARM</see> - Get tensor opaque capture descriptor data for descriptor heap replay
/// </summary>
/// <remarks>
/// <para>
/// To get the opaque capture descriptor data for tensors, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_heap with VK_ARM_tensors
/// VkResult vkGetTensorOpaqueCaptureDataARM(
/// VkDevice device,
/// uint32_t tensorCount,
/// const VkTensorARM* pTensors,
/// VkHostAddressRangeEXT* pDatas);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetTensorOpaqueCaptureDataARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkTensorARM> pTensors,
scoped ReadOnlySpan<VkHostAddressRangeEXT> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetSampleLocationsEXT.html">vkCmdSetSampleLocationsEXT</see> - Set sample locations dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the sample locations used
/// for rasterization, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_sample_locations
/// void vkCmdSetSampleLocationsEXT(
/// VkCommandBuffer commandBuffer,
/// const VkSampleLocationsInfoEXT* pSampleLocationsInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetSampleLocationsEXT<T>(
this T handle,
in VkSampleLocationsInfoEXT pSampleLocationsInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkSampleLocationsInfoEXT* pSampleLocationsInfoFixed = &pSampleLocationsInfo)
{
handle.PInvoke.vkCmdSetSampleLocationsEXT.Invoke(handle.Handle, pSampleLocationsInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetImageDrmFormatModifierPropertiesEXT.html">vkGetImageDrmFormatModifierPropertiesEXT</see> - Returns an image&amp;apos;s DRM format modifier
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetImageDrmFormatModifierPropertiesEXT
/// </para>
/// <para>
/// If an image was created with <c>VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT</c>,
/// then the image has a <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#glossary-drm-format-modifier">Linux DRM format
/// modifier^</see>.
/// To query the <i>modifier</i>, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_image_drm_format_modifier
/// VkResult vkGetImageDrmFormatModifierPropertiesEXT(
/// VkDevice device,
/// VkImage image,
/// VkImageDrmFormatModifierPropertiesEXT* pProperties);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetImageDrmFormatModifierPropertiesEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkImageDrmFormatModifierPropertiesEXT.</returns>
public static VkImageDrmFormatModifierPropertiesEXT GetImageDrmFormatModifierPropertiesEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkImage image
)
{
VkImageDrmFormatModifierPropertiesEXT outValue = new();
GetImageDrmFormatModifierPropertiesEXT(handle, image, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateValidationCacheEXT.html">vkCreateValidationCacheEXT</see> - Creates a new validation cache
/// </summary>
/// <remarks>
/// <para>
/// To create validation cache objects, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_validation_cache
/// VkResult vkCreateValidationCacheEXT(
/// VkDevice device,
/// const VkValidationCacheCreateInfoEXT* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkValidationCacheEXT* pValidationCache);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkValidationCacheEXT CreateValidationCacheEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyValidationCacheEXT.html">vkDestroyValidationCacheEXT</see> - Destroy a validation cache object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a validation cache, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_validation_cache
/// void vkDestroyValidationCacheEXT(
/// VkDevice device,
/// VkValidationCacheEXT validationCache,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyValidationCacheEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkValidationCacheEXT validationCache,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyValidationCacheEXT.Invoke(handle.Handle, validationCache, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkMergeValidationCachesEXT.html">vkMergeValidationCachesEXT</see> - Combine the data stores of validation caches
/// </summary>
/// <remarks>
/// <para>
/// Validation cache objects <i>can</i> be merged using the command:
/// </para>
/// <code>
/// // Provided by VK_EXT_validation_cache
/// VkResult vkMergeValidationCachesEXT(
/// VkDevice device,
/// VkValidationCacheEXT dstCache,
/// uint32_t srcCacheCount,
/// const VkValidationCacheEXT* pSrcCaches);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void MergeValidationCachesEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkValidationCacheEXT dstCache,
scoped ReadOnlySpan<VkValidationCacheEXT> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetValidationCacheDataEXT.html">vkGetValidationCacheDataEXT</see> - Get the data store from a validation cache
/// </summary>
/// <remarks>
/// <para>
/// Data <i>can</i> be retrieved from a validation cache object using the command:
/// </para>
/// <code>
/// // Provided by VK_EXT_validation_cache
/// VkResult vkGetValidationCacheDataEXT(
/// VkDevice device,
/// VkValidationCacheEXT validationCache,
/// size_t* pDataSize,
/// void* pData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe VkResult GetValidationCacheDataEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkValidationCacheEXT validationCache,
ref nuint pDataSize,
scoped ReadOnlySpan<byte> 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;
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static nuint GetValidationCacheDataEXT_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkValidationCacheEXT validationCache
)
{
nuint pDataSize = default;
GetValidationCacheDataEXT(handle, validationCache, ref pDataSize, null);
return pDataSize;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pData">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static VkResult GetValidationCacheDataEXT_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkValidationCacheEXT validationCache,
scoped ReadOnlySpan<byte> pData
)
{
nuint pDataSize = (nuint)pData.Length;
return GetValidationCacheDataEXT(handle, validationCache, ref pDataSize, pData);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindShadingRateImageNV.html">vkCmdBindShadingRateImageNV</see> - Bind a shading rate image on a command buffer
/// </summary>
/// <remarks>
/// <para>
/// When shading rate image usage is enabled in the bound pipeline, the pipeline
/// uses a shading rate image specified by the command:
/// </para>
/// <code>
/// // Provided by VK_NV_shading_rate_image
/// void vkCmdBindShadingRateImageNV(
/// VkCommandBuffer commandBuffer,
/// VkImageView imageView,
/// VkImageLayout imageLayout);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void BindShadingRateImageNV<T>(this T handle, VkImageView imageView, VkImageLayout imageLayout)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdBindShadingRateImageNV.Invoke(handle.Handle, imageView, imageLayout);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetViewportShadingRatePaletteNV.html">vkCmdSetViewportShadingRatePaletteNV</see> - Set shading rate image palettes dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the per-viewport shading
/// rate image palettes, call:
/// </para>
/// <code>
/// // Provided by VK_NV_shading_rate_image
/// void vkCmdSetViewportShadingRatePaletteNV(
/// VkCommandBuffer commandBuffer,
/// uint32_t firstViewport,
/// uint32_t viewportCount,
/// const VkShadingRatePaletteNV* pShadingRatePalettes);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetViewportShadingRatePaletteNV<T>(
this T handle,
int firstViewport,
scoped ReadOnlySpan<VkShadingRatePaletteNV> pShadingRatePalettes
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkShadingRatePaletteNV* pShadingRatePalettesFixed = pShadingRatePalettes)
{
handle.PInvoke.vkCmdSetViewportShadingRatePaletteNV.Invoke(
handle.Handle,
firstViewport,
pShadingRatePalettes.Length,
pShadingRatePalettesFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetCoarseSampleOrderNV.html">vkCmdSetCoarseSampleOrderNV</see> - Set order of coverage samples for coarse fragments dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the order of coverage
/// samples in fragments larger than one pixel, call:
/// </para>
/// <code>
/// // Provided by VK_NV_shading_rate_image
/// void vkCmdSetCoarseSampleOrderNV(
/// VkCommandBuffer commandBuffer,
/// VkCoarseSampleOrderTypeNV sampleOrderType,
/// uint32_t customSampleOrderCount,
/// const VkCoarseSampleOrderCustomNV* pCustomSampleOrders);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetCoarseSampleOrderNV<T>(
this T handle,
VkCoarseSampleOrderTypeNV sampleOrderType,
scoped ReadOnlySpan<VkCoarseSampleOrderCustomNV> pCustomSampleOrders
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCoarseSampleOrderCustomNV* pCustomSampleOrdersFixed = pCustomSampleOrders)
{
handle.PInvoke.vkCmdSetCoarseSampleOrderNV.Invoke(
handle.Handle,
sampleOrderType,
pCustomSampleOrders.Length,
pCustomSampleOrdersFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateAccelerationStructureNV.html">vkCreateAccelerationStructureNV</see> - Create a new acceleration structure object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateAccelerationStructureNV
/// </para>
/// <para>
/// To create acceleration structures, call:
/// </para>
/// <code>
/// // Provided by VK_NV_ray_tracing
/// VkResult vkCreateAccelerationStructureNV(
/// VkDevice device,
/// const VkAccelerationStructureCreateInfoNV* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkAccelerationStructureNV* pAccelerationStructure);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkAccelerationStructureNV CreateAccelerationStructureNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyAccelerationStructureNV.html">vkDestroyAccelerationStructureNV</see> - Destroy an acceleration structure object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkDestroyAccelerationStructureNV
/// </para>
/// <para>
/// To destroy an acceleration structure, call:
/// </para>
/// <code>
/// // Provided by VK_NV_ray_tracing
/// void vkDestroyAccelerationStructureNV(
/// VkDevice device,
/// VkAccelerationStructureNV accelerationStructure,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyAccelerationStructureNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkAccelerationStructureNV accelerationStructure,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyAccelerationStructureNV.Invoke(handle.Handle, accelerationStructure, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetAccelerationStructureMemoryRequirementsNV.html">vkGetAccelerationStructureMemoryRequirementsNV</see> - Get acceleration structure memory requirements
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetAccelerationStructureMemoryRequirementsNV
/// </para>
/// <para>
/// An acceleration structure has memory requirements for the structure object
/// itself, scratch space for the build, and scratch space for the update.
/// </para>
/// <para>
/// Scratch space is allocated as a <c>VkBuffer</c>, so for
/// <c>VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV</c>
/// and
/// <c>VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV</c>
/// the <c>pMemoryRequirements</c>-&gt;alignment and
/// <c>pMemoryRequirements</c>-&gt;memoryTypeBits values returned by this call <i>must</i>
/// be filled with zero, and <i>should</i> be ignored by the application.
/// </para>
/// <para>
/// To query the memory requirements, call:
/// </para>
/// <code>
/// // Provided by VK_NV_ray_tracing
/// void vkGetAccelerationStructureMemoryRequirementsNV(
/// VkDevice device,
/// const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo,
/// VkMemoryRequirements2* pMemoryRequirements);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetAccelerationStructureMemoryRequirementsNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkAccelerationStructureMemoryRequirementsInfoNV pInfo,
ref VkMemoryRequirements2 pMemoryRequirements
)
{
fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements)
fixed (VkAccelerationStructureMemoryRequirementsInfoNV* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetAccelerationStructureMemoryRequirementsNV.Invoke(
handle.Handle,
pInfoFixed,
pMemoryRequirementsFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryRequirements2.</returns>
public static VkMemoryRequirements2 GetAccelerationStructureMemoryRequirementsNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkAccelerationStructureMemoryRequirementsInfoNV pInfo
)
{
VkMemoryRequirements2 outValue = new();
GetAccelerationStructureMemoryRequirementsNV(handle, pInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkBindAccelerationStructureMemoryNV.html">vkBindAccelerationStructureMemoryNV</see> - Bind acceleration structure memory
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkBindAccelerationStructureMemoryNV
/// </para>
/// <para>
/// To attach memory to one or more acceleration structures at a time, call:
/// </para>
/// <code>
/// // Provided by VK_NV_ray_tracing
/// VkResult vkBindAccelerationStructureMemoryNV(
/// VkDevice device,
/// uint32_t bindInfoCount,
/// const VkBindAccelerationStructureMemoryInfoNV* pBindInfos);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindAccelerationStructureMemoryNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkBindAccelerationStructureMemoryInfoNV> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBuildAccelerationStructureNV.html">vkCmdBuildAccelerationStructureNV</see> - Build an acceleration structure
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBuildAccelerationStructureNV
/// </para>
/// <para>
/// To build an acceleration structure for the `<c>VK_NV_ray_tracing</c>`
/// extension call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BuildAccelerationStructureNV<T>(
this T handle,
in VkAccelerationStructureInfoNV pInfo,
VkBuffer instanceData,
ByteSize64 instanceOffset,
Brutal.Bool32 update,
VkAccelerationStructureNV dst,
VkAccelerationStructureNV src,
VkBuffer scratch,
ByteSize64 scratchOffset
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkAccelerationStructureInfoNV* pInfoFixed = &pInfo)
{
handle.PInvoke.vkCmdBuildAccelerationStructureNV.Invoke(
handle.Handle,
pInfoFixed,
instanceData,
instanceOffset,
update,
dst,
src,
scratch,
scratchOffset
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyAccelerationStructureNV.html">vkCmdCopyAccelerationStructureNV</see> - Copy an acceleration structure
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyAccelerationStructureNV
/// </para>
/// <para>
/// To copy an acceleration structure for the `<c>VK_NV_ray_tracing</c>`
/// extension call:
/// </para>
/// <code>
/// // Provided by VK_NV_ray_tracing
/// void vkCmdCopyAccelerationStructureNV(
/// VkCommandBuffer commandBuffer,
/// VkAccelerationStructureNV dst,
/// VkAccelerationStructureNV src,
/// VkCopyAccelerationStructureModeKHR mode);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyAccelerationStructureNV<T>(
this T handle,
VkAccelerationStructureNV dst,
VkAccelerationStructureNV src,
VkCopyAccelerationStructureModeKHR mode
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdCopyAccelerationStructureNV.Invoke(handle.Handle, dst, src, mode);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdTraceRaysNV.html">vkCmdTraceRaysNV</see> - Initialize a ray tracing dispatch
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdTraceRaysNV
/// </para>
/// <para>
/// To dispatch ray tracing for the `<c>VK_NV_ray_tracing</c>` extension use:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void TraceRaysNV<T>(
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<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdTraceRaysNV.Invoke(
handle.Handle,
raygenShaderBindingTableBuffer,
raygenShaderBindingOffset,
missShaderBindingTableBuffer,
missShaderBindingOffset,
missShaderBindingStride,
hitShaderBindingTableBuffer,
hitShaderBindingOffset,
hitShaderBindingStride,
callableShaderBindingTableBuffer,
callableShaderBindingOffset,
callableShaderBindingStride,
width,
height,
depth
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateRayTracingPipelinesNV.html">vkCreateRayTracingPipelinesNV</see> - Creates a new ray tracing pipeline object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateRayTracingPipelinesNV
/// </para>
/// <para>
/// To create ray tracing pipelines, call:
/// </para>
/// <code>
/// // Provided by VK_NV_ray_tracing
/// VkResult vkCreateRayTracingPipelinesNV(
/// VkDevice device,
/// VkPipelineCache pipelineCache,
/// uint32_t createInfoCount,
/// const VkRayTracingPipelineCreateInfoNV* pCreateInfos,
/// const VkAllocationCallbacks* pAllocator,
/// VkPipeline* pPipelines);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CreateRayTracingPipelinesNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipelineCache pipelineCache,
scoped ReadOnlySpan<VkRayTracingPipelineCreateInfoNV> pCreateInfos,
VkAllocator? pAllocator,
scoped ReadOnlySpan<VkPipeline> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetRayTracingShaderGroupHandlesKHR.html">vkGetRayTracingShaderGroupHandlesKHR</see> - Query ray tracing pipeline shader group handles
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetRayTracingShaderGroupHandlesKHR
/// </para>
/// <para>
/// To query the opaque handles of shaders in the ray tracing pipeline, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetRayTracingShaderGroupHandlesKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipeline pipeline,
int firstGroup,
int groupCount,
scoped ReadOnlySpan<byte> 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;
}
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult GetRayTracingShaderGroupHandlesNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipeline pipeline,
int firstGroup,
int groupCount,
nuint dataSize,
void* pData
)
{
return handle.PInvoke.vkGetRayTracingShaderGroupHandlesNV.Invoke(
handle.Handle,
pipeline,
firstGroup,
groupCount,
dataSize,
pData
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetAccelerationStructureHandleNV.html">vkGetAccelerationStructureHandleNV</see> - Get opaque acceleration structure handle
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetAccelerationStructureHandleNV
/// </para>
/// <para>
/// 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:
/// </para>
/// <code>
/// // Provided by VK_NV_ray_tracing
/// VkResult vkGetAccelerationStructureHandleNV(
/// VkDevice device,
/// VkAccelerationStructureNV accelerationStructure,
/// size_t dataSize,
/// void* pData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetAccelerationStructureHandleNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkAccelerationStructureNV accelerationStructure,
scoped ReadOnlySpan<byte> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdWriteAccelerationStructuresPropertiesNV.html">vkCmdWriteAccelerationStructuresPropertiesNV</see> - Write acceleration structure result parameters to query results.
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdWriteAccelerationStructuresPropertiesNV
/// </para>
/// <para>
/// To query acceleration structure size parameters for the
/// `<c>VK_NV_ray_tracing</c>` extension call:
/// </para>
/// <code>
/// // Provided by VK_NV_ray_tracing
/// void vkCmdWriteAccelerationStructuresPropertiesNV(
/// VkCommandBuffer commandBuffer,
/// uint32_t accelerationStructureCount,
/// const VkAccelerationStructureNV* pAccelerationStructures,
/// VkQueryType queryType,
/// VkQueryPool queryPool,
/// uint32_t firstQuery);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void WriteAccelerationStructuresPropertiesNV<T>(
this T handle,
scoped ReadOnlySpan<VkAccelerationStructureNV> pAccelerationStructures,
VkQueryType queryType,
VkQueryPool queryPool,
int firstQuery
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkAccelerationStructureNV* pAccelerationStructuresFixed = pAccelerationStructures)
{
handle.PInvoke.vkCmdWriteAccelerationStructuresPropertiesNV.Invoke(
handle.Handle,
pAccelerationStructures.Length,
pAccelerationStructuresFixed,
queryType,
queryPool,
firstQuery
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCompileDeferredNV.html">vkCompileDeferredNV</see> - Deferred compilation of shaders
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCompileDeferredNV
/// </para>
/// <para>
/// To compile a deferred shader in a pipeline call:
/// </para>
/// <code>
/// // Provided by VK_NV_ray_tracing
/// VkResult vkCompileDeferredNV(
/// VkDevice device,
/// VkPipeline pipeline,
/// uint32_t shader);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CompileDeferredNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetMemoryHostPointerPropertiesEXT.html">vkGetMemoryHostPointerPropertiesEXT</see> - Get properties of external memory host pointer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetMemoryHostPointerPropertiesEXT
/// </para>
/// <para>
/// To determine the correct parameters to use when importing host pointers,
/// call:
/// </para>
/// <code>
/// // Provided by VK_EXT_external_memory_host
/// VkResult vkGetMemoryHostPointerPropertiesEXT(
/// VkDevice device,
/// VkExternalMemoryHandleTypeFlagBits handleType,
/// const void* pHostPointer,
/// VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetMemoryHostPointerPropertiesEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryHostPointerPropertiesEXT.</returns>
public static unsafe VkMemoryHostPointerPropertiesEXT GetMemoryHostPointerPropertiesEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkExternalMemoryHandleTypeFlags handleType,
void* pHostPointer
)
{
VkMemoryHostPointerPropertiesEXT outValue = new();
GetMemoryHostPointerPropertiesEXT(handle, handleType, pHostPointer, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdWriteBufferMarkerAMD.html">vkCmdWriteBufferMarkerAMD</see> - Execute a pipelined write of a marker value into a buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdWriteBufferMarkerAMD
/// </para>
/// <para>
/// To write a 32-bit marker value into a buffer as a pipelined operation, call:
/// </para>
/// <code>
/// // Provided by VK_AMD_buffer_marker
/// void vkCmdWriteBufferMarkerAMD(
/// VkCommandBuffer commandBuffer,
/// VkPipelineStageFlagBits pipelineStage,
/// VkBuffer dstBuffer,
/// VkDeviceSize dstOffset,
/// uint32_t marker);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void WriteBufferMarkerAMD<T>(
this T handle,
VkPipelineStageFlags pipelineStage,
VkBuffer dstBuffer,
ByteSize64 dstOffset,
int marker
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdWriteBufferMarkerAMD.Invoke(handle.Handle, pipelineStage, dstBuffer, dstOffset, marker);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdWriteBufferMarker2AMD.html">vkCmdWriteBufferMarker2AMD</see> - Execute a pipelined write of a marker value into a buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdWriteBufferMarker2AMD
/// </para>
/// <para>
/// To write a 32-bit marker value into a buffer as a pipelined operation, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void WriteBufferMarker2AMD<T>(
this T handle,
VkPipelineStageFlags2 stage,
VkBuffer dstBuffer,
ByteSize64 dstOffset,
int marker
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdWriteBufferMarker2AMD.Invoke(handle.Handle, stage, dstBuffer, dstOffset, marker);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult GetCalibratedTimestampsEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
int timestampCount,
VkCalibratedTimestampInfoKHR* pTimestampInfos,
nint* pTimestamps,
nint* pMaxDeviation
)
{
return handle.PInvoke.vkGetCalibratedTimestampsEXT.Invoke(
handle.Handle,
timestampCount,
pTimestampInfos,
pTimestamps,
pMaxDeviation
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawMeshTasksNV.html">vkCmdDrawMeshTasksNV</see> - Draw mesh task work items
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawMeshTasksNV
/// </para>
/// <para>
/// To record a mesh tasks drawing command, call:
/// </para>
/// <code>
/// // Provided by VK_NV_mesh_shader
/// void vkCmdDrawMeshTasksNV(
/// VkCommandBuffer commandBuffer,
/// uint32_t taskCount,
/// uint32_t firstTask);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawMeshTasksNV<T>(this T handle, int taskCount, int firstTask)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawMeshTasksNV.Invoke(handle.Handle, taskCount, firstTask);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawMeshTasksIndirectNV.html">vkCmdDrawMeshTasksIndirectNV</see> - Issue an indirect mesh tasks draw into a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawMeshTasksIndirectNV
/// </para>
/// <para>
/// To record an indirect mesh tasks drawing command, call:
/// </para>
/// <code>
/// // Provided by VK_NV_mesh_shader
/// void vkCmdDrawMeshTasksIndirectNV(
/// VkCommandBuffer commandBuffer,
/// VkBuffer buffer,
/// VkDeviceSize offset,
/// uint32_t drawCount,
/// uint32_t stride);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawMeshTasksIndirectNV<T>(
this T handle,
VkBuffer buffer,
ByteSize64 offset,
int drawCount,
int stride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawMeshTasksIndirectNV.Invoke(handle.Handle, buffer, offset, drawCount, stride);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawMeshTasksIndirectCountNV.html">vkCmdDrawMeshTasksIndirectCountNV</see> - Perform an indirect mesh tasks draw with the draw count sourced from a buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawMeshTasksIndirectCountNV
/// </para>
/// <para>
/// To record an indirect mesh tasks drawing command with the draw count sourced
/// from a buffer, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawMeshTasksIndirectCountNV<T>(
this T handle,
VkBuffer buffer,
ByteSize64 offset,
VkBuffer countBuffer,
ByteSize64 countBufferOffset,
int maxDrawCount,
int stride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawMeshTasksIndirectCountNV.Invoke(
handle.Handle,
buffer,
offset,
countBuffer,
countBufferOffset,
maxDrawCount,
stride
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetExclusiveScissorEnableNV.html">vkCmdSetExclusiveScissorEnableNV</see> - Dynamically enable each exclusive scissor for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> whether an exclusive scissor
/// is enabled or not, call:
/// </para>
/// <code>
/// // Provided by VK_NV_scissor_exclusive
/// void vkCmdSetExclusiveScissorEnableNV(
/// VkCommandBuffer commandBuffer,
/// uint32_t firstExclusiveScissor,
/// uint32_t exclusiveScissorCount,
/// const VkBool32* pExclusiveScissorEnables);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetExclusiveScissorEnableNV<T>(
this T handle,
int firstExclusiveScissor,
scoped ReadOnlySpan<Brutal.Bool32> pExclusiveScissorEnables
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (Brutal.Bool32* pExclusiveScissorEnablesFixed = pExclusiveScissorEnables)
{
handle.PInvoke.vkCmdSetExclusiveScissorEnableNV.Invoke(
handle.Handle,
firstExclusiveScissor,
pExclusiveScissorEnables.Length,
pExclusiveScissorEnablesFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetExclusiveScissorNV.html">vkCmdSetExclusiveScissorNV</see> - Set exclusive scissor rectangles dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the exclusive scissor
/// rectangles, call:
/// </para>
/// <code>
/// // Provided by VK_NV_scissor_exclusive
/// void vkCmdSetExclusiveScissorNV(
/// VkCommandBuffer commandBuffer,
/// uint32_t firstExclusiveScissor,
/// uint32_t exclusiveScissorCount,
/// const VkRect2D* pExclusiveScissors);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetExclusiveScissorNV<T>(
this T handle,
int firstExclusiveScissor,
scoped ReadOnlySpan<VkRect2D> pExclusiveScissors
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkRect2D* pExclusiveScissorsFixed = pExclusiveScissors)
{
handle.PInvoke.vkCmdSetExclusiveScissorNV.Invoke(
handle.Handle,
firstExclusiveScissor,
pExclusiveScissors.Length,
pExclusiveScissorsFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetCheckpointNV.html">vkCmdSetCheckpointNV</see> - Insert diagnostic checkpoint in command stream
/// </summary>
/// <remarks>
/// <para>
/// Device diagnostic checkpoints are inserted into the command stream by
/// calling <c>vkCmdSetCheckpointNV</c>.
/// </para>
/// <code>
/// // Provided by VK_NV_device_diagnostic_checkpoints
/// void vkCmdSetCheckpointNV(
/// VkCommandBuffer commandBuffer,
/// const void* pCheckpointMarker);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetCheckpointNV<T>(this T handle, void* pCheckpointMarker)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetCheckpointNV.Invoke(handle.Handle, pCheckpointMarker);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetQueueCheckpointDataNV.html">vkGetQueueCheckpointDataNV</see> - Retrieve diagnostic checkpoint data
/// </summary>
/// <remarks>
/// <para>
/// If the device encounters an error during execution, the implementation will
/// return a <c>VK_ERROR_DEVICE_LOST</c> error to the application at a certain
/// point during host execution.
/// When this happens, the application <i>can</i> call
/// <c>vkGetQueueCheckpointDataNV</c> to retrieve information on the most recent
/// diagnostic checkpoints that were executed by the device.
/// </para>
/// <code>
/// // Provided by VK_NV_device_diagnostic_checkpoints
/// void vkGetQueueCheckpointDataNV(
/// VkQueue queue,
/// uint32_t* pCheckpointDataCount,
/// VkCheckpointDataNV* pCheckpointData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe void GetCheckpointDataNV(
this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> handle,
ref int pCheckpointDataCount,
scoped ReadOnlySpan<VkCheckpointDataNV> pCheckpointData
)
{
fixed (VkCheckpointDataNV* pCheckpointDataFixed = pCheckpointData)
fixed (int* pCheckpointDataCountFixed = &pCheckpointDataCount)
{
handle.PInvoke.vkGetQueueCheckpointDataNV.Invoke(
handle.Handle,
pCheckpointDataCountFixed,
pCheckpointDataFixed
);
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static int GetCheckpointDataNV_Count(this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> handle)
{
int pCheckpointDataCount = default;
GetCheckpointDataNV(handle, ref pCheckpointDataCount, null);
return pCheckpointDataCount;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pCheckpointData">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static void GetCheckpointDataNV_Write(
this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkCheckpointDataNV> pCheckpointData
)
{
int pCheckpointDataCount = pCheckpointData.Length;
GetCheckpointDataNV(handle, ref pCheckpointDataCount, pCheckpointData);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetQueueCheckpointData2NV.html">vkGetQueueCheckpointData2NV</see> - Retrieve diagnostic checkpoint data
/// </summary>
/// <remarks>
/// <para>
/// If the device encounters an error during execution, the implementation will
/// return a <c>VK_ERROR_DEVICE_LOST</c> error to the application at some point
/// during host execution.
/// When this happens, the application <i>can</i> call
/// <c>vkGetQueueCheckpointData2NV</c> to retrieve information on the most recent
/// diagnostic checkpoints that were executed by the device.
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe void GetCheckpointData2NV(
this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> handle,
ref int pCheckpointDataCount,
scoped ReadOnlySpan<VkCheckpointData2NV> pCheckpointData
)
{
fixed (VkCheckpointData2NV* pCheckpointDataFixed = pCheckpointData)
fixed (int* pCheckpointDataCountFixed = &pCheckpointDataCount)
{
handle.PInvoke.vkGetQueueCheckpointData2NV.Invoke(
handle.Handle,
pCheckpointDataCountFixed,
pCheckpointDataFixed
);
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static int GetCheckpointData2NV_Count(this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> handle)
{
int pCheckpointDataCount = default;
GetCheckpointData2NV(handle, ref pCheckpointDataCount, null);
return pCheckpointDataCount;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pCheckpointData">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static void GetCheckpointData2NV_Write(
this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkCheckpointData2NV> pCheckpointData
)
{
int pCheckpointDataCount = pCheckpointData.Length;
GetCheckpointData2NV(handle, ref pCheckpointDataCount, pCheckpointData);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkSetSwapchainPresentTimingQueueSizeEXT.html">vkSetSwapchainPresentTimingQueueSizeEXT</see> - Allocate memory for the swapchain-internal timing results queue
/// </summary>
/// <remarks>
/// <para>
/// In order to collect timing information about presentation, a swapchain needs
/// an internal queue to store asynchronously updated results until applications
/// collect them.
/// </para>
/// <para>
/// To allocate the swapchain&apos;s internal timing results queue, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_present_timing
/// VkResult vkSetSwapchainPresentTimingQueueSizeEXT(
/// VkDevice device,
/// VkSwapchainKHR swapchain,
/// uint32_t size);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static VkResult SetSwapchainPresentTimingQueueSizeEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetSwapchainTimingPropertiesEXT.html">vkGetSwapchainTimingPropertiesEXT</see> - Obtain the display timing properties of the PE&amp;apos;s display
/// </summary>
/// <remarks>
/// <para>
/// The implementation maintains an internal monotonically increasing counter
/// which updates when the presentation engine&apos;s timing properties are modified.
/// </para>
/// <para>
/// To query the presentation engine&apos;s current timing properties for a given
/// swapchain, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_present_timing
/// VkResult vkGetSwapchainTimingPropertiesEXT(
/// VkDevice device,
/// VkSwapchainKHR swapchain,
/// VkSwapchainTimingPropertiesEXT* pSwapchainTimingProperties,
/// uint64_t* pSwapchainTimingPropertiesCounter);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult GetSwapchainTimingPropertiesEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetSwapchainTimeDomainPropertiesEXT.html">vkGetSwapchainTimeDomainPropertiesEXT</see> - Obtain the time domains supported by the PE for the swapchain
/// </summary>
/// <remarks>
/// <para>
/// The implementation maintains an internal monotonically increasing counter
/// which updates when the presentation engine&apos;s list of supported time domains
/// for a swapchain is modified.
/// </para>
/// <para>
/// To query the time domains supported by the presentation engine for a given
/// swapchain, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_present_timing
/// VkResult vkGetSwapchainTimeDomainPropertiesEXT(
/// VkDevice device,
/// VkSwapchainKHR swapchain,
/// VkSwapchainTimeDomainPropertiesEXT* pSwapchainTimeDomainProperties,
/// uint64_t* pTimeDomainsCounter);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult GetSwapchainTimeDomainPropertiesEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetPastPresentationTimingEXT.html">vkGetPastPresentationTimingEXT</see> - Obtain timing of previously-presented images
/// </summary>
/// <remarks>
/// <para>
/// Because of the asynchronous nature of the presentation engine, the timing
/// information for a given <c>vkQueuePresentKHR</c> command may: only becomes
/// available some time after the presentation has occurred.
/// These time values <i>should</i> be asynchronously queried, and are returned if
/// available.
/// All time values are in nanoseconds, according to the time-domain being used.
/// </para>
/// <para>
/// To asynchronously query the presentation engine for newly-available timing
/// information about one or more previous presents to a given swapchain, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_present_timing
/// VkResult vkGetPastPresentationTimingEXT(
/// VkDevice device,
/// const VkPastPresentationTimingInfoEXT* pPastPresentationTimingInfo,
/// VkPastPresentationTimingPropertiesEXT* pPastPresentationTimingProperties);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult GetPastPresentationTimingEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkInitializePerformanceApiINTEL.html">vkInitializePerformanceApiINTEL</see> - Initialize a device for performance queries
/// </summary>
/// <remarks>
/// <para>
/// Prior to creating a performance query pool, initialize the device for
/// performance queries with the call:
/// </para>
/// <code>
/// // Provided by VK_INTEL_performance_query
/// VkResult vkInitializePerformanceApiINTEL(
/// VkDevice device,
/// const VkInitializePerformanceApiInfoINTEL* pInitializeInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void InitializePerformanceApiINTEL(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkUninitializePerformanceApiINTEL.html">vkUninitializePerformanceApiINTEL</see> - Uninitialize a device for performance queries
/// </summary>
/// <remarks>
/// <para>
/// Once performance query operations have completed, uninitialize the device
/// for performance queries with the call:
/// </para>
/// <code>
/// // Provided by VK_INTEL_performance_query
/// void vkUninitializePerformanceApiINTEL(
/// VkDevice device);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void UninitializePerformanceApiINTEL(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle
)
{
handle.PInvoke.vkUninitializePerformanceApiINTEL.Invoke(handle.Handle);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetPerformanceMarkerINTEL.html">vkCmdSetPerformanceMarkerINTEL</see> - Markers
/// </summary>
/// <remarks>
/// <para>
/// 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:
/// </para>
/// <code>
/// // Provided by VK_INTEL_performance_query
/// VkResult vkCmdSetPerformanceMarkerINTEL(
/// VkCommandBuffer commandBuffer,
/// const VkPerformanceMarkerInfoINTEL* pMarkerInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetPerformanceMarkerINTEL<T>(
this T handle,
in VkPerformanceMarkerInfoINTEL pMarkerInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetPerformanceStreamMarkerINTEL.html">vkCmdSetPerformanceStreamMarkerINTEL</see> - Markers
/// </summary>
/// <remarks>
/// <para>
/// 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.
/// </para>
/// <code>
/// // Provided by VK_INTEL_performance_query
/// VkResult vkCmdSetPerformanceStreamMarkerINTEL(
/// VkCommandBuffer commandBuffer,
/// const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetPerformanceStreamMarkerINTEL<T>(
this T handle,
in VkPerformanceStreamMarkerInfoINTEL pMarkerInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetPerformanceOverrideINTEL.html">vkCmdSetPerformanceOverrideINTEL</see> - Performance override settings
/// </summary>
/// <remarks>
/// <para>
/// 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 :
/// </para>
/// <code>
/// // Provided by VK_INTEL_performance_query
/// VkResult vkCmdSetPerformanceOverrideINTEL(
/// VkCommandBuffer commandBuffer,
/// const VkPerformanceOverrideInfoINTEL* pOverrideInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetPerformanceOverrideINTEL<T>(
this T handle,
in VkPerformanceOverrideInfoINTEL pOverrideInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkAcquirePerformanceConfigurationINTEL.html">vkAcquirePerformanceConfigurationINTEL</see> - Acquire the performance query capability
/// </summary>
/// <remarks>
/// <para>
/// To acquire a device performance configuration, call:
/// </para>
/// <code>
/// // Provided by VK_INTEL_performance_query
/// VkResult vkAcquirePerformanceConfigurationINTEL(
/// VkDevice device,
/// const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo,
/// VkPerformanceConfigurationINTEL* pConfiguration);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void AcquirePerformanceConfigurationINTEL(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkReleasePerformanceConfigurationINTEL.html">vkReleasePerformanceConfigurationINTEL</see> - Release a configuration to capture performance data
/// </summary>
/// <remarks>
/// <para>
/// To release a device performance configuration, call:
/// </para>
/// <code>
/// // Provided by VK_INTEL_performance_query
/// VkResult vkReleasePerformanceConfigurationINTEL(
/// VkDevice device,
/// VkPerformanceConfigurationINTEL configuration);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ReleasePerformanceConfigurationINTEL(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueueSetPerformanceConfigurationINTEL.html">vkQueueSetPerformanceConfigurationINTEL</see> - Set a performance query
/// </summary>
/// <remarks>
/// <para>
/// To set a performance configuration, call:
/// </para>
/// <code>
/// // Provided by VK_INTEL_performance_query
/// VkResult vkQueueSetPerformanceConfigurationINTEL(
/// VkQueue queue,
/// VkPerformanceConfigurationINTEL configuration);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetPerformanceConfigurationINTEL(
this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetPerformanceParameterINTEL.html">vkGetPerformanceParameterINTEL</see> - Query performance capabilities of the device
/// </summary>
/// <remarks>
/// <para>
/// Some performance query features of a device can be discovered with the call:
/// </para>
/// <code>
/// // Provided by VK_INTEL_performance_query
/// VkResult vkGetPerformanceParameterINTEL(
/// VkDevice device,
/// VkPerformanceParameterTypeINTEL parameter,
/// VkPerformanceValueINTEL* pValue);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetPerformanceParameterINTEL(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkPerformanceValueINTEL.</returns>
public static VkPerformanceValueINTEL GetPerformanceParameterINTEL(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPerformanceParameterTypeINTEL parameter
)
{
VkPerformanceValueINTEL outValue = new();
GetPerformanceParameterINTEL(handle, parameter, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkSetLocalDimmingAMD.html">vkSetLocalDimmingAMD</see> - Set Local Dimming
/// </summary>
/// <remarks>
/// <para>
/// The local dimming HDR setting may also be changed over the life of a
/// swapchain by calling:
/// </para>
/// <code>
/// // Provided by VK_AMD_display_native_hdr
/// void vkSetLocalDimmingAMD(
/// VkDevice device,
/// VkSwapchainKHR swapChain,
/// VkBool32 localDimmingEnable);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetLocalDimmingAMD(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSwapchainKHR swapChain,
Brutal.Bool32 localDimmingEnable
)
{
handle.PInvoke.vkSetLocalDimmingAMD.Invoke(handle.Handle, swapChain, localDimmingEnable);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkDeviceAddress GetBufferDeviceAddressEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkBufferDeviceAddressInfo pInfo
)
{
fixed (VkBufferDeviceAddressInfo* pInfoFixed = &pInfo)
{
return handle.PInvoke.vkGetBufferDeviceAddressEXT.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetLineStippleEXT<T>(this T handle, int lineStippleFactor, ushort lineStipplePattern)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetLineStippleEXT.Invoke(handle.Handle, lineStippleFactor, lineStipplePattern);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ResetQueryPoolEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkQueryPool queryPool,
int firstQuery,
int queryCount
)
{
handle.PInvoke.vkResetQueryPoolEXT.Invoke(handle.Handle, queryPool, firstQuery, queryCount);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetCullModeEXT<T>(this T handle, VkCullModeFlags cullMode)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetCullModeEXT.Invoke(handle.Handle, cullMode);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetFrontFaceEXT<T>(this T handle, VkFrontFace frontFace)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetFrontFaceEXT.Invoke(handle.Handle, frontFace);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetPrimitiveTopologyEXT<T>(this T handle, VkPrimitiveTopology primitiveTopology)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetPrimitiveTopologyEXT.Invoke(handle.Handle, primitiveTopology);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetViewportWithCountEXT<T>(this T handle, int viewportCount, VkViewport* pViewports)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetViewportWithCountEXT.Invoke(handle.Handle, viewportCount, pViewports);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetScissorWithCountEXT<T>(this T handle, int scissorCount, VkRect2D* pScissors)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetScissorWithCountEXT.Invoke(handle.Handle, scissorCount, pScissors);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindVertexBuffers2EXT<T>(
this T handle,
int firstBinding,
int bindingCount,
VkBuffer* pBuffers,
ByteSize64* pOffsets,
ByteSize64* pSizes,
ByteSize64* pStrides
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdBindVertexBuffers2EXT.Invoke(
handle.Handle,
firstBinding,
bindingCount,
pBuffers,
pOffsets,
pSizes,
pStrides
);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDepthTestEnableEXT<T>(this T handle, Brutal.Bool32 depthTestEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDepthTestEnableEXT.Invoke(handle.Handle, depthTestEnable);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDepthWriteEnableEXT<T>(this T handle, Brutal.Bool32 depthWriteEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDepthWriteEnableEXT.Invoke(handle.Handle, depthWriteEnable);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDepthCompareOpEXT<T>(this T handle, VkCompareOp depthCompareOp)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDepthCompareOpEXT.Invoke(handle.Handle, depthCompareOp);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDepthBoundsTestEnableEXT<T>(this T handle, Brutal.Bool32 depthBoundsTestEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDepthBoundsTestEnableEXT.Invoke(handle.Handle, depthBoundsTestEnable);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetStencilTestEnableEXT<T>(this T handle, Brutal.Bool32 stencilTestEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetStencilTestEnableEXT.Invoke(handle.Handle, stencilTestEnable);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetStencilOpEXT<T>(
this T handle,
VkStencilFaceFlags faceMask,
VkStencilOp failOp,
VkStencilOp passOp,
VkStencilOp depthFailOp,
VkCompareOp compareOp
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetStencilOpEXT.Invoke(handle.Handle, faceMask, failOp, passOp, depthFailOp, compareOp);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CopyMemoryToImageEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkCopyMemoryToImageInfo pCopyMemoryToImageInfo
)
{
fixed (VkCopyMemoryToImageInfo* pCopyMemoryToImageInfoFixed = &pCopyMemoryToImageInfo)
{
return handle.PInvoke.vkCopyMemoryToImageEXT.Invoke(handle.Handle, pCopyMemoryToImageInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CopyImageToMemoryEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkCopyImageToMemoryInfo pCopyImageToMemoryInfo
)
{
fixed (VkCopyImageToMemoryInfo* pCopyImageToMemoryInfoFixed = &pCopyImageToMemoryInfo)
{
return handle.PInvoke.vkCopyImageToMemoryEXT.Invoke(handle.Handle, pCopyImageToMemoryInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CopyImageToImageEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkCopyImageToImageInfo pCopyImageToImageInfo
)
{
fixed (VkCopyImageToImageInfo* pCopyImageToImageInfoFixed = &pCopyImageToImageInfo)
{
return handle.PInvoke.vkCopyImageToImageEXT.Invoke(handle.Handle, pCopyImageToImageInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult TransitionImageLayoutEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
int transitionCount,
VkHostImageLayoutTransitionInfo* pTransitions
)
{
return handle.PInvoke.vkTransitionImageLayoutEXT.Invoke(handle.Handle, transitionCount, pTransitions);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetImageSubresourceLayout2EXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkImage image,
VkImageSubresource2* pSubresource,
ref VkSubresourceLayout2 pLayout
)
{
fixed (VkSubresourceLayout2* pLayoutFixed = &pLayout)
{
handle.PInvoke.vkGetImageSubresourceLayout2EXT.Invoke(handle.Handle, image, pSubresource, pLayoutFixed);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkSubresourceLayout2.</returns>
public static unsafe VkSubresourceLayout2 GetImageSubresourceLayout2EXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkImage image,
VkImageSubresource2* pSubresource
)
{
VkSubresourceLayout2 outValue = new();
GetImageSubresourceLayout2EXT(handle, image, pSubresource, ref outValue);
return outValue;
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult ReleaseSwapchainImagesEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkReleaseSwapchainImagesInfoKHR pReleaseInfo
)
{
fixed (VkReleaseSwapchainImagesInfoKHR* pReleaseInfoFixed = &pReleaseInfo)
{
return handle.PInvoke.vkReleaseSwapchainImagesEXT.Invoke(handle.Handle, pReleaseInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetGeneratedCommandsMemoryRequirementsNV.html">vkGetGeneratedCommandsMemoryRequirementsNV</see> - Retrieve the buffer allocation requirements for generated commands
/// </summary>
/// <remarks>
/// <para>
/// With `<c>VK_NV_device_generated_commands</c>`, to retrieve the memory size
/// and alignment requirements of a particular execution state call:
/// </para>
/// <code>
/// // Provided by VK_NV_device_generated_commands
/// void vkGetGeneratedCommandsMemoryRequirementsNV(
/// VkDevice device,
/// const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo,
/// VkMemoryRequirements2* pMemoryRequirements);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetGeneratedCommandsMemoryRequirementsNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkGeneratedCommandsMemoryRequirementsInfoNV pInfo,
ref VkMemoryRequirements2 pMemoryRequirements
)
{
fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements)
fixed (VkGeneratedCommandsMemoryRequirementsInfoNV* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetGeneratedCommandsMemoryRequirementsNV.Invoke(
handle.Handle,
pInfoFixed,
pMemoryRequirementsFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryRequirements2.</returns>
public static VkMemoryRequirements2 GetGeneratedCommandsMemoryRequirementsNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkGeneratedCommandsMemoryRequirementsInfoNV pInfo
)
{
VkMemoryRequirements2 outValue = new();
GetGeneratedCommandsMemoryRequirementsNV(handle, pInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPreprocessGeneratedCommandsNV.html">vkCmdPreprocessGeneratedCommandsNV</see> - Performs preprocessing for generated commands
/// </summary>
/// <remarks>
/// <para>
/// Commands <i>can</i> be preprocessed prior execution using the following command:
/// </para>
/// <code>
/// // Provided by VK_NV_device_generated_commands
/// void vkCmdPreprocessGeneratedCommandsNV(
/// VkCommandBuffer commandBuffer,
/// const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void PreprocessGeneratedCommandsNV<T>(
this T handle,
in VkGeneratedCommandsInfoNV pGeneratedCommandsInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkGeneratedCommandsInfoNV* pGeneratedCommandsInfoFixed = &pGeneratedCommandsInfo)
{
handle.PInvoke.vkCmdPreprocessGeneratedCommandsNV.Invoke(handle.Handle, pGeneratedCommandsInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdExecuteGeneratedCommandsNV.html">vkCmdExecuteGeneratedCommandsNV</see> - Generate and execute commands on the device
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdExecuteGeneratedCommandsNV
/// </para>
/// <para>
/// With `<c>VK_NV_device_generated_commands</c>`, the actual generation of
/// commands as well as their execution on the device is handled as single
/// action with:
/// </para>
/// <code>
/// // Provided by VK_NV_device_generated_commands
/// void vkCmdExecuteGeneratedCommandsNV(
/// VkCommandBuffer commandBuffer,
/// VkBool32 isPreprocessed,
/// const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void ExecuteGeneratedCommandsNV<T>(
this T handle,
Brutal.Bool32 isPreprocessed,
in VkGeneratedCommandsInfoNV pGeneratedCommandsInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkGeneratedCommandsInfoNV* pGeneratedCommandsInfoFixed = &pGeneratedCommandsInfo)
{
handle.PInvoke.vkCmdExecuteGeneratedCommandsNV.Invoke(
handle.Handle,
isPreprocessed,
pGeneratedCommandsInfoFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindPipelineShaderGroupNV.html">vkCmdBindPipelineShaderGroupNV</see> - Bind a pipeline object
/// </summary>
/// <remarks>
/// <para>
/// For pipelines that were created with the support of multiple shader groups
/// (see <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#graphics-shadergroups">Graphics Pipeline Shader Groups^</see>), the regular
/// <c>vkCmdBindPipeline</c> command will bind Shader Group `0`.
/// To explicitly bind a shader group use:
/// </para>
/// <code>
/// // Provided by VK_NV_device_generated_commands
/// void vkCmdBindPipelineShaderGroupNV(
/// VkCommandBuffer commandBuffer,
/// VkPipelineBindPoint pipelineBindPoint,
/// VkPipeline pipeline,
/// uint32_t groupIndex);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void BindPipelineShaderGroupNV<T>(
this T handle,
VkPipelineBindPoint pipelineBindPoint,
VkPipeline pipeline,
int groupIndex
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdBindPipelineShaderGroupNV.Invoke(
handle.Handle,
pipelineBindPoint,
pipeline,
groupIndex
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateIndirectCommandsLayoutNV.html">vkCreateIndirectCommandsLayoutNV</see> - Create an indirect command layout object
/// </summary>
/// <remarks>
/// <para>
/// Indirect command layouts for `<c>VK_NV_device_generated_commands</c>` are
/// created by:
/// </para>
/// <code>
/// // Provided by VK_NV_device_generated_commands
/// VkResult vkCreateIndirectCommandsLayoutNV(
/// VkDevice device,
/// const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkIndirectCommandsLayoutNV* pIndirectCommandsLayout);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkIndirectCommandsLayoutNV CreateIndirectCommandsLayoutNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyIndirectCommandsLayoutNV.html">vkDestroyIndirectCommandsLayoutNV</see> - Destroy an indirect commands layout
/// </summary>
/// <remarks>
/// <para>
/// Indirect command layouts for `<c>VK_NV_device_generated_commands</c>` are
/// destroyed by:
/// </para>
/// <code>
/// // Provided by VK_NV_device_generated_commands
/// void vkDestroyIndirectCommandsLayoutNV(
/// VkDevice device,
/// VkIndirectCommandsLayoutNV indirectCommandsLayout,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyIndirectCommandsLayoutNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkIndirectCommandsLayoutNV indirectCommandsLayout,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyIndirectCommandsLayoutNV.Invoke(handle.Handle, indirectCommandsLayout, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDepthBias2EXT.html">vkCmdSetDepthBias2EXT</see> - Set depth bias factors and clamp dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the depth bias parameters,
/// call:
/// </para>
/// <code>
/// // Provided by VK_EXT_depth_bias_control
/// void vkCmdSetDepthBias2EXT(
/// VkCommandBuffer commandBuffer,
/// const VkDepthBiasInfoEXT* pDepthBiasInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetDepthBias2EXT<T>(this T handle, in VkDepthBiasInfoEXT pDepthBiasInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDepthBiasInfoEXT* pDepthBiasInfoFixed = &pDepthBiasInfo)
{
handle.PInvoke.vkCmdSetDepthBias2EXT.Invoke(handle.Handle, pDepthBiasInfoFixed);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CreatePrivateDataSlotEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkPrivateDataSlotCreateInfo pCreateInfo,
VkAllocator? pAllocator,
VkPrivateDataSlot* pPrivateDataSlot
)
{
fixed (VkPrivateDataSlotCreateInfo* pCreateInfoFixed = &pCreateInfo)
{
return handle.PInvoke.vkCreatePrivateDataSlotEXT.Invoke(
handle.Handle,
pCreateInfoFixed,
pAllocator,
pPrivateDataSlot
);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyPrivateDataSlotEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPrivateDataSlot privateDataSlot,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyPrivateDataSlotEXT.Invoke(handle.Handle, privateDataSlot, pAllocator);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static VkResult SetPrivateDataEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkObjectType objectType,
nint objectHandle,
VkPrivateDataSlot privateDataSlot,
nint data
)
{
return handle.PInvoke.vkSetPrivateDataEXT.Invoke(
handle.Handle,
objectType,
objectHandle,
privateDataSlot,
data
);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe nint GetPrivateDataEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkObjectType objectType,
nint objectHandle,
VkPrivateDataSlot privateDataSlot
)
{
nint pDataLocal = default;
handle.PInvoke.vkGetPrivateDataEXT.Invoke(
handle.Handle,
objectType,
objectHandle,
privateDataSlot,
&pDataLocal
);
return pDataLocal;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueueSetPerfHintQCOM.html">vkQueueSetPerfHintQCOM</see> - Set a performance hint on a queue
/// </summary>
/// <remarks>
/// <para>
/// To set a performance hint on a <c>VkQueue</c> object, call:
/// </para>
/// <code>
/// // Provided by VK_QCOM_queue_perf_hint
/// VkResult vkQueueSetPerfHintQCOM(
/// VkQueue queue,
/// const VkPerfHintInfoQCOM* pPerfHintInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetPerfHintQCOM(
this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDispatchTileQCOM.html">vkCmdDispatchTileQCOM</see> - Dispatch per-tile work items
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDispatchTileQCOM
/// </para>
/// <para>
/// To record an area-based dispatch, call:
/// </para>
/// <code>
/// // Provided by VK_QCOM_tile_shading
/// void vkCmdDispatchTileQCOM(
/// VkCommandBuffer commandBuffer,
/// const VkDispatchTileInfoQCOM* pDispatchTileInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DispatchTileQCOM<T>(this T handle, in VkDispatchTileInfoQCOM pDispatchTileInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDispatchTileInfoQCOM* pDispatchTileInfoFixed = &pDispatchTileInfo)
{
handle.PInvoke.vkCmdDispatchTileQCOM.Invoke(handle.Handle, pDispatchTileInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBeginPerTileExecutionQCOM.html">vkCmdBeginPerTileExecutionQCOM</see> - Begin per-tile execution mode
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBeginPerTileExecutionQCOM
/// </para>
/// <para>
/// To enable the per-tile execution model, call:
/// </para>
/// <code>
/// // Provided by VK_QCOM_tile_shading
/// void vkCmdBeginPerTileExecutionQCOM(
/// VkCommandBuffer commandBuffer,
/// const VkPerTileBeginInfoQCOM* pPerTileBeginInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BeginPerTileExecutionQCOM<T>(
this T handle,
in VkPerTileBeginInfoQCOM pPerTileBeginInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkPerTileBeginInfoQCOM* pPerTileBeginInfoFixed = &pPerTileBeginInfo)
{
handle.PInvoke.vkCmdBeginPerTileExecutionQCOM.Invoke(handle.Handle, pPerTileBeginInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEndPerTileExecutionQCOM.html">vkCmdEndPerTileExecutionQCOM</see> - End per-tile execution mode
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdEndPerTileExecutionQCOM
/// </para>
/// <para>
/// To disable per-tile execution model, call:
/// </para>
/// <code>
/// // Provided by VK_QCOM_tile_shading
/// void vkCmdEndPerTileExecutionQCOM(
/// VkCommandBuffer commandBuffer,
/// const VkPerTileEndInfoQCOM* pPerTileEndInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void EndPerTileExecutionQCOM<T>(this T handle, in VkPerTileEndInfoQCOM pPerTileEndInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkPerTileEndInfoQCOM* pPerTileEndInfoFixed = &pPerTileEndInfo)
{
handle.PInvoke.vkCmdEndPerTileExecutionQCOM.Invoke(handle.Handle, pPerTileEndInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkSetLatencySleepModeLegacyNV.html">vkSetLatencySleepModeLegacyNV</see> - Stub description of vkSetLatencySleepModeLegacyNV
/// </summary>
/// <remarks>
/// <para>
/// This is an undocumented legacy function and is superseded by the
/// <c>VK_NV_low_latency2</c> extension.
/// </para>
/// <code>
/// // Provided by VK_NV_low_latency
/// void vkSetLatencySleepModeLegacyNV(
/// VkDevice device,
/// VkBool32 lowLatencyMode,
/// VkBool32 lowLatencyBoost,
/// uint32_t minimumIntervalUs);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetLatencySleepModeLegacyNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
Brutal.Bool32 lowLatencyMode,
Brutal.Bool32 lowLatencyBoost,
int minimumIntervalUs
)
{
handle.PInvoke.vkSetLatencySleepModeLegacyNV.Invoke(
handle.Handle,
lowLatencyMode,
lowLatencyBoost,
minimumIntervalUs
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkLatencySleepLegacyNV.html">vkLatencySleepLegacyNV</see> - Stub description of vkLatencySleepLegacyNV
/// </summary>
/// <remarks>
/// <para>
/// This is an undocumented legacy function and is superseded by the
/// <c>VK_NV_low_latency2</c> extension.
/// </para>
/// <code>
/// // Provided by VK_NV_low_latency
/// void vkLatencySleepLegacyNV(
/// VkDevice device,
/// VkSemaphore signalSemaphore,
/// uint64_t value);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void LatencySleepLegacyNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSemaphore signalSemaphore,
nint value
)
{
handle.PInvoke.vkLatencySleepLegacyNV.Invoke(handle.Handle, signalSemaphore, value);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkSetLatencyMarkerLegacyNV.html">vkSetLatencyMarkerLegacyNV</see> - Stub description of vkSetLatencyMarkerLegacyNV
/// </summary>
/// <remarks>
/// <para>
/// This is an undocumented legacy function and is superseded by the
/// <c>VK_NV_low_latency2</c> extension.
/// </para>
/// <code>
/// // Provided by VK_NV_low_latency
/// void vkSetLatencyMarkerLegacyNV(
/// VkDevice device,
/// uint64_t frameID,
/// uint32_t marker);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetLatencyMarkerLegacyNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
nint frameID,
int marker
)
{
handle.PInvoke.vkSetLatencyMarkerLegacyNV.Invoke(handle.Handle, frameID, marker);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetLatencyTimingsLegacyNV.html">vkGetLatencyTimingsLegacyNV</see> - Stub description of vkGetLatencyTimingsLegacyNV
/// </summary>
/// <remarks>
/// <para>
/// This is an undocumented legacy function and is superseded by the
/// <c>VK_NV_low_latency2</c> extension.
/// </para>
/// <code>
/// // Provided by VK_NV_low_latency
/// void vkGetLatencyTimingsLegacyNV(
/// VkDevice device,
/// void* pTimings);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void* GetLatencyTimingsLegacyNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle
)
{
void* pTimingsLocal = default;
handle.PInvoke.vkGetLatencyTimingsLegacyNV.Invoke(handle.Handle, pTimingsLocal);
return pTimingsLocal;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueueNotifyOutOfBandLegacyNV.html">vkQueueNotifyOutOfBandLegacyNV</see> - Stub description of vkQueueNotifyOutOfBandLegacyNV
/// </summary>
/// <remarks>
/// <para>
/// This is an undocumented legacy function and is superseded by the
/// <c>VK_NV_low_latency2</c> extension.
/// </para>
/// <code>
/// // Provided by VK_NV_low_latency
/// void vkQueueNotifyOutOfBandLegacyNV(
/// VkQueue queue,
/// uint32_t queueType);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void NotifyOutOfBandLegacyNV(
this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> handle,
int queueType
)
{
handle.PInvoke.vkQueueNotifyOutOfBandLegacyNV.Invoke(handle.Handle, queueType);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetSleepStatusLegacyNV.html">vkGetSleepStatusLegacyNV</see> - Stub description of vkGetSleepStatusLegacyNV
/// </summary>
/// <remarks>
/// <para>
/// This is an undocumented legacy function and is superseded by the
/// <c>VK_NV_low_latency2</c> extension.
/// </para>
/// <code>
/// // Provided by VK_NV_low_latency
/// void vkGetSleepStatusLegacyNV(
/// VkDevice device,
/// VkBool32* pLowLatencyMode);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe Brutal.Bool32 GetSleepStatusLegacyNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle
)
{
Brutal.Bool32 pLowLatencyModeLocal = default;
handle.PInvoke.vkGetSleepStatusLegacyNV.Invoke(handle.Handle, &pLowLatencyModeLocal);
return pLowLatencyModeLocal;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkShutdownLatencyDeviceLegacyNV.html">vkShutdownLatencyDeviceLegacyNV</see> - Stub description of vkShutdownLatencyDeviceLegacyNV
/// </summary>
/// <remarks>
/// <para>
/// This is an undocumented legacy function and is superseded by the
/// <c>VK_NV_low_latency2</c> extension.
/// </para>
/// <code>
/// // Provided by VK_NV_low_latency
/// void vkShutdownLatencyDeviceLegacyNV(
/// VkDevice device);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ShutdownLatencyDeviceLegacyNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle
)
{
handle.PInvoke.vkShutdownLatencyDeviceLegacyNV.Invoke(handle.Handle);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDescriptorSetLayoutSizeEXT.html">vkGetDescriptorSetLayoutSizeEXT</see> - Get the size of a descriptor set layout in memory
/// </summary>
/// <remarks>
/// <para>
/// To determine the amount of memory needed to store all descriptors with a
/// given layout, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_buffer
/// void vkGetDescriptorSetLayoutSizeEXT(
/// VkDevice device,
/// VkDescriptorSetLayout layout,
/// VkDeviceSize* pLayoutSizeInBytes);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe ByteSize64 GetDescriptorSetLayoutSizeEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDescriptorSetLayout layout
)
{
ByteSize64 pLayoutSizeInBytesLocal = default;
handle.PInvoke.vkGetDescriptorSetLayoutSizeEXT.Invoke(handle.Handle, layout, &pLayoutSizeInBytesLocal);
return pLayoutSizeInBytesLocal;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDescriptorSetLayoutBindingOffsetEXT.html">vkGetDescriptorSetLayoutBindingOffsetEXT</see> - Get the offset of a binding within a descriptor set layout
/// </summary>
/// <remarks>
/// <para>
/// To get the offset of a binding within a descriptor set layout in memory,
/// call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_buffer
/// void vkGetDescriptorSetLayoutBindingOffsetEXT(
/// VkDevice device,
/// VkDescriptorSetLayout layout,
/// uint32_t binding,
/// VkDeviceSize* pOffset);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe ByteSize64 GetDescriptorSetLayoutBindingOffsetEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDescriptorSetLayout layout,
int binding
)
{
ByteSize64 pOffsetLocal = default;
handle.PInvoke.vkGetDescriptorSetLayoutBindingOffsetEXT.Invoke(
handle.Handle,
layout,
binding,
&pOffsetLocal
);
return pOffsetLocal;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDescriptorEXT.html">vkGetDescriptorEXT</see> - To get a descriptor to place in a buffer
/// </summary>
/// <remarks>
/// <para>
/// To get descriptor data to place in a buffer, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_buffer
/// void vkGetDescriptorEXT(
/// VkDevice device,
/// const VkDescriptorGetInfoEXT* pDescriptorInfo,
/// size_t dataSize,
/// void* pDescriptor);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetDescriptorEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDescriptorGetInfoEXT pDescriptorInfo,
scoped ReadOnlySpan<byte> pDescriptor
)
{
fixed (byte* pDescriptorFixed = pDescriptor)
fixed (VkDescriptorGetInfoEXT* pDescriptorInfoFixed = &pDescriptorInfo)
{
handle.PInvoke.vkGetDescriptorEXT.Invoke(
handle.Handle,
pDescriptorInfoFixed,
(nuint)pDescriptor.Length,
pDescriptorFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindDescriptorBuffersEXT.html">vkCmdBindDescriptorBuffersEXT</see> - Binding descriptor buffers to a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBindDescriptorBuffersEXT
/// </para>
/// <para>
/// To bind descriptor buffers to a command buffer, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_buffer
/// void vkCmdBindDescriptorBuffersEXT(
/// VkCommandBuffer commandBuffer,
/// uint32_t bufferCount,
/// const VkDescriptorBufferBindingInfoEXT* pBindingInfos);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindDescriptorBuffersEXT<T>(
this T handle,
scoped ReadOnlySpan<VkDescriptorBufferBindingInfoEXT> pBindingInfos
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDescriptorBufferBindingInfoEXT* pBindingInfosFixed = pBindingInfos)
{
handle.PInvoke.vkCmdBindDescriptorBuffersEXT.Invoke(
handle.Handle,
pBindingInfos.Length,
pBindingInfosFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDescriptorBufferOffsetsEXT.html">vkCmdSetDescriptorBufferOffsetsEXT</see> - Setting descriptor buffer offsets in a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdSetDescriptorBufferOffsetsEXT
/// </para>
/// <para>
/// To set descriptor buffer offsets in a command buffer, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetDescriptorBufferOffsetsEXT<T>(
this T handle,
VkPipelineBindPoint pipelineBindPoint,
VkPipelineLayout layout,
int firstSet,
scoped ReadOnlySpan<int> pBufferIndices,
scoped ReadOnlySpan<ByteSize64> pOffsets
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (ByteSize64* pOffsetsFixed = pOffsets)
fixed (int* pBufferIndicesFixed = pBufferIndices)
{
handle.PInvoke.vkCmdSetDescriptorBufferOffsetsEXT.Invoke(
handle.Handle,
pipelineBindPoint,
layout,
firstSet,
pBufferIndices.Length,
pBufferIndicesFixed,
pOffsetsFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindDescriptorBufferEmbeddedSamplersEXT.html">vkCmdBindDescriptorBufferEmbeddedSamplersEXT</see> - Setting embedded immutable samplers offsets in a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBindDescriptorBufferEmbeddedSamplersEXT
/// </para>
/// <para>
/// To bind an embedded immutable sampler set to a command buffer, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_buffer
/// void vkCmdBindDescriptorBufferEmbeddedSamplersEXT(
/// VkCommandBuffer commandBuffer,
/// VkPipelineBindPoint pipelineBindPoint,
/// VkPipelineLayout layout,
/// uint32_t set);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void BindDescriptorBufferEmbeddedSamplersEXT<T>(
this T handle,
VkPipelineBindPoint pipelineBindPoint,
VkPipelineLayout layout,
int set
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdBindDescriptorBufferEmbeddedSamplersEXT.Invoke(
handle.Handle,
pipelineBindPoint,
layout,
set
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetBufferOpaqueCaptureDescriptorDataEXT.html">vkGetBufferOpaqueCaptureDescriptorDataEXT</see> - Get buffer opaque capture descriptor data
/// </summary>
/// <remarks>
/// <para>
/// To get the opaque descriptor data for a buffer, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_buffer
/// VkResult vkGetBufferOpaqueCaptureDescriptorDataEXT(
/// VkDevice device,
/// const VkBufferCaptureDescriptorDataInfoEXT* pInfo,
/// void* pData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void* GetBufferOpaqueCaptureDescriptorDataEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetImageOpaqueCaptureDescriptorDataEXT.html">vkGetImageOpaqueCaptureDescriptorDataEXT</see> - Get image opaque capture descriptor data
/// </summary>
/// <remarks>
/// <para>
/// To get the opaque capture descriptor data for an image, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_buffer
/// VkResult vkGetImageOpaqueCaptureDescriptorDataEXT(
/// VkDevice device,
/// const VkImageCaptureDescriptorDataInfoEXT* pInfo,
/// void* pData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void* GetImageOpaqueCaptureDescriptorDataEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetImageViewOpaqueCaptureDescriptorDataEXT.html">vkGetImageViewOpaqueCaptureDescriptorDataEXT</see> - Get image view opaque capture descriptor data
/// </summary>
/// <remarks>
/// <para>
/// To get the opaque capture descriptor data for an image view, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_buffer
/// VkResult vkGetImageViewOpaqueCaptureDescriptorDataEXT(
/// VkDevice device,
/// const VkImageViewCaptureDescriptorDataInfoEXT* pInfo,
/// void* pData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void* GetImageViewOpaqueCaptureDescriptorDataEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetSamplerOpaqueCaptureDescriptorDataEXT.html">vkGetSamplerOpaqueCaptureDescriptorDataEXT</see> - Get sampler opaque capture descriptor data
/// </summary>
/// <remarks>
/// <para>
/// To get the opaque capture descriptor data for a sampler, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_buffer
/// VkResult vkGetSamplerOpaqueCaptureDescriptorDataEXT(
/// VkDevice device,
/// const VkSamplerCaptureDescriptorDataInfoEXT* pInfo,
/// void* pData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void* GetSamplerOpaqueCaptureDescriptorDataEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT.html">vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT</see> - Get acceleration structure opaque capture descriptor data
/// </summary>
/// <remarks>
/// <para>
/// To get the opaque capture descriptor data for an acceleration structure,
/// call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void* GetAccelerationStructureOpaqueCaptureDescriptorDataEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetFragmentShadingRateEnumNV.html">vkCmdSetFragmentShadingRateEnumNV</see> - Set pipeline fragment shading rate dynamically for a command buffer using enums
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the pipeline fragment
/// shading rate and combiner operation, call:
/// </para>
/// <code>
/// // Provided by VK_NV_fragment_shading_rate_enums
/// void vkCmdSetFragmentShadingRateEnumNV(
/// VkCommandBuffer commandBuffer,
/// VkFragmentShadingRateNV shadingRate,
/// const VkFragmentShadingRateCombinerOpKHR combinerOps[2]);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetFragmentShadingRateEnumNV<T>(
this T handle,
VkFragmentShadingRateNV shadingRate,
VkFragmentShadingRateCombinerOpKHR* combinerOps
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetFragmentShadingRateEnumNV.Invoke(handle.Handle, shadingRate, combinerOps);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceFaultInfoEXT.html">vkGetDeviceFaultInfoEXT</see> - Reports fault information for the specified device
/// </summary>
/// <remarks>
/// <para>
/// To retrieve diagnostic information about faults that may: have caused device
/// loss, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_device_fault
/// VkResult vkGetDeviceFaultInfoEXT(
/// VkDevice device,
/// VkDeviceFaultCountsEXT* pFaultCounts,
/// VkDeviceFaultInfoEXT* pFaultInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult GetFaultInfoEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetVertexInputEXT.html">vkCmdSetVertexInputEXT</see> - Set the vertex input state dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the vertex input attribute
/// and vertex input binding descriptions, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetVertexInputEXT<T>(
this T handle,
scoped ReadOnlySpan<VkVertexInputBindingDescription2EXT> pVertexBindingDescriptions,
scoped ReadOnlySpan<VkVertexInputAttributeDescription2EXT> pVertexAttributeDescriptions
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (
VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptionsFixed = pVertexAttributeDescriptions
)
fixed (VkVertexInputBindingDescription2EXT* pVertexBindingDescriptionsFixed = pVertexBindingDescriptions)
{
handle.PInvoke.vkCmdSetVertexInputEXT.Invoke(
handle.Handle,
pVertexBindingDescriptions.Length,
pVertexBindingDescriptionsFixed,
pVertexAttributeDescriptions.Length,
pVertexAttributeDescriptionsFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI.html">vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI</see> - Query maximum supported subpass shading workgroup size for a give render pass
/// </summary>
/// <remarks>
/// <para>
/// A subpass shading pipeline&apos;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.
/// </para>
/// <para>
/// To query the maximum workgroup size, call:
/// </para>
/// <code>
/// // Provided by VK_HUAWEI_subpass_shading
/// VkResult vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(
/// VkDevice device,
/// VkRenderPass renderpass,
/// VkExtent2D* pMaxWorkgroupSize);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetSubpassShadingMaxWorkgroupSizeHUAWEI(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkRenderPass renderpass,
scoped ReadOnlySpan<VkExtent2D> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSubpassShadingHUAWEI.html">vkCmdSubpassShadingHUAWEI</see> - Dispatch compute work items
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdSubpassShadingHUAWEI
/// </para>
/// <para>
/// 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 <c>subpassLoad</c> are allowed to be used.
/// </para>
/// <para>
/// To record a subpass shading, call:
/// </para>
/// <code>
/// // Provided by VK_HUAWEI_subpass_shading
/// void vkCmdSubpassShadingHUAWEI(
/// VkCommandBuffer commandBuffer);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SubpassShadingHUAWEI<T>(this T handle)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSubpassShadingHUAWEI.Invoke(handle.Handle);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindInvocationMaskHUAWEI.html">vkCmdBindInvocationMaskHUAWEI</see> - Bind an invocation mask image on a command buffer
/// </summary>
/// <remarks>
/// <para>
/// When invocation mask image usage is enabled in the bound ray tracing
/// pipeline, the pipeline uses an invocation mask image specified by the
/// command:
/// </para>
/// <code>
/// // Provided by VK_HUAWEI_invocation_mask
/// void vkCmdBindInvocationMaskHUAWEI(
/// VkCommandBuffer commandBuffer,
/// VkImageView imageView,
/// VkImageLayout imageLayout);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void BindInvocationMaskHUAWEI<T>(this T handle, VkImageView imageView, VkImageLayout imageLayout)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdBindInvocationMaskHUAWEI.Invoke(handle.Handle, imageView, imageLayout);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetMemoryRemoteAddressNV.html">vkGetMemoryRemoteAddressNV</see> - Get an address for a memory object accessible by remote devices
/// </summary>
/// <remarks>
/// <para>
/// To export an address representing the payload of a Vulkan device memory
/// object accessible by remote devices, call:
/// </para>
/// <code>
/// // Provided by VK_NV_external_memory_rdma
/// VkResult vkGetMemoryRemoteAddressNV(
/// VkDevice device,
/// const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo,
/// VkRemoteAddressNV* pAddress);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkRemoteAddressNV GetMemoryRemoteAddressNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetPipelinePropertiesEXT.html">vkGetPipelinePropertiesEXT</see> - Query pipeline properties
/// </summary>
/// <remarks>
/// <para>
/// To query the pipeline properties call:
/// </para>
/// <code>
/// // Provided by VK_EXT_pipeline_properties
/// VkResult vkGetPipelinePropertiesEXT(
/// VkDevice device,
/// const VkPipelineInfoKHR* pPipelineInfo,
/// VkBaseOutStructure* pPipelineProperties);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetPipelinePropertiesEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkBaseOutStructure.</returns>
public static VkBaseOutStructure GetPipelinePropertiesEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkPipelineInfoKHR pPipelineInfo
)
{
VkBaseOutStructure outValue = new();
GetPipelinePropertiesEXT(handle, pPipelineInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetPatchControlPointsEXT.html">vkCmdSetPatchControlPointsEXT</see> - Specify the number of control points per patch dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the number of control points
/// per patch, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_extended_dynamic_state2, VK_EXT_shader_object
/// void vkCmdSetPatchControlPointsEXT(
/// VkCommandBuffer commandBuffer,
/// uint32_t patchControlPoints);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetPatchControlPointsEXT<T>(this T handle, int patchControlPoints)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetPatchControlPointsEXT.Invoke(handle.Handle, patchControlPoints);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetRasterizerDiscardEnableEXT<T>(this T handle, Brutal.Bool32 rasterizerDiscardEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetRasterizerDiscardEnableEXT.Invoke(handle.Handle, rasterizerDiscardEnable);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDepthBiasEnableEXT<T>(this T handle, Brutal.Bool32 depthBiasEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDepthBiasEnableEXT.Invoke(handle.Handle, depthBiasEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetLogicOpEXT.html">vkCmdSetLogicOpEXT</see> - Select which logical operation to apply for blend state dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the logical operation to
/// apply for blend state, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_extended_dynamic_state2, VK_EXT_shader_object
/// void vkCmdSetLogicOpEXT(
/// VkCommandBuffer commandBuffer,
/// VkLogicOp logicOp);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetLogicOpEXT<T>(this T handle, VkLogicOp logicOp)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetLogicOpEXT.Invoke(handle.Handle, logicOp);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetPrimitiveRestartEnableEXT<T>(this T handle, Brutal.Bool32 primitiveRestartEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetPrimitiveRestartEnableEXT.Invoke(handle.Handle, primitiveRestartEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetColorWriteEnableEXT.html">vkCmdSetColorWriteEnableEXT</see> - Enable or disable writes to a color attachment dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically enable or disable^</see> writes to a
/// color attachment, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_color_write_enable
/// void vkCmdSetColorWriteEnableEXT(
/// VkCommandBuffer commandBuffer,
/// uint32_t attachmentCount,
/// const VkBool32* pColorWriteEnables);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetColorWriteEnableEXT<T>(
this T handle,
scoped ReadOnlySpan<Brutal.Bool32> pColorWriteEnables
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (Brutal.Bool32* pColorWriteEnablesFixed = pColorWriteEnables)
{
handle.PInvoke.vkCmdSetColorWriteEnableEXT.Invoke(
handle.Handle,
pColorWriteEnables.Length,
pColorWriteEnablesFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawMultiEXT.html">vkCmdDrawMultiEXT</see> - Draw primitives
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawMultiEXT
/// </para>
/// <para>
/// To record an ordered sequence of draws which have no state changes between
/// them, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DrawMultiEXT<T>(
this T handle,
scoped ReadOnlySpan<VkMultiDrawInfoEXT> pVertexInfo,
int instanceCount,
int firstInstance,
int stride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkMultiDrawInfoEXT* pVertexInfoFixed = pVertexInfo)
{
handle.PInvoke.vkCmdDrawMultiEXT.Invoke(
handle.Handle,
pVertexInfo.Length,
pVertexInfoFixed,
instanceCount,
firstInstance,
stride
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawMultiIndexedEXT.html">vkCmdDrawMultiIndexedEXT</see> - Draw primitives
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawMultiIndexedEXT
/// </para>
/// <para>
/// To record an ordered sequence of indexed draws which have no state changes
/// between them, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DrawMultiIndexedEXT<T>(
this T handle,
scoped ReadOnlySpan<VkMultiDrawIndexedInfoEXT> pIndexInfo,
int instanceCount,
int firstInstance,
int stride,
int* pVertexOffset
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkMultiDrawIndexedInfoEXT* pIndexInfoFixed = pIndexInfo)
{
handle.PInvoke.vkCmdDrawMultiIndexedEXT.Invoke(
handle.Handle,
pIndexInfo.Length,
pIndexInfoFixed,
instanceCount,
firstInstance,
stride,
pVertexOffset
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateMicromapEXT.html">vkCreateMicromapEXT</see> - Create a new micromap object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateMicromapEXT
/// </para>
/// <para>
/// To create a micromap, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_opacity_micromap
/// VkResult vkCreateMicromapEXT(
/// VkDevice device,
/// const VkMicromapCreateInfoEXT* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkMicromapEXT* pMicromap);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkMicromapEXT CreateMicromapEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyMicromapEXT.html">vkDestroyMicromapEXT</see> - Destroy a micromap object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkDestroyMicromapEXT
/// </para>
/// <para>
/// To destroy a micromap, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_opacity_micromap
/// void vkDestroyMicromapEXT(
/// VkDevice device,
/// VkMicromapEXT micromap,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyMicromapEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkMicromapEXT micromap,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyMicromapEXT.Invoke(handle.Handle, micromap, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBuildMicromapsEXT.html">vkCmdBuildMicromapsEXT</see> - Build a micromap
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBuildMicromapsEXT
/// </para>
/// <para>
/// To build micromaps represented as a <c>VkMicromapEXT</c> object call:
/// </para>
/// <code>
/// // Provided by VK_EXT_opacity_micromap
/// void vkCmdBuildMicromapsEXT(
/// VkCommandBuffer commandBuffer,
/// uint32_t infoCount,
/// const VkMicromapBuildInfoEXT* pInfos);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BuildMicromapsEXT<T>(
this T handle,
scoped ReadOnlySpan<VkMicromapBuildInfoEXT> pInfos
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkMicromapBuildInfoEXT* pInfosFixed = pInfos)
{
handle.PInvoke.vkCmdBuildMicromapsEXT.Invoke(handle.Handle, pInfos.Length, pInfosFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkBuildMicromapsEXT.html">vkBuildMicromapsEXT</see> - Build a micromap on the host
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkBuildMicromapsEXT
/// </para>
/// <para>
/// To build <c>VkMicromapEXT</c> on the host, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_opacity_micromap
/// VkResult vkBuildMicromapsEXT(
/// VkDevice device,
/// VkDeferredOperationKHR deferredOperation,
/// uint32_t infoCount,
/// const VkMicromapBuildInfoEXT* pInfos);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult BuildMicromapsEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDeferredOperationKHR deferredOperation,
scoped ReadOnlySpan<VkMicromapBuildInfoEXT> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCopyMicromapEXT.html">vkCopyMicromapEXT</see> - Copy a micromap on the host
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCopyMicromapEXT
/// </para>
/// <para>
/// To copy or compact a <c>VkMicromapEXT</c> on the host, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_opacity_micromap
/// VkResult vkCopyMicromapEXT(
/// VkDevice device,
/// VkDeferredOperationKHR deferredOperation,
/// const VkCopyMicromapInfoEXT* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CopyMicromapEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCopyMicromapToMemoryEXT.html">vkCopyMicromapToMemoryEXT</see> - Serialize a micromap on the host
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCopyMicromapToMemoryEXT
/// </para>
/// <para>
/// To copy a <c>VkMicromapEXT</c> to host accessible memory, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_opacity_micromap
/// VkResult vkCopyMicromapToMemoryEXT(
/// VkDevice device,
/// VkDeferredOperationKHR deferredOperation,
/// const VkCopyMicromapToMemoryInfoEXT* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CopyMicromapToMemoryEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCopyMemoryToMicromapEXT.html">vkCopyMemoryToMicromapEXT</see> - Deserialize a micromap on the host
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCopyMemoryToMicromapEXT
/// </para>
/// <para>
/// To copy host accessible <c>VkMicromapEXT</c> to a micromap, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_opacity_micromap
/// VkResult vkCopyMemoryToMicromapEXT(
/// VkDevice device,
/// VkDeferredOperationKHR deferredOperation,
/// const VkCopyMemoryToMicromapInfoEXT* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CopyMemoryToMicromapEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkWriteMicromapsPropertiesEXT.html">vkWriteMicromapsPropertiesEXT</see> - Query micromap meta-data on the host
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkWriteMicromapsPropertiesEXT
/// </para>
/// <para>
/// To query <c>VkMicromapEXT</c> size parameters on the host, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void WriteMicromapsPropertiesEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkMicromapEXT> pMicromaps,
VkQueryType queryType,
scoped ReadOnlySpan<byte> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyMicromapEXT.html">vkCmdCopyMicromapEXT</see> - Copy a micromap
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyMicromapEXT
/// </para>
/// <para>
/// To copy a <c>VkMicromapEXT</c> call:
/// </para>
/// <code>
/// // Provided by VK_EXT_opacity_micromap
/// void vkCmdCopyMicromapEXT(
/// VkCommandBuffer commandBuffer,
/// const VkCopyMicromapInfoEXT* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyMicromapEXT<T>(this T handle, in VkCopyMicromapInfoEXT pInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyMicromapInfoEXT* pInfoFixed = &pInfo)
{
handle.PInvoke.vkCmdCopyMicromapEXT.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyMicromapToMemoryEXT.html">vkCmdCopyMicromapToMemoryEXT</see> - Copy a micromap to device memory
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyMicromapToMemoryEXT
/// </para>
/// <para>
/// To copy a <c>VkMicromapEXT</c> to device memory call:
/// </para>
/// <code>
/// // Provided by VK_EXT_opacity_micromap
/// void vkCmdCopyMicromapToMemoryEXT(
/// VkCommandBuffer commandBuffer,
/// const VkCopyMicromapToMemoryInfoEXT* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyMicromapToMemoryEXT<T>(this T handle, in VkCopyMicromapToMemoryInfoEXT pInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyMicromapToMemoryInfoEXT* pInfoFixed = &pInfo)
{
handle.PInvoke.vkCmdCopyMicromapToMemoryEXT.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyMemoryToMicromapEXT.html">vkCmdCopyMemoryToMicromapEXT</see> - Copy device memory to a micromap
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyMemoryToMicromapEXT
/// </para>
/// <para>
/// To copy device memory to a micromap call:
/// </para>
/// <code>
/// // Provided by VK_EXT_opacity_micromap
/// void vkCmdCopyMemoryToMicromapEXT(
/// VkCommandBuffer commandBuffer,
/// const VkCopyMemoryToMicromapInfoEXT* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyMemoryToMicromapEXT<T>(this T handle, in VkCopyMemoryToMicromapInfoEXT pInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyMemoryToMicromapInfoEXT* pInfoFixed = &pInfo)
{
handle.PInvoke.vkCmdCopyMemoryToMicromapEXT.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdWriteMicromapsPropertiesEXT.html">vkCmdWriteMicromapsPropertiesEXT</see> - Write micromap result parameters to query results.
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdWriteMicromapsPropertiesEXT
/// </para>
/// <para>
/// To query <c>VkMicromapEXT</c> size parameters call:
/// </para>
/// <code>
/// // Provided by VK_EXT_opacity_micromap
/// void vkCmdWriteMicromapsPropertiesEXT(
/// VkCommandBuffer commandBuffer,
/// uint32_t micromapCount,
/// const VkMicromapEXT* pMicromaps,
/// VkQueryType queryType,
/// VkQueryPool queryPool,
/// uint32_t firstQuery);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void WriteMicromapsPropertiesEXT<T>(
this T handle,
scoped ReadOnlySpan<VkMicromapEXT> pMicromaps,
VkQueryType queryType,
VkQueryPool queryPool,
int firstQuery
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkMicromapEXT* pMicromapsFixed = pMicromaps)
{
handle.PInvoke.vkCmdWriteMicromapsPropertiesEXT.Invoke(
handle.Handle,
pMicromaps.Length,
pMicromapsFixed,
queryType,
queryPool,
firstQuery
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceMicromapCompatibilityEXT.html">vkGetDeviceMicromapCompatibilityEXT</see> - Check if a serialized micromap is compatible with the current device
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetDeviceMicromapCompatibilityEXT
/// </para>
/// <para>
/// To check if a serialized <c>VkMicromapEXT</c> is compatible with the current
/// device call:
/// </para>
/// <code>
/// // Provided by VK_EXT_opacity_micromap
/// void vkGetDeviceMicromapCompatibilityEXT(
/// VkDevice device,
/// const VkMicromapVersionInfoEXT* pVersionInfo,
/// VkAccelerationStructureCompatibilityKHR* pCompatibility);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkAccelerationStructureCompatibilityKHR GetMicromapCompatibilityEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkMicromapVersionInfoEXT pVersionInfo
)
{
fixed (VkMicromapVersionInfoEXT* pVersionInfoFixed = &pVersionInfo)
{
VkAccelerationStructureCompatibilityKHR pCompatibilityLocal = default;
handle.PInvoke.vkGetDeviceMicromapCompatibilityEXT.Invoke(
handle.Handle,
pVersionInfoFixed,
&pCompatibilityLocal
);
return pCompatibilityLocal;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetMicromapBuildSizesEXT.html">vkGetMicromapBuildSizesEXT</see> - Retrieve the required size for a micromap
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetMicromapBuildSizesEXT
/// </para>
/// <para>
/// To get the build sizes for a micromap, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_opacity_micromap
/// void vkGetMicromapBuildSizesEXT(
/// VkDevice device,
/// VkAccelerationStructureBuildTypeKHR buildType,
/// const VkMicromapBuildInfoEXT* pBuildInfo,
/// VkMicromapBuildSizesInfoEXT* pSizeInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetMicromapBuildSizesEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawClusterHUAWEI.html">vkCmdDrawClusterHUAWEI</see> - Draw cluster culling work items
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawClusterHUAWEI
/// </para>
/// <para>
/// To record a cluster culling shader drawing command, call:
/// </para>
/// <code>
/// // Provided by VK_HUAWEI_cluster_culling_shader
/// void vkCmdDrawClusterHUAWEI(
/// VkCommandBuffer commandBuffer,
/// uint32_t groupCountX,
/// uint32_t groupCountY,
/// uint32_t groupCountZ);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawClusterHUAWEI<T>(this T handle, int groupCountX, int groupCountY, int groupCountZ)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawClusterHUAWEI.Invoke(handle.Handle, groupCountX, groupCountY, groupCountZ);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawClusterIndirectHUAWEI.html">vkCmdDrawClusterIndirectHUAWEI</see> - Issue an indirect cluster culling draw into a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawClusterIndirectHUAWEI
/// </para>
/// <para>
/// To record an indirect cluster culling drawing command, call:
/// </para>
/// <code>
/// // Provided by VK_HUAWEI_cluster_culling_shader
/// void vkCmdDrawClusterIndirectHUAWEI(
/// VkCommandBuffer commandBuffer,
/// VkBuffer buffer,
/// VkDeviceSize offset);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawClusterIndirectHUAWEI<T>(this T handle, VkBuffer buffer, ByteSize64 offset)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawClusterIndirectHUAWEI.Invoke(handle.Handle, buffer, offset);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkSetDeviceMemoryPriorityEXT.html">vkSetDeviceMemoryPriorityEXT</see> - Change a memory allocation priority
/// </summary>
/// <remarks>
/// <para>
/// To modify the priority of an existing memory allocation, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_pageable_device_local_memory
/// void vkSetDeviceMemoryPriorityEXT(
/// VkDevice device,
/// VkDeviceMemory memory,
/// float priority);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDeviceMemoryPriorityEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDeviceMemory memory,
float priority
)
{
handle.PInvoke.vkSetDeviceMemoryPriorityEXT.Invoke(handle.Handle, memory, priority);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDispatchParametersARM.html">vkCmdSetDispatchParametersARM</see> - Set parameters that affect dispatch commands
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdSetDispatchParametersARM
/// </para>
/// <para>
/// To set parameters that affect dispatch commands, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_scheduling_controls
/// void vkCmdSetDispatchParametersARM(
/// VkCommandBuffer commandBuffer,
/// const VkDispatchParametersARM* pDispatchParameters);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetDispatchParametersARM<T>(
this T handle,
VkDispatchParametersARM* pDispatchParameters
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDispatchParametersARM.Invoke(handle.Handle, pDispatchParameters);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDescriptorSetLayoutHostMappingInfoVALVE.html">vkGetDescriptorSetLayoutHostMappingInfoVALVE</see> - Stub description of vkGetDescriptorSetLayoutHostMappingInfoVALVE
/// </summary>
/// <remarks>
/// <para>
/// [[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.
/// </para>
/// <code>
/// // Provided by VK_VALVE_descriptor_set_host_mapping
/// void vkGetDescriptorSetLayoutHostMappingInfoVALVE(
/// VkDevice device,
/// const VkDescriptorSetBindingReferenceVALVE* pBindingReference,
/// VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetDescriptorSetLayoutHostMappingInfoVALVE(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDescriptorSetBindingReferenceVALVE* pBindingReference,
ref VkDescriptorSetLayoutHostMappingInfoVALVE pHostMapping
)
{
fixed (VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMappingFixed = &pHostMapping)
{
handle.PInvoke.vkGetDescriptorSetLayoutHostMappingInfoVALVE.Invoke(
handle.Handle,
pBindingReference,
pHostMappingFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkDescriptorSetLayoutHostMappingInfoVALVE.</returns>
public static unsafe VkDescriptorSetLayoutHostMappingInfoVALVE GetDescriptorSetLayoutHostMappingInfoVALVE(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDescriptorSetBindingReferenceVALVE* pBindingReference
)
{
VkDescriptorSetLayoutHostMappingInfoVALVE outValue = new();
GetDescriptorSetLayoutHostMappingInfoVALVE(handle, pBindingReference, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDescriptorSetHostMappingVALVE.html">vkGetDescriptorSetHostMappingVALVE</see> - Stub description of vkGetDescriptorSetHostMappingVALVE
/// </summary>
/// <remarks>
/// <para>
/// 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.
/// </para>
/// <code>
/// // Provided by VK_VALVE_descriptor_set_host_mapping
/// void vkGetDescriptorSetHostMappingVALVE(
/// VkDevice device,
/// VkDescriptorSet descriptorSet,
/// void** ppData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void* GetDescriptorSetHostMappingVALVE(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDescriptorSet descriptorSet
)
{
void* ppDataLocal = default;
handle.PInvoke.vkGetDescriptorSetHostMappingVALVE.Invoke(handle.Handle, descriptorSet, &ppDataLocal);
return ppDataLocal;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyMemoryIndirectNV.html">vkCmdCopyMemoryIndirectNV</see> - Copy data between memory regions
/// </summary>
/// <remarks>
/// <para>
/// To copy data between two memory regions by specifying copy parameters
/// indirectly in memory, call:
/// </para>
/// <code>
/// // Provided by VK_NV_copy_memory_indirect
/// void vkCmdCopyMemoryIndirectNV(
/// VkCommandBuffer commandBuffer,
/// VkDeviceAddress copyBufferAddress,
/// uint32_t copyCount,
/// uint32_t stride);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyMemoryIndirectNV<T>(
this T handle,
VkDeviceAddress copyBufferAddress,
int copyCount,
int stride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdCopyMemoryIndirectNV.Invoke(handle.Handle, copyBufferAddress, copyCount, stride);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyMemoryToImageIndirectNV.html">vkCmdCopyMemoryToImageIndirectNV</see> - Copy data from a memory region to an image object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyMemoryToImageIndirectNV
/// </para>
/// <para>
/// To copy data from a memory region to an image object by specifying copy
/// parameters in memory, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyMemoryToImageIndirectNV<T>(
this T handle,
VkDeviceAddress copyBufferAddress,
int stride,
VkImage dstImage,
VkImageLayout dstImageLayout,
scoped ReadOnlySpan<VkImageSubresourceLayers> pImageSubresources
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkImageSubresourceLayers* pImageSubresourcesFixed = pImageSubresources)
{
handle.PInvoke.vkCmdCopyMemoryToImageIndirectNV.Invoke(
handle.Handle,
copyBufferAddress,
pImageSubresources.Length,
stride,
dstImage,
dstImageLayout,
pImageSubresourcesFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDecompressMemoryNV.html">vkCmdDecompressMemoryNV</see> - Decompress memory containing compressed data
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDecompressMemoryNV
/// To decompress memory containing compressed data, call:
/// </para>
/// <code>
/// // Provided by VK_NV_memory_decompression
/// void vkCmdDecompressMemoryNV(
/// VkCommandBuffer commandBuffer,
/// uint32_t decompressRegionCount,
/// const VkDecompressMemoryRegionNV* pDecompressMemoryRegions);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DecompressMemoryNV<T>(
this T handle,
scoped ReadOnlySpan<VkDecompressMemoryRegionNV> pDecompressMemoryRegions
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDecompressMemoryRegionNV* pDecompressMemoryRegionsFixed = pDecompressMemoryRegions)
{
handle.PInvoke.vkCmdDecompressMemoryNV.Invoke(
handle.Handle,
pDecompressMemoryRegions.Length,
pDecompressMemoryRegionsFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDecompressMemoryIndirectCountNV.html">vkCmdDecompressMemoryIndirectCountNV</see> - Indirect decompress data between memory regions
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDecompressMemoryIndirectCountNV
/// </para>
/// <para>
/// To decompress data between one or more memory regions by specifying
/// decompression parameters indirectly in a buffer, call:
/// </para>
/// <code>
/// // Provided by VK_NV_memory_decompression
/// void vkCmdDecompressMemoryIndirectCountNV(
/// VkCommandBuffer commandBuffer,
/// VkDeviceAddress indirectCommandsAddress,
/// VkDeviceAddress indirectCommandsCountAddress,
/// uint32_t stride);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DecompressMemoryIndirectCountNV<T>(
this T handle,
VkDeviceAddress indirectCommandsAddress,
VkDeviceAddress indirectCommandsCountAddress,
int stride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDecompressMemoryIndirectCountNV.Invoke(
handle.Handle,
indirectCommandsAddress,
indirectCommandsCountAddress,
stride
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetPipelineIndirectMemoryRequirementsNV.html">vkGetPipelineIndirectMemoryRequirementsNV</see> - Get the memory requirements for the compute indirect pipeline
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetPipelineIndirectMemoryRequirementsNV
/// </para>
/// <para>
/// To determine the memory requirements for a compute pipeline&apos;s metadata,
/// call:
/// </para>
/// <code>
/// // Provided by VK_NV_device_generated_commands_compute
/// void vkGetPipelineIndirectMemoryRequirementsNV(
/// VkDevice device,
/// const VkComputePipelineCreateInfo* pCreateInfo,
/// VkMemoryRequirements2* pMemoryRequirements);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetPipelineIndirectMemoryRequirementsNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkComputePipelineCreateInfo pCreateInfo,
ref VkMemoryRequirements2 pMemoryRequirements
)
{
fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements)
fixed (VkComputePipelineCreateInfo* pCreateInfoFixed = &pCreateInfo)
{
handle.PInvoke.vkGetPipelineIndirectMemoryRequirementsNV.Invoke(
handle.Handle,
pCreateInfoFixed,
pMemoryRequirementsFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryRequirements2.</returns>
public static VkMemoryRequirements2 GetPipelineIndirectMemoryRequirementsNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkComputePipelineCreateInfo pCreateInfo
)
{
VkMemoryRequirements2 outValue = new();
GetPipelineIndirectMemoryRequirementsNV(handle, pCreateInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdUpdatePipelineIndirectBufferNV.html">vkCmdUpdatePipelineIndirectBufferNV</see> - Update the indirect compute pipeline&amp;apos;s metadata
/// </summary>
/// <remarks>
/// <para>
/// To save a compute pipeline&apos;s metadata at a device address call:
/// </para>
/// <code>
/// // Provided by VK_NV_device_generated_commands_compute
/// void vkCmdUpdatePipelineIndirectBufferNV(
/// VkCommandBuffer commandBuffer,
/// VkPipelineBindPoint pipelineBindPoint,
/// VkPipeline pipeline);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void UpdatePipelineIndirectBufferNV<T>(
this T handle,
VkPipelineBindPoint pipelineBindPoint,
VkPipeline pipeline
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdUpdatePipelineIndirectBufferNV.Invoke(handle.Handle, pipelineBindPoint, pipeline);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetPipelineIndirectDeviceAddressNV.html">vkGetPipelineIndirectDeviceAddressNV</see> - Get pipeline&amp;apos;s 64-bit device address
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetPipelineIndirectDeviceAddressNV
/// </para>
/// <para>
/// To query a compute pipeline&apos;s 64-bit device address, call:
/// </para>
/// <code>
/// // Provided by VK_NV_device_generated_commands_compute
/// VkDeviceAddress vkGetPipelineIndirectDeviceAddressNV(
/// VkDevice device,
/// const VkPipelineIndirectDeviceAddressInfoNV* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkDeviceAddress GetPipelineIndirectDeviceAddressNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkPipelineIndirectDeviceAddressInfoNV pInfo
)
{
fixed (VkPipelineIndirectDeviceAddressInfoNV* pInfoFixed = &pInfo)
{
return handle.PInvoke.vkGetPipelineIndirectDeviceAddressNV.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDepthClampEnableEXT.html">vkCmdSetDepthClampEnableEXT</see> - Specify dynamically whether depth clamping is enabled in the command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> enable or disable depth
/// clamping, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
/// void vkCmdSetDepthClampEnableEXT(
/// VkCommandBuffer commandBuffer,
/// VkBool32 depthClampEnable);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDepthClampEnableEXT<T>(this T handle, Brutal.Bool32 depthClampEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDepthClampEnableEXT.Invoke(handle.Handle, depthClampEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetPolygonModeEXT.html">vkCmdSetPolygonModeEXT</see> - Specify polygon mode dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the polygon mode, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
/// void vkCmdSetPolygonModeEXT(
/// VkCommandBuffer commandBuffer,
/// VkPolygonMode polygonMode);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetPolygonModeEXT<T>(this T handle, VkPolygonMode polygonMode)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetPolygonModeEXT.Invoke(handle.Handle, polygonMode);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetRasterizationSamplesEXT.html">vkCmdSetRasterizationSamplesEXT</see> - Specify the rasterization samples dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the
/// <c>rasterizationSamples</c>, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
/// void vkCmdSetRasterizationSamplesEXT(
/// VkCommandBuffer commandBuffer,
/// VkSampleCountFlagBits rasterizationSamples);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetRasterizationSamplesEXT<T>(this T handle, VkSampleCountFlags rasterizationSamples)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetRasterizationSamplesEXT.Invoke(handle.Handle, rasterizationSamples);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetSampleMaskEXT.html">vkCmdSetSampleMaskEXT</see> - Specify the sample mask dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the sample mask, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
/// void vkCmdSetSampleMaskEXT(
/// VkCommandBuffer commandBuffer,
/// VkSampleCountFlagBits samples,
/// const VkSampleMask* pSampleMask);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetSampleMaskEXT<T>(
this T handle,
VkSampleCountFlags samples,
scoped ReadOnlySpan<VkSampleMask> pSampleMask
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkSampleMask* pSampleMaskFixed = pSampleMask)
{
handle.PInvoke.vkCmdSetSampleMaskEXT.Invoke(handle.Handle, samples, pSampleMaskFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetAlphaToCoverageEnableEXT.html">vkCmdSetAlphaToCoverageEnableEXT</see> - Specify the alpha to coverage enable state dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the
/// <c>alphaToCoverageEnable</c> state, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
/// void vkCmdSetAlphaToCoverageEnableEXT(
/// VkCommandBuffer commandBuffer,
/// VkBool32 alphaToCoverageEnable);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetAlphaToCoverageEnableEXT<T>(this T handle, Brutal.Bool32 alphaToCoverageEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetAlphaToCoverageEnableEXT.Invoke(handle.Handle, alphaToCoverageEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetAlphaToOneEnableEXT.html">vkCmdSetAlphaToOneEnableEXT</see> - Specify the alpha to one enable state dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the <c>alphaToOneEnable</c>
/// state, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
/// void vkCmdSetAlphaToOneEnableEXT(
/// VkCommandBuffer commandBuffer,
/// VkBool32 alphaToOneEnable);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetAlphaToOneEnableEXT<T>(this T handle, Brutal.Bool32 alphaToOneEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetAlphaToOneEnableEXT.Invoke(handle.Handle, alphaToOneEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetLogicOpEnableEXT.html">vkCmdSetLogicOpEnableEXT</see> - Specify dynamically whether logical operations are enabled for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> whether logical operations
/// are enabled, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
/// void vkCmdSetLogicOpEnableEXT(
/// VkCommandBuffer commandBuffer,
/// VkBool32 logicOpEnable);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetLogicOpEnableEXT<T>(this T handle, Brutal.Bool32 logicOpEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetLogicOpEnableEXT.Invoke(handle.Handle, logicOpEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetColorBlendEnableEXT.html">vkCmdSetColorBlendEnableEXT</see> - Specify the &lt;c&gt;blendEnable&lt;/c&gt; for each attachment dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> <c>blendEnable</c>, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
/// void vkCmdSetColorBlendEnableEXT(
/// VkCommandBuffer commandBuffer,
/// uint32_t firstAttachment,
/// uint32_t attachmentCount,
/// const VkBool32* pColorBlendEnables);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetColorBlendEnableEXT<T>(
this T handle,
int firstAttachment,
scoped ReadOnlySpan<Brutal.Bool32> pColorBlendEnables
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (Brutal.Bool32* pColorBlendEnablesFixed = pColorBlendEnables)
{
handle.PInvoke.vkCmdSetColorBlendEnableEXT.Invoke(
handle.Handle,
firstAttachment,
pColorBlendEnables.Length,
pColorBlendEnablesFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetColorBlendEquationEXT.html">vkCmdSetColorBlendEquationEXT</see> - Specify the blend factors and operations dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> color blend factors and
/// operations, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
/// void vkCmdSetColorBlendEquationEXT(
/// VkCommandBuffer commandBuffer,
/// uint32_t firstAttachment,
/// uint32_t attachmentCount,
/// const VkColorBlendEquationEXT* pColorBlendEquations);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetColorBlendEquationEXT<T>(
this T handle,
int firstAttachment,
scoped ReadOnlySpan<VkColorBlendEquationEXT> pColorBlendEquations
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkColorBlendEquationEXT* pColorBlendEquationsFixed = pColorBlendEquations)
{
handle.PInvoke.vkCmdSetColorBlendEquationEXT.Invoke(
handle.Handle,
firstAttachment,
pColorBlendEquations.Length,
pColorBlendEquationsFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetColorWriteMaskEXT.html">vkCmdSetColorWriteMaskEXT</see> - Specify the color write masks for each attachment dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the color write masks, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_extended_dynamic_state3, VK_EXT_shader_object
/// void vkCmdSetColorWriteMaskEXT(
/// VkCommandBuffer commandBuffer,
/// uint32_t firstAttachment,
/// uint32_t attachmentCount,
/// const VkColorComponentFlags* pColorWriteMasks);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetColorWriteMaskEXT<T>(
this T handle,
int firstAttachment,
scoped ReadOnlySpan<VkColorComponentFlags> pColorWriteMasks
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkColorComponentFlags* pColorWriteMasksFixed = pColorWriteMasks)
{
handle.PInvoke.vkCmdSetColorWriteMaskEXT.Invoke(
handle.Handle,
firstAttachment,
pColorWriteMasks.Length,
pColorWriteMasksFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetTessellationDomainOriginEXT.html">vkCmdSetTessellationDomainOriginEXT</see> - Specify the origin of the tessellation domain space dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the origin of the
/// tessellation domain space, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetTessellationDomainOriginEXT<T>(this T handle, VkTessellationDomainOrigin domainOrigin)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetTessellationDomainOriginEXT.Invoke(handle.Handle, domainOrigin);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetRasterizationStreamEXT.html">vkCmdSetRasterizationStreamEXT</see> - Specify the rasterization stream dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the
/// <c>rasterizationStream</c> state, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetRasterizationStreamEXT<T>(this T handle, int rasterizationStream)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetRasterizationStreamEXT.Invoke(handle.Handle, rasterizationStream);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetConservativeRasterizationModeEXT.html">vkCmdSetConservativeRasterizationModeEXT</see> - Specify the conservative rasterization mode dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the
/// <c>conservativeRasterizationMode</c>, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetConservativeRasterizationModeEXT<T>(
this T handle,
VkConservativeRasterizationModeEXT conservativeRasterizationMode
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetConservativeRasterizationModeEXT.Invoke(
handle.Handle,
conservativeRasterizationMode
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetExtraPrimitiveOverestimationSizeEXT.html">vkCmdSetExtraPrimitiveOverestimationSizeEXT</see> - Specify the conservative rasterization extra primitive overestimation size dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the
/// <c>extraPrimitiveOverestimationSize</c>, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetExtraPrimitiveOverestimationSizeEXT<T>(
this T handle,
float extraPrimitiveOverestimationSize
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetExtraPrimitiveOverestimationSizeEXT.Invoke(
handle.Handle,
extraPrimitiveOverestimationSize
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDepthClipEnableEXT.html">vkCmdSetDepthClipEnableEXT</see> - Specify dynamically whether depth clipping is enabled in the command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> enable or disable depth
/// clipping, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDepthClipEnableEXT<T>(this T handle, Brutal.Bool32 depthClipEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDepthClipEnableEXT.Invoke(handle.Handle, depthClipEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetSampleLocationsEnableEXT.html">vkCmdSetSampleLocationsEnableEXT</see> - Specify the samples locations enable state dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the
/// <c>sampleLocationsEnable</c> state, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetSampleLocationsEnableEXT<T>(this T handle, Brutal.Bool32 sampleLocationsEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetSampleLocationsEnableEXT.Invoke(handle.Handle, sampleLocationsEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetColorBlendAdvancedEXT.html">vkCmdSetColorBlendAdvancedEXT</see> - Specify the advanced color blend state dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the advanced blend state,
/// call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetColorBlendAdvancedEXT<T>(
this T handle,
int firstAttachment,
scoped ReadOnlySpan<VkColorBlendAdvancedEXT> pColorBlendAdvanced
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkColorBlendAdvancedEXT* pColorBlendAdvancedFixed = pColorBlendAdvanced)
{
handle.PInvoke.vkCmdSetColorBlendAdvancedEXT.Invoke(
handle.Handle,
firstAttachment,
pColorBlendAdvanced.Length,
pColorBlendAdvancedFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetProvokingVertexModeEXT.html">vkCmdSetProvokingVertexModeEXT</see> - Specify the provoking vertex mode dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the
/// <c>provokingVertexMode</c> state, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetProvokingVertexModeEXT<T>(this T handle, VkProvokingVertexModeEXT provokingVertexMode)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetProvokingVertexModeEXT.Invoke(handle.Handle, provokingVertexMode);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetLineRasterizationModeEXT.html">vkCmdSetLineRasterizationModeEXT</see> - Specify the line rasterization mode dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the
/// <c>lineRasterizationMode</c> state, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetLineRasterizationModeEXT<T>(
this T handle,
VkLineRasterizationModeEXT lineRasterizationMode
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetLineRasterizationModeEXT.Invoke(handle.Handle, lineRasterizationMode);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetLineStippleEnableEXT.html">vkCmdSetLineStippleEnableEXT</see> - Specify the line stipple enable dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the <c>stippledLineEnable</c>
/// state, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetLineStippleEnableEXT<T>(this T handle, Brutal.Bool32 stippledLineEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetLineStippleEnableEXT.Invoke(handle.Handle, stippledLineEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDepthClipNegativeOneToOneEXT.html">vkCmdSetDepthClipNegativeOneToOneEXT</see> - Specify the negative one to one depth clip mode dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> <c>negativeOneToOne</c>,
/// call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetDepthClipNegativeOneToOneEXT<T>(this T handle, Brutal.Bool32 negativeOneToOne)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDepthClipNegativeOneToOneEXT.Invoke(handle.Handle, negativeOneToOne);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetViewportWScalingEnableNV.html">vkCmdSetViewportWScalingEnableNV</see> - Specify the viewport W scaling enable state dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the
/// <c>viewportWScalingEnable</c> state, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetViewportWScalingEnableNV<T>(this T handle, Brutal.Bool32 viewportWScalingEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetViewportWScalingEnableNV.Invoke(handle.Handle, viewportWScalingEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetViewportSwizzleNV.html">vkCmdSetViewportSwizzleNV</see> - Specify the viewport swizzle state dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the viewport swizzle state,
/// call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetViewportSwizzleNV<T>(
this T handle,
int firstViewport,
scoped ReadOnlySpan<VkViewportSwizzleNV> pViewportSwizzles
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkViewportSwizzleNV* pViewportSwizzlesFixed = pViewportSwizzles)
{
handle.PInvoke.vkCmdSetViewportSwizzleNV.Invoke(
handle.Handle,
firstViewport,
pViewportSwizzles.Length,
pViewportSwizzlesFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetCoverageToColorEnableNV.html">vkCmdSetCoverageToColorEnableNV</see> - Specify the coverage to color enable state dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the
/// <c>coverageToColorEnable</c> state, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetCoverageToColorEnableNV<T>(this T handle, Brutal.Bool32 coverageToColorEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetCoverageToColorEnableNV.Invoke(handle.Handle, coverageToColorEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetCoverageToColorLocationNV.html">vkCmdSetCoverageToColorLocationNV</see> - Specify the coverage to color location dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the
/// <c>coverageToColorLocation</c> state, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetCoverageToColorLocationNV<T>(this T handle, int coverageToColorLocation)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetCoverageToColorLocationNV.Invoke(handle.Handle, coverageToColorLocation);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetCoverageModulationModeNV.html">vkCmdSetCoverageModulationModeNV</see> - Specify the coverage modulation mode dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the
/// <c>coverageModulationMode</c> state, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetCoverageModulationModeNV<T>(
this T handle,
VkCoverageModulationModeNV coverageModulationMode
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetCoverageModulationModeNV.Invoke(handle.Handle, coverageModulationMode);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetCoverageModulationTableEnableNV.html">vkCmdSetCoverageModulationTableEnableNV</see> - Specify the coverage modulation table enable state dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the
/// <c>coverageModulationTableEnable</c> state, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetCoverageModulationTableEnableNV<T>(
this T handle,
Brutal.Bool32 coverageModulationTableEnable
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetCoverageModulationTableEnableNV.Invoke(handle.Handle, coverageModulationTableEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetCoverageModulationTableNV.html">vkCmdSetCoverageModulationTableNV</see> - Specify the coverage modulation table dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the
/// <c>pCoverageModulationTable</c> state, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetCoverageModulationTableNV<T>(
this T handle,
scoped ReadOnlySpan<float> pCoverageModulationTable
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (float* pCoverageModulationTableFixed = pCoverageModulationTable)
{
handle.PInvoke.vkCmdSetCoverageModulationTableNV.Invoke(
handle.Handle,
pCoverageModulationTable.Length,
pCoverageModulationTableFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetShadingRateImageEnableNV.html">vkCmdSetShadingRateImageEnableNV</see> - Specify the shading rate image enable state dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the
/// <c>shadingRateImageEnable</c> state, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetShadingRateImageEnableNV<T>(this T handle, Brutal.Bool32 shadingRateImageEnable)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetShadingRateImageEnableNV.Invoke(handle.Handle, shadingRateImageEnable);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetRepresentativeFragmentTestEnableNV.html">vkCmdSetRepresentativeFragmentTestEnableNV</see> - Specify the representative fragment test enable dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the
/// <c>representativeFragmentTestEnable</c> state, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetRepresentativeFragmentTestEnableNV<T>(
this T handle,
Brutal.Bool32 representativeFragmentTestEnable
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetRepresentativeFragmentTestEnableNV.Invoke(
handle.Handle,
representativeFragmentTestEnable
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetCoverageReductionModeNV.html">vkCmdSetCoverageReductionModeNV</see> - Specify the coverage reduction mode dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the
/// <c>coverageReductionMode</c> state, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetCoverageReductionModeNV<T>(this T handle, VkCoverageReductionModeNV coverageReductionMode)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetCoverageReductionModeNV.Invoke(handle.Handle, coverageReductionMode);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateTensorARM.html">vkCreateTensorARM</see> - Create a new tensor object
/// </summary>
/// <remarks>
/// <para>
/// To create tensors, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_tensors
/// VkResult vkCreateTensorARM(
/// VkDevice device,
/// const VkTensorCreateInfoARM* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkTensorARM* pTensor);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkTensorARM CreateTensorARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyTensorARM.html">vkDestroyTensorARM</see> - Destroy a tensor object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a tensor, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_tensors
/// void vkDestroyTensorARM(
/// VkDevice device,
/// VkTensorARM tensor,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyTensorARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkTensorARM tensor,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyTensorARM.Invoke(handle.Handle, tensor, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateTensorViewARM.html">vkCreateTensorViewARM</see> - Create an tensor view from an existing tensor
/// </summary>
/// <remarks>
/// <para>
/// To create a tensor view, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_tensors
/// VkResult vkCreateTensorViewARM(
/// VkDevice device,
/// const VkTensorViewCreateInfoARM* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkTensorViewARM* pView);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkTensorViewARM CreateTensorViewARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyTensorViewARM.html">vkDestroyTensorViewARM</see> - Destroy a tensor view object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a tensor view, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_tensors
/// void vkDestroyTensorViewARM(
/// VkDevice device,
/// VkTensorViewARM tensorView,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyTensorViewARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkTensorViewARM tensorView,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyTensorViewARM.Invoke(handle.Handle, tensorView, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetTensorMemoryRequirementsARM.html">vkGetTensorMemoryRequirementsARM</see> - Returns the memory requirements for specified Vulkan object
/// </summary>
/// <remarks>
/// <para>
/// To determine the memory requirements for a tensor resource, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_tensors
/// void vkGetTensorMemoryRequirementsARM(
/// VkDevice device,
/// const VkTensorMemoryRequirementsInfoARM* pInfo,
/// VkMemoryRequirements2* pMemoryRequirements);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetTensorMemoryRequirementsARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkTensorMemoryRequirementsInfoARM pInfo,
ref VkMemoryRequirements2 pMemoryRequirements
)
{
fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements)
fixed (VkTensorMemoryRequirementsInfoARM* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetTensorMemoryRequirementsARM.Invoke(
handle.Handle,
pInfoFixed,
pMemoryRequirementsFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryRequirements2.</returns>
public static VkMemoryRequirements2 GetTensorMemoryRequirementsARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkTensorMemoryRequirementsInfoARM pInfo
)
{
VkMemoryRequirements2 outValue = new();
GetTensorMemoryRequirementsARM(handle, pInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkBindTensorMemoryARM.html">vkBindTensorMemoryARM</see> - Bind device memory to tensor objects
/// </summary>
/// <remarks>
/// <para>
/// To attach memory to tensor objects call:
/// </para>
/// <code>
/// // Provided by VK_ARM_tensors
/// VkResult vkBindTensorMemoryARM(
/// VkDevice device,
/// uint32_t bindInfoCount,
/// const VkBindTensorMemoryInfoARM* pBindInfos);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindTensorMemoryARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkBindTensorMemoryInfoARM> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceTensorMemoryRequirementsARM.html">vkGetDeviceTensorMemoryRequirementsARM</see> - Returns the memory requirements for specified tensor creation infos
/// </summary>
/// <remarks>
/// <para>
/// To determine the memory requirements for a tensor resource without creating
/// an object, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_tensors
/// void vkGetDeviceTensorMemoryRequirementsARM(
/// VkDevice device,
/// const VkDeviceTensorMemoryRequirementsARM* pInfo,
/// VkMemoryRequirements2* pMemoryRequirements);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetTensorMemoryRequirementsARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceTensorMemoryRequirementsARM pInfo,
ref VkMemoryRequirements2 pMemoryRequirements
)
{
fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements)
fixed (VkDeviceTensorMemoryRequirementsARM* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetDeviceTensorMemoryRequirementsARM.Invoke(
handle.Handle,
pInfoFixed,
pMemoryRequirementsFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryRequirements2.</returns>
public static VkMemoryRequirements2 GetTensorMemoryRequirementsARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDeviceTensorMemoryRequirementsARM pInfo
)
{
VkMemoryRequirements2 outValue = new();
GetTensorMemoryRequirementsARM(handle, pInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyTensorARM.html">vkCmdCopyTensorARM</see> - Copy data between tensors
/// </summary>
/// <remarks>
/// <para>
/// To copy data between tensor objects, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_tensors
/// void vkCmdCopyTensorARM(
/// VkCommandBuffer commandBuffer,
/// const VkCopyTensorInfoARM* pCopyTensorInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyTensorARM<T>(this T handle, in VkCopyTensorInfoARM pCopyTensorInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyTensorInfoARM* pCopyTensorInfoFixed = &pCopyTensorInfo)
{
handle.PInvoke.vkCmdCopyTensorARM.Invoke(handle.Handle, pCopyTensorInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetTensorOpaqueCaptureDescriptorDataARM.html">vkGetTensorOpaqueCaptureDescriptorDataARM</see> - Get tensor opaque capture descriptor data
/// </summary>
/// <remarks>
/// <para>
/// To get the opaque capture descriptor data for a tensor, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
/// VkResult vkGetTensorOpaqueCaptureDescriptorDataARM(
/// VkDevice device,
/// const VkTensorCaptureDescriptorDataInfoARM* pInfo,
/// void* pData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void* GetTensorOpaqueCaptureDescriptorDataARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetTensorViewOpaqueCaptureDescriptorDataARM.html">vkGetTensorViewOpaqueCaptureDescriptorDataARM</see> - Get tensor view opaque capture descriptor data
/// </summary>
/// <remarks>
/// <para>
/// To get the opaque capture descriptor data for a tensor view, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_descriptor_buffer with VK_ARM_tensors
/// VkResult vkGetTensorViewOpaqueCaptureDescriptorDataARM(
/// VkDevice device,
/// const VkTensorViewCaptureDescriptorDataInfoARM* pInfo,
/// void* pData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void* GetTensorViewOpaqueCaptureDescriptorDataARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetShaderModuleIdentifierEXT.html">vkGetShaderModuleIdentifierEXT</see> - Query a unique identifier for a shader module
/// </summary>
/// <remarks>
/// <para>
/// Shader modules have unique identifiers associated with them.
/// To query an implementation provided identifier, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_shader_module_identifier
/// void vkGetShaderModuleIdentifierEXT(
/// VkDevice device,
/// VkShaderModule shaderModule,
/// VkShaderModuleIdentifierEXT* pIdentifier);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetShaderModuleIdentifierEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkShaderModule shaderModule,
ref VkShaderModuleIdentifierEXT pIdentifier
)
{
fixed (VkShaderModuleIdentifierEXT* pIdentifierFixed = &pIdentifier)
{
handle.PInvoke.vkGetShaderModuleIdentifierEXT.Invoke(handle.Handle, shaderModule, pIdentifierFixed);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkShaderModuleIdentifierEXT.</returns>
public static VkShaderModuleIdentifierEXT GetShaderModuleIdentifierEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkShaderModule shaderModule
)
{
VkShaderModuleIdentifierEXT outValue = new();
GetShaderModuleIdentifierEXT(handle, shaderModule, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetShaderModuleCreateInfoIdentifierEXT.html">vkGetShaderModuleCreateInfoIdentifierEXT</see> - Query a unique identifier for a shader module create info
/// </summary>
/// <remarks>
/// <para>
/// <c>VkShaderModuleCreateInfo</c> structures have unique identifiers associated
/// with them.
/// To query an implementation provided identifier, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_shader_module_identifier
/// void vkGetShaderModuleCreateInfoIdentifierEXT(
/// VkDevice device,
/// const VkShaderModuleCreateInfo* pCreateInfo,
/// VkShaderModuleIdentifierEXT* pIdentifier);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetShaderModuleCreateInfoIdentifierEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkShaderModuleCreateInfo pCreateInfo,
ref VkShaderModuleIdentifierEXT pIdentifier
)
{
fixed (VkShaderModuleIdentifierEXT* pIdentifierFixed = &pIdentifier)
fixed (VkShaderModuleCreateInfo* pCreateInfoFixed = &pCreateInfo)
{
handle.PInvoke.vkGetShaderModuleCreateInfoIdentifierEXT.Invoke(
handle.Handle,
pCreateInfoFixed,
pIdentifierFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkShaderModuleIdentifierEXT.</returns>
public static VkShaderModuleIdentifierEXT GetShaderModuleCreateInfoIdentifierEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkShaderModuleCreateInfo pCreateInfo
)
{
VkShaderModuleIdentifierEXT outValue = new();
GetShaderModuleCreateInfoIdentifierEXT(handle, pCreateInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateOpticalFlowSessionNV.html">vkCreateOpticalFlowSessionNV</see> - Creates an optical flow session object
/// </summary>
/// <remarks>
/// <para>
/// To create an optical flow session object, call:
/// </para>
/// <code>
/// // Provided by VK_NV_optical_flow
/// VkResult vkCreateOpticalFlowSessionNV(
/// VkDevice device,
/// const VkOpticalFlowSessionCreateInfoNV* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkOpticalFlowSessionNV* pSession);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkOpticalFlowSessionNV CreateOpticalFlowSessionNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyOpticalFlowSessionNV.html">vkDestroyOpticalFlowSessionNV</see> - Destroy optical flow session object
/// </summary>
/// <remarks>
/// <para>
/// To destroy an optical flow session object, call:
/// </para>
/// <code>
/// // Provided by VK_NV_optical_flow
/// void vkDestroyOpticalFlowSessionNV(
/// VkDevice device,
/// VkOpticalFlowSessionNV session,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyOpticalFlowSessionNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkOpticalFlowSessionNV session,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyOpticalFlowSessionNV.Invoke(handle.Handle, session, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkBindOpticalFlowSessionImageNV.html">vkBindOpticalFlowSessionImageNV</see> - Bind image to an optical flow session
/// </summary>
/// <remarks>
/// <para>
/// To bind a Vulkan image to an optical flow session object, call:
/// </para>
/// <code>
/// // Provided by VK_NV_optical_flow
/// VkResult vkBindOpticalFlowSessionImageNV(
/// VkDevice device,
/// VkOpticalFlowSessionNV session,
/// VkOpticalFlowSessionBindingPointNV bindingPoint,
/// VkImageView view,
/// VkImageLayout layout);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void BindOpticalFlowSessionImageNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdOpticalFlowExecuteNV.html">vkCmdOpticalFlowExecuteNV</see> - Calculate optical flow vectors
/// </summary>
/// <remarks>
/// <para>
/// 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.
/// </para>
/// <para>
/// To calculate optical flow vectors from two input frames, call:
/// </para>
/// <code>
/// // Provided by VK_NV_optical_flow
/// void vkCmdOpticalFlowExecuteNV(
/// VkCommandBuffer commandBuffer,
/// VkOpticalFlowSessionNV session,
/// const VkOpticalFlowExecuteInfoNV* pExecuteInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void OpticalFlowExecuteNV<T>(
this T handle,
VkOpticalFlowSessionNV session,
in VkOpticalFlowExecuteInfoNV pExecuteInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkOpticalFlowExecuteInfoNV* pExecuteInfoFixed = &pExecuteInfo)
{
handle.PInvoke.vkCmdOpticalFlowExecuteNV.Invoke(handle.Handle, session, pExecuteInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkAntiLagUpdateAMD.html">vkAntiLagUpdateAMD</see> - Provide information to reduce latency
/// </summary>
/// <remarks>
/// <para>
/// To lower latency, call:
/// </para>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void AntiLagUpdateAMD(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkAntiLagDataAMD* pData
)
{
handle.PInvoke.vkAntiLagUpdateAMD.Invoke(handle.Handle, pData);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateShadersEXT.html">vkCreateShadersEXT</see> - Create one or more new shaders
/// </summary>
/// <remarks>
/// <para>
/// To create one or more shader objects, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_shader_object
/// VkResult vkCreateShadersEXT(
/// VkDevice device,
/// uint32_t createInfoCount,
/// const VkShaderCreateInfoEXT* pCreateInfos,
/// const VkAllocationCallbacks* pAllocator,
/// VkShaderEXT* pShaders);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CreateShadersEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkShaderCreateInfoEXT> pCreateInfos,
VkAllocator? pAllocator,
scoped ReadOnlySpan<VkShaderEXT> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyShaderEXT.html">vkDestroyShaderEXT</see> - Destroy a shader object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a shader object, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_shader_object
/// void vkDestroyShaderEXT(
/// VkDevice device,
/// VkShaderEXT shader,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyShaderEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkShaderEXT shader,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyShaderEXT.Invoke(handle.Handle, shader, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetShaderBinaryDataEXT.html">vkGetShaderBinaryDataEXT</see> - Get the binary shader code from a shader object
/// </summary>
/// <remarks>
/// <para>
/// Binary shader code <i>can</i> be retrieved from a shader object using the command:
/// </para>
/// <code>
/// // Provided by VK_EXT_shader_object
/// VkResult vkGetShaderBinaryDataEXT(
/// VkDevice device,
/// VkShaderEXT shader,
/// size_t* pDataSize,
/// void* pData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe VkResult GetShaderBinaryDataEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkShaderEXT shader,
ref nuint pDataSize,
scoped ReadOnlySpan<byte> 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;
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static nuint GetShaderBinaryDataEXT_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkShaderEXT shader
)
{
nuint pDataSize = default;
GetShaderBinaryDataEXT(handle, shader, ref pDataSize, null);
return pDataSize;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pData">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static VkResult GetShaderBinaryDataEXT_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkShaderEXT shader,
scoped ReadOnlySpan<byte> pData
)
{
nuint pDataSize = (nuint)pData.Length;
return GetShaderBinaryDataEXT(handle, shader, ref pDataSize, pData);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindShadersEXT.html">vkCmdBindShadersEXT</see> - Bind shader objects to a command buffer
/// </summary>
/// <remarks>
/// <para>
/// Once shader objects have been created, they <i>can</i> be bound to the command
/// buffer using the command:
/// </para>
/// <code>
/// // Provided by VK_EXT_shader_object
/// void vkCmdBindShadersEXT(
/// VkCommandBuffer commandBuffer,
/// uint32_t stageCount,
/// const VkShaderStageFlagBits* pStages,
/// const VkShaderEXT* pShaders);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindShadersEXT<T>(
this T handle,
scoped ReadOnlySpan<VkShaderStageFlags> pStages,
scoped ReadOnlySpan<VkShaderEXT> pShaders
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkShaderEXT* pShadersFixed = pShaders)
fixed (VkShaderStageFlags* pStagesFixed = pStages)
{
handle.PInvoke.vkCmdBindShadersEXT.Invoke(handle.Handle, pStages.Length, pStagesFixed, pShadersFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetDepthClampRangeEXT.html">vkCmdSetDepthClampRangeEXT</see> - Set the viewport depth clamp range dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the viewport depth clamp
/// range parameters, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetDepthClampRangeEXT<T>(
this T handle,
VkDepthClampModeEXT depthClampMode,
VkDepthClampRangeEXT* pDepthClampRange
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetDepthClampRangeEXT.Invoke(handle.Handle, depthClampMode, pDepthClampRange);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetFramebufferTilePropertiesQCOM.html">vkGetFramebufferTilePropertiesQCOM</see> - Get tile properties from the attachments in framebuffer
/// </summary>
/// <remarks>
/// <para>
/// To query the tile properties from the attachments in framebuffer, call:
/// </para>
/// <code>
/// // Provided by VK_QCOM_tile_properties
/// VkResult vkGetFramebufferTilePropertiesQCOM(
/// VkDevice device,
/// VkFramebuffer framebuffer,
/// uint32_t* pPropertiesCount,
/// VkTilePropertiesQCOM* pProperties);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe VkResult GetFramebufferTilePropertiesQCOM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkFramebuffer framebuffer,
ref int pPropertiesCount,
scoped ReadOnlySpan<VkTilePropertiesQCOM> 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;
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static int GetFramebufferTilePropertiesQCOM_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkFramebuffer framebuffer
)
{
int pPropertiesCount = default;
GetFramebufferTilePropertiesQCOM(handle, framebuffer, ref pPropertiesCount, null);
return pPropertiesCount;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pProperties">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static VkResult GetFramebufferTilePropertiesQCOM_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkFramebuffer framebuffer,
scoped ReadOnlySpan<VkTilePropertiesQCOM> pProperties
)
{
int pPropertiesCount = pProperties.Length;
return GetFramebufferTilePropertiesQCOM(handle, framebuffer, ref pPropertiesCount, pProperties);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDynamicRenderingTilePropertiesQCOM.html">vkGetDynamicRenderingTilePropertiesQCOM</see> - Get the properties when using dynamic rendering
/// </summary>
/// <remarks>
/// <para>
/// To query the tile properties when using dynamic rendering, call:
/// </para>
/// <code>
/// // Provided by VK_QCOM_tile_properties
/// VkResult vkGetDynamicRenderingTilePropertiesQCOM(
/// VkDevice device,
/// const VkRenderingInfo* pRenderingInfo,
/// VkTilePropertiesQCOM* pProperties);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetDynamicRenderingTilePropertiesQCOM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkTilePropertiesQCOM.</returns>
public static VkTilePropertiesQCOM GetDynamicRenderingTilePropertiesQCOM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkRenderingInfo pRenderingInfo
)
{
VkTilePropertiesQCOM outValue = new();
GetDynamicRenderingTilePropertiesQCOM(handle, pRenderingInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkConvertCooperativeVectorMatrixNV.html">vkConvertCooperativeVectorMatrixNV</see> - Convert a cooperative vector matrix from one layout and type to another
/// </summary>
/// <remarks>
/// <para>
/// To query the size of a cooperative vector matrix, or to convert a matrix to
/// another layout and type, call:
/// </para>
/// <code>
/// // Provided by VK_NV_cooperative_vector
/// VkResult vkConvertCooperativeVectorMatrixNV(
/// VkDevice device,
/// const VkConvertCooperativeVectorMatrixInfoNV* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult ConvertCooperativeVectorMatrixNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdConvertCooperativeVectorMatrixNV.html">vkCmdConvertCooperativeVectorMatrixNV</see> - Convert a cooperative vector matrix from one layout and type to another
/// </summary>
/// <remarks>
/// <para>
/// To convert a matrix to another layout and type, call:
/// </para>
/// <code>
/// // Provided by VK_NV_cooperative_vector
/// void vkCmdConvertCooperativeVectorMatrixNV(
/// VkCommandBuffer commandBuffer,
/// uint32_t infoCount,
/// const VkConvertCooperativeVectorMatrixInfoNV* pInfos);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void ConvertCooperativeVectorMatrixNV<T>(
this T handle,
scoped ReadOnlySpan<VkConvertCooperativeVectorMatrixInfoNV> pInfos
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkConvertCooperativeVectorMatrixInfoNV* pInfosFixed = pInfos)
{
handle.PInvoke.vkCmdConvertCooperativeVectorMatrixNV.Invoke(handle.Handle, pInfos.Length, pInfosFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkSetLatencySleepModeNV.html">vkSetLatencySleepModeNV</see> - Enable or Disable low latency mode on a swapchain
/// </summary>
/// <remarks>
/// <para>
/// To enable or disable low latency mode on a swapchain, call:
/// </para>
/// <code>
/// // Provided by VK_NV_low_latency2
/// VkResult vkSetLatencySleepModeNV(
/// VkDevice device,
/// VkSwapchainKHR swapchain,
/// const VkLatencySleepModeInfoNV* pSleepModeInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetLatencySleepModeNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkLatencySleepNV.html">vkLatencySleepNV</see> - Trigger low latency mode Sleep
/// </summary>
/// <remarks>
/// <para>
/// To provide the synchronization primitive used to delay host CPU work for
/// lower latency rendering, call:
/// </para>
/// <code>
/// // Provided by VK_NV_low_latency2
/// VkResult vkLatencySleepNV(
/// VkDevice device,
/// VkSwapchainKHR swapchain,
/// const VkLatencySleepInfoNV* pSleepInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void LatencySleepNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkSetLatencyMarkerNV.html">vkSetLatencyMarkerNV</see> - Pass in marker for timing info
/// </summary>
/// <remarks>
/// <para>
/// An application <i>can</i> provide timestamps at various stages of its frame
/// generation work by calling:
/// </para>
/// <code>
/// // Provided by VK_NV_low_latency2
/// void vkSetLatencyMarkerNV(
/// VkDevice device,
/// VkSwapchainKHR swapchain,
/// const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetLatencyMarkerNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSwapchainKHR swapchain,
in VkSetLatencyMarkerInfoNV pLatencyMarkerInfo
)
{
fixed (VkSetLatencyMarkerInfoNV* pLatencyMarkerInfoFixed = &pLatencyMarkerInfo)
{
handle.PInvoke.vkSetLatencyMarkerNV.Invoke(handle.Handle, swapchain, pLatencyMarkerInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetLatencyTimingsNV.html">vkGetLatencyTimingsNV</see> - Get latency marker results
/// </summary>
/// <remarks>
/// <para>
/// To get an array containing the newest collected latency data, call:
/// </para>
/// <code>
/// // Provided by VK_NV_low_latency2
/// void vkGetLatencyTimingsNV(
/// VkDevice device,
/// VkSwapchainKHR swapchain,
/// VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetLatencyTimingsNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkSwapchainKHR swapchain,
in VkGetLatencyMarkerInfoNV pLatencyMarkerInfo
)
{
fixed (VkGetLatencyMarkerInfoNV* pLatencyMarkerInfoFixed = &pLatencyMarkerInfo)
{
handle.PInvoke.vkGetLatencyTimingsNV.Invoke(handle.Handle, swapchain, pLatencyMarkerInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkQueueNotifyOutOfBandNV.html">vkQueueNotifyOutOfBandNV</see> - Notify out of band queue
/// </summary>
/// <remarks>
/// <para>
/// To mark a queue as <i>out of band</i>, so that all <c>vkQueueSubmit</c> calls on
/// the queue are ignored for latency evaluation, call:
/// </para>
/// <code>
/// // Provided by VK_NV_low_latency2
/// void vkQueueNotifyOutOfBandNV(
/// VkQueue queue,
/// const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void NotifyOutOfBandNV(
this VulkanHandleWrapper<VkQueue, VkDevice.FunctionTable> handle,
in VkOutOfBandQueueTypeInfoNV pQueueTypeInfo
)
{
fixed (VkOutOfBandQueueTypeInfoNV* pQueueTypeInfoFixed = &pQueueTypeInfo)
{
handle.PInvoke.vkQueueNotifyOutOfBandNV.Invoke(handle.Handle, pQueueTypeInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateDataGraphPipelinesARM.html">vkCreateDataGraphPipelinesARM</see> - Create data graph pipeline objects
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateDataGraphPipelinesARM
/// </para>
/// <para>
/// To create data graph pipelines, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CreateDataGraphPipelinesARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDeferredOperationKHR deferredOperation,
VkPipelineCache pipelineCache,
scoped ReadOnlySpan<VkDataGraphPipelineCreateInfoARM> pCreateInfos,
VkAllocator? pAllocator,
scoped ReadOnlySpan<VkPipeline> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateDataGraphPipelineSessionARM.html">vkCreateDataGraphPipelineSessionARM</see> - Create a data graph pipeline session
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateDataGraphPipelineSessionARM
/// </para>
/// <para>
/// To create a data graph pipeline session, call
/// </para>
/// <code>
/// // Provided by VK_ARM_data_graph
/// VkResult vkCreateDataGraphPipelineSessionARM(
/// VkDevice device,
/// const VkDataGraphPipelineSessionCreateInfoARM* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkDataGraphPipelineSessionARM* pSession);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkDataGraphPipelineSessionARM CreateDataGraphPipelineSessionARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDataGraphPipelineSessionBindPointRequirementsARM.html">vkGetDataGraphPipelineSessionBindPointRequirementsARM</see> - Get the bind point requirements of a data graph pipeline session
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetDataGraphPipelineSessionBindPointRequirementsARM
/// </para>
/// <para>
/// To determine the bind point requirements for a data graph pipeline session,
/// call:
/// </para>
/// <code>
/// // Provided by VK_ARM_data_graph
/// VkResult vkGetDataGraphPipelineSessionBindPointRequirementsARM(
/// VkDevice device,
/// const VkDataGraphPipelineSessionBindPointRequirementsInfoARM* pInfo,
/// uint32_t* pBindPointRequirementCount,
/// VkDataGraphPipelineSessionBindPointRequirementARM* pBindPointRequirements);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe VkResult GetDataGraphPipelineSessionBindPointRequirementsARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDataGraphPipelineSessionBindPointRequirementsInfoARM pInfo,
ref int pBindPointRequirementCount,
scoped ReadOnlySpan<VkDataGraphPipelineSessionBindPointRequirementARM> 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;
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static int GetDataGraphPipelineSessionBindPointRequirementsARM_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDataGraphPipelineSessionBindPointRequirementsInfoARM pInfo
)
{
int pBindPointRequirementCount = default;
GetDataGraphPipelineSessionBindPointRequirementsARM(handle, pInfo, ref pBindPointRequirementCount, null);
return pBindPointRequirementCount;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pBindPointRequirements">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static VkResult GetDataGraphPipelineSessionBindPointRequirementsARM_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDataGraphPipelineSessionBindPointRequirementsInfoARM pInfo,
scoped ReadOnlySpan<VkDataGraphPipelineSessionBindPointRequirementARM> pBindPointRequirements
)
{
int pBindPointRequirementCount = pBindPointRequirements.Length;
return GetDataGraphPipelineSessionBindPointRequirementsARM(
handle,
pInfo,
ref pBindPointRequirementCount,
pBindPointRequirements
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDataGraphPipelineSessionMemoryRequirementsARM.html">vkGetDataGraphPipelineSessionMemoryRequirementsARM</see> - Get the memory requirements of a data graph pipeline session
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetDataGraphPipelineSessionMemoryRequirementsARM
/// </para>
/// <para>
/// To determine the memory requirements for a data graph pipeline session,
/// call:
/// </para>
/// <code>
/// // Provided by VK_ARM_data_graph
/// void vkGetDataGraphPipelineSessionMemoryRequirementsARM(
/// VkDevice device,
/// const VkDataGraphPipelineSessionMemoryRequirementsInfoARM* pInfo,
/// VkMemoryRequirements2* pMemoryRequirements);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetDataGraphPipelineSessionMemoryRequirementsARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDataGraphPipelineSessionMemoryRequirementsInfoARM pInfo,
ref VkMemoryRequirements2 pMemoryRequirements
)
{
fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements)
fixed (VkDataGraphPipelineSessionMemoryRequirementsInfoARM* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetDataGraphPipelineSessionMemoryRequirementsARM.Invoke(
handle.Handle,
pInfoFixed,
pMemoryRequirementsFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryRequirements2.</returns>
public static VkMemoryRequirements2 GetDataGraphPipelineSessionMemoryRequirementsARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDataGraphPipelineSessionMemoryRequirementsInfoARM pInfo
)
{
VkMemoryRequirements2 outValue = new();
GetDataGraphPipelineSessionMemoryRequirementsARM(handle, pInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkBindDataGraphPipelineSessionMemoryARM.html">vkBindDataGraphPipelineSessionMemoryARM</see> - Bind device memory to a data graph pipeline session object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkBindDataGraphPipelineSessionMemoryARM
/// </para>
/// <para>
/// To attach memory to a data graph pipeline session object, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_data_graph
/// VkResult vkBindDataGraphPipelineSessionMemoryARM(
/// VkDevice device,
/// uint32_t bindInfoCount,
/// const VkBindDataGraphPipelineSessionMemoryInfoARM* pBindInfos);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindDataGraphPipelineSessionMemoryARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkBindDataGraphPipelineSessionMemoryInfoARM> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyDataGraphPipelineSessionARM.html">vkDestroyDataGraphPipelineSessionARM</see> - Destroy a data graph pipeline session object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkDestroyDataGraphPipelineSessionARM
/// </para>
/// <para>
/// To destroy a data graph pipeline session, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_data_graph
/// void vkDestroyDataGraphPipelineSessionARM(
/// VkDevice device,
/// VkDataGraphPipelineSessionARM session,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyDataGraphPipelineSessionARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDataGraphPipelineSessionARM session,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyDataGraphPipelineSessionARM.Invoke(handle.Handle, session, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDispatchDataGraphARM.html">vkCmdDispatchDataGraphARM</see> - Dispatch a data graph pipeline within a session
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDispatchDataGraphARM
/// </para>
/// <para>
/// To record a data graph pipeline dispatch, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_data_graph
/// void vkCmdDispatchDataGraphARM(
/// VkCommandBuffer commandBuffer,
/// VkDataGraphPipelineSessionARM session,
/// const VkDataGraphPipelineDispatchInfoARM* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DispatchDataGraphARM<T>(
this T handle,
VkDataGraphPipelineSessionARM session,
in VkDataGraphPipelineDispatchInfoARM pInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkDataGraphPipelineDispatchInfoARM* pInfoFixed = &pInfo)
{
handle.PInvoke.vkCmdDispatchDataGraphARM.Invoke(handle.Handle, session, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDataGraphPipelineAvailablePropertiesARM.html">vkGetDataGraphPipelineAvailablePropertiesARM</see> - Query available properties of a data graph pipeline
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetDataGraphPipelineAvailablePropertiesARM
/// </para>
/// <para>
/// To query the properties of a data graph pipeline that can be obtained, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_data_graph
/// VkResult vkGetDataGraphPipelineAvailablePropertiesARM(
/// VkDevice device,
/// const VkDataGraphPipelineInfoARM* pPipelineInfo,
/// uint32_t* pPropertiesCount,
/// VkDataGraphPipelinePropertyARM* pProperties);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe VkResult GetDataGraphPipelineAvailablePropertiesARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDataGraphPipelineInfoARM pPipelineInfo,
ref int pPropertiesCount,
scoped ReadOnlySpan<VkDataGraphPipelinePropertyARM> 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;
}
}
/// <summary>Queries the required length.</summary>
/// <returns>The required length.</returns>
public static int GetDataGraphPipelineAvailablePropertiesARM_Count(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDataGraphPipelineInfoARM pPipelineInfo
)
{
int pPropertiesCount = default;
GetDataGraphPipelineAvailablePropertiesARM(handle, pPipelineInfo, ref pPropertiesCount, null);
return pPropertiesCount;
}
/// <summary>Writes to a provided span.</summary>
/// <param name="pProperties">The span to write to.</param>
/// <returns>Return value of the underlying function.</returns>
public static VkResult GetDataGraphPipelineAvailablePropertiesARM_Write(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDataGraphPipelineInfoARM pPipelineInfo,
scoped ReadOnlySpan<VkDataGraphPipelinePropertyARM> pProperties
)
{
int pPropertiesCount = pProperties.Length;
return GetDataGraphPipelineAvailablePropertiesARM(handle, pPipelineInfo, ref pPropertiesCount, pProperties);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDataGraphPipelinePropertiesARM.html">vkGetDataGraphPipelinePropertiesARM</see> - Query properties of a data graph pipeline
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetDataGraphPipelinePropertiesARM
/// </para>
/// <para>
/// To query properties of a data graph pipeline, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_data_graph
/// VkResult vkGetDataGraphPipelinePropertiesARM(
/// VkDevice device,
/// const VkDataGraphPipelineInfoARM* pPipelineInfo,
/// uint32_t propertiesCount,
/// VkDataGraphPipelinePropertyQueryResultARM* pProperties);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult GetDataGraphPipelinePropertiesARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkDataGraphPipelineInfoARM pPipelineInfo,
scoped ReadOnlySpan<VkDataGraphPipelinePropertyQueryResultARM> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetAttachmentFeedbackLoopEnableEXT.html">vkCmdSetAttachmentFeedbackLoopEnableEXT</see> - Specify whether attachment feedback loops are enabled dynamically on a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdSetAttachmentFeedbackLoopEnableEXT
/// </para>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> whether a pipeline <i>can</i>
/// access a resource as a non-attachment while it is also used as an attachment
/// that is written to, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_attachment_feedback_loop_dynamic_state
/// void vkCmdSetAttachmentFeedbackLoopEnableEXT(
/// VkCommandBuffer commandBuffer,
/// VkImageAspectFlags aspectMask);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetAttachmentFeedbackLoopEnableEXT<T>(this T handle, VkImageAspectFlags aspectMask)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetAttachmentFeedbackLoopEnableEXT.Invoke(handle.Handle, aspectMask);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindTileMemoryQCOM.html">vkCmdBindTileMemoryQCOM</see> - Bind tile memory to a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To bind a range of tile memory to the command buffer, call:
/// </para>
/// <code>
/// // Provided by VK_QCOM_tile_memory_heap
/// void vkCmdBindTileMemoryQCOM(
/// VkCommandBuffer commandBuffer,
/// const VkTileMemoryBindInfoQCOM* pTileMemoryBindInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BindTileMemoryQCOM<T>(this T handle, in VkTileMemoryBindInfoQCOM pTileMemoryBindInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkTileMemoryBindInfoQCOM* pTileMemoryBindInfoFixed = &pTileMemoryBindInfo)
{
handle.PInvoke.vkCmdBindTileMemoryQCOM.Invoke(handle.Handle, pTileMemoryBindInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDecompressMemoryEXT.html">vkCmdDecompressMemoryEXT</see> - Decompress data between memory regions
/// </summary>
/// <remarks>
/// <para>
/// To decompress memory containing compressed data, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_memory_decompression
/// void vkCmdDecompressMemoryEXT(
/// VkCommandBuffer commandBuffer,
/// const VkDecompressMemoryInfoEXT* pDecompressMemoryInfoEXT);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DecompressMemoryEXT<T>(
this T handle,
VkDecompressMemoryInfoEXT* pDecompressMemoryInfoEXT
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDecompressMemoryEXT.Invoke(handle.Handle, pDecompressMemoryInfoEXT);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDecompressMemoryIndirectCountEXT.html">vkCmdDecompressMemoryIndirectCountEXT</see> - Indirect decompress data between memory regions
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDecompressMemoryIndirectCountEXT
/// </para>
/// <para>
/// To decompress data between one or more memory regions by specifying
/// decompression parameters indirectly in a buffer, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_memory_decompression
/// void vkCmdDecompressMemoryIndirectCountEXT(
/// VkCommandBuffer commandBuffer,
/// VkMemoryDecompressionMethodFlagsEXT decompressionMethod,
/// VkDeviceAddress indirectCommandsAddress,
/// VkDeviceAddress indirectCommandsCountAddress,
/// uint32_t maxDecompressionCount,
/// uint32_t stride);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DecompressMemoryIndirectCountEXT<T>(
this T handle,
VkMemoryDecompressionMethodFlagsEXT decompressionMethod,
VkDeviceAddress indirectCommandsAddress,
VkDeviceAddress indirectCommandsCountAddress,
int maxDecompressionCount,
int stride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDecompressMemoryIndirectCountEXT.Invoke(
handle.Handle,
decompressionMethod,
indirectCommandsAddress,
indirectCommandsCountAddress,
maxDecompressionCount,
stride
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateExternalComputeQueueNV.html">vkCreateExternalComputeQueueNV</see> - Create an external compute queue for use by a compatible external API.
/// </summary>
/// <remarks>
/// <para>
/// To create an external compute queue for use by compatible external APIs
/// call:
/// </para>
/// <code>
/// // Provided by VK_NV_external_compute_queue
/// VkResult vkCreateExternalComputeQueueNV(
/// VkDevice device,
/// const VkExternalComputeQueueCreateInfoNV* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkExternalComputeQueueNV* pExternalQueue);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkExternalComputeQueueNV CreateExternalComputeQueueNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyExternalComputeQueueNV.html">vkDestroyExternalComputeQueueNV</see> - Destroys an external queue.
/// </summary>
/// <remarks>
/// <para>
/// To destroy a previously created external compute queue call:
/// </para>
/// <code>
/// // Provided by VK_NV_external_compute_queue
/// void vkDestroyExternalComputeQueueNV(
/// VkDevice device,
/// VkExternalComputeQueueNV externalQueue,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyExternalComputeQueueNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkExternalComputeQueueNV externalQueue,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyExternalComputeQueueNV.Invoke(handle.Handle, externalQueue, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetExternalComputeQueueDataNV.html">vkGetExternalComputeQueueDataNV</see> - Retrieves data necessary for compatible external API initialization
/// </summary>
/// <remarks>
/// <para>
/// To query the implementation-specific data that must be passed to compatible
/// external APIs during their initialization process call:
/// </para>
/// <code>
/// // Provided by VK_NV_external_compute_queue
/// void vkGetExternalComputeQueueDataNV(
/// VkExternalComputeQueueNV externalQueue,
/// VkExternalComputeQueueDataParamsNV* params,
/// void* pData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void* GetExternalComputeQueueDataNV(
this VulkanHandleWrapper<VkExternalComputeQueueNV, VkDevice.FunctionTable> handle,
VkExternalComputeQueueDataParamsNV* @params
)
{
void* pDataLocal = default;
handle.PInvoke.vkGetExternalComputeQueueDataNV.Invoke(handle.Handle, @params, pDataLocal);
return pDataLocal;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetClusterAccelerationStructureBuildSizesNV.html">vkGetClusterAccelerationStructureBuildSizesNV</see> - Retrieve the buffer allocation requirements for cluster geometry command
/// </summary>
/// <remarks>
/// <para>
/// These cluster acceleration structures <i>can</i> be built or moved by a single
/// versatile multi-indirect function
/// <c>vkCmdBuildClusterAccelerationStructureIndirectNV</c>.
/// To determine the memory requirements for executing this function, call:
/// </para>
/// <code>
/// // Provided by VK_NV_cluster_acceleration_structure
/// void vkGetClusterAccelerationStructureBuildSizesNV(
/// VkDevice device,
/// const VkClusterAccelerationStructureInputInfoNV* pInfo,
/// VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetClusterAccelerationStructureBuildSizesNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkClusterAccelerationStructureInputInfoNV pInfo,
in VkAccelerationStructureBuildSizesInfoKHR pSizeInfo
)
{
fixed (VkAccelerationStructureBuildSizesInfoKHR* pSizeInfoFixed = &pSizeInfo)
fixed (VkClusterAccelerationStructureInputInfoNV* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetClusterAccelerationStructureBuildSizesNV.Invoke(
handle.Handle,
pInfoFixed,
pSizeInfoFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBuildClusterAccelerationStructureIndirectNV.html">vkCmdBuildClusterAccelerationStructureIndirectNV</see> - Build or move cluster acceleration structures
/// </summary>
/// <remarks>
/// <para>
/// To build or move a cluster acceleration structure or a cluster acceleration
/// structure template call:
/// </para>
/// <code>
/// // Provided by VK_NV_cluster_acceleration_structure
/// void vkCmdBuildClusterAccelerationStructureIndirectNV(
/// VkCommandBuffer commandBuffer,
/// const VkClusterAccelerationStructureCommandsInfoNV* pCommandInfos);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BuildClusterAccelerationStructureIndirectNV<T>(
this T handle,
VkClusterAccelerationStructureCommandsInfoNV* pCommandInfos
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdBuildClusterAccelerationStructureIndirectNV.Invoke(handle.Handle, pCommandInfos);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetPartitionedAccelerationStructuresBuildSizesNV.html">vkGetPartitionedAccelerationStructuresBuildSizesNV</see> - Retrieve the buffer allocation requirements for partitioned acceleration structure command
/// </summary>
/// <remarks>
/// <para>
/// To determine the memory requirements for a PTAS, call:
/// </para>
/// <code>
/// // Provided by VK_NV_partitioned_acceleration_structure
/// void vkGetPartitionedAccelerationStructuresBuildSizesNV(
/// VkDevice device,
/// const VkPartitionedAccelerationStructureInstancesInputNV* pInfo,
/// VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetPartitionedAccelerationStructuresBuildSizesNV(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkPartitionedAccelerationStructureInstancesInputNV pInfo,
in VkAccelerationStructureBuildSizesInfoKHR pSizeInfo
)
{
fixed (VkAccelerationStructureBuildSizesInfoKHR* pSizeInfoFixed = &pSizeInfo)
fixed (VkPartitionedAccelerationStructureInstancesInputNV* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetPartitionedAccelerationStructuresBuildSizesNV.Invoke(
handle.Handle,
pInfoFixed,
pSizeInfoFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBuildPartitionedAccelerationStructuresNV.html">vkCmdBuildPartitionedAccelerationStructuresNV</see> - Command for building a PTLAS
/// </summary>
/// <remarks>
/// <para>
/// To build a partitioned top level acceleration structure, call:
/// </para>
/// <code>
/// // Provided by VK_NV_partitioned_acceleration_structure
/// void vkCmdBuildPartitionedAccelerationStructuresNV(
/// VkCommandBuffer commandBuffer,
/// const VkBuildPartitionedAccelerationStructureInfoNV* pBuildInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BuildPartitionedAccelerationStructuresNV<T>(
this T handle,
in VkBuildPartitionedAccelerationStructureInfoNV pBuildInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkBuildPartitionedAccelerationStructureInfoNV* pBuildInfoFixed = &pBuildInfo)
{
handle.PInvoke.vkCmdBuildPartitionedAccelerationStructuresNV.Invoke(handle.Handle, pBuildInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetGeneratedCommandsMemoryRequirementsEXT.html">vkGetGeneratedCommandsMemoryRequirementsEXT</see> - Retrieve the buffer allocation requirements for generated commands
/// </summary>
/// <remarks>
/// <para>
/// With `<c>VK_EXT_device_generated_commands</c>`, to retrieve the memory size
/// and alignment requirements of a particular execution state call:
/// </para>
/// <code>
/// // Provided by VK_EXT_device_generated_commands
/// void vkGetGeneratedCommandsMemoryRequirementsEXT(
/// VkDevice device,
/// const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo,
/// VkMemoryRequirements2* pMemoryRequirements);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetGeneratedCommandsMemoryRequirementsEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkGeneratedCommandsMemoryRequirementsInfoEXT pInfo,
ref VkMemoryRequirements2 pMemoryRequirements
)
{
fixed (VkMemoryRequirements2* pMemoryRequirementsFixed = &pMemoryRequirements)
fixed (VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfoFixed = &pInfo)
{
handle.PInvoke.vkGetGeneratedCommandsMemoryRequirementsEXT.Invoke(
handle.Handle,
pInfoFixed,
pMemoryRequirementsFixed
);
}
}
/// <summary>Wrapper that returns the struct instead of taking it as a ref parameter.</summary>
/// <returns>The VkMemoryRequirements2.</returns>
public static VkMemoryRequirements2 GetGeneratedCommandsMemoryRequirementsEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkGeneratedCommandsMemoryRequirementsInfoEXT pInfo
)
{
VkMemoryRequirements2 outValue = new();
GetGeneratedCommandsMemoryRequirementsEXT(handle, pInfo, ref outValue);
return outValue;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPreprocessGeneratedCommandsEXT.html">vkCmdPreprocessGeneratedCommandsEXT</see> - Performs preprocessing for generated commands
/// </summary>
/// <remarks>
/// <para>
/// Commands <i>can</i> be preprocessed prior execution using the following command:
/// </para>
/// <code>
/// // Provided by VK_EXT_device_generated_commands
/// void vkCmdPreprocessGeneratedCommandsEXT(
/// VkCommandBuffer commandBuffer,
/// const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo,
/// VkCommandBuffer stateCommandBuffer);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void PreprocessGeneratedCommandsEXT<T>(
this T handle,
in VkGeneratedCommandsInfoEXT pGeneratedCommandsInfo,
VkCommandBuffer stateCommandBuffer
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfoFixed = &pGeneratedCommandsInfo)
{
handle.PInvoke.vkCmdPreprocessGeneratedCommandsEXT.Invoke(
handle.Handle,
pGeneratedCommandsInfoFixed,
stateCommandBuffer
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdExecuteGeneratedCommandsEXT.html">vkCmdExecuteGeneratedCommandsEXT</see> - Generate and execute commands on the device
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdExecuteGeneratedCommandsEXT
/// </para>
/// <para>
/// With `<c>VK_EXT_device_generated_commands</c>`, the actual generation of
/// commands as well as their execution on the device is handled as single
/// action with:
/// </para>
/// <code>
/// // Provided by VK_EXT_device_generated_commands
/// void vkCmdExecuteGeneratedCommandsEXT(
/// VkCommandBuffer commandBuffer,
/// VkBool32 isPreprocessed,
/// const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void ExecuteGeneratedCommandsEXT<T>(
this T handle,
Brutal.Bool32 isPreprocessed,
in VkGeneratedCommandsInfoEXT pGeneratedCommandsInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfoFixed = &pGeneratedCommandsInfo)
{
handle.PInvoke.vkCmdExecuteGeneratedCommandsEXT.Invoke(
handle.Handle,
isPreprocessed,
pGeneratedCommandsInfoFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateIndirectCommandsLayoutEXT.html">vkCreateIndirectCommandsLayoutEXT</see> - Create an indirect command layout object
/// </summary>
/// <remarks>
/// <para>
/// Indirect command layouts for `<c>VK_EXT_device_generated_commands</c>` are
/// created by:
/// </para>
/// <code>
/// // Provided by VK_EXT_device_generated_commands
/// VkResult vkCreateIndirectCommandsLayoutEXT(
/// VkDevice device,
/// const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkIndirectCommandsLayoutEXT CreateIndirectCommandsLayoutEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyIndirectCommandsLayoutEXT.html">vkDestroyIndirectCommandsLayoutEXT</see> - Destroy an indirect commands layout
/// </summary>
/// <remarks>
/// <para>
/// Indirect command layouts for `<c>VK_EXT_device_generated_commands</c>` are
/// destroyed by:
/// </para>
/// <code>
/// // Provided by VK_EXT_device_generated_commands
/// void vkDestroyIndirectCommandsLayoutEXT(
/// VkDevice device,
/// VkIndirectCommandsLayoutEXT indirectCommandsLayout,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyIndirectCommandsLayoutEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkIndirectCommandsLayoutEXT indirectCommandsLayout,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyIndirectCommandsLayoutEXT.Invoke(handle.Handle, indirectCommandsLayout, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateIndirectExecutionSetEXT.html">vkCreateIndirectExecutionSetEXT</see> - Create an indirect execution set
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateIndirectExecutionSetEXT
/// </para>
/// <para>
/// Indirect Execution Sets are created by calling:
/// </para>
/// <code>
/// // Provided by VK_EXT_device_generated_commands
/// VkResult vkCreateIndirectExecutionSetEXT(
/// VkDevice device,
/// const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkIndirectExecutionSetEXT* pIndirectExecutionSet);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkIndirectExecutionSetEXT CreateIndirectExecutionSetEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyIndirectExecutionSetEXT.html">vkDestroyIndirectExecutionSetEXT</see> - Destroy an indirect execution set
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkDestroyIndirectExecutionSetEXT
/// </para>
/// <para>
/// Destroy an Indirect Execution Set by calling:
/// </para>
/// <code>
/// // Provided by VK_EXT_device_generated_commands
/// void vkDestroyIndirectExecutionSetEXT(
/// VkDevice device,
/// VkIndirectExecutionSetEXT indirectExecutionSet,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyIndirectExecutionSetEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkIndirectExecutionSetEXT indirectExecutionSet,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyIndirectExecutionSetEXT.Invoke(handle.Handle, indirectExecutionSet, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkUpdateIndirectExecutionSetPipelineEXT.html">vkUpdateIndirectExecutionSetPipelineEXT</see> - Update the contents of an indirect execution set
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkUpdateIndirectExecutionSetPipelineEXT
/// </para>
/// <para>
/// Pipeline elements in an Indirect Execution Set can be updated by calling:
/// </para>
/// <code>
/// // Provided by VK_EXT_device_generated_commands
/// void vkUpdateIndirectExecutionSetPipelineEXT(
/// VkDevice device,
/// VkIndirectExecutionSetEXT indirectExecutionSet,
/// uint32_t executionSetWriteCount,
/// const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void UpdateIndirectExecutionSetPipelineEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkIndirectExecutionSetEXT indirectExecutionSet,
scoped ReadOnlySpan<VkWriteIndirectExecutionSetPipelineEXT> pExecutionSetWrites
)
{
fixed (VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWritesFixed = pExecutionSetWrites)
{
handle.PInvoke.vkUpdateIndirectExecutionSetPipelineEXT.Invoke(
handle.Handle,
indirectExecutionSet,
pExecutionSetWrites.Length,
pExecutionSetWritesFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkUpdateIndirectExecutionSetShaderEXT.html">vkUpdateIndirectExecutionSetShaderEXT</see> - Update the contents of an indirect execution set
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkUpdateIndirectExecutionSetShaderEXT
/// </para>
/// <para>
/// Shader object elements in an Indirect Execution Set can be updated by
/// calling:
/// </para>
/// <code>
/// // Provided by VK_EXT_device_generated_commands
/// void vkUpdateIndirectExecutionSetShaderEXT(
/// VkDevice device,
/// VkIndirectExecutionSetEXT indirectExecutionSet,
/// uint32_t executionSetWriteCount,
/// const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void UpdateIndirectExecutionSetShaderEXT(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkIndirectExecutionSetEXT indirectExecutionSet,
scoped ReadOnlySpan<VkWriteIndirectExecutionSetShaderEXT> pExecutionSetWrites
)
{
fixed (VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWritesFixed = pExecutionSetWrites)
{
handle.PInvoke.vkUpdateIndirectExecutionSetShaderEXT.Invoke(
handle.Handle,
indirectExecutionSet,
pExecutionSetWrites.Length,
pExecutionSetWritesFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateShaderInstrumentationARM.html">vkCreateShaderInstrumentationARM</see> - Create a new shader instrumentation object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateShaderInstrumentationARM
/// :objectnameplural: shader instrumentation
/// :objectnamecamelcase: shaderInstrumentation
/// :objectnamestruct: VkDeviceObjectReservationCreateInfo
/// :objectcount: 1
/// </para>
/// <para>
/// To create a shader instrumentation object, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_shader_instrumentation
/// VkResult vkCreateShaderInstrumentationARM(
/// VkDevice device,
/// const VkShaderInstrumentationCreateInfoARM* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkShaderInstrumentationARM* pInstrumentation);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkShaderInstrumentationARM CreateShaderInstrumentationARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyShaderInstrumentationARM.html">vkDestroyShaderInstrumentationARM</see> - Destroy a shader instrumentation object
/// </summary>
/// <remarks>
/// <para>
/// To destroy a shader instrumentation object, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_shader_instrumentation
/// void vkDestroyShaderInstrumentationARM(
/// VkDevice device,
/// VkShaderInstrumentationARM instrumentation,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyShaderInstrumentationARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkShaderInstrumentationARM instrumentation,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyShaderInstrumentationARM.Invoke(handle.Handle, instrumentation, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBeginShaderInstrumentationARM.html">vkCmdBeginShaderInstrumentationARM</see> - Begin shader instrumentation
/// </summary>
/// <remarks>
/// <para>
/// To begin shader instrumentation, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_shader_instrumentation
/// void vkCmdBeginShaderInstrumentationARM(
/// VkCommandBuffer commandBuffer,
/// VkShaderInstrumentationARM instrumentation);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void BeginShaderInstrumentationARM<T>(this T handle, VkShaderInstrumentationARM instrumentation)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdBeginShaderInstrumentationARM.Invoke(handle.Handle, instrumentation);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdEndShaderInstrumentationARM.html">vkCmdEndShaderInstrumentationARM</see> - End shader instrumentation
/// </summary>
/// <remarks>
/// <para>
/// To end shader instrumentation, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_shader_instrumentation
/// void vkCmdEndShaderInstrumentationARM(
/// VkCommandBuffer commandBuffer);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void EndShaderInstrumentationARM<T>(this T handle)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdEndShaderInstrumentationARM.Invoke(handle.Handle);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetShaderInstrumentationValuesARM.html">vkGetShaderInstrumentationValuesARM</see> - Retrieve shader instrumentation data
/// </summary>
/// <remarks>
/// <para>
/// Data <i>can</i> be retrieved from an instrumentation object in units of metric
/// blocks.
/// The size of each metric block in bytes is
/// <c><c>sizeof</c>(<c>VkShaderInstrumentationMetricDataHeaderARM</c>) {plus}
/// <c>sizeof</c>(uint64_t) {times}
/// <c>VkPhysicalDeviceShaderInstrumentationPropertiesARM::numMetrics</c></c>.
/// </para>
/// <para>
/// To retrieve metric blocks from an instrumentation object, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_shader_instrumentation
/// VkResult vkGetShaderInstrumentationValuesARM(
/// VkDevice device,
/// VkShaderInstrumentationARM instrumentation,
/// uint32_t* pMetricBlockCount,
/// void* pMetricValues,
/// VkShaderInstrumentationValuesFlagsARM flags);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult GetShaderInstrumentationValuesARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkClearShaderInstrumentationMetricsARM.html">vkClearShaderInstrumentationMetricsARM</see> - Clear shader instrumentation metrics to zero
/// </summary>
/// <remarks>
/// <para>
/// [[shaders-instrumentation-clear]]
/// To clear the value of all metric blocks in an instrumentation object to
/// zero, call:
/// </para>
/// <code>
/// // Provided by VK_ARM_shader_instrumentation
/// void vkClearShaderInstrumentationMetricsARM(
/// VkDevice device,
/// VkShaderInstrumentationARM instrumentation);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void ClearShaderInstrumentationMetricsARM(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkShaderInstrumentationARM instrumentation
)
{
handle.PInvoke.vkClearShaderInstrumentationMetricsARM.Invoke(handle.Handle, instrumentation);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void EndRendering2EXT<T>(this T handle, in VkRenderingEndInfoKHR pRenderingEndInfo)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkRenderingEndInfoKHR* pRenderingEndInfoFixed = &pRenderingEndInfo)
{
handle.PInvoke.vkCmdEndRendering2EXT.Invoke(handle.Handle, pRenderingEndInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBeginCustomResolveEXT.html">vkCmdBeginCustomResolveEXT</see> - Begins a shader resolve operation
/// </summary>
/// <remarks>
/// <para>
/// To begin resolving attachments using render pass draws, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_custom_resolve with VK_KHR_dynamic_rendering or VK_VERSION_1_3
/// void vkCmdBeginCustomResolveEXT(
/// VkCommandBuffer commandBuffer,
/// const VkBeginCustomResolveInfoEXT* pBeginCustomResolveInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BeginCustomResolveEXT<T>(
this T handle,
in VkBeginCustomResolveInfoEXT pBeginCustomResolveInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkBeginCustomResolveInfoEXT* pBeginCustomResolveInfoFixed = &pBeginCustomResolveInfo)
{
handle.PInvoke.vkCmdBeginCustomResolveEXT.Invoke(handle.Handle, pBeginCustomResolveInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetComputeOccupancyPriorityNV.html">vkCmdSetComputeOccupancyPriorityNV</see> - Set the compute occupancy priority for subsequent compute dispatches
/// </summary>
/// <remarks>
/// <para>
/// To set the compute occupancy priority for subsequent compute dispatches,
/// call:
/// </para>
/// <code>
/// // Provided by VK_NV_compute_occupancy_priority
/// void vkCmdSetComputeOccupancyPriorityNV(
/// VkCommandBuffer commandBuffer,
/// const VkComputeOccupancyPriorityParametersNV* pParameters);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void SetComputeOccupancyPriorityNV<T>(
this T handle,
VkComputeOccupancyPriorityParametersNV* pParameters
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetComputeOccupancyPriorityNV.Invoke(handle.Handle, pParameters);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetPrimitiveRestartIndexEXT.html">vkCmdSetPrimitiveRestartIndexEXT</see> - Set primitive assembly restart index dynamically for a command buffer
/// </summary>
/// <remarks>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically control^</see> which special vertex
/// index value is treated as restarting the assembly of primitives, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_primitive_restart_index
/// void vkCmdSetPrimitiveRestartIndexEXT(
/// VkCommandBuffer commandBuffer,
/// uint32_t primitiveRestartIndex);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetPrimitiveRestartIndexEXT<T>(this T handle, int primitiveRestartIndex)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetPrimitiveRestartIndexEXT.Invoke(handle.Handle, primitiveRestartIndex);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateAccelerationStructureKHR.html">vkCreateAccelerationStructureKHR</see> - Create a new acceleration structure object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateAccelerationStructureKHR
/// </para>
/// <para>
/// To create an acceleration structure using a buffer, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_acceleration_structure
/// VkResult vkCreateAccelerationStructureKHR(
/// VkDevice device,
/// const VkAccelerationStructureCreateInfoKHR* pCreateInfo,
/// const VkAllocationCallbacks* pAllocator,
/// VkAccelerationStructureKHR* pAccelerationStructure);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkAccelerationStructureKHR CreateAccelerationStructureKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkDestroyAccelerationStructureKHR.html">vkDestroyAccelerationStructureKHR</see> - Destroy an acceleration structure object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkDestroyAccelerationStructureKHR
/// </para>
/// <para>
/// To destroy an acceleration structure, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_acceleration_structure
/// void vkDestroyAccelerationStructureKHR(
/// VkDevice device,
/// VkAccelerationStructureKHR accelerationStructure,
/// const VkAllocationCallbacks* pAllocator);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyAccelerationStructureKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkAccelerationStructureKHR accelerationStructure,
VkAllocator? pAllocator
)
{
handle.PInvoke.vkDestroyAccelerationStructureKHR.Invoke(handle.Handle, accelerationStructure, pAllocator);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBuildAccelerationStructuresKHR.html">vkCmdBuildAccelerationStructuresKHR</see> - Build an acceleration structure
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBuildAccelerationStructuresKHR
/// </para>
/// <para>
/// To build acceleration structures call:
/// </para>
/// <code>
/// // Provided by VK_KHR_acceleration_structure
/// void vkCmdBuildAccelerationStructuresKHR(
/// VkCommandBuffer commandBuffer,
/// uint32_t infoCount,
/// const VkAccelerationStructureBuildGeometryInfoKHR* pInfos,
/// const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BuildAccelerationStructuresKHR<T>(
this T handle,
scoped ReadOnlySpan<VkAccelerationStructureBuildGeometryInfoKHR> pInfos,
scoped ReadOnlySpan<Ptr<VkAccelerationStructureBuildRangeInfoKHR>> ppBuildRangeInfos
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (Ptr<VkAccelerationStructureBuildRangeInfoKHR>* ppBuildRangeInfosFixed = ppBuildRangeInfos)
fixed (VkAccelerationStructureBuildGeometryInfoKHR* pInfosFixed = pInfos)
{
handle.PInvoke.vkCmdBuildAccelerationStructuresKHR.Invoke(
handle.Handle,
pInfos.Length,
pInfosFixed,
(VkAccelerationStructureBuildRangeInfoKHR**)ppBuildRangeInfosFixed
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBuildAccelerationStructuresIndirectKHR.html">vkCmdBuildAccelerationStructuresIndirectKHR</see> - Build an acceleration structure with some parameters provided on the device
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdBuildAccelerationStructuresIndirectKHR
/// </para>
/// <para>
/// To build acceleration structures with some parameters sourced on the device
/// call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void BuildAccelerationStructuresIndirectKHR<T>(
this T handle,
scoped ReadOnlySpan<VkAccelerationStructureBuildGeometryInfoKHR> pInfos,
scoped ReadOnlySpan<VkDeviceAddress> pIndirectDeviceAddresses,
scoped ReadOnlySpan<int> pIndirectStrides,
scoped ReadOnlySpan<Ptr<int>> ppMaxPrimitiveCounts
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (Ptr<int>* 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
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkBuildAccelerationStructuresKHR.html">vkBuildAccelerationStructuresKHR</see> - Build an acceleration structure on the host
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkBuildAccelerationStructuresKHR
/// </para>
/// <para>
/// To build acceleration structures on the host, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_acceleration_structure
/// VkResult vkBuildAccelerationStructuresKHR(
/// VkDevice device,
/// VkDeferredOperationKHR deferredOperation,
/// uint32_t infoCount,
/// const VkAccelerationStructureBuildGeometryInfoKHR* pInfos,
/// const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult BuildAccelerationStructuresKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDeferredOperationKHR deferredOperation,
scoped ReadOnlySpan<VkAccelerationStructureBuildGeometryInfoKHR> pInfos,
scoped ReadOnlySpan<Ptr<VkAccelerationStructureBuildRangeInfoKHR>> ppBuildRangeInfos
)
{
fixed (Ptr<VkAccelerationStructureBuildRangeInfoKHR>* 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCopyAccelerationStructureKHR.html">vkCopyAccelerationStructureKHR</see> - Copy an acceleration structure on the host
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCopyAccelerationStructureKHR
/// </para>
/// <para>
/// To copy or compact an acceleration structure on the host, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_acceleration_structure
/// VkResult vkCopyAccelerationStructureKHR(
/// VkDevice device,
/// VkDeferredOperationKHR deferredOperation,
/// const VkCopyAccelerationStructureInfoKHR* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CopyAccelerationStructureKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCopyAccelerationStructureToMemoryKHR.html">vkCopyAccelerationStructureToMemoryKHR</see> - Serialize an acceleration structure on the host
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCopyAccelerationStructureToMemoryKHR
/// </para>
/// <para>
/// To copy an acceleration structure to host accessible memory, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_acceleration_structure
/// VkResult vkCopyAccelerationStructureToMemoryKHR(
/// VkDevice device,
/// VkDeferredOperationKHR deferredOperation,
/// const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CopyAccelerationStructureToMemoryKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCopyMemoryToAccelerationStructureKHR.html">vkCopyMemoryToAccelerationStructureKHR</see> - Deserialize an acceleration structure on the host
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCopyMemoryToAccelerationStructureKHR
/// </para>
/// <para>
/// To copy host accessible memory to an acceleration structure, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_acceleration_structure
/// VkResult vkCopyMemoryToAccelerationStructureKHR(
/// VkDevice device,
/// VkDeferredOperationKHR deferredOperation,
/// const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CopyMemoryToAccelerationStructureKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkWriteAccelerationStructuresPropertiesKHR.html">vkWriteAccelerationStructuresPropertiesKHR</see> - Query acceleration structure meta-data on the host
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkWriteAccelerationStructuresPropertiesKHR
/// </para>
/// <para>
/// To query acceleration structure size parameters on the host, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void WriteAccelerationStructuresPropertiesKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkAccelerationStructureKHR> pAccelerationStructures,
VkQueryType queryType,
scoped ReadOnlySpan<byte> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyAccelerationStructureKHR.html">vkCmdCopyAccelerationStructureKHR</see> - Copy an acceleration structure
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyAccelerationStructureKHR
/// </para>
/// <para>
/// To copy an acceleration structure call:
/// </para>
/// <code>
/// // Provided by VK_KHR_acceleration_structure
/// void vkCmdCopyAccelerationStructureKHR(
/// VkCommandBuffer commandBuffer,
/// const VkCopyAccelerationStructureInfoKHR* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyAccelerationStructureKHR<T>(
this T handle,
in VkCopyAccelerationStructureInfoKHR pInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyAccelerationStructureInfoKHR* pInfoFixed = &pInfo)
{
handle.PInvoke.vkCmdCopyAccelerationStructureKHR.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyAccelerationStructureToMemoryKHR.html">vkCmdCopyAccelerationStructureToMemoryKHR</see> - Copy an acceleration structure to device memory
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyAccelerationStructureToMemoryKHR
/// </para>
/// <para>
/// To copy an acceleration structure to device memory call:
/// </para>
/// <code>
/// // Provided by VK_KHR_acceleration_structure
/// void vkCmdCopyAccelerationStructureToMemoryKHR(
/// VkCommandBuffer commandBuffer,
/// const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyAccelerationStructureToMemoryKHR<T>(
this T handle,
in VkCopyAccelerationStructureToMemoryInfoKHR pInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyAccelerationStructureToMemoryInfoKHR* pInfoFixed = &pInfo)
{
handle.PInvoke.vkCmdCopyAccelerationStructureToMemoryKHR.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdCopyMemoryToAccelerationStructureKHR.html">vkCmdCopyMemoryToAccelerationStructureKHR</see> - Copy device memory to an acceleration structure
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdCopyMemoryToAccelerationStructureKHR
/// </para>
/// <para>
/// To copy device memory to an acceleration structure call:
/// </para>
/// <code>
/// // Provided by VK_KHR_acceleration_structure
/// void vkCmdCopyMemoryToAccelerationStructureKHR(
/// VkCommandBuffer commandBuffer,
/// const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void CopyMemoryToAccelerationStructureKHR<T>(
this T handle,
in VkCopyMemoryToAccelerationStructureInfoKHR pInfo
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkCopyMemoryToAccelerationStructureInfoKHR* pInfoFixed = &pInfo)
{
handle.PInvoke.vkCmdCopyMemoryToAccelerationStructureKHR.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetAccelerationStructureDeviceAddressKHR.html">vkGetAccelerationStructureDeviceAddressKHR</see> - Query an address of an acceleration structure
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetAccelerationStructureDeviceAddressKHR
/// </para>
/// <para>
/// To query the 64-bit device address for an acceleration structure, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_acceleration_structure
/// VkDeviceAddress vkGetAccelerationStructureDeviceAddressKHR(
/// VkDevice device,
/// const VkAccelerationStructureDeviceAddressInfoKHR* pInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkDeviceAddress GetAccelerationStructureDeviceAddressKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkAccelerationStructureDeviceAddressInfoKHR pInfo
)
{
fixed (VkAccelerationStructureDeviceAddressInfoKHR* pInfoFixed = &pInfo)
{
return handle.PInvoke.vkGetAccelerationStructureDeviceAddressKHR.Invoke(handle.Handle, pInfoFixed);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdWriteAccelerationStructuresPropertiesKHR.html">vkCmdWriteAccelerationStructuresPropertiesKHR</see> - Write acceleration structure result parameters to query results.
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdWriteAccelerationStructuresPropertiesKHR
/// </para>
/// <para>
/// To query acceleration structure size parameters call:
/// </para>
/// <code>
/// // Provided by VK_KHR_acceleration_structure
/// void vkCmdWriteAccelerationStructuresPropertiesKHR(
/// VkCommandBuffer commandBuffer,
/// uint32_t accelerationStructureCount,
/// const VkAccelerationStructureKHR* pAccelerationStructures,
/// VkQueryType queryType,
/// VkQueryPool queryPool,
/// uint32_t firstQuery);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void WriteAccelerationStructuresPropertiesKHR<T>(
this T handle,
scoped ReadOnlySpan<VkAccelerationStructureKHR> pAccelerationStructures,
VkQueryType queryType,
VkQueryPool queryPool,
int firstQuery
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
fixed (VkAccelerationStructureKHR* pAccelerationStructuresFixed = pAccelerationStructures)
{
handle.PInvoke.vkCmdWriteAccelerationStructuresPropertiesKHR.Invoke(
handle.Handle,
pAccelerationStructures.Length,
pAccelerationStructuresFixed,
queryType,
queryPool,
firstQuery
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetDeviceAccelerationStructureCompatibilityKHR.html">vkGetDeviceAccelerationStructureCompatibilityKHR</see> - Check if a serialized acceleration structure is compatible with the current device
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetDeviceAccelerationStructureCompatibilityKHR
/// </para>
/// <para>
/// To check if a serialized acceleration structure is compatible with the
/// current device call:
/// </para>
/// <code>
/// // Provided by VK_KHR_acceleration_structure
/// void vkGetDeviceAccelerationStructureCompatibilityKHR(
/// VkDevice device,
/// const VkAccelerationStructureVersionInfoKHR* pVersionInfo,
/// VkAccelerationStructureCompatibilityKHR* pCompatibility);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkAccelerationStructureCompatibilityKHR GetAccelerationStructureCompatibilityKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
in VkAccelerationStructureVersionInfoKHR pVersionInfo
)
{
fixed (VkAccelerationStructureVersionInfoKHR* pVersionInfoFixed = &pVersionInfo)
{
VkAccelerationStructureCompatibilityKHR pCompatibilityLocal = default;
handle.PInvoke.vkGetDeviceAccelerationStructureCompatibilityKHR.Invoke(
handle.Handle,
pVersionInfoFixed,
&pCompatibilityLocal
);
return pCompatibilityLocal;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetAccelerationStructureBuildSizesKHR.html">vkGetAccelerationStructureBuildSizesKHR</see> - Retrieve the required size for an acceleration structure
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetAccelerationStructureBuildSizesKHR
/// </para>
/// <para>
/// To get the build sizes for an acceleration structure, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_acceleration_structure
/// void vkGetAccelerationStructureBuildSizesKHR(
/// VkDevice device,
/// VkAccelerationStructureBuildTypeKHR buildType,
/// const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo,
/// const uint32_t* pMaxPrimitiveCounts,
/// VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetAccelerationStructureBuildSizesKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkAccelerationStructureBuildTypeKHR buildType,
in VkAccelerationStructureBuildGeometryInfoKHR pBuildInfo,
scoped ReadOnlySpan<int> 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
);
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdTraceRaysKHR.html">vkCmdTraceRaysKHR</see> - Initialize a ray tracing dispatch
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdTraceRaysKHR
/// </para>
/// <para>
/// To dispatch ray tracing use:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void TraceRaysKHR<T>(
this T handle,
VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable,
VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable,
VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable,
VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable,
int width,
int height,
int depth
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdTraceRaysKHR.Invoke(
handle.Handle,
pRaygenShaderBindingTable,
pMissShaderBindingTable,
pHitShaderBindingTable,
pCallableShaderBindingTable,
width,
height,
depth
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateRayTracingPipelinesKHR.html">vkCreateRayTracingPipelinesKHR</see> - Creates a new ray tracing pipeline object
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCreateRayTracingPipelinesKHR
/// </para>
/// <para>
/// To create ray tracing pipelines, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe VkResult CreateRayTracingPipelinesKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkDeferredOperationKHR deferredOperation,
VkPipelineCache pipelineCache,
scoped ReadOnlySpan<VkRayTracingPipelineCreateInfoKHR> pCreateInfos,
VkAllocator? pAllocator,
scoped ReadOnlySpan<VkPipeline> 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;
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetRayTracingCaptureReplayShaderGroupHandlesKHR.html">vkGetRayTracingCaptureReplayShaderGroupHandlesKHR</see> - Query opaque capture replay data for pipeline shader group handles
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkGetRayTracingCaptureReplayShaderGroupHandlesKHR
/// </para>
/// <para>
/// To query the opaque capture data of shader groups in a ray tracing pipeline,
/// call:
/// </para>
/// <code>
/// // Provided by VK_KHR_ray_tracing_pipeline
/// VkResult vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(
/// VkDevice device,
/// VkPipeline pipeline,
/// uint32_t firstGroup,
/// uint32_t groupCount,
/// size_t dataSize,
/// void* pData);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void GetRayTracingCaptureReplayShaderGroupHandlesKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipeline pipeline,
int firstGroup,
int groupCount,
scoped ReadOnlySpan<byte> 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;
}
}
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdTraceRaysIndirectKHR.html">vkCmdTraceRaysIndirectKHR</see> - Initialize an indirect ray tracing dispatch
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdTraceRaysIndirectKHR
/// </para>
/// <para>
/// To dispatch ray tracing, with some parameters sourced on the device, use:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void TraceRaysIndirectKHR<T>(
this T handle,
VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable,
VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable,
VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable,
VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable,
VkDeviceAddress indirectDeviceAddress
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdTraceRaysIndirectKHR.Invoke(
handle.Handle,
pRaygenShaderBindingTable,
pMissShaderBindingTable,
pHitShaderBindingTable,
pCallableShaderBindingTable,
indirectDeviceAddress
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetRayTracingShaderGroupStackSizeKHR.html">vkGetRayTracingShaderGroupStackSizeKHR</see> - Query ray tracing pipeline shader group shader stack size
/// </summary>
/// <remarks>
/// <para>
/// To query the pipeline stack size of shaders in a shader group in the ray
/// tracing pipeline, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_ray_tracing_pipeline
/// VkDeviceSize vkGetRayTracingShaderGroupStackSizeKHR(
/// VkDevice device,
/// VkPipeline pipeline,
/// uint32_t group,
/// VkShaderGroupShaderKHR groupShader);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ByteSize64 GetRayTracingShaderGroupStackSizeKHR(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
VkPipeline pipeline,
int group,
VkShaderGroupShaderKHR groupShader
)
{
return handle.PInvoke.vkGetRayTracingShaderGroupStackSizeKHR.Invoke(
handle.Handle,
pipeline,
group,
groupShader
);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetRayTracingPipelineStackSizeKHR.html">vkCmdSetRayTracingPipelineStackSizeKHR</see> - Set the stack size dynamically for a ray tracing pipeline
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdSetRayTracingPipelineStackSizeKHR
/// </para>
/// <para>
/// To <see href="https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-dynamic-state">dynamically set^</see> the stack size for a ray
/// tracing pipeline, call:
/// </para>
/// <code>
/// // Provided by VK_KHR_ray_tracing_pipeline
/// void vkCmdSetRayTracingPipelineStackSizeKHR(
/// VkCommandBuffer commandBuffer,
/// uint32_t pipelineStackSize);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void SetRayTracingPipelineStackSizeKHR<T>(this T handle, int pipelineStackSize)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdSetRayTracingPipelineStackSizeKHR.Invoke(handle.Handle, pipelineStackSize);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawMeshTasksEXT.html">vkCmdDrawMeshTasksEXT</see> - Draw mesh task work items
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawMeshTasksEXT
/// </para>
/// <para>
/// To record a mesh tasks drawing command, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_mesh_shader
/// void vkCmdDrawMeshTasksEXT(
/// VkCommandBuffer commandBuffer,
/// uint32_t groupCountX,
/// uint32_t groupCountY,
/// uint32_t groupCountZ);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawMeshTasksEXT<T>(this T handle, int groupCountX, int groupCountY, int groupCountZ)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawMeshTasksEXT.Invoke(handle.Handle, groupCountX, groupCountY, groupCountZ);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawMeshTasksIndirectEXT.html">vkCmdDrawMeshTasksIndirectEXT</see> - Issue an indirect mesh tasks draw into a command buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawMeshTasksIndirectEXT
/// </para>
/// <para>
/// To record an indirect mesh tasks drawing command, call:
/// </para>
/// <code>
/// // Provided by VK_EXT_mesh_shader
/// void vkCmdDrawMeshTasksIndirectEXT(
/// VkCommandBuffer commandBuffer,
/// VkBuffer buffer,
/// VkDeviceSize offset,
/// uint32_t drawCount,
/// uint32_t stride);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawMeshTasksIndirectEXT<T>(
this T handle,
VkBuffer buffer,
ByteSize64 offset,
int drawCount,
int stride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawMeshTasksIndirectEXT.Invoke(handle.Handle, buffer, offset, drawCount, stride);
}
/// <summary>
/// <see href="https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdDrawMeshTasksIndirectCountEXT.html">vkCmdDrawMeshTasksIndirectCountEXT</see> - Perform an indirect mesh tasks draw with the draw count sourced from a buffer
/// </summary>
/// <remarks>
/// <para>
/// :refpage: vkCmdDrawMeshTasksIndirectCountEXT
/// </para>
/// <para>
/// To record an indirect mesh tasks drawing command with the draw count sourced
/// from a buffer, call:
/// </para>
/// <code>
/// // 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);
/// </code>
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void DrawMeshTasksIndirectCountEXT<T>(
this T handle,
VkBuffer buffer,
ByteSize64 offset,
VkBuffer countBuffer,
ByteSize64 countBufferOffset,
int maxDrawCount,
int stride
)
where T : VulkanHandleWrapper<VkCommandBuffer, VkDevice.FunctionTable>
{
handle.PInvoke.vkCmdDrawMeshTasksIndirectCountEXT.Invoke(
handle.Handle,
buffer,
offset,
countBuffer,
countBufferOffset,
maxDrawCount,
stride
);
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyImages(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkImage> pImages,
VkAllocator? pAllocator
)
{
fixed (VkImage* pImagesFixed = pImages)
{
handle.PInvoke.vxDestroyImages.Invoke(handle.Handle, pImagesFixed, pImages.Length, pAllocator);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyImageViews(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkImageView> pImageViews,
VkAllocator? pAllocator
)
{
fixed (VkImageView* pImageViewsFixed = pImageViews)
{
handle.PInvoke.vxDestroyImageViews.Invoke(
handle.Handle,
pImageViewsFixed,
pImageViews.Length,
pAllocator
);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyBuffers(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkBuffer> pBuffers,
VkAllocator? pAllocator
)
{
fixed (VkBuffer* pBuffersFixed = pBuffers)
{
handle.PInvoke.vxDestroyBuffers.Invoke(handle.Handle, pBuffersFixed, pBuffers.Length, pAllocator);
}
}
/// <summary>
///
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe void DestroyBufferViews(
this VulkanHandleWrapper<VkDevice, VkDevice.FunctionTable> handle,
scoped ReadOnlySpan<VkBufferView> pBufferViews,
VkAllocator? pAllocator
)
{
fixed (VkBufferView* pBufferViewsFixed = pBufferViews)
{
handle.PInvoke.vxDestroyBufferViews.Invoke(
handle.Handle,
pBufferViewsFixed,
pBufferViews.Length,
pAllocator
);
}
}
}
}