How to using clCreateImage to create a miapmap image?
xxxxxxLD opened this issue · 1 comments
xxxxxxLD commented
I'm trying to use clCreateImage to create a mipmap image, but returns CL_INVALID_IMAGE_DESCRIPTOR . Here is my code:
cl_image_desc clImageIn;
memset(&clImageIn, 0, sizeof(cl_image_desc));
clImageIn.image_type = CL_MEM_OBJECT_IMAGE2D;
clImageIn.image_width = 1920;
clImageIn.image_height = 1080;
clImageIn.num_mip_levels = 2;
cl_image_format clImageFormat;
clImageFormat.image_channel_order = CL_R;
clImageFormat.image_channel_data_type = CL_UNORM_INT8;
int ret;
cl_mem image = clCreateImage(context, CL_READ_ONLY, &clImageFormat, &clImageIn, NULL, ret);
and the ret also returns -65, is there something wrong?
Btw, I find mali-G57 cannot support OPENCL EXTENSION of cl_khr_mipmap_image ,is that true?