Fix a bunch of OpenCL bugs (yay for PCs with multiple platforms).