In opengl there is something called multidraw, I was wondering if D3D12 has an equivalent? I didn't see one in the graphicscommandlist interface docs, am I missing something or is there no equivalent?
Also I'm starting to look into the source of the dynamic indexing example and looking at this (https://msdn.microsoft.com/en-us/library/windows/desktop/mt186614(v=vs.85).aspx) page. I was wondering how to handle resource binding tier 1 hardware? I am right in connecting Resource Binding Tiers and dynamic indexing right? or am I completely off base.
In regards to the resource binding tiers question, I just wanted to know if I need to bound check manually? And if I do go out of bounds what happens is the access clamped or will an error happen?
HOWEVER, as you aren't wandering off into user mode driver town every time you do a draw call, because you are recording them into a client side buffer, this isn't a bad thing.
MultiDraw, and its ilk, are pretty much there as an optimisation and would allow the driver to hit some faster paths because it knows, between draw calls, that you aren't changing state.
Useful in a client-server setup. Useful in a high overhead setup. Less useful in a thin API.
In fact with the executeindirect functionality of D3D12 (which gives you the ability to change some root signature constants, and indeed vertex and index buffer locations based on a buffer input) you can do practically more things with better functionality. (One thread writes a command list with N indirect calls, one thread (or the GPU!) writes a buffer with draw call information, bit of fence sync magics, and bam! loads of draws!).
In fact with the executeindirect functionality of D3D12 (which gives you the ability to change some root signature constants, and indeed vertex and index buffer locations based on a buffer input) you can do practically more things with better functionality. (One thread writes a command list with N indirect calls, one thread (or the GPU!) writes a buffer with draw call information, bit of fence sync magics, and bam! loads of draws!).
Yeah I agree, but I'm not ready for indirect drawing yet. I'm still acquainting myself to the basics of D3D12.
Any takers on resource binding tiers and out of bounds indexing?
In regards to the resource binding tiers question, I just wanted to know if I need to bound check manually? And if I do go out of bounds what happens is the access clamped or will an error happen?
No, there's nothing like glMultiDraw in D3D. You'd have to implement it yourself with a loop.
Take another look at the link that SeanMiddleditch posted. ExecuteIndirect *is* MultiDraw. It's wrong to suggest D3D12 has no MultiDraw equivalent, it's in fact even more powerful than GL's MultiDraw. I believe it's also possible for a single ExecuteIndirect to execute Draws and Dispatches within a single ExecuteIndirect.
Edit: That was a misreading of the documentation, it is not.
Adam Miles - Principal Software Development Engineer - Microsoft Xbox Advanced Technology Group
ExecuteIndirect is MultiDrawIndirect (glMultiDrawArraysIndirect, glMultiDrawElementsIndirect). MultiDraw (glMultiDrawArrays, glMultiDrawElements) is the simple version that D3D12 doesn't need because of the low draw overhead.