PDA

View Full Version : transform feedback + glDrawElementsInstanced (REVISITED)



Dark Photon
02-08-2013, 11:19 AM
For on-GPU culling and LOD of instance variation data provided to an instanced draw call (see aqnuep's GPU based dynamic geometry LOD (http://rastergrid.com/blog/2010/10/gpu-based-dynamic-geometry-lod/) for background) ...but without GPU->CPU->GPU synchronization...

Are atomics still the simplest and most efficient method to effectively feedback GL_PRIMITIVES_GENERATED from a transform feedback run into the "primcount" parameter of DrawElementsInstanced draw calls (invoked via glDrawElementsIndirect) on NVidia GPUs? (Re: this thread (http://www.opengl.org/discussion_boards/showthread.php/178280-transform-feedback-glDrawElementsInstanced/)) Or is there another?

glDrawElementsTransformFeedbackStreamInstancedPrim Count() would work too :whistle: (ala glDrawTransformFeedbackStreamInstanced (http://www.opengl.org/sdk/docs/man/xhtml/glDrawTransformFeedbackStreamInstanced.xml)), but I'm not holding my breath for that one.

An alternative would be the ability to fetch query results directly into GPU buffer objects (assuming it all stayed on the GPU), instead of into CPU-side client pointers. In the same manor as VBOs vs. client arrays for vertex attribute and index arrays. However, no AMD_query_buffer_object (http://www.opengl.org/registry/specs/AMD/query_buffer_object.txt) support here yet.

Thanks.