0 Replies Latest reply on Jan 5, 2016 9:51 PM by lucia

    does device side enqueue support image object as child kernel parameter


      hi,I have a question about OpenCL2.0, hope you guys can help me.

      I am trying to enqueue a kernel inside a kernel using device side enqueue feature of OpenCL 2.0, the child kernel has a parameter known as image object(write_only), but when i try to read the image object in host side ,there is nothing but zero values in the image object. However, when i try buffer object, the result is true. My question is: does device side enqueue support image object as parameter for child kernel.I know it support pipe as in SDK sample DeviceEnqueueBFS. The code is shown below:



      void kernelLauncher(__global uchar *preFrame,

                                      read_write image2d_t preFrameME,

                                      __constant sclParam *param)


        int ret;

        clk_event_t event_ip, event_me;


        size_t globalWorkSize[2];

        size_t localWorkSize[2];

        ndrange_t ndrange;


        //define a block for IP kernel

        void (^IP_blk)(void) = ^{clDownsample2K1K((__global uchar2*)preFrame,





        //NDRange infomation for IP part

        globalWorkSize[0] = 960;

        globalWorkSize[1] = 540;

        localWorkSize[0] = 64;

        localWorkSize[1] = 1;

        ndrange = ndrange_2D(globalWorkSize, localWorkSize);


        ret = enqueue_kernel(get_default_queue(), CLK_ENQUEUE_FLAGS_NO_WAIT,

        ndrange, 0, NULL, &event_ip, IP_blk);

        if(ret != 0)