When should results of a CS issuing image store ops be presented?
Consider a simple test app which uses a compute shader to write to a 2D image by firing store ops. To fill the image with contents, a single dispatch call is used. This process can be clearly visible in the Event Browser, screen-shot of which I'm attaching below:

(the colour pass is irrelevant for the purpose of this discussion)
Now, the question I have is: what is the expected behavior of the texture viewer, configured to view the contents of the image, which is modified by the dispatch call?:
a) Are we expecting the updated image contents to show up if I click on the vkCmdDispatch() item in the Event Browser... b) ..or do I need to click the vkQueueSubmit() call which actually throws the work chunk at the compute queue, in order to see the updated contents?
Reason I'm asking is a) seems to be more sensible. However, right now, clicking on vkCmdDispatch() gives me a black texture. This could be due to a missing barrier somewhere, or could be by design. If it's the latter, please feel free to close the ticket :)
It should be a). All state and data presented in the UI (texture/buffer contents, pipeline state, etc etc) should all be up to date and accurate as of the end of the selected event. So for a draw or a dispatch when you select it you'll see the results. For vulkan this is a bit unclear since the results aren't defined to finish, but intuitively imagine a complete hard GPU sync is inserted so you see all the results from everything before, and no results from anything after :). For vulkan the queuesubmit/begin end command buffer events are purely for illustration they shouldn't affect the results of replay (I think - there might be an edge case where it makes sense...).
This should be solved by the barriers here in texture display which sets all write-type bits on the srcAccessMask when inserting a barrier on the image to ensure contents are up to date.
Can you share a repro project that shows the bug?
Need to check internally, I'll get back to you.
It seems that the vk_draw_funcs.cpp::WrappedVulkan::Serialise_vkCmdDispatch() function is not called if I click on the dispatch call. However, moving one call forward does execute that function, which results in a correct preview.
And yeah, the fat memory barrier you're injecting seems to be fine :)
Any progress on this, Baldur?
Did you find out if you were able to share the repro project, or did you find that it reproduces on a public sample somewhere I can look at?
Oh wow, hooray for me.. I'll be sending you the trace file in a minute :)
Edit: Actually, no! I did send you the file more than two weeks ago! Let me refresh that e-mail thread.. :>
Sigh, stupidest bug ever :(. When doing a partial-replay of a command buffer I wasn't using the deserialised dimensions passed to CmdDispatch, so it was dispatching 0,0,0. Should be working now!
Works fine now, thanks.