Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Vulkan Manual question

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 Ryan_001   Prime Members   

3384
Like
1Likes
Like

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?



#2 C0lumbo   Members   

4394
Like
1Likes
Like

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.


#3 Ryan_001   Prime Members   

3384
Like
0Likes
Like

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?



#4 C0lumbo   Members   

4394
Like
1Likes
Like

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.






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.