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;
int offset = myParamsCalculatedInPrevKernelRun;
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