1Name 2 3 NV_bindless_multi_draw_indirect_count 4 5Name Strings 6 7 GL_NV_bindless_multi_draw_indirect_count 8 9Contact 10 11 Christoph Kubisch, NVIDIA (ckubisch 'at' nvidia.com) 12 13Contributors 14 15 Piers Daniell, NVIDIA 16 17Status 18 19 DRAFT SPECIFICATION 20 21Version 22 23 Last Modified Date: July 6, 2015 24 Revision: 3 25 26Number 27 28 OpenGL Extension #456 29 30Dependencies 31 32 NV_bindless_multi_draw_indirect is required. 33 34 ARB_indirect_parameters is required. 35 36 The extension is written against the OpenGL 4.3 Specification, Core Profile. 37 38Overview 39 40 This extension adds the possibility to define the number of drawcalls within 41 a multi-draw-indirect call from the GPU, as provided by ARB_indirect_parameters, 42 for the functions added in NV_bindless_multi_draw_indirect. 43 44 45New Procedures and Functions 46 47 void MultiDrawArraysIndirectBindlessCountNV(enum mode, 48 const void *indirect, 49 intptr drawCount, 50 sizei maxDrawCount, 51 sizei stride, 52 int vertexBufferCount); 53 54 void MultiDrawElementsIndirectBindlessCountNV(enum mode, 55 enum type, 56 const void *indirect, 57 intptr drawCount, 58 sizei maxDrawCount, 59 sizei stride, 60 int vertexBufferCount); 61 62New Tokens 63 64 None. 65 66Additions to Chapter 10 of the OpenGL 4.3 (Core) Specification (OpenGL Operation) 67 68 Additions to Section 10.5, "Drawing Commands Using Vertex Arrays" 69 70 After the description of MultiDrawArraysIndirectBindlessNV and before the 71 introduction of DrawElementsOneInstance, insert the following on p.311: 72 73 The command 74 75 void MultiDrawArraysIndirectBindlessCountNV(enum mode, 76 const void *indirect, 77 intptr drawCount, 78 sizei maxDrawCount, 79 sizei stride, 80 int vertexBufferCount); 81 82 behaves similarly to MultiDrawArraysIndirectBindlessNV, except that <drawCount> 83 defines an offset (in bytes) into the buffer object bound to the 84 PARAMETER_BUFFER_ARB binding point at which a single <sizei> typed value 85 is stored, which contains the draw count. <maxDrawCount> specifies the 86 maximum number of draws that are expected to be stored in the buffer, 87 and as in ARB_indirect_parameters the buffer must be sized accordingly. 88 If the value stored at <drawCount> into the buffer is greater than 89 <maxDrawCount>, an implementation may stop processing draws after 90 <maxDrawCount> parameter sets. 91 92 <drawCount> must be a multiple of four, otherwiseINVALID_VALUE error will 93 be generated 94 95 <maxDrawCount> must be positive, otherwise an INVALID_VALUE error will be 96 generated. 97 98 After the description of MultiDrawElementsIndirectBindlessNV and before the 99 introduction of MultiDrawElementsBaseVertex, insert the following on p.316: 100 101 The command 102 103 void MultiDrawElementsIndirectBindlessCountNV(enum mode, 104 enum type, 105 const void *indirect, 106 intptr drawCount, 107 sizei maxDrawCount, 108 sizei stride, 109 int vertexBufferCount); 110 111 behaves similarly to MultiDrawElementsIndirectBindlessNV, except that 112 <drawCount> defines an offset (in bytes) into the buffer object bound 113 to the PARAMETER_BUFFER_ARB binding point at which a single <sizei> typed 114 value is stored, which contains the draw count. <maxDrawCount> specifies 115 the maximum number of draws that are expected to be stored in the buffer, 116 and as in ARB_indirect_parameters the buffer must be sized accordingly. 117 If the value stored at <drawCount> into the buffer is greater than 118 <maxDrawCount>, an implementation may stop processing draws after 119 <maxDrawCount> parameter sets. 120 121 <drawCount> must be a multiple of four, otherwise INVALID_VALUE error will 122 be generated 123 124 <maxDrawCount> must be positive, otherwise an INVALID_VALUE error will be 125 generated. 126 127 Modifications to Section 10.3.10 (p. 305) "Indirect Commands in Buffer Objects" 128 129 Modify both instances of "DrawArraysIndirect, DrawElementsIndirect, 130 MultiDrawArraysIndirect and MultiDrawElementsIndirect" on 131 p. 305 to read "DrawArraysIndirect, DrawElementsIndirect, 132 MultiDrawArraysIndirect, MultiDrawArraysIndirectARB, MultiDrawElementsIndirect, 133 MultiDrawElementsIndirectCountARB, MultiDrawArraysIndirectBindlessNV, 134 MultiDrawArraysIndirectBindlessCountNV, MultiDrawElementsIndirectBindlessNV 135 and MultiDrawElementsIndirectBindlessCountNV". 136 137 138Additions to the AGL/GLX/WGL Specifications 139 140 None. 141 142GLX Protocol 143 144 None. 145 146Errors 147 148 INVALID_OPERATION is generated by MultiDrawArraysIndirectBindlessCountNV or 149 MultiDrawElementsIndirectBindlessCountNV if no buffer is bound to the 150 PARAMETER_BUFFER_ARB or DRAW_INDIRECT_BUFFER binding point. 151 152 INVALID_VALUE is generated by MultiDrawArraysIndirectBindlessCountNV or 153 MultiDrawElementsIndirectBindlessCountNV if <drawCount> is not aligned 154 to found basic machine units. 155 156 INVALID_VALUE is generated by MultiDrawArraysIndirectBindlessCountNV or 157 MultiDrawElementsIndirectBindlessCountNV if <maxDrawCount> is not positive. 158 159 INVALID_OPERATION is generated by MultiDrawArraysIndirectBindlessCountNV or 160 MultiDrawElementsIndirectBindlessCountNV if reading a <sizei> typed value 161 from the buffer bound to the PARAMETER_BUFFER_ARB target at the offset 162 specified by <drawCount> would result in an out-of-bounds access. 163 164New State 165 166 None. 167 168New Implementation Dependent State 169 170 None. 171 172Issues 173 174 175Revision History 176 177 Rev. Date Author Changes 178 ---- -------- -------- ----------------------------------------- 179 3 07/06/2015 ckubisch stress that indirect buffer must be able to 180 store <maxDrawCount> commands 181 2 06/24/2013 ckubisch Sync to ARB_indirect_parameters 182 1 06/14/2013 ckubisch Initial draft 183