Quantcast
Channel: Community : All Content - OpenCL
Viewing all articles
Browse latest Browse all 2400

OpenCL analogue of GL_ARB_draw_indirect

$
0
0

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.

 

Thanks.

glEnqueueNDRange
Détecter la langue » English

Viewing all articles
Browse latest Browse all 2400

Trending Articles