Jump to content
  • Advertisement
Sign in to follow this  
MePHyst0

ID3DXEffect::SetTexture calling AddRef and Release on texture

This topic is 3919 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 everyone, Recently I have been profiling our engine and noticed that the effect section takes a lot time to complete, therefore I ran it through pix and ati's perf studio and found out that the biggest timeeaters are AddRef and Release called from ID3DXEffect::SetTexture, do anyone know why are these two called from settexture?(actually, i can't seem to find a reason to call AddRef and Release right after) Thanks, Szabo Tibor

Share this post


Link to post
Share on other sites
Advertisement
Well, calling AddRef and Release is the proper way of handling an interface thats passed from one place to another. However it really shouldn't be taking very much time at all to do either.

Share this post


Link to post
Share on other sites
actually it tooks quite much time, summed up addref and release take up to 0.317ms whereas all the other API calls take up to 3.3ms, so it's cca 10% and I really don't want to sacrifice 10% of the frame time just to do the right thing COM-wise :)

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.

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!