コード例 #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));
     }
 }
コード例 #2
0
 public static VkResult vkWaitForFences(VkDevice device, VkFence fence, VkBool32 waitAll, ulong timeout)
 {
     return(vkWaitForFences(device, 1, &fence, waitAll, timeout));
 }
コード例 #3
0
 public static VkResult vkQueueSubmit(VkQueue queue, VkSubmitInfo submit, VkFence fence)
 {
     return(vkQueueSubmit(queue, 1, &submit, fence));
 }
コード例 #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));
     }
 }
コード例 #5
0
 public static VkResult vkResetFences(VkDevice device, VkFence fence)
 {
     return(vkResetFences(device, 1, &fence));
 }
コード例 #6
0
ファイル: VkQueue.cs プロジェクト: Gaiaxis/SharpGame
        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));
        }
コード例 #7
0
 public static VkResult vkQueueBindSparse(VkQueue queue, VkBindSparseInfo bindInfo, VkFence fence)
 {
     return(vkQueueBindSparse(queue, 1, &bindInfo, fence));
 }
コード例 #8
0
ファイル: VkQueue.cs プロジェクト: Gaiaxis/SharpGame
 public void BindSparse(VkBindSparseInfo bindInfo, VkFence fence = default)
 {
     VulkanUtil.CheckResult(vkQueueBindSparse(this, 1, &bindInfo, fence));
 }
コード例 #9
0
ファイル: VkQueue.cs プロジェクト: Gaiaxis/SharpGame
        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));
        }
コード例 #10
0
ファイル: VkQueue.cs プロジェクト: Gaiaxis/SharpGame
 public void Submit(VkSubmitInfo submit, VkFence fence = default)
 {
     VulkanUtil.CheckResult(vkQueueSubmit(this, 1, &submit, fence));
 }
コード例 #11
0
ファイル: VkQueue.cs プロジェクト: Gaiaxis/SharpGame
        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));
        }
コード例 #12
0
ファイル: Device.cs プロジェクト: Gaiaxis/SharpGame
 public static VkResult AcquireNextImageKHR(VkSwapchainKHR swapchain, ulong timeout, VkSemaphore semaphore, VkFence fence, out uint pImageIndex)
 {
     return(vkAcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, out pImageIndex));
 }