Skip to content

Should I use a small size for Queue::write_buffer_with? #7091

Answered by cwfitzgerald
jre0 asked this question in Q&A
Discussion options

You must be logged in to vote

We will allocate the entire size of buffer you request, and will copy that entire region to the gpu. In that way write_buffer shouldn't be used for very sparse updates as you'll upload a whole load of zeros. The best way to do very sparse updates is to upload (index, data) pairs, then use a compute shader to scatter those to the places they need to go, but that's a more advanced technique.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jre0
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