|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 23-Nov-2020 | - |
| .editorconfig | H A D | 23-Nov-2020 | 47 | 4 | 3 |
| Makefile.sources | H A D | 23-Nov-2020 | 1.4 KiB | 83 | 82 |
| README | H A D | 23-Nov-2020 | 3.1 KiB | 78 | 62 |
| adapter9.c | H A D | 23-Nov-2020 | 47.3 KiB | 1,154 | 892 |
| adapter9.h | H A D | 23-Nov-2020 | 5.4 KiB | 145 | 102 |
| authenticatedchannel9.c | H A D | 23-Nov-2020 | 3 KiB | 79 | 49 |
| authenticatedchannel9.h | H A D | 23-Nov-2020 | 2.7 KiB | 66 | 35 |
| basetexture9.c | H A D | 23-Nov-2020 | 22.5 KiB | 625 | 458 |
| basetexture9.h | H A D | 23-Nov-2020 | 5.3 KiB | 171 | 114 |
| buffer9.c | H A D | 23-Nov-2020 | 17.9 KiB | 462 | 310 |
| buffer9.h | H A D | 23-Nov-2020 | 4.7 KiB | 148 | 100 |
| cryptosession9.c | H A D | 23-Nov-2020 | 4.2 KiB | 116 | 82 |
| cryptosession9.h | H A D | 23-Nov-2020 | 3.5 KiB | 87 | 52 |
| cubetexture9.c | H A D | 23-Nov-2020 | 12.2 KiB | 351 | 265 |
| cubetexture9.h | H A D | 23-Nov-2020 | 3 KiB | 81 | 49 |
| device9.c | H A D | 23-Nov-2020 | 146.7 KiB | 4,167 | 3,339 |
| device9.h | H A D | 23-Nov-2020 | 29.9 KiB | 852 | 661 |
| device9ex.c | H A D | 23-Nov-2020 | 16.8 KiB | 459 | 390 |
| device9ex.h | H A D | 23-Nov-2020 | 6.8 KiB | 165 | 120 |
| device9video.c | H A D | 23-Nov-2020 | 2.6 KiB | 63 | 35 |
| device9video.h | H A D | 23-Nov-2020 | 2.5 KiB | 58 | 29 |
| guid.c | H A D | 23-Nov-2020 | 4.8 KiB | 85 | 57 |
| guid.h | H A D | 23-Nov-2020 | 1.4 KiB | 41 | 12 |
| indexbuffer9.c | H A D | 23-Nov-2020 | 4.2 KiB | 135 | 96 |
| indexbuffer9.h | H A D | 23-Nov-2020 | 2.7 KiB | 86 | 45 |
| iunknown.c | H A D | 23-Nov-2020 | 8.4 KiB | 288 | 204 |
| iunknown.h | H A D | 23-Nov-2020 | 5 KiB | 181 | 111 |
| meson.build | H A D | 23-Nov-2020 | 2.1 KiB | 76 | 70 |
| nine_buffer_upload.c | H A D | 23-Nov-2020 | 9.1 KiB | 295 | 211 |
| nine_buffer_upload.h | H A D | 23-Nov-2020 | 2.2 KiB | 60 | 22 |
| nine_csmt_helper.h | H A D | 23-Nov-2020 | 16.2 KiB | 439 | 375 |
| nine_debug.c | H A D | 23-Nov-2020 | 5.4 KiB | 118 | 83 |
| nine_debug.h | H A D | 23-Nov-2020 | 4.5 KiB | 138 | 97 |
| nine_defines.h | H A D | 23-Nov-2020 | 2.7 KiB | 66 | 31 |
| nine_dump.c | H A D | 23-Nov-2020 | 31.9 KiB | 814 | 737 |
| nine_dump.h | H A D | 23-Nov-2020 | 1.4 KiB | 53 | 43 |
| nine_ff.c | H A D | 23-Nov-2020 | 96.1 KiB | 2,501 | 1,875 |
| nine_ff.h | H A D | 23-Nov-2020 | 3.8 KiB | 127 | 102 |
| nine_flags.h | H A D | 23-Nov-2020 | 298 | 14 | 5 |
| nine_helpers.c | H A D | 23-Nov-2020 | 3.1 KiB | 101 | 68 |
| nine_helpers.h | H A D | 23-Nov-2020 | 5.8 KiB | 201 | 152 |
| nine_limits.h | H A D | 23-Nov-2020 | 8.6 KiB | 248 | 201 |
| nine_lock.c | H A D | 23-Nov-2020 | 101.9 KiB | 3,295 | 3,027 |
| nine_lock.h | H A D | 23-Nov-2020 | 2.5 KiB | 55 | 28 |
| nine_pdata.h | H A D | 23-Nov-2020 | 833 | 47 | 36 |
| nine_pipe.c | H A D | 23-Nov-2020 | 17.3 KiB | 384 | 283 |
| nine_pipe.h | H A D | 23-Nov-2020 | 28.3 KiB | 828 | 675 |
| nine_queue.c | H A D | 23-Nov-2020 | 7.3 KiB | 280 | 157 |
| nine_queue.h | H A D | 23-Nov-2020 | 1.7 KiB | 55 | 21 |
| nine_quirk.c | H A D | 23-Nov-2020 | 1.8 KiB | 50 | 22 |
| nine_quirk.h | H A D | 23-Nov-2020 | 1.4 KiB | 37 | 9 |
| nine_shader.c | H A D | 23-Nov-2020 | 132.5 KiB | 4,141 | 3,369 |
| nine_shader.h | H A D | 23-Nov-2020 | 9.6 KiB | 328 | 261 |
| nine_state.c | H A D | 23-Nov-2020 | 126.2 KiB | 3,717 | 2,855 |
| nine_state.h | H A D | 23-Nov-2020 | 23.4 KiB | 674 | 493 |
| nineexoverlayextension.c | H A D | 23-Nov-2020 | 2.2 KiB | 47 | 21 |
| nineexoverlayextension.h | H A D | 23-Nov-2020 | 2.2 KiB | 50 | 23 |
| pixelshader9.c | H A D | 23-Nov-2020 | 8.6 KiB | 257 | 191 |
| pixelshader9.h | H A D | 23-Nov-2020 | 5.4 KiB | 159 | 103 |
| query9.c | H A D | 23-Nov-2020 | 10.1 KiB | 315 | 229 |
| query9.h | H A D | 23-Nov-2020 | 2.6 KiB | 84 | 49 |
| resource9.c | H A D | 23-Nov-2020 | 5.9 KiB | 182 | 107 |
| resource9.h | H A D | 23-Nov-2020 | 2.6 KiB | 90 | 47 |
| stateblock9.c | H A D | 23-Nov-2020 | 22.4 KiB | 603 | 392 |
| stateblock9.h | H A D | 23-Nov-2020 | 2.2 KiB | 72 | 37 |
| surface9.c | H A D | 23-Nov-2020 | 30.8 KiB | 864 | 666 |
| surface9.h | H A D | 23-Nov-2020 | 5.5 KiB | 179 | 121 |
| swapchain9.c | H A D | 23-Nov-2020 | 48.7 KiB | 1,320 | 1,019 |
| swapchain9.h | H A D | 23-Nov-2020 | 5.3 KiB | 159 | 103 |
| swapchain9ex.c | H A D | 23-Nov-2020 | 4.3 KiB | 118 | 82 |
| swapchain9ex.h | H A D | 23-Nov-2020 | 2.4 KiB | 62 | 32 |
| texture9.c | H A D | 23-Nov-2020 | 14.1 KiB | 394 | 282 |
| texture9.h | H A D | 23-Nov-2020 | 2.7 KiB | 77 | 45 |
| threadpool.c | H A D | 23-Nov-2020 | 5.4 KiB | 201 | 118 |
| threadpool.h | H A D | 23-Nov-2020 | 2.1 KiB | 61 | 29 |
| vertexbuffer9.c | H A D | 23-Nov-2020 | 3.9 KiB | 127 | 89 |
| vertexbuffer9.h | H A D | 23-Nov-2020 | 2.6 KiB | 80 | 42 |
| vertexdeclaration9.c | H A D | 23-Nov-2020 | 19.2 KiB | 532 | 436 |
| vertexdeclaration9.h | H A D | 23-Nov-2020 | 3.3 KiB | 100 | 58 |
| vertexshader9.c | H A D | 23-Nov-2020 | 10.3 KiB | 305 | 235 |
| vertexshader9.h | H A D | 23-Nov-2020 | 5.2 KiB | 156 | 98 |
| volume9.c | H A D | 23-Nov-2020 | 19.9 KiB | 559 | 443 |
| volume9.h | H A D | 23-Nov-2020 | 3.6 KiB | 119 | 71 |
| volumetexture9.c | H A D | 23-Nov-2020 | 10.3 KiB | 294 | 224 |
| volumetexture9.h | H A D | 23-Nov-2020 | 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