write_imagef causes build to fail

Discussion created by DFYX on Dec 5, 2011
Latest reply on Dec 13, 2011 by DFYX
write_imagef causes "Error: Undeclared function index 1028"

I just tried to run the QtOpenCL examples on Windows 7 x64, ATI Radeon HD4850, Catalyst 11.9, APP SDK 2.5 x64, MS Visual Studio 2008. Every kernel that contains a call to write_imagef causes an error in clBuildProgram. In case of the attached example it's "Error: Undeclared function index 1028". Replacing it with write_imagei leads to no error.

__kernel void fillRectWithColor (__write_only image2d_t dstImage, int offsetX, int offsetY, int limitX, int limitY, float4 color) { int x = get_global_id(0) + offsetX; int y = get_global_id(1) + offsetY; if (x < limitX && y < limitY) write_imagef(dstImage, (int2)(x, y), color); }