AnsweredAssumed Answered

OpenCL analogue of GL_ARB_draw_indirect

Question asked by alariq on Dec 14, 2012
Latest reply on Dec 14, 2012 by siu

Hi, All


Iis there any (planned) support for this kind of feature?


It is very usefull if you know your parameters to glEnqueueNDRange on GPU side and do not want to do round trip.


for now only one workaround I can come up with, is to always add some kind of check and offset like this:


void kernel my_kernel(__global * int myParamsCalculatedInPrevKernelRun, __global int* pout )


   int count = myParamsCalculatedInPrevKernelRun[0];

   int offset = myParamsCalculatedInPrevKernelRun[1];


   int gi = get_global_id(0) + offset;

   if( gi >= count + offset) return.


   // kernel code

   *pout = ...



But this also implies that i have to call glEnqueueNDRange with max possible amount of work-items which is not very good from various points.



Détecter la langue » English