• FEATURED

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

## Vulkan Manual question

3 replies to this topic

### #1Ryan_001  Prime Members

Posted 18 March 2017 - 10:01 AM

In the Vulkan manual pages, the command functions all have a 'Command Properties' box at the bottom that specifies Command Buffer Levels, Render Pass Scope, etc...  See https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdBindPipeline.html for an example.

The last column is 'Pipeline Type'.  Under most commands this is left empty, but occasionally this has the entry 'Transfer' (ex. https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkCmdClearDepthStencilImage.html).  I don't know what that actually means.  In Vulkan there are only two types of pipelines, compute and graphics, there's no notion of a 'Transfer' pipeline, you can't create one, you can't bind one, it doesn't exist.  There is the notion of different queue types, compute, graphics, and transfer; but the chart already has a column called 'Supported Queue Types'.

Anyone have any ideas what that column means/is used for?

### #2C0lumbo  Members

Posted 18 March 2017 - 10:17 AM

Interesting question.

I believe it corresponds to the VK_PIPELINE_STAGE_* enums. In this case, if you wanted to use a synchronisation primitive like vkCmdPipelineBarrier to wait on completion of vkCmdClearDepthStencilImage, you need to use VK_PIPELINE_STAGE_TRANSFER_BIT.

Edit: So a less abbreviated version of the 'pipeline' heading would be 'pipeline stage in which this command is executed'

Edited by C0lumbo, 18 March 2017 - 10:18 AM.

### #3Ryan_001  Prime Members

Posted 18 March 2017 - 10:36 AM

That sounds like a solid theory.  So when it states 'Graphics' that would be equivalent to VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT?

### #4C0lumbo  Members

Posted 18 March 2017 - 02:21 PM

That sounds like a solid theory.  So when it states 'Graphics' that would be equivalent to VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT?

Yes. Although I think it's rare that VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT is the best option for synchonisation commands. If your sync primitive is waiting on a previous render to texture which you'll read in a fragment shader, then VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT is overkill, it's only the fragment shader that needs to wait - so your dstStageMask might be VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT.

Or if you're waiting for a vertex shader to finish reading from a texture before you scribble over the top of it, then srcStageMask might be VK_PIPELINE_STAGE_VERTEX_SHADER_BIT.