I am a little confused about the existence of the ID3D12GraphicsCommandList::SetGraphicsRootSignature
method. From what I understand of this MSDN page, it seems that the only valid usage of it is to always call it after SetPipelineState
, giving it the same root signature as was provided when creating the pipeline state object. If that's so, what benefit is there to it not being implicit? Are there other ways to use this method?
It is CPU optimisation, internally it is possible to prepare part of a mapping from the root signature slots to the actual binding. If you share a root signature between different pipeline state objects, then this work can be done once per root signature instead of once per pipeline state object.
You are likely to call SetGraphicsRootSignature
less often then SetGraphicPipelineState
. This is why.