|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| .editorconfig | D | 23-Nov-2023 | 47 | 4 | 3 |
| Makefile.sources | D | 23-Nov-2023 | 1.4 KiB | 83 | 82 |
| README | D | 23-Nov-2023 | 3.1 KiB | 78 | 62 |
| adapter9.c | D | 23-Nov-2023 | 47.3 KiB | 1,154 | 892 |
| adapter9.h | D | 23-Nov-2023 | 5.4 KiB | 145 | 102 |
| authenticatedchannel9.c | D | 23-Nov-2023 | 3 KiB | 79 | 49 |
| authenticatedchannel9.h | D | 23-Nov-2023 | 2.7 KiB | 66 | 35 |
| basetexture9.c | D | 23-Nov-2023 | 22.5 KiB | 625 | 458 |
| basetexture9.h | D | 23-Nov-2023 | 5.3 KiB | 171 | 114 |
| buffer9.c | D | 23-Nov-2023 | 17.8 KiB | 462 | 310 |
| buffer9.h | D | 23-Nov-2023 | 4.7 KiB | 148 | 100 |
| cryptosession9.c | D | 23-Nov-2023 | 4.2 KiB | 116 | 82 |
| cryptosession9.h | D | 23-Nov-2023 | 3.5 KiB | | |
| cubetexture9.c | D | 23-Nov-2023 | 12.2 KiB | 351 | 265 |
| cubetexture9.h | D | 23-Nov-2023 | 3 KiB | 81 | 49 |
| device9.c | D | 23-Nov-2023 | 146.7 KiB | 4,167 | 3,339 |
| device9.h | D | 23-Nov-2023 | 29.9 KiB | 852 | 661 |
| device9ex.c | D | 23-Nov-2023 | 16.8 KiB | 459 | 390 |
| device9ex.h | D | 23-Nov-2023 | 6.8 KiB | 165 | 120 |
| device9video.c | D | 23-Nov-2023 | 2.6 KiB | 63 | 35 |
| device9video.h | D | 23-Nov-2023 | 2.5 KiB | 58 | 29 |
| guid.c | D | 23-Nov-2023 | 4.8 KiB | 85 | 57 |
| guid.h | D | 23-Nov-2023 | 1.4 KiB | 41 | 12 |
| indexbuffer9.c | D | 23-Nov-2023 | 4.2 KiB | 135 | 96 |
| indexbuffer9.h | D | 23-Nov-2023 | 2.7 KiB | 86 | 45 |
| iunknown.c | D | 23-Nov-2023 | 8.4 KiB | 288 | 204 |
| iunknown.h | D | 23-Nov-2023 | 5 KiB | 181 | 111 |
| meson.build | D | 23-Nov-2023 | 2.1 KiB | 76 | 70 |
| nine_buffer_upload.c | D | 23-Nov-2023 | 9 KiB | 295 | 211 |
| nine_buffer_upload.h | D | 23-Nov-2023 | 2.2 KiB | 60 | 22 |
| nine_csmt_helper.h | D | 23-Nov-2023 | 16.2 KiB | 439 | 375 |
| nine_debug.c | D | 23-Nov-2023 | 5.4 KiB | 118 | 83 |
| nine_debug.h | D | 23-Nov-2023 | 4.5 KiB | 138 | 97 |
| nine_defines.h | D | 23-Nov-2023 | 2.7 KiB | 66 | 31 |
| nine_dump.c | D | 23-Nov-2023 | 31.9 KiB | 814 | 737 |
| nine_dump.h | D | 23-Nov-2023 | 1.4 KiB | 53 | 43 |
| nine_ff.c | D | 23-Nov-2023 | 96.1 KiB | 2,501 | 1,875 |
| nine_ff.h | D | 23-Nov-2023 | 3.8 KiB | 127 | 102 |
| nine_flags.h | D | 23-Nov-2023 | 298 | 14 | 5 |
| nine_helpers.c | D | 23-Nov-2023 | 3.1 KiB | 101 | 68 |
| nine_helpers.h | D | 23-Nov-2023 | 5.8 KiB | 201 | 152 |
| nine_limits.h | D | 23-Nov-2023 | 8.6 KiB | 248 | 201 |
| nine_lock.c | D | 23-Nov-2023 | 101.9 KiB | 3,295 | 3,027 |
| nine_lock.h | D | 23-Nov-2023 | 2.5 KiB | 55 | 28 |
| nine_pdata.h | D | 23-Nov-2023 | 833 | 47 | 36 |
| nine_pipe.c | D | 23-Nov-2023 | 17.3 KiB | 384 | 283 |
| nine_pipe.h | D | 23-Nov-2023 | 28.3 KiB | 828 | 675 |
| nine_queue.c | D | 23-Nov-2023 | 7.3 KiB | 280 | 157 |
| nine_queue.h | D | 23-Nov-2023 | 1.7 KiB | 55 | 21 |
| nine_quirk.c | D | 23-Nov-2023 | 1.8 KiB | 50 | 22 |
| nine_quirk.h | D | 23-Nov-2023 | 1.4 KiB | 37 | 9 |
| nine_shader.c | D | 23-Nov-2023 | 132.5 KiB | 4,141 | 3,369 |
| nine_shader.h | D | 23-Nov-2023 | 9.6 KiB | 328 | 261 |
| nine_state.c | D | 23-Nov-2023 | 126.2 KiB | 3,717 | 2,855 |
| nine_state.h | D | 23-Nov-2023 | 23.4 KiB | 674 | 493 |
| nineexoverlayextension.c | D | 23-Nov-2023 | 2.2 KiB | 47 | 21 |
| nineexoverlayextension.h | D | 23-Nov-2023 | 2.2 KiB | 50 | 23 |
| pixelshader9.c | D | 23-Nov-2023 | 8.6 KiB | 257 | 191 |
| pixelshader9.h | D | 23-Nov-2023 | 5.4 KiB | 159 | 103 |
| query9.c | D | 23-Nov-2023 | 10.1 KiB | 315 | 229 |
| query9.h | D | 23-Nov-2023 | 2.6 KiB | 84 | 49 |
| resource9.c | D | 23-Nov-2023 | 5.9 KiB | 182 | 107 |
| resource9.h | D | 23-Nov-2023 | 2.6 KiB | 90 | 47 |
| stateblock9.c | D | 23-Nov-2023 | 22.4 KiB | 603 | 392 |
| stateblock9.h | D | 23-Nov-2023 | 2.2 KiB | 72 | 37 |
| surface9.c | D | 23-Nov-2023 | 30.8 KiB | 863 | 665 |
| surface9.h | D | 23-Nov-2023 | 5.5 KiB | 179 | 121 |
| swapchain9.c | D | 23-Nov-2023 | 48.7 KiB | 1,320 | 1,019 |
| swapchain9.h | D | 23-Nov-2023 | 5.3 KiB | 159 | 103 |
| swapchain9ex.c | D | 23-Nov-2023 | 4.3 KiB | 118 | 82 |
| swapchain9ex.h | D | 23-Nov-2023 | 2.4 KiB | 62 | 32 |
| texture9.c | D | 23-Nov-2023 | 14.1 KiB | 394 | 282 |
| texture9.h | D | 23-Nov-2023 | 2.7 KiB | 77 | 45 |
| threadpool.c | D | 23-Nov-2023 | 5.4 KiB | 201 | 118 |
| threadpool.h | D | 23-Nov-2023 | 2.1 KiB | 61 | 29 |
| vertexbuffer9.c | D | 23-Nov-2023 | 3.9 KiB | 127 | 89 |
| vertexbuffer9.h | D | 23-Nov-2023 | 2.6 KiB | 80 | 42 |
| vertexdeclaration9.c | D | 23-Nov-2023 | 19.2 KiB | 532 | 436 |
| vertexdeclaration9.h | D | 23-Nov-2023 | 3.3 KiB | 100 | 58 |
| vertexshader9.c | D | 23-Nov-2023 | 10.3 KiB | 305 | 235 |
| vertexshader9.h | D | 23-Nov-2023 | 5.2 KiB | 156 | 98 |
| volume9.c | D | 23-Nov-2023 | 19.8 KiB | 559 | 443 |
| volume9.h | D | 23-Nov-2023 | 3.6 KiB | 119 | 71 |
| volumetexture9.c | D | 23-Nov-2023 | 10.3 KiB | 294 | 224 |
| volumetexture9.h | D | 23-Nov-2023 | 2.8 KiB | 76 | 44 |
README
1Quickstart Guide
2
3*** Configure and build mesa
4CFLAGS="-m32" CXXFLAGS="-m32" ./autogen.sh --prefix=/usr \
5 --with-gallium-drivers=nouveau,r600,swrast --enable-nine \
6 --enable-debug --enable-texture-float --with-dri-drivers= --disable-dri \
7 --disable-opengl --disable-egl --disable-vdpau --disable-xvmc --disable-gbm \
8 --disable-llvm
9make
10
11*** Then we create some symlinks to mesa:
12ln -s "`pwd`/lib/gallium/libd3dadapter9.so.0.0.0" /usr/lib/
13ln -s "`pwd`/lib/gallium/libd3dadapter9.so.0" /usr/lib/
14ln -s "`pwd`/lib/gallium/libd3dadapter9.so" /usr/lib/
15ln -s "`pwd`/include/d3dadapter" /usr/include/
16
17*** Clone and build a patched wine
18git clone git@github.com:iXit/wine.git
19./configure
20make
21
22*** And finally we create some symlinks to our patched wine files:
23for f in d3d9.dll gdi32.dll user32.dll wineps.drv winex11.drv;
24do
25 mv /usr/lib/wine/$f.so /usr/lib/wine/$f.so.old
26 ln -s "`pwd`/dlls/`basename -s .dll $f`/$f.so" /usr/lib/wine/
27done
28
29*** Activating it within wine
30regedit
31Navigate to HKCU\Software\Wine\Direct3D
32If it's not there, create it
33Create a new DWORD value called UseNative
34Set its value to 1
35
36Every Direct3D9 program will now try using nine before wined3d
37
38If you want to selectively enable it per-exe instead, use the key:
39HKCU\Software\Wine\AppDefaults\app.exe\Direct3D\UseNative
40where app.exe is the name of your .exe file
41
42
43*** HOW IT WORKS ***
44
45Nine implements the full IDirect3DDevice9 COM interface and a custom COM
46interface called ID3DAdapter9 which is used to implement a final IDirect3D9Ex
47COM interface.
48ID3DAdapter9 is completely devoid of window system code, meaning this can be
49provided by wine, Xlib, Wayland, etc. It's inadvisible to write a non-Windows
50backend though, as we don't want to encourage linux developers to use this API.
51
52The gallium frontend is compiled, along with pipe-loader, into a library called
53libd3dadapter9.so. This library loads pipe_[driver].so drivers on demand and
54exports a single symbol for getting a subsystem driver. Currently only DRM is
55supported.
56This library is then linked to the library implementing the IDirect3D9[Ex]
57interface and the actual Direct3D9 entry points (Direct3DCreate9[Ex])
58
59The implementation of IDirect3D9[Ex] lies within wine and coexists with
60wined3d. It's loaded on demand and so if it's not there, it doesn't have any
61drivers or something else is wrong, d3d9.dll will automatically revert to using
62wined3d.
63Whether or not it's even tried is determined by 2 DWORD registry keys.
64> HKCU\Software\Wine\Direct3D\UseNative
65> HKCU\Software\Wine\AppDefaults\app.exe\Direct3D\UseNative
66The former is the global on-switch. The latter is per-exe.
67
68The driver search path can be set at configure time with
69--with-gallium-driver-dir and overridden at runtime with D3D9_DRIVERS_PATH.
70Debugging information can be gotten with the WINEDEBUG channels d3d9 and
71d3dadapter, and gallium frontend debug information can be gotten with NINE_DEBUG.
72Help on NINE_DEBUG is shown through NINE_DEBUG=help
73
74Finally, the ID3DPresent[Group] and ID3DAdapter9 interfaces are not set in
75stone, so feel free to hack on those as well as st/nine.
76
77Happy Hacking!
78