Skip to content

CommitShaderResources() frequency #231

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

You must be logged in to vote

In some of the sample files, it mentions it should be called after using SetPipelineState()

No, this is not the case. You can commit resource any time. Note only that binding a PSO that is not compatible with a signature, makes all incompatible SRBs invalid. If you can point to the document, this should be fixed.

I've been calling CommitShaderResources() only once per frame, at the beginning of every frame, and have not had any problems to date

Yes, this is the exactly correct use case.

Diligent Engine did not seem to like that

You need call CommitShaderResources after you change any variable - the changes are not automatically visible to GPU. If you loaded a new texture and set it …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by RobertMtx
Comment options

You must be logged in to vote
1 reply
@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