Hello guys,
I am wondering why D3D12 resource size has type UINT64 while resource view size is limited to UINT32.
typedef struct D3D12_RESOURCE_DESC {
…
UINT64 Width;
…
} D3D12_RESOURCE_DESC;
Vertex buffer view can be described in UINT32 types.
typedef struct D3D12_VERTEX_BUFFER_VIEW {
D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
UINT SizeInBytes;
UINT StrideInBytes;
} D3D12_VERTEX_BUFFER_VIEW;
For the buffer we can specify offset for the first element as UINT64 but the buffer view should still be defined in UINT32 terms.
typedef struct D3D12_BUFFER_SRV {
UINT64 FirstElement;
UINT NumElements;
UINT StructureByteStride;
D3D12_BUFFER_SRV_FLAGS Flags;
} D3D12_BUFFER_SRV;
Does it really mean that we can create, for instance, structured buffer of floats having MAX_UNIT64 elements (MAX_UNIT64 * sizeof(float) in byte size) but are not be able to create shader resource view which will enclose it completely since we are limited by UINT range?
Is there a specific reason for this? HLSL is restricted to UINT32 values. Calling function GetDimensions() on the resource of UINT64 size will not be able to produce valid values. I guess, it could be one of the reasons.
Thanks!