typedef struct D3D12_BUFFER_UAV {
UINT64 FirstElement;
UINT NumElements;
UINT StructureByteStride;
UINT64 CounterOffsetInBytes; // The counter offset, in bytes.
D3D12_BUFFER_UAV_FLAGS Flags;
} D3D12_BUFFER_UAV;
say I have a buffer of 2 UAV for simplicity with a UAV counter
the first is 10 objects lets name them struct input
the second is 20 objects let's call it struct output
and a buffer of size 10*sizeof(input)+ 20*sizeof(output)+sizeof(UINT)
so I will have to make two D3D12_UNORDERED_ACCESS_VIEW_DESC
for the first description
FirstElement=0
NumElements =10
StructureByteStride= sizeof(Input)
CounterOffsetInBytes=??
// The counter offset, in bytes.
for the second description
FirstElement=10
NumElements =20
StructureByteStride =sizeof(output)
CounterOffsetInBytes=??
// The counter offset, in bytes.
1- What is CounterOffsetInBytes and how to set it, for instance where the counter is located at the beginning or at the end the doc doesn't mention.
2- am I suppose to make a counter for each buffer or one will buffer will be enough, if i need to make two counters then how does it work