I'm having trouble with understanding what subresource is in Direct 3D 12.
So far, I thought it as user defines subresource. Just like allocating one huge array and dividing parts of the array to interpret as a particular object. (eg. using first 2 bytes ([0]~[1]) as object A and next 2 bytes as object B ([2]~[3])) Referred to "region" in case of ID3D12GraphicsCommandList::CopyBufferRegion. Descriptors seem to work in this manner as well (from here to there is a particular object).
However, this subresource confuses me when it comes to texture.
I thought resource creation has nothing to do with subresource because there was no argument such as UINT NumSubresources (eg. D3D12_HEAP_PROPERTIES or D3D12_RESOURCE_DESC in ID3D12Device::CreateCommittedResource) until I needed to get the size and row pitch of texture by ID3D12Device::GetCopyableFootprints. And GetCopyableFootprints requires UINT NumSubresources.
I couldn't find example that uses other than 0 FirstSubresource, 1 NumSubresources, 0 BaseOffset.
Q. If assuming there is a ID3D12Resource that has 2 subresource textures, how do I get number of subresources, or start offset of each subresource if subresource count is more than 1, in this ID3D12Resource?
Q. How do I create ID3D12Resource that has 2 subresource textures (committedresource)?
Q. What exactly is subresource?