Sign in to follow this  
ZachBethel

[D3D12] ID3D12Resource::Map on a default resource

Recommended Posts

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this