I think I found a bug in the CodeXL debugger. It's running inside a Visual Studio 2012 instance.
For a kernel with this signature,
__kernel void do_something(
__global uchar *src, int src_rows, int src_cols, int src_step,
__global float* dst, int dst_rows, int dst_cols, int dst_step
the debugger will always show a null (0x00) for 'src', even if the pointer points to valid, initialized memory. This drove me crazy.
While researching the issue, I came across the necessary extension for scalar values and added
#pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable
which made no difference.
I have working code now, but the debugger still shows null; adding values to the null pointer variable creates funny address patterns, like increasing the value by 0x01010100, which actually might be intended in case of real null pointers.
It might also be interesting to note that the whole program (or debugger?) crashed when I replaced uchar* by void*, I don't even come to the point where I can inspect variable values.
I really hope this gets fixed. For the meantime, this report hopefully saves other people some headache.
Thanks for CodeXL!