The OpenCL spec defines several image_read functions - with a suffix for the element data type; with variants for 2D and 3D images; and variants taking a sampler, or not taking one.
The spec says that no-sampler read functions behave just as though you've provided a certain kind of sampler, except for the case of denormal/sub-normal values; to quote from the spec:
The sampler-less image read functions behave exactly as the corresponding built-in image read functions that take integer coordinates and a sampler with filter mode set to
CLK_FILTER_NEAREST, normalized coordinates set toCLK_NORMALIZED_COORDS_FALSEand addressing mode toCLK_ADDRESS_NONE. There is one exception when theimage_channel_data_typeis a floating-point type (such asCL_FLOAT). In this exceptional case, when channel data values are denormalized, the sampler-less image read function may return the denormalized data, while the image read function with a sampler argument may flush the denormalized channel data values to zero.
I don't understand the last sentence. That is, it would make sense to me if it said: "Sampler-less read functions may or may not flush the data, but with-sampler read functions always flush". Saying that both "may" do something means that both may also do the other - so that apparently there is no difference.
So, am I misreading? Is this a glitch in the spec? And what actually happens with denormals in various OpenCL implementations?