• Home
  • History
  • Annotate
  • only in /external/mesa3d/src/gallium/state_trackers/nine/
NameDateSize

..10-Aug-20184 KiB

.editorconfig10-Aug-201847

adapter9.c10-Aug-201846.4 KiB

adapter9.h10-Aug-20185.4 KiB

authenticatedchannel9.c10-Aug-20183 KiB

authenticatedchannel9.h10-Aug-20182.7 KiB

basetexture9.c10-Aug-201822.3 KiB

basetexture9.h10-Aug-20185.2 KiB

buffer9.c10-Aug-201816.1 KiB

buffer9.h10-Aug-20184.5 KiB

cryptosession9.c10-Aug-20184.2 KiB

cryptosession9.h10-Aug-20183.5 KiB

cubetexture9.c10-Aug-201812.2 KiB

cubetexture9.h10-Aug-20183 KiB

device9.c10-Aug-2018142.6 KiB

device9.h10-Aug-201829.8 KiB

device9ex.c10-Aug-201816.8 KiB

device9ex.h10-Aug-20186.8 KiB

device9video.c10-Aug-20182.6 KiB

device9video.h10-Aug-20182.5 KiB

guid.c10-Aug-20184.8 KiB

guid.h10-Aug-20181.4 KiB

indexbuffer9.c10-Aug-20184.3 KiB

indexbuffer9.h10-Aug-20182.7 KiB

iunknown.c10-Aug-20188.3 KiB

iunknown.h10-Aug-20185 KiB

Makefile.am10-Aug-2018265

Makefile.sources10-Aug-20181.4 KiB

nine_buffer_upload.c10-Aug-20189.1 KiB

nine_buffer_upload.h10-Aug-20182.2 KiB

nine_csmt_helper.h10-Aug-201815.9 KiB

nine_debug.c10-Aug-20185.5 KiB

nine_debug.h10-Aug-20184.3 KiB

nine_defines.h10-Aug-20182.7 KiB

nine_dump.c10-Aug-201831.8 KiB

nine_dump.h10-Aug-20181.4 KiB

nine_ff.c10-Aug-201896.9 KiB

nine_ff.h10-Aug-20183.3 KiB

nine_flags.h10-Aug-2018298

nine_helpers.c10-Aug-20183.1 KiB

nine_helpers.h10-Aug-20184.8 KiB

nine_limits.h10-Aug-20188.6 KiB

nine_lock.c10-Aug-2018104.5 KiB

nine_lock.h10-Aug-20182.5 KiB

nine_pdata.h10-Aug-2018822

nine_pipe.c10-Aug-201817 KiB

nine_pipe.h10-Aug-201828.1 KiB

nine_queue.c10-Aug-20187.3 KiB

nine_queue.h10-Aug-20181.7 KiB

nine_quirk.c10-Aug-20181.8 KiB

nine_quirk.h10-Aug-20181.4 KiB

nine_shader.c10-Aug-2018118 KiB

nine_shader.h10-Aug-20186.5 KiB

nine_state.c10-Aug-2018135.6 KiB

nine_state.h10-Aug-201822.9 KiB

nineexoverlayextension.c10-Aug-20182.2 KiB

nineexoverlayextension.h10-Aug-20182.2 KiB

pixelshader9.c10-Aug-20186.5 KiB

pixelshader9.h10-Aug-20184 KiB

query9.c10-Aug-201810.1 KiB

query9.h10-Aug-20182.6 KiB

README10-Aug-20183.1 KiB

resource9.c10-Aug-20185.3 KiB

resource9.h10-Aug-20182.6 KiB

stateblock9.c10-Aug-201821.4 KiB

stateblock9.h10-Aug-20182.2 KiB

surface9.c10-Aug-201829.5 KiB

surface9.h10-Aug-20185.5 KiB

swapchain9.c10-Aug-201840.9 KiB

swapchain9.h10-Aug-20185.1 KiB

swapchain9ex.c10-Aug-20184.3 KiB

swapchain9ex.h10-Aug-20182.4 KiB

texture9.c10-Aug-201814.1 KiB

texture9.h10-Aug-20182.7 KiB

threadpool.c10-Aug-20185.2 KiB

threadpool.h10-Aug-20182.1 KiB

vertexbuffer9.c10-Aug-20183.9 KiB

vertexbuffer9.h10-Aug-20182.6 KiB

vertexdeclaration9.c10-Aug-201819.2 KiB

vertexdeclaration9.h10-Aug-20183.3 KiB

vertexshader9.c10-Aug-20188.5 KiB

vertexshader9.h10-Aug-20184.3 KiB

volume9.c10-Aug-201819.4 KiB

volume9.h10-Aug-20183.6 KiB

volumetexture9.c10-Aug-201810.2 KiB

volumetexture9.h10-Aug-20182.8 KiB

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 --with-gallium-driver-dir="`pwd`/src/gallium/targets/pipe-loader/.libs" \
7 --enable-debug --enable-texture-float --with-dri-drivers= --disable-dri \
8 --disable-opengl --disable-egl --disable-vdpau --disable-xvmc --disable-gbm \
9 --disable-gallium-llvm
10make
11
12*** Then we create some symlinks to mesa:
13ln -s "`pwd`/lib/gallium/libd3dadapter9.so.0.0.0" /usr/lib/
14ln -s "`pwd`/lib/gallium/libd3dadapter9.so.0" /usr/lib/
15ln -s "`pwd`/lib/gallium/libd3dadapter9.so" /usr/lib/
16ln -s "`pwd`/include/d3dadapter" /usr/include/
17
18*** Clone and build a patched wine
19git clone git@github.com:iXit/wine.git
20./configure
21make
22
23*** And finally we create some symlinks to our patched wine files:
24for f in d3d9.dll gdi32.dll user32.dll wineps.drv winex11.drv;
25do
26    mv /usr/lib/wine/$f.so /usr/lib/wine/$f.so.old
27    ln -s "`pwd`/dlls/`basename -s .dll $f`/$f.so" /usr/lib/wine/
28done
29
30*** Activating it within wine
31regedit
32Navigate to HKCU\Software\Wine\Direct3D
33If it's not there, create it
34Create a new DWORD value called UseNative
35Set its value to 1
36
37Every Direct3D9 program will now try using nine before wined3d
38
39If you want to selectively enable it per-exe instead, use the key:
40HKCU\Software\Wine\AppDefaults\app.exe\Direct3D\UseNative
41where app.exe is the name of your .exe file
42
43
44*** HOW IT WORKS ***
45
46Nine implements the full IDirect3DDevice9 COM interface and a custom COM
47interface called ID3DAdapter9 which is used to implement a final IDirect3D9Ex
48COM interface.
49ID3DAdapter9 is completely devoid of window system code, meaning this can be
50provided by wine, Xlib, Wayland, etc. It's inadvisible to write a non-Windows
51backend though, as we don't want to encourage linux developers to use this API.
52
53The state tracker is compiled, along with pipe-loader, into a library called
54libd3dadapter9.so. This library loads pipe_[driver].so drivers on demand and
55exports a single symbol for getting a subsystem driver. Currently only DRM is
56supported.
57This library is then linked to the library implementing the IDirect3D9[Ex]
58interface and the actual Direct3D9 entry points (Direct3DCreate9[Ex])
59
60The implementation of IDirect3D9[Ex] lies within wine and coexists with
61wined3d. It's loaded on demand and so if it's not there, it doesn't have any
62drivers or something else is wrong, d3d9.dll will automatically revert to using
63wined3d.
64Whether or not it's even tried is determined by 2 DWORD registry keys.
65> HKCU\Software\Wine\Direct3D\UseNative
66> HKCU\Software\Wine\AppDefaults\app.exe\Direct3D\UseNative
67The former is the global on-switch. The latter is per-exe.
68
69The driver search path can be set at configure time with
70--with-gallium-driver-dir and overridden at runtime with D3D9_DRIVERS_PATH.
71Debugging information can be gotten with the WINEDEBUG channels d3d9 and
72d3dadapter, and state_tracker debug information can be gotten with NINE_DEBUG.
73Help on NINE_DEBUG is shown through NINE_DEBUG=help
74
75Finally, the ID3DPresent[Group] and ID3DAdapter9 interfaces are not set in
76stone, so feel free to hack on those as well as st/nine.
77
78Happy Hacking!
79