Bug (?) with image2d_t as parameter in kernel

Hi there,

I’ve used image2d_t in my kernels and until now, it works so far so good. But when i add another kernel with image2d_t as parameter, it stops to build correctly (plus i can’t have access to the build log because the app crashes (clBuildProgram) before returning values).

Can someone helps me ?

code.txt (4.09 KB)

I can confirm that compilation crashed on my machine, too (OpenSUSE 11.2, CUDA 3.2 with libcuda.so.260.19.26), but I was able to compile (but not test) your code with another OpenCL implementation - NVIDIAs OpenCL compiler reports some syntax errors by raising SIGSEGV, but this seems not to be cause here… I suspect it is a(nother) compiler bug.

In general having multiple kernels taking image arguments in a single CL program works fine for me, also with NVIDIA’s OpenCL.

As a workaround, you could try splitting it up into two programs and compile them separately…

When i replace this :

__kernel void insertOSD(__write_only image2d_t srcLeft, __write_only image2d_t srcRight,

	__read_only image2d_t logo,

	uint lowestDisparity,

	uint xOffset, uint yOffset,

	uint width, uint height)

{

	int2 coord = (int2)(get_global_id(0), get_global_id(1));

}

by this :

__kernel void insertOSD(__global uint * srcLeft, __global uint *srcRight,

	__global uint * logo,

	uint lowestDisparity,

	uint xOffset, uint yOffset,

	uint width, uint height)

{

	int2 coord = (int2)(get_global_id(0), get_global_id(1));

}

It works ?! However, my nVidia GPU has image support ? Why the nvidia driver refuses to build my CL program correctly when i use image2d_t ?

EDIT : Found the bug ! You need to USE your image2d parameter (read_image/write_image) even if you don’t want to use it now (i just wanted to declare my kernel…External Image)

I have the same problem. It is ridiculous that compilation will clash if the image parameters are declared but not used.