Jump to content
  • Advertisement
Sign in to follow this  
ZachBethel

[D3D12] ID3D12Resource::Map on a default resource

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

It seems like it's valid usage, the docs don't seem to mention it. However, isn't the point of a DEFAULT resource that it's not visible to the host? You would have to use an upload heap to stage it.

Share this post


Link to post
Share on other sites
Advertisement

Yeah, it's clearly stated in the official document, that only the UPLOAD type of resource can Map(), which means a relatively low performance along with its access continence.

Share this post


Link to post
Share on other sites
"default" is misleading, it actually means device local memory. It's video memory in case of discrete gpu and not all gpu allows cpu to write to their memory.

Share this post


Link to post
Share on other sites

"Default" follows in the tradition of D3D, coming from D3DPOOL_DEFAULT and continuing with D3D11_USAGE_DEFAULT. I agree it's not the best name, but it works well enough. Basically, for discrete GPUs, "default" = video memory with no CPU access, and for integrated GPUs, "default" = system memory with no CPU access.

 

Note that with D3D12, you can you explicitly control the properties of the memory you request along two axes (location, CPU access) by using D3D12_HEAP_TYPE_CUSTOM and specifying appropriate properties. You can even translate from the well-defined heap types (default, upload, readback) to their appropriate properties with GetCustomHeapProperties. There's currently no way to create video memory heaps with CPU access though.

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!