Skip to content

Shader resource state transitions and Vulkan #337

Answered by bill-call
bill-call asked this question in Q&A
Discussion options

You must be logged in to vote

I was able to reproduce it as a tutorial but, in the process, I also finally found the problem. When using the double-buffer pattern, any texture that is used as an input for any compute shader, must pass that texture to the next shader in the chain, even if that shader does not use it, and so on for all intermediate compute shaders until the chain reaches the next shader that actually uses it.

This is exactly the fix you suggested earlier, but I had two bindings in my pipeline setup that were using the wrong index.

Example:

Assume I have three compute shaders CS1, CS2 and CS3, and double-buffered Textures T1, T2, T3, and single-buffered texture T4:

CS1 has inputs T1[0], T2[0]
outputs T1[1]

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
11 replies
@TheMostDiligent
Comment options

@bill-call
Comment options

@TheMostDiligent
Comment options

@bill-call
Comment options

Answer selected by bill-call
@TheMostDiligent
Comment options

@bill-call
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants