This was originally written with D3D11 in mind, which will block recursive maps, but D3D9 (and older) will let them through. This fixes a bug with double-unmap attempting to access a null pRenameResource.
Also fix the calls to actually map the heaps to use subresource index instead of plane index.
This was originally written with D3D11 in mind, which will block recursive maps, but D3D9 (and older) will let them through. This fixes a bug with double-unmap attempting to access a null pRenameResource.
Also fix the calls to actually map the heaps to use subresource index instead of plane index.