OpenCL 2.01, can't write to char pointers

Discussion created by tball on Feb 24, 2010
Latest reply on Jun 23, 2010 by smatovic
opencl, fglrx, uchar, pointers


I have a problem witing to a char array, when using the GPU.

See my code attached.

I use the following:

Ubuntu 9.10

Fglrx 10.1/10.2

AMD stream SDK 2.01.

My output picture is somewhat distorted. See my attached picture. On a nvidia gfx card and using the cpu, there is no problem "copying" the uchar image to another.

I use the correct extension, to be able to write to an uchar pointer array.

#pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable __kernel void hello(__global uchar * input, __global uchar * output, __global int * widthstep) { int tidx = get_global_id(0); int tidy = get_global_id(1); output[tidx + tidy*widthstep[0]] = input[tidx + tidy*widthstep[0]]; }