Enabling OpenCL on 10.7.5 and ML GM


10.7.5/mbp2012 drivers run opencl on Fermi just fine out of box, no more need to enable it binpatching, but..

If you have a card with more than 2 gb of video memory, opencl suddenly gets disabled, wtf?
Here is why: (warning, assembler skills needed for the pic)
basicaly, if your video ram amount > 2GB by at least 1 byte, then you are screwed.
Funny Apple, they decided to control it themselves instead of putting check in the nvidia driver.
But, we can just disable the check and enjoy.
The file you wanna patch is /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
Just do these two simple patches you can do with any hex editor and you are good to go:
1) for 32-bit part:
find 3d 01 00 00 80 73 e7
replace with 3d 01 00 00 80 90 90

yes, its just last two bytes to disable the check
2) for 64-bit part, for lion
find ff 50 68 48 39 d8 73 e5
replace with ff 50 68 48 39 d8 90 90

for mountain lion
find ff 50 68 4c 39 e0 73 e7
replace with ff 50 68 4c 39 e0 90 90

P.S. doesnt applies to gtx670/gtx680, they have a different problems.