Skip to content

Mutable Variables #291

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

You must be logged in to vote

STATIC and MUTABLE variables are internally pretty much the same. STATIC are simply for convenience of defining a variable through the pipeline state (or resource signature) that can be shared between all SRBs.

DYNAMIC variables are handled differently. They can be changed arbitrary for the cost of introducing a minor overhead each time an SRB is committed.

I create a new immutable buffer, fill it with new data, change the SRB variable to point to the new buffer, then delete the old one.

This is a reasonable approach.

For example, should I be creating an entire new SRB to represent the new area? Or is there perhaps a way to update data in an immutable buffer?

You may be confusing immu…

Replies: 2 comments

Comment options

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