Jump to content

OpenCL fix for non-GF100/GF110 cards (aka CC/SM 2.1+)


  • Please log in to reply
137 replies to this topic

#61
FecsoMAC

FecsoMAC

    InsanelyMac Protégé

  • Members
  • Pip
  • 30 posts
I have Quadro 4000 MAC card on Lion 10.7.4. I installed the new nvidia driver(Retail_270.00.00f06.dmg), and I can't enable openCL.
I modified GeForceGLDriver and libclh.dylib. After restart I get slow motion in system.

I modified these files in apple driver, and everything was good, I could use OpenCL, but now with nvidia, it isn't working.
(In the new nvidia driver I didn't find in info.plist of NVDAGF100Hal.kext the IOPCIPrimaryMatch)

Any idea?
Thx

#62
Riley Freeman

Riley Freeman

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 904 posts
  • Gender:Male
  • Location:The Streets

just installed 10.8 dp4 and opencl now works ootb on non-gf100/gf110 cards, so this fix is no longer required :)

I had to patch to get OceanWave working on my 460 GTX.

#63
Klonkrieger2

Klonkrieger2

    InsanelyMac Protégé

  • Members
  • PipPip
  • 63 posts
Riley Freeman: Which files did you patch? i could only patch the libclh.dylib file. in GeForceGLDriver i couldn't find the right hex-code. So for me (quadro 5000) opencl is still not working :(

#64
Riley Freeman

Riley Freeman

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 904 posts
  • Gender:Male
  • Location:The Streets
Just libclh.dylib as I'm on ML DP4. The GeForceGLDriver patch is only for Lion.

#65
Klonkrieger2

Klonkrieger2

    InsanelyMac Protégé

  • Members
  • PipPip
  • 63 posts
could you please upload your file? i don't know why mine's not working...

#66
Riley Freeman

Riley Freeman

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 904 posts
  • Gender:Male
  • Location:The Streets
Here it is. http://ge.tt/5RPfQGJ/v/0?c

It's the whole GeForceGLDriver.bundle just in case you didn't keep a backup of the original file before editing. The libclh.dylib is patched.

I also included the script I use to patch the file. I just double-click it and it puts a backup copy of libclh.dylib on my desktop and then patches the original file.

#67
Klonkrieger2

Klonkrieger2

    InsanelyMac Protégé

  • Members
  • PipPip
  • 63 posts
thank's man! But this didn't work for me too :( Still no working opencl. even upgrading to the new ML build changed anything. Any Suggestions about that?

#68
Riley Freeman

Riley Freeman

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 904 posts
  • Gender:Male
  • Location:The Streets
No ideas, it just worked for me :(

#69
ugokind

ugokind

    InsanelyMac Deity

  • Donators
  • 1,713 posts
  • Gender:Male
  • Location:10100
  • Interests:Apicoltura
    Mac
    Linux
    Homebrew
    Australia
    Spremermilcervello
confirm !

not required in DP4
my 460m gtx is rinning perfectly no freeze

#70
Riley Freeman

Riley Freeman

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 904 posts
  • Gender:Male
  • Location:The Streets
Have you tested with OceanWave? I usually run it after a fresh install and it always says patching is needed.

#71
Klonkrieger2

Klonkrieger2

    InsanelyMac Protégé

  • Members
  • PipPip
  • 63 posts
netkas <3
http://netkas.org/?p=1161

this solved my problem :)

#72
subxero

subxero

    InsanelyMac Protégé

  • Members
  • PipPip
  • 58 posts

netkas <3
http://netkas.org/?p=1161

this solved my problem :)

This is patch only applies to video cards using the MBP2012 drivers to see cards with more than 2GB RAM.

#73
Klonkrieger2

Klonkrieger2

    InsanelyMac Protégé

  • Members
  • PipPip
  • 63 posts
That's just wrong...re-read the text and watch for "ML" "mountain lion" "ML GM" etc. ;)

#74
subxero

subxero

    InsanelyMac Protégé

  • Members
  • PipPip
  • 58 posts

That's just wrong...re-read the text and watch for "ML" "mountain lion" "ML GM" etc. ;)


From the Netkas site:

Enabling OpenCL on 10.7.5/mbp2012 drivers and ML GM

July 11th 2012 Posted to Apple,Lion,Mountain Lion,Nvidia

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)
Posted Image
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. End Quote!

Exactly what I said. This is a patch to enable cards that COULD normally have OpenCL support, but don't Because they have memory greater than 2GB. This is not a generic OpenCL patch.

#75
Klonkrieger2

Klonkrieger2

    InsanelyMac Protégé

  • Members
  • PipPip
  • 63 posts
"This is patch only applies to video cards using the MBP2012 drivers to see cards with more than 2GB RAM."

MPB2012 drivers != Mountain Lion

but let's stop this stupid argument....

#76
Moviemakergr

Moviemakergr

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 159 posts
  • Gender:Male

Here it is. http://ge.tt/5RPfQGJ/v/0?c

It's the whole GeForceGLDriver.bundle just in case you didn't keep a backup of the original file before editing. The libclh.dylib is patched.

I also included the script I use to patch the file. I just double-click it and it puts a backup copy of libclh.dylib on my desktop and then patches the original file.


Thanks mate that's works for me .. 560Ti and MLGM :wink2:

#77
Sanky18

Sanky18

    InsanelyMac Protégé

  • Members
  • PipPip
  • 65 posts
  • Gender:Male
Hi i have a lenovo g460 running 10.8 having following configuration:
Intel core i5 520m
4 gb ram
500 gb hdd
nvidia geforce 310m
I have succcessfully installed 10.8 and also booted up without any problems but the system hangs after a couple of minutes after boot. I can move the mouse but everything else is frozen. In the system log i get this:
NVDA(OpenGL): Channel exception! exception type = 0xd = GR: SW Notify Error
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: IOVendorGLContext::ReportGPURestart
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: 0000006e
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: 00200000 00008597 00000474 00000040
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: 0000047e 000017b4 00000001 0000000a
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: 00000000 00000000 00000002
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: 00000040 00000000
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0xd = GR: SW Notify Error
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: 0000006e
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: 00200000 00008597 00000474 00000010
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: 0000047e 00000dfc 0000002b 0000000a
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: 00000000 00000000 00000403
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: 00000010 00000000
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: NVDA(OpenGL): Channel exception! exception type = 0xd = GR: SW Notify Error
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: 0000006e
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: 00200000 00008597 00000474 00000010
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: 0000047e 00000dfc 0000006e 0000000a
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: 00000000 00000000 00000403
Jul 18 20:20:49 Sankets-MacBook-Pro kernel[0]: 00000010 00000000
How do i solve this?? In 0.7.4 the gpu worked just fine. Thanks in advance.

#78
rfwagner

rfwagner

    InsanelyMac Protégé

  • Members
  • Pip
  • 1 posts
Hello to all, i want to make a request for anyone that have Final Cut Pro X installed, and is using this kind of video card, if the OPENCL ativated by this method is used by the FCPX for rendering video, because some people reported that especialy in FCP the GPU is not activated to render, just the CPU, and after make this procedure.
Can someone please test and post here?

I know that some guys post in tonymac forum that they can see what i wrote, with a system temperatu monitor, the gpu temp stay the same after some time in rendering, only the cpu temp raises, reaching the conclusion that the OPENCL activated did not work for Final Cut.

Sincerely thanks since now.

#79
RobertX

RobertX

    Yosemite Sam

  • Members
  • PipPipPipPipPipPipPip
  • 565 posts
  • Gender:Not Telling
seems that i need this fix again(or a new fix?)
after using these drivers http://www.nvidia.co...f20-driver.html running 10.8.1, OpenCLOceanWave errors again... :moil:

Edited by robertx, 12 September 2012 - 12:31 PM.


#80
RobertX

RobertX

    Yosemite Sam

  • Members
  • PipPipPipPipPipPipPip
  • 565 posts
  • Gender:Not Telling
from oclinfo:
[codebox]1 OpenCL platform found!
[Platform 0]
Name: Apple
Vendor: Apple
Version: OpenCL 1.2 (Jun 20 2012 14:18:19)
Profile: FULL_PROFILE
Extensions: cl_APPLE_SetMemObjectDestructor cl_APPLE_ContextLoggingFunctions cl_APPLE_clut cl_APPLE_query_kernel_names cl_APPLE_gl_sharing cl_khr_gl_event

[OpenCL-only Context]
2 OpenCL devices found!
[Device 0]
Name: Intel® Core™2 Duo CPU E6550 @ 2.33GHz
Vendor: Intel
Type: CPU
Device Version: OpenCL 1.2
Driver Version: 1.1
Compute Units: 2
Work Group Size: 1024
Clock: 2327 MHz
Global Memory (Total): 8192 MB
Global Memory (Host): 8192 MB
Global Memory (PCIe): 0 MB
Local Memory: 32 KB
Cache Size: 0.0625 KB
Cache Line Size: 4194304 Bytes
Available: Yes
Double-Precision: Yes
Extensions:
cl_APPLE_SetMemObjectDestructor
cl_APPLE_ContextLoggingFunctions
cl_APPLE_clut
cl_APPLE_query_kernel_names
cl_APPLE_gl_sharing
cl_khr_gl_event
cl_khr_fp64
cl_khr_global_int32_base_atomics
cl_khr_global_int32_extended_atomics
cl_khr_local_int32_base_atomics
cl_khr_local_int32_extended_atomics
cl_khr_byte_addressable_store
cl_khr_int64_base_atomics
cl_khr_int64_extended_atomics
cl_khr_3d_image_writes
cl_APPLE_fp64_basic_ops
cl_APPLE_fixed_alpha_channel_orders
cl_APPLE_biased_fixed_point_image_formats
[Device 1]
Name: GeForce GT 520
Vendor: NVIDIA
Type: GPU
Device Version: OpenCL 1.1
Driver Version: CLH 1.0
Compute Units: 1
Work Group Size: 1024
Clock: 1620 MHz
Global Memory: 1024 MB
Local Memory: 48 KB
Cache Size: 0 KB
Cache Line Size: 0 Bytes
Available: Yes
Double-Precision: No
Extensions:
cl_APPLE_SetMemObjectDestructor
cl_APPLE_ContextLoggingFunctions
cl_APPLE_clut
cl_APPLE_query_kernel_names
cl_APPLE_gl_sharing
cl_khr_gl_event
cl_khr_byte_addressable_store
cl_khr_global_int32_base_atomics
cl_khr_global_int32_extended_atomics
cl_khr_local_int32_base_atomics
cl_khr_local_int32_extended_atomics
cl_APPLE_fp64_basic_ops
[shared OpenCL+OpenGL Context]
2 OpenCL devices found!
[Device 0]
Name: GeForce GT 520
Vendor: NVIDIA
Type: GPU
Device Version: OpenCL 1.1
Driver Version: CLH 1.0
Compute Units: 1
Work Group Size: 1024
Clock: 1620 MHz
Global Memory: 1024 MB
Local Memory: 48 KB
Cache Size: 0 KB
Cache Line Size: 0 Bytes
Available: Yes
Double-Precision: No
Extensions:
cl_APPLE_SetMemObjectDestructor
cl_APPLE_ContextLoggingFunctions
cl_APPLE_clut
cl_APPLE_query_kernel_names
cl_APPLE_gl_sharing
cl_khr_gl_event
cl_khr_byte_addressable_store
cl_khr_global_int32_base_atomics
cl_khr_global_int32_extended_atomics
cl_khr_local_int32_base_atomics
cl_khr_local_int32_extended_atomics
cl_APPLE_fp64_basic_ops
[Device 1]
Name: Intel® Core™2 Duo CPU E6550 @ 2.33GHz
Vendor: Intel
Type: CPU
Device Version: OpenCL 1.2
Driver Version: 1.1
Compute Units: 2
Work Group Size: 1024
Clock: 2327 MHz
Global Memory (Total): 8192 MB
Global Memory (Host): 8192 MB
Global Memory (PCIe): 0 MB
Local Memory: 32 KB
Cache Size: 0.0625 KB
Cache Line Size: 4194304 Bytes
Available: Yes
Double-Precision: Yes
Extensions:
cl_APPLE_SetMemObjectDestructor
cl_APPLE_ContextLoggingFunctions
cl_APPLE_clut
cl_APPLE_query_kernel_names
cl_APPLE_gl_sharing
cl_khr_gl_event
cl_khr_fp64
cl_khr_global_int32_base_atomics
cl_khr_global_int32_extended_atomics
cl_khr_local_int32_base_atomics
cl_khr_local_int32_extended_atomics
cl_khr_byte_addressable_store
cl_khr_int64_base_atomics
cl_khr_int64_extended_atomics
cl_khr_3d_image_writes
cl_APPLE_fp64_basic_ops
cl_APPLE_fixed_alpha_channel_orders
cl_APPLE_biased_fixed_point_image_formats
logout
[Process completed]
[/codebox]
...so i have something... :whistle: ...just not sure what

and from displacement, run from terminal
[codebox]Downloads/Release/displacement
----------------------------------------------------------------------
Setting up Graphics...
----------------------------------------------------------------------
Creating Shadow FrameBuffer...
Creating Jitter Texture...
Loading Light Probe "stpeters_probe.pfm"
Creating Light Probe Texture (1500 x 1500)....
----------------------------------------------------------------------
Filling Sphere 1040384 bytes 65024 elements (127 x 512) => (127 x 512)
Loading Shader Program "fresnel.vert"...
Loading Shader Program "fresnel.frag"...
Loading Shader Program "phong.vert"...
Loading Shader Program "phong.frag"...
Loading Shader Program "skybox.vert"...
Loading Shader Program "skybox.frag"...
----------------------------------------------------------------------
Setting up Compute...
----------------------------------------------------------------------
Using active OpenGL context...
----------------------------------------------------------------------
Connecting to NVIDIA GeForce GT 520...
----------------------------------------------------------------------
Allocating buffers on compute device...
----------------------------------------------------------------------
Loading kernel source from file 'displacement_kernel.cl'...
----------------------------------------------------------------------
Building compute program...
OpenCL Build Warning : Compiler build log:
<program source>:107:5: warning: no previous prototype for function 'mod'
int mod(int x, int a)
^
<program source>:116:7: warning: no previous prototype for function 'mix1d'
float mix1d(float a, float b, float t)
^
<program source>:124:8: warning: no previous prototype for function 'mix2d'
float2 mix2d(float2 a, float2 b, float t)
^
<program source>:132:8: warning: no previous prototype for function 'mix3d'
float4 mix3d(float4 a, float4 b, float t)
^
<program source>:140:7: warning: no previous prototype for function 'smooth'
float smooth(float t)
^
<program source>:145:5: warning: no previous prototype for function 'lattice3d'
int lattice3d(int4 i)
^
<program source>:150:7: warning: no previous prototype for function 'gradient3d'
float gradient3d(int4 i, float4 v)
^
<program source>:157:8: warning: no previous prototype for function 'normalized'
float4 normalized(float4 v)
^
<program source>:166:7: warning: no previous prototype for function 'gradient_noise3d'
float gradient_noise3d(float4 position)
^
<program source>:214:7: warning: no previous prototype for function 'ridgedmultifractal3d'
float ridgedmultifractal3d(
^
<program source>:223:8: warning: unused variable 'remainder'
float remainder = 0.0f;
^
<program source>:224:8: warning: unused variable 'sample'
float sample = 0.0f;
^
<program source>:252:8: warning: no previous prototype for function 'cross3'
float4 cross3(float4 va, float4 vb)
^
<program source>:280:14: warning: comparison of integers of different signs: 'int' and 'uint' (aka 'unsigned int')
if(index >= count)
~~~~~ ^ ~~~~~
<program source>:283:10: warning: unused variable 'di'
int2 di = (int2)(tx, ty);
^
<program source>:275:9: warning: unused variable 'ix'
int ix = (int) dimx;
^

Break on OpenCLWarningBreak to debug.
Creating kernel 'displace'...
Maximum Workgroup Size '768'
----------------------------------------------------------------------
Starting event loop...
----------------------------------------------------------------------
Leslies-Mac-Pro:Release leslie$
[/codebox]


a screen from displacement...

Attached File  Displacement.png   1.36MB   15 downloads

here's a screenshot of an OpenCL based screensaver...

Attached File  Ephemeral OpenCL Screensaver.png   571.95KB   15 downloads





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy