Jump to content
  • Advertisement
Sign in to follow this  
korvax

Bind/unbind resources in every draw call

This topic is 2120 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

Hi,

I have a question about overhead. All resources that are need in a draw call is "bound" to the device.. Should one unbind them as well, or is that just unnecessary overhead? Obviously you need to unbind some of them or the render will complain. But the other ones?.

Share this post


Link to post
Share on other sites
Advertisement

There's no general answer, except that ideally, you'd do the least amount of work possible for each draw call.

 

If you know that the next draw call is going to need the same resource, it's wasteful to unbind it and then immediately rebind it afterwards.

Share this post


Link to post
Share on other sites

There's no general answer, except that ideally, you'd do the least amount of work possible for each draw call.

 

Since I was to ask pretty much the same question, so I don't have to open another thread... is there even any gain from unbinding a resource? Say you have three texture views bound, and all concurrent draw calls from now on are using only the first two slots, with different texture views. Is there any noticable difference between calling PSSetShaderResource with only the two resource views you want to set, and calling it with a third nullptr entry to unbind the other view?

Edited by Juliean

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!