blob: 801254ce1c320e81e9cf0acdb0770cd5d0968892 [file] [log] [blame]
Name
NV_bindless_multi_draw_indirect_count
Name Strings
GL_NV_bindless_multi_draw_indirect_count
Contact
Christoph Kubisch, NVIDIA (ckubisch 'at' nvidia.com)
Contributors
Piers Daniell, NVIDIA
Status
DRAFT SPECIFICATION
Version
Last Modified Date: July 6, 2015
Revision: 3
Number
OpenGL Extension #456
Dependencies
NV_bindless_multi_draw_indirect is required.
ARB_indirect_parameters is required.
The extension is written against the OpenGL 4.3 Specification, Core Profile.
Overview
This extension adds the possibility to define the number of drawcalls within
a multi-draw-indirect call from the GPU, as provided by ARB_indirect_parameters,
for the functions added in NV_bindless_multi_draw_indirect.
New Procedures and Functions
void MultiDrawArraysIndirectBindlessCountNV(enum mode,
const void *indirect,
intptr drawCount,
sizei maxDrawCount,
sizei stride,
int vertexBufferCount);
void MultiDrawElementsIndirectBindlessCountNV(enum mode,
enum type,
const void *indirect,
intptr drawCount,
sizei maxDrawCount,
sizei stride,
int vertexBufferCount);
New Tokens
None.
Additions to Chapter 10 of the OpenGL 4.3 (Core) Specification (OpenGL Operation)
Additions to Section 10.5, "Drawing Commands Using Vertex Arrays"
After the description of MultiDrawArraysIndirectBindlessNV and before the
introduction of DrawElementsOneInstance, insert the following on p.311:
The command
void MultiDrawArraysIndirectBindlessCountNV(enum mode,
const void *indirect,
intptr drawCount,
sizei maxDrawCount,
sizei stride,
int vertexBufferCount);
behaves similarly to MultiDrawArraysIndirectBindlessNV, except that <drawCount>
defines an offset (in bytes) into the buffer object bound to the
PARAMETER_BUFFER_ARB binding point at which a single <sizei> typed value
is stored, which contains the draw count. <maxDrawCount> specifies the
maximum number of draws that are expected to be stored in the buffer,
and as in ARB_indirect_parameters the buffer must be sized accordingly.
If the value stored at <drawCount> into the buffer is greater than
<maxDrawCount>, an implementation may stop processing draws after
<maxDrawCount> parameter sets.
<drawCount> must be a multiple of four, otherwiseINVALID_VALUE error will
be generated
<maxDrawCount> must be positive, otherwise an INVALID_VALUE error will be
generated.
After the description of MultiDrawElementsIndirectBindlessNV and before the
introduction of MultiDrawElementsBaseVertex, insert the following on p.316:
The command
void MultiDrawElementsIndirectBindlessCountNV(enum mode,
enum type,
const void *indirect,
intptr drawCount,
sizei maxDrawCount,
sizei stride,
int vertexBufferCount);
behaves similarly to MultiDrawElementsIndirectBindlessNV, except that
<drawCount> defines an offset (in bytes) into the buffer object bound
to the PARAMETER_BUFFER_ARB binding point at which a single <sizei> typed
value is stored, which contains the draw count. <maxDrawCount> specifies
the maximum number of draws that are expected to be stored in the buffer,
and as in ARB_indirect_parameters the buffer must be sized accordingly.
If the value stored at <drawCount> into the buffer is greater than
<maxDrawCount>, an implementation may stop processing draws after
<maxDrawCount> parameter sets.
<drawCount> must be a multiple of four, otherwise INVALID_VALUE error will
be generated
<maxDrawCount> must be positive, otherwise an INVALID_VALUE error will be
generated.
Modifications to Section 10.3.10 (p. 305) "Indirect Commands in Buffer Objects"
Modify both instances of "DrawArraysIndirect, DrawElementsIndirect,
MultiDrawArraysIndirect and MultiDrawElementsIndirect" on
p. 305 to read "DrawArraysIndirect, DrawElementsIndirect,
MultiDrawArraysIndirect, MultiDrawArraysIndirectARB, MultiDrawElementsIndirect,
MultiDrawElementsIndirectCountARB, MultiDrawArraysIndirectBindlessNV,
MultiDrawArraysIndirectBindlessCountNV, MultiDrawElementsIndirectBindlessNV
and MultiDrawElementsIndirectBindlessCountNV".
Additions to the AGL/GLX/WGL Specifications
None.
GLX Protocol
None.
Errors
INVALID_OPERATION is generated by MultiDrawArraysIndirectBindlessCountNV or
MultiDrawElementsIndirectBindlessCountNV if no buffer is bound to the
PARAMETER_BUFFER_ARB or DRAW_INDIRECT_BUFFER binding point.
INVALID_VALUE is generated by MultiDrawArraysIndirectBindlessCountNV or
MultiDrawElementsIndirectBindlessCountNV if <drawCount> is not aligned
to found basic machine units.
INVALID_VALUE is generated by MultiDrawArraysIndirectBindlessCountNV or
MultiDrawElementsIndirectBindlessCountNV if <maxDrawCount> is not positive.
INVALID_OPERATION is generated by MultiDrawArraysIndirectBindlessCountNV or
MultiDrawElementsIndirectBindlessCountNV if reading a <sizei> typed value
from the buffer bound to the PARAMETER_BUFFER_ARB target at the offset
specified by <drawCount> would result in an out-of-bounds access.
New State
None.
New Implementation Dependent State
None.
Issues
Revision History
Rev. Date Author Changes
---- -------- -------- -----------------------------------------
3 07/06/2015 ckubisch stress that indirect buffer must be able to
store <maxDrawCount> commands
2 06/24/2013 ckubisch Sync to ARB_indirect_parameters
1 06/14/2013 ckubisch Initial draft