OpenCL write_imagei problem

I have a very strange issue when try to write data into a 2d integer image.
This are the important parts of the code (I’m useing the C++ wrapper cl.hpp):

cl_int err = 0;
cl::ImageFormat format(CL_RGBA,  CL_SIGNED_INT32);
cl::Image2D border(mContext, CL_MEM_READ_WRITE, format, 1, 1, 0, NULL, &err);

And read it back with this lines (this code is not very clean, but it’s there just for debug):

int *im = new int[4];
cl::size_t<3> o; o[0] = o[1] = o[2] = 0;
cl::size_t<3> s; s[0] = s[1] = s[2] = 1;
err = mCommandQueue.enqueueReadImage(border, CL_TRUE, o, s, 0, 0, im)

And finally the kernel (again just a test kernel):

kernel void generateVertexBuffer(write_only image2d_t borders){
    int4 b = {1, 2, 3, 4};
    if(get_global_id(0) == 0)
        write_imagei(border, (int2)(0, 0), b); 

When try to run this code the enqueueReadImage always return -5: CL_OUT_OF_RESOURCES.
The code works if I change the image format to CL_[UN]SIGNED_INT[8|16], the problem arise only with 32 bit integer formats, which is odd considering that clGetSupportedImageFormats with CL_MEM_READ_WRITE and CL_MEM_OBJECT_IMAGE2D tells me that four channel 32bit images are supported.
Lasts informations: OS: windows 8 64bit, GeForce GTX 470, driver version: 320.49.

Any ideas?