Beispiel #1
0
 /// <summary>
 /// To record a pipeline barrier, call:
 /// </summary>
 /// <param name="srcStageMask">is a bitmask of <c>VkPipelineStageFlagBits</c> specifying the <a href='https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#synchronization-pipeline-stages-masks'> source stage mask</a>.</param>
 /// <param name="dstStageMask">is a bitmask of <c>VkPipelineStageFlagBits</c> specifying the <a href='https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#synchronization-pipeline-stages-masks'> destination stage mask</a>.</param>
 /// <param name="dependencyFlags">is a bitmask of <c>VkDependencyFlagBits</c> specifying how execution and memory dependencies are formed.</param>
 /// <param name="barrier">is a pointer to an array of <see cref="VkMemoryBarrier"/> structures.</param>
 /// <param name="bufferBarrier">is a pointer to an array of <see cref="VkBufferMemoryBarrier"/> structures.</param>
 /// <param name="imageBarrier">is a pointer to an array of <see cref="VkImageMemoryBarrier"/> structures.</param>
 public void PipelineBarrier(VkPipelineStageFlag srcStageMask,
                             VkPipelineStageFlag dstStageMask,
                             VkDependencyFlag dependencyFlags, VkMemoryBarrier barrier = default(VkMemoryBarrier),
                             VkBufferMemoryBarrier bufferBarrier = default(VkBufferMemoryBarrier),
                             VkImageMemoryBarrier imageBarrier   = default(VkImageMemoryBarrier))
 {
     unsafe
     {
         VkCommandBuffer.vkCmdPipelineBarrier(Handle, srcStageMask, dstStageMask, dependencyFlags,
                                              barrier.SType != VkStructureType.BufferMemoryBarrier ? 0 : 1u, &barrier,
                                              bufferBarrier.SType != VkStructureType.BufferMemoryBarrier ? 0 : 1u, &bufferBarrier,
                                              imageBarrier.SType != VkStructureType.ImageMemoryBarrier ? 0 : 1u, &imageBarrier);
     }
 }