Ability to change border color with image objects
Currently on pg 238 of the 1.1 spec it says this:
I would like to see the ability to change the border color added. All current GPUs support this in their hardware (since OpenGL has it).
220.127.116.11.1 Determining the border color
If <addressing mode> in sampler is CLK_ADDRESS_CLAMP, then out-of-range image
coordinates return the border color. The border color selected depends on the image channel
order and can be one of the following values:
If the image channel order is CL_A, CL_INTENSITY, CL_Rx, CL_RA, CL_RGx,
CL_RGBx, CL_ARGB, CL_BGRA, or CL_RGBA, the border color is (0.0f, 0.0f,
If the image channel order is CL_R, CL_RG, CL_RGB, or CL_LUMINANCE, the border
color is (0.0f, 0.0f, 0.0f, 1.0f
Currently I use the border color in my kernel to handle out of range memory buffer accesss instead of if/else as it is a lot cheaper.
Using zero works fine currently, but it limits the kernel's flexibility for features I want to add later on.