Advertisement

Does switching shaders and root signatures add to the overhead of switching a PSO?

Started by November 01, 2017 05:27 PM
1 comment, last by galop1n 7 years, 3 months ago

I know some people will find this question stupid, but it is not stupid if you don't know how SetPipelineState exactly works.

If I switch the current PSO to another one with different shaders and root signatures, will that be more expensive than switching to a PSO with the same shaders and root signatures as the current PSO?

In other words: does switching the shaders and root signatures add to the overhead of switching the PSO?

It will depends on the hardware, on the driver version ( as they optimize things), on what are the differences between your PSOs.

As a rule of thumb, you can assume the more different, the more complex. That being said, the PSO is designed to give the driver enough knowledge to be efficient to start with. We can even even swap PSO in an ExecuteIndirect packet on Xbox one just to say so :)

Be careful also with "the same shaders", because it is not because your DXBC or DXIL is the same that the uCode is the same, the input layout for example will impact the shader compilation, render targets can too, and probably some other stuff. At least the compilation is at the creation now, not at the first usage in the driver :)

 

This topic is closed to new replies.

Advertisement