Looks like you need to convert the `src` to `8UC1` type and change all non-zero values to 255.
It can be easier done via `oclMat src8u(src.size(), CV_8UC1); src8u.setTo(Scalar(255), src);`.
Also the function expects single-channel images only, so `CV_Assert(src.channels() == 1);` would help catch bugs.