Reading an image using CLK_FILTER_LINEAR interpolation mode produces zeros instead of the correct image values.
Driver: OpenCL Runtime 15.1
Version: 5.0.0.57
OS: Debian Jessie
Language: Python (PyOpenCL)
The following kernel is a minimum test case. It is supposed to copy the input into the output. It works fine under the Beignet GPU driver, but under Intel's CPU driver the output image consists of all zeros. When CLK_FILTER_LINEAR is replaced by CLK_FILTER_NEAREST it works.
The problem persists when using normalized coordinates.
constant sampler_t S = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_NONE | CLK_FILTER_LINEAR; kernel void tube( read_only image2d_t img_in, write_only image2d_t img_out) { int2 xy = {get_global_id(0), get_global_id(1)}; uint4 rgb_; rgb_ = read_imageui(img_in, S, convert_float2(xy) + 0.5f); write_imageui(img_out, xy, rgb_); }
I attach a small test script.