I'am unhappay at the moment. After digging all day long in forums and tutorials and documentations I think there is a bug in the ATI SDK.
I'll try to calcualte some float4 color values and convert them to unsigned int to save the value in a __global unsigned int* buffer.
This compiles ok, and is exactly the same like some raytracing function I've found, so I'll expect that this will work. (maybe I test it on my notebook with nvidia card). Every time I'll get an exception if I call enqueueNDRangeKernel. This exception happens on a movaps assembler instruction and hints that the memory is not aligned correctly (#aps means aligned). Unfortunately every thing I'll do to align memory fails (maybe it doesn't fail). The buffer is allocated by opencl functionality.
The function looks like that
__kernel void convert(__global uint* pDst,__global uint* pSrc1,__global uint* pSrc2)
uint pos = get_global_id(0);
float4 l_Val1 = uintToFloat4(p_Src[pos]);
float4 l_Val2 = uintToFloat4(p_Src2[pos]);
float4 l_Ret = float4ToUint(dosomething(l_Val1,l_Val2));
// if I comment floatTiUint out and set l_Ret to some immediate value all is ok
p_Dst[pos] = l_Ret;
Hope someone knows what my fault is (I hope its my fault, because i'am new to opencl.)