Hello!
I am feeling confused by MSDN documentation on the argument SetGraphicsRootShaderResourceView should accept
https://msdn.microsoft.com/en-us/library/windows/desktop/dn903913(v=vs.85).aspx.
void SetGraphicsRootShaderResourceView(
[in] UINT RootParameterIndex,
[in] D3D12_GPU_VIRTUAL_ADDRESS BufferLocation
);
According to MSDN BufferLocation is "The GPU virtual address of the constant buffer. D3D12_GPU_VIRTUAL_ADDRESS is a typedef'd alias of UINT64. "
Sounds like a copy-paste for SetGraphicsRootConstantBufferView description
https://msdn.microsoft.com/en-us/library/windows/desktop/dn903911(v=vs.85).aspx
After I had checked D3D12 source header file, I got even more puzzled.
virtual void STDMETHODCALLTYPE SetGraphicsRootConstantBufferView(
_In_ UINT RootParameterIndex,
_In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation) = 0;
virtual void STDMETHODCALLTYPE SetGraphicsRootShaderResourceView(
_In_ UINT RootParameterIndex,
_In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation) = 0;
virtual void STDMETHODCALLTYPE SetGraphicsRootUnorderedAccessView(
_In_ UINT RootParameterIndex,
_In_ D3D12_GPU_VIRTUAL_ADDRESS BufferLocation) = 0;
All of the three functions take D3D12_GPU_VIRTUAL_ADDRESS as an argument.
Does it really mean that D3D12 can bind CBV/SRV/UAV for the resource based only on its D3D12_GPU_VIRTUAL_ADDRESS without specifying corresponding CBV/SRV/UAV descriptor handle?