Jump to content
  • Advertisement
HD86

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

This topic is 382 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement

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 :)

 

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!