Too many images?

I use NVIDEA OpenCL version.
My kernel requied array of 2D images as input parameter. Since current version does not support arrays of images I use each one as separate parameter.

__kernel void blabla(__write_only image2d_t out_view0,
__write_only image2d_t out_view1,
__write_only image2d_t out_view2,
__write_only image2d_t out_view3,
__write_only image2d_t out_view4,
__write_only image2d_t out_view5,
__write_only image2d_t out_view6,
__write_only image2d_t out_view7,

The code works fine in case I have only 8 images. In case I try to increace the number I get the error

ptxas fatal : More than 8 surfaces used in entry function ‘blabla’

I have another kernel that uses 16 2D read only images as input and it works fine.
Do anybody have exponation what does it mean?


Elaborating a little on what Maxim said, you want to call clGetDeviceInfo() and pass CL_DEVICE_MAX_WRITE_IMAGE_ARGS as the argument.