Skip to content

Uploading groups of shader attributes in DX12 (Buffer and view questions) #210

Answered by TheMostDiligent
RobertMtx asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there! The answers to your question depend on how much data you need to upload to buffer (few bytes vs few KBs vs MBs) and how many updates you need to do (100s vs 1000s vs millions). If you do 100s of updates, then any method will work really. If you do 1000s of updates, then you may need to think more carefully. 100s of thousands of updates definitely require some careful implementation.

  1. Should I split attributes up based on how frequently they are updated (two buffers/views per shader/pipeline/etc)?

Generally, yes. If you have some data that does not change, it is better to separate it. On the other hand, if it is only few bytes, you may also upload it to dynamic buffer every time

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
1 reply
@RobertMtx
Comment options

Answer selected by RobertMtx
Comment options

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

@RobertMtx
Comment options

@TheMostDiligent
Comment options

@RobertMtx
Comment options

@TheMostDiligent
Comment options

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