PDA

View Full Version : Array of images as kernel parameter



pelotoescogorciao
01-05-2013, 11:15 AM
I need to access an image array as kernel's parameter. Also, I need that the images could have different sizes too.

Example:



__kernel void MyKernel ( __read_only image2d_t img[1024] )
{
/* img[0].width = 256px */
/* img[1].width=32px */
}


Why I could need this? For instance, to make a CL renderer where each object could use a different texture.

Currently it's a pain becuase I must use a global memory buffer and to implement my own texture filtering or to pass each image as kernel's parameters ( and there's an imput limit of 8 currently which is absolutely insufficient... )

thx.