Turnip+Zink in ExaGear: Difference between revisions

New page(translated)
 
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''[[Turnip|Turnip]][[Zink|+Zink]]''' in [[About ExaGear products|'''ExaGear Windows Emulator''']] is used as one of the methods to achieve full hardware acceleration. The '''Turnip, Zink''' drivers are part of the '''Mesa''' driver, a free implementation of the Vulkan, OpenGL API.
[[ru:Turnip+Zink в ExaGear]]
'''[[Turnip]][[Zink|+Zink]]''' in [[About ExaGear products|'''ExaGear Windows Emulator''']] is used as one of the methods to achieve full hardware acceleration for the new Adreno GPUs using xlib (an X Window System client function library written in C language). dri3 does not currently support hardware acceleration due to limitations of the '''ExaGear''' X server.
 
For a list of ''GPU Adreno'' that support '''Turnip+Zink''' drivers, see [[Turnip#Supported GPUs|here]].
 
The '''Turnip, Zink''' drivers are part of the '''''Mesa''''' driver, a free implementation of the ''Vulkan, OpenGL API''.


This article shows instructions for compiling '''''Mesa''' with Turnip+Zink'' and then installing the compiled libraries in ''ExaGear Windows Emulator''.
This article shows instructions for compiling '''''Mesa''' with Turnip+Zink'' and then installing the compiled libraries in ''ExaGear Windows Emulator''.
Line 6: Line 11:


== Install prebuilt libraries for ExaGear Turnip+Zink ==
== Install prebuilt libraries for ExaGear Turnip+Zink ==
In the current (released since December 2021) modified caches '''Turnip+Zink''' is built-in, they can be installed in the "Start" menu
In current (released from December 2021) (modified) caches, '''Turnip+Zink''' is usually built in, they can be installed in the '''Start'' menu (in the folders ''Render, WineGL'', etc.)
----If a cache is used where '''Turnip+Zink''' is not included in the .obb, it is easiest to use auto-installers created with WinRAR(SFX archives) to install Turnip+Zink data. You can download them [https://drive.google.com/drive/folders/15TElVFjHc9hAQxdd2MMYB6o3_lo38X7y?usp=sharing here].
----If a cache is used where '''Turnip+Zink''' is not included in the .obb, the easiest way to install is to use auto-installers created with WinRAR(SFX archives), (if using the original .obb, installation may be required additional libraries (dependencies)).
 
You can download the '''Turnip+Zink''' auto-installers [https://drive.google.com/drive/folders/15TElVFjHc9hAQxdd2MMYB6o3_lo38X7y?usp=sharing here].


== Build Mesa with Turnip+Zink for manual use in ExaGear (for modders) ==
== Build Mesa with Turnip+Zink for manual use in ExaGear (for modders) ==
'''Attention! Basic knowledge of GNU/Linux required.'''
'''Attention! Basic knowledge of GNU/Linux required.'''


This part of the article shows instructions for building the '''Turnip+Zink'' libraries manually, followed by installation and use in ExaGear.
This part of the article shows instructions for building the ''Turnip+Zink'' libraries manually, followed by installation and use in ExaGear.
----To do this, you need to have a computer or laptop with i386 (not x86_64, because '''ExaGear Windows Emulator''' only supports translation to ARM 32-bit code) ''GNU/Linux'' operating system.
----To do this, you need to have a computer or laptop with i386 (not x86_64, because '''ExaGear Windows Emulator''' only supports translation to ARM 32-bit code) ''GNU/Linux'' operating system.


Line 34: Line 41:
If you are using Debian 11 and below, or Ubuntu 18.04, then before building mesa, you need to compile the latest versions of the programs listed below:
If you are using Debian 11 and below, or Ubuntu 18.04, then before building mesa, you need to compile the latest versions of the programs listed below:


# [https://gitlab.freedesktop.org/glvnd/libglvn to https://gitlab.freedesktop.org/glvnd/libglvnd]
# [https://gitlab.freedesktop.org/glvnd/libglvn https://gitlab.freedesktop.org/glvnd/libglvnd]
# https://dri.freedesktop.org/libdrm
# https://dri.freedesktop.org/libdrm
# [https://gitlab.freedesktop.org/wayland/waylandhttps://gitlab.freedesktop.org/wayland/wayland-protocols https://gitlab.freedesktop.org/wayland/wayland]
# [https://gitlab.freedesktop.org/wayland/waylandhttps://gitlab.freedesktop.org/wayland/wayland-protocols https://gitlab.freedesktop.org/wayland/wayland]
Line 72: Line 79:


==== include ====
==== include ====
Copy the gbm.h file (located in ~/mesa/src/gbm/main) to the include folder.
Copy the gbm.h file (located in <code>~/mesa/src/gbm/main</code>) to the include folder.


Copy these directories to the usr/include folder: EGL, GL, GLES, GLES2, GLES3, KHR (located in ~/mesa/include)
Copy these directories to the usr/include folder: EGL, GL, GLES, GLES2, GLES3, KHR (located in <code>~/mesa/include</code>)


==== share ====
==== share ====
In share folder create folder vulkan, glvnd, drirc.d, in folder vulkan create folder icd.d, in glvnd folder create folder egl_vendor.d.
In share folder create folder vulkan, glvnd, drirc.d, in folder vulkan create folder icd.d, in glvnd folder create folder egl_vendor.d.
----In the vulkan/icd.d folder, copy the freedreno_icd.i686.json file (located in ~/mesa/build/src/freedreno/vulkan)
----In the <code>vulkan/icd.d</code> folder, copy the freedreno_icd.i686.json file (located in <code>~/mesa/build/src/freedreno/vulkan</code>)


In glvnd/egl_vendor.d/ folder copy 50_mesa.json (located in ~/mesa/build/src/egl)
In <code>glvnd/egl_vendor.d/</code> folder copy 50_mesa.json (located in <code>~/mesa/build/src/egl</code>)


Copy the 00-mesa-defaults.conf file to the drirc.d folder (located in ~/mesa/src/util)
Copy the 00-mesa-defaults.conf file to the drirc.d folder (located in <code>~/mesa/src/util</code>)
----
----


Line 88: Line 95:
In the lib folder, create the i386-linux-gnu folder and copy the files there:
In the lib folder, create the i386-linux-gnu folder and copy the files there:


# libglapi.so, libglapi.so.0, libglapi.so.0.0.0 (located in ~/mesa/build/src/mapi/shared-glapi)
# libglapi.so, libglapi.so.0, libglapi.so.0.0.0 (located in <code>~/mesa/build/src/mapi/shared-glapi</code>)
# libvulkan_freedreno.so (located in ~/mesa/build/src/freedreno/vulkan)
# libvulkan_freedreno.so (located in <code>~/mesa/build/src/freedreno/vulkan</code>)
# libOSMesa.so.8.0.0, libOSMesa.so, libOSMesa.so.8 (found in ~/mesa/build/src/gallium/targets/osmesa)
# libOSMesa.so.8.0.0, libOSMesa.so, libOSMesa.so.8 (found in <code>~/mesa/build/src/gallium/targets/osmesa</code>)
# libGLX_mesa.so.0.0.0, libGLX_mesa.so, libGLX_mesa.so.0 (found in ~/mesa/build/src/glx/)
# libGLX_mesa.so.0.0.0, libGLX_mesa.so, libGLX_mesa.so.0 (found in <code>~/mesa/build/src/glx/</code>)
# libEGL_mesa.so.0.0.0, libEGL_mesa.so, libEGL_mesa.so.0 (located in ~/mesa/build/src/egl)
# libEGL_mesa.so.0.0.0, libEGL_mesa.so, libEGL_mesa.so.0 (located in <code>~/mesa/build/src/egl</code>)
# libgbm.so, libgbm.so.1, libgbm.so.1.0.0 (located in ~/mesa/build/src/gbm/)
# libgbm.so, libgbm.so.1, libgbm.so.1.0.0 (located in <code>~/mesa/build/src/gbm/</code>)


Also create pkgconfig and dri folders in the same lib folder. Copy the following files to the pkgconfig folder:
Also create pkgconfig and dri folders in the same lib folder. Copy the following files to the pkgconfig folder:


# osmesa.pc (located in ~/mesa/build/meson-private/)
# osmesa.pc (located in <code>~/mesa/build/meson-private/</code>)
# gbm.pc (located in ~/mesa/build/meson-private/)
# gbm.pc (located in <code>~/mesa/build/meson-private/</code>)
# dri.pc (located in ~/mesa/build/meson-private/)
# dri.pc (located in <code>~/mesa/build/meson-private/</code>)


Copy these files to the dri folder:
Copy these files to the dri folder:


# zink_dri.so (located in ~/mesa/build/src/gallium/targets/dri)
# zink_dri.so (located in <code>~/mesa/build/src/gallium/targets/dri</code>)
# libgallium_dri.so (located in ~/mesa/build/src/gallium/targets/dri)
# libgallium_dri.so (located in <code>~/mesa/build/src/gallium/targets/dri</code>)


=== Zink-Mesa-Xlib ===
=== Zink-Mesa-Xlib ===


====lib====
====lib====
From the folder '''Zink-Mesa-Xlib''' you need to copy the libGL.so.1.5.0 library (located in ~/mesa/build/src /gallium/targets/libgl-xlib/)
From the folder '''Zink-Mesa-Xlib''' you need to copy the libGL.so.1.5.0 library (located in <code>~/mesa/build/src /gallium/targets/libgl-xlib/</code>)
----
----


==== Validation in ExaGear ====
==== Validation in ExaGear ====
After copying all the files, you need to copy the usr folder to the ''Download'' folder of the phone, then run '''ExaGear Windows Emulator''', and copy the copied folder to the Z:/ drive with overwriting.
After copying all the files, you need to copy the usr folder to the ''Download'' folder of the phone, then run '''ExaGear Windows Emulator''', and copy the copied folder to the Z: / drive with overwriting.


If the standard ''ExaGear'' cache is used (which is not recommended) then it must be modified by adding the <code>vulkan-tools</code> package. How to modify the cache and add packages to it is described in [[Modifying caches in ExaGear#Adding packages, replacing Wine in caches|here]]. You also need to download [https://drive.google.com/file/d/1L4pd-hdA_3PLxyMXwlrDMWjOuO62kjKv/view?usp=sharing terminal emulator] for ExaGear.
If the standard ''ExaGear'' cache is used (which is not recommended) then it must be modified by adding the <code>vulkan-tools</code> package. How to modify the cache and add packages to it is described in [[Modifying caches in ExaGear#Adding packages, replacing Wine in caches|here]]. You also need to download [https://drive.google.com/file/d/1L4pd-hdA_3PLxyMXwlrDMWjOuO62kjKv/view?usp=sharing terminal emulator] for ExaGear.
Line 119: Line 126:
Open a terminal and enter the command <code>vulkaninfo</code> (if you use the original '''ExaGear Windows Emulator''' cache and there is a missing libraries error, you need to download and install them additionally). After all the errors have been fixed and the <code>vulkaninfo</code> command has run successfully and the '''Vulkan API and GPU name''' extensions should be shown (or the TU error will be shown, in this case ''Vulkan'' will also work).
Open a terminal and enter the command <code>vulkaninfo</code> (if you use the original '''ExaGear Windows Emulator''' cache and there is a missing libraries error, you need to download and install them additionally). After all the errors have been fixed and the <code>vulkaninfo</code> command has run successfully and the '''Vulkan API and GPU name''' extensions should be shown (or the TU error will be shown, in this case ''Vulkan'' will also work).


You also need to check '''OpenGL''' (type <code>glxgears,</code> should show gears). If gears are displayed, then Turnip+Zink is working. If you get an error that the command was not found, run the [[Wine|Wine]] ported to Windows [http://www2.cs.uidaho.edu/~jeffery/win32/wglgears.exe wglgears] in [[Wine|Wine]].
You also need to check '''OpenGL''' (type <code>glxgears,</code> should show gears). If gears are displayed, then Turnip+Zink is working. If you get an error that the command was not found, run the [[Wine(en)|Wine]] ported to Windows [http://www2.cs.uidaho.edu/~jeffery/win32/wglgears.exe wglgears] in [[Wine|Wine]].


If you get an error when starting glxgears instead of gears (wglgears will close), then you may have an unsupported GPU, you can see the list of GPUs that can work with '''Turnip+Zink''' [[Turnip(en)#Supported GPUs |here]].
If you get an error when starting glxgears instead of gears (wglgears will close), then you may have an unsupported GPU, you can see the list of GPUs that can work with '''Turnip+Zink''' [[Turnip#Supported GPUs |here]].


== Links ==
== Links ==
[https://github.com/alexvorxx/Zink-Mesa-Xlib/blob/main/README.rst Original instruction by alexvorxx]
[https://github.com/alexvorxx/Zink-Mesa-Xlib/blob/main/README.rst Original instruction by alexvorxx]