Indirect draw and dispatch commands as well as their respective buffer types should be added.
Concept:
enum class BufferType {
Vertex,
Index,
Constant,
Storage,
StreamOutput,
DrawIndirect, // New buffer type for indirect draw commands
DispatchIndirect, // New buffer type for indirect dispatch commands
};
For the case the rendering APIs have slightly different buffer formats for these commands, individual structures for each backend must be provided. Otherwise, a uniform structure can be used:
The parameter buffer specifies a buffer that contains the draw/dispatch command arguments and the parameter offset specifies an aligned byte offset within the buffer for command arguments.
Indirect draw and dispatch commands as well as their respective buffer types should be added.
Concept:
For the case the rendering APIs have slightly different buffer formats for these commands, individual structures for each backend must be provided. Otherwise, a uniform structure can be used:
The functions in the
CommandBuffer
interface may look like this:The parameter
buffer
specifies a buffer that contains the draw/dispatch command arguments and the parameteroffset
specifies an aligned byte offset within the buffer for command arguments.Progress overview:
DrawIndirect
DrawIndexedIndirect
DispatchIndirect