Beispiel #1
0
 public static VkResult vkQueueSubmit(VkQueue queue, ReadOnlySpan <VkSubmitInfo> submits, VkFence fence)
 {
     fixed(VkSubmitInfo *submitsPtr = submits)
     {
         return(vkQueueSubmit(queue, (uint)submits.Length, submitsPtr, fence));
     }
 }
Beispiel #2
0
 public static VkResult vkWaitForFences(VkDevice device, VkFence fence, VkBool32 waitAll, ulong timeout)
 {
     return(vkWaitForFences(device, 1, &fence, waitAll, timeout));
 }
Beispiel #3
0
 public static VkResult vkQueueSubmit(VkQueue queue, VkSubmitInfo submit, VkFence fence)
 {
     return(vkQueueSubmit(queue, 1, &submit, fence));
 }
Beispiel #4
0
 public static VkResult vkQueueBindSparse(VkQueue queue, ReadOnlySpan <VkBindSparseInfo> bindInfo, VkFence fence)
 {
     fixed(VkBindSparseInfo *bindInfoPtr = bindInfo)
     {
         return(vkQueueBindSparse(queue, (uint)bindInfo.Length, bindInfoPtr, fence));
     }
 }
Beispiel #5
0
 public static VkResult vkResetFences(VkDevice device, VkFence fence)
 {
     return(vkResetFences(device, 1, &fence));
 }
Beispiel #6
0
        public void BindSparse(VkBindSparseInfo[] bindInfo, VkFence fence = default)
        {
            int count = bindInfo?.Length ?? 0;

            VulkanUtil.CheckResult(vkQueueBindSparse(this, (uint)count, bindInfo != null ? (VkBindSparseInfo *)Unsafe.AsPointer(ref bindInfo[0]) : null, fence));
        }
Beispiel #7
0
 public static VkResult vkQueueBindSparse(VkQueue queue, VkBindSparseInfo bindInfo, VkFence fence)
 {
     return(vkQueueBindSparse(queue, 1, &bindInfo, fence));
 }
Beispiel #8
0
 public void BindSparse(VkBindSparseInfo bindInfo, VkFence fence = default)
 {
     VulkanUtil.CheckResult(vkQueueBindSparse(this, 1, &bindInfo, fence));
 }
Beispiel #9
0
        public void Submit(VkSemaphore waitSemaphore, VkPipelineStageFlags waitDstStageMask,
                           VkCommandBuffer commandBuffer, VkSemaphore signalSemaphore, VkFence fence = default)
        {
            VkCommandBuffer commandBufferHandle = commandBuffer;

            var nativeSubmit = new VkSubmitInfo
            {
                sType = VkStructureType.SubmitInfo
            };

            if (waitSemaphore != default)
            {
                nativeSubmit.waitSemaphoreCount = 1;
                nativeSubmit.pWaitSemaphores    = &waitSemaphore;
                nativeSubmit.pWaitDstStageMask  = &waitDstStageMask;
            }

            if (commandBuffer != null)
            {
                nativeSubmit.commandBufferCount = 1;
                nativeSubmit.pCommandBuffers    = &commandBufferHandle;
            }

            if (signalSemaphore != default)
            {
                nativeSubmit.signalSemaphoreCount = 1;
                nativeSubmit.pSignalSemaphores    = &signalSemaphore;
            }

            VulkanUtil.CheckResult(vkQueueSubmit(this, 1, &nativeSubmit, fence));
        }
Beispiel #10
0
 public void Submit(VkSubmitInfo submit, VkFence fence = default)
 {
     VulkanUtil.CheckResult(vkQueueSubmit(this, 1, &submit, fence));
 }
Beispiel #11
0
        public void Submit(VkSubmitInfo[] submits, VkFence fence = default)
        {
            int count = submits?.Length ?? 0;

            VulkanUtil.CheckResult(vkQueueSubmit(this, (uint)count, submits != null ? (VkSubmitInfo *)Unsafe.AsPointer(ref submits[0]) : null, fence));
        }
Beispiel #12
0
 public static VkResult AcquireNextImageKHR(VkSwapchainKHR swapchain, ulong timeout, VkSemaphore semaphore, VkFence fence, out uint pImageIndex)
 {
     return(vkAcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, out pImageIndex));
 }