[HowTo] OpenCL support in Wine

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
User avatar
blaiseg07
Level 2
Level 2
Posts: 31
Joined: Mon Sep 26, 2011 4:08 pm

[HowTo] OpenCL support in Wine

Post by blaiseg07 »

My video card is a NVIDIA GT 220 with the 280.13 drivers on Ubuntu 11.04(64-bit) and I'm building W.I.N.E(32-bit version) from source. So how do I compile in OpenCL support you ask?

Code: Select all

    cd /usr/include
    #make directorty#
    sudo mkdir CL
    cd CL
    #download opencl headers#
    sudo wget http://www.khronos.org/registry/cl/api/1.1/cl_ext.h
    sudo wget http://www.khronos.org/registry/cl/api/1.1/cl_gl_ext.h
    sudo wget http://www.khronos.org/registry/cl/api/1.1/cl_gl.h
    sudo wget http://www.khronos.org/registry/cl/api/1.1/cl.h
    sudo wget http://www.khronos.org/registry/cl/api/1.1/cl_platform.h
    sudo wget http://www.khronos.org/registry/cl/api/1.1/opencl.h
    #custom configure. nVidia provides 32-bit opencl drivers in /usr/lib32#
    CC="gcc-4.5 -m32" LDFLAGS="-L/lib32 -L/usr/lib32 -Wl,-rpath,/lib32 -Wl,-rpath,/usr/lib32" OPENCL_LIBS="/usr/lib32" OPENCL_CFLAGS="/usr/include/CL" ./configure -v --prefix=/usr 
   #make
   make and sudo make install
Now you will have OpenCL support in W.I.N.E. NJoy!
User avatar
blaiseg07
Level 2
Level 2
Posts: 31
Joined: Mon Sep 26, 2011 4:08 pm

Post by blaiseg07 »

almost forgot add '--with-opencl' in the configure line after '--prefix=/usr '.
DaVince
Level 8
Level 8
Posts: 1099
Joined: Wed Oct 29, 2008 4:53 pm

Post by DaVince »

Could you tell me if this also works with the GeForce 540G, or that I'll just have to try it out myself? (Don't have access to the notebook with that GPU right now.)
Thaodan
Level 2
Level 2
Posts: 10
Joined: Tue Aug 30, 2011 6:13 am

Post by Thaodan »

in ubuntu theas headers are included in nvidia-current-dev but they are in /usr/include/nvidia-curren/cl and not in /usr/include/CL.
User avatar
blaiseg07
Level 2
Level 2
Posts: 31
Joined: Mon Sep 26, 2011 4:08 pm

Post by blaiseg07 »

Thaodan wrote:in ubuntu theas headers are included in nvidia-current-dev but they are in /usr/include/nvidia-curren/cl and not in /usr/include/CL.
Thanks for pointing that out. Using the nVidia Binary driver (not the package maintainer version) the opencl headers aren't included so you have to make a directory and download them.
Locked