Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Multiple draw commands fail if the initial layout of the texture doesn't match the current layout #2074

Closed
vE5li opened this issue Oct 31, 2022 · 0 comments · Fixed by #2075

Comments

@vE5li
Copy link
Contributor

vE5li commented Oct 31, 2022

So from my understanding here is what is happening.

When you add a draw command to the SyncCommandBufferBuilder, it will check if the textures bound by the descriptor set have a current layout that differs from the initial layout of the Texture. You can see this check happening here. If that is the case, it will insert a layout transition and set state.memory.exclusive to true.

When you now add a second draw call, draw will fail here, since state.memory.exclusive was previously set to true.

This access should be safe, since the layout transition is behind a barrier and thus already completed when we want to read from the texture.

Removing the initial setting of state.memory.exclusive fixes the bug for me, so I have also created a pull request to remove that line.

@Rua Rua closed this as completed in #2075 Nov 1, 2022
Rua added a commit that referenced this issue Nov 1, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant