https://bugs.winehq.org/show_bug.cgi?id=46470
Nakarin Khankham garuda2550@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #63668|0 |1 is obsolete| |
--- Comment #4 from Nakarin Khankham garuda2550@gmail.com --- Created attachment 63669 --> https://bugs.winehq.org/attachment.cgi?id=63669 New version of OpenCL 2.1 support patch
Added new version of the patch, the new version will enable platform extensions pass-though as well.
@Amruth Aradhya, for the way to compile wine with this patch, use below instructions. You can change the file extract or install path as you'd like.
Before you continue, you need to install required tools and library to compile wine.
On Ubuntu 18.04 You can get it by using this command.
sudo apt install pkg-config libx11-dev mesa-common-dev libgl1-mesa-dri libegl1-mesa libegl1-mesa-dev libgl1-mesa-dev libfreetype6-dev libjpeg-dev libxml2-dev libgnutls28-dev libxslt-dev libmpg123-dev libvulkan-dev libxrender-dev libxcursor-dev libxi-dev libxrandr-dev libxinerama-dev libxcomposite-dev libglu1-mesa-dev libosmesa6-dev libva-dev libsdl2-dev ocl-icd-opencl-dev libpcap-dev libncurses5-dev libsane-dev libv4l-dev libgphoto2-dev liblcms2-dev libgtk-3-dev libcapi20-dev libcups2-dev libfontconfig1-dev libgsm1-dev libkrb5-dev libopenal-dev libldap2-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libavcodec-dev
Some package aren't need for compile wine, but required to compile wine-staging. I didn't have the list of only package required to compile wine, so... :P
1. Open terminal.
2. Download wine source code and put it in your home directory. The source code can be any version, but I recommended either version 4.0 or latest 4.x release.
You can download the source code from https://www.winehq.org/ using your browser or by using this command.
wget https://dl.winehq.org/wine/source/4.0/wine-4.0.tar.xz
3. Extract the source code by using this command, change the file name to match the version you download
tar xJf wine-4.0.tar.xz
4. Change the current directory by using this command, change the directory name to match the version you download
cd wine-4.0
5. In this step, you will be in directory "~/wine-4.0" Now, download the OpenCL patch by using this command
wget https://github.com/kytulendu/wine-opencl/raw/master/0001_Update_OpenCL.patch
6. Apply the patch by using this command
git apply 0001_Update_OpenCL.patch
7. Make "build" directory by using this command
mkdir build
8. Change the current directory by using this command
cd build
9. In this step, you will be in directory "~/wine-4.0/build" Now, execute the configure script by using this command
../configure --enable-win64 --prefix=/opt/wine-opencl
In "--prefix=/opt/wine-opencl", this is where you will install your custom version of wine, you can install it in your home directory, which doesn't require "sudo" command to install, for example.
../configure --enable-win64 --prefix=/home/purr/wine-opencl
When it finish, the script will complain that there are some library missing/too old. Namely libhal, vkd3d and OSS sound system, this message can be ignore.
10. Build wine by using this command, then wait for finish compile
make -j 4
Note: The number behind "-j" is the number of thread your PC have, I'd recommended "number of thread - 2", just in case the compiler use too much CPU time and freeze the GUI.
11. Install your compiled wine by using this command
sudo make install
If you use --prefix to your home directory, you can use the below command to install it without using "sudo" command
make install
12. Test if it installed correctly by using this command
/opt/wine-opencl/bin/wine64 --version
If you install to other directory, change the executable path accordingly, suchas.
/home/purr/wine-opencl/bin/wine64 --version
13. Try to run and test the OpenCL program, in this case is I use Daz Studio (Windows 64bit version) that already installed to the main wine prefix.
/opt/wine-opencl/bin/wine64 C:\Program\ Files\DAZ\ 3D\DAZStudio4\DAZStudio.exe
14. Have fun :3