1
\$\begingroup\$

As far as I understand Direct3D 11 I have to specify certain BindFlags in order to use a resource in a specific stage of the pipeline.

From my experience some combinations are more common like BindFlags.RenderTarget | BindFlags.ShaderResource for post processing effects. And I guess it could also be quite handy sometimes to set the ShaderResource flag for DepthStencilBuffers.

So I would like to know what is happening behind the scenes. What is the drawback of simply setting all of them? Would it be a minor performance hit? Or is as bad as an individual copy of the resource for every different flag?

\$\endgroup\$
0
\$\begingroup\$

Yes, most likely it will be performance hit (or memory usage increase). Set only those flags which you need.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ not quite satisfying, but I will do that. Thanks! \$\endgroup\$ – Lucius Feb 29 '12 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.