[Mesa-dev] Direct3D 9 state tracker

Marek Olšák maraeo at gmail.com
Thu Jul 18 07:39:46 PDT 2013


I think this Direct3D 9 state tracker is the most important project
since Mesa 1.0. I mean this adds native Direct3D 9 driver
infrastructure for Wine on Linux and as such should eventually be
competitive with Windows in terms of performance.

Do we need the horrible OpenGL anymore? Haha, just kidding.

If the Wine modifications are accepted by upstream Wine, I'd like this
state tracker to get merged. :)

Marek

On Tue, Jul 16, 2013 at 9:43 PM, Christoph Bumiller
<e0425955 at student.tuwien.ac.at> wrote:
> So, about two months ago I had the insane idea to pick up Joakim
> Sindholt's Direct3D 9 state tracker that he'd started about 3 years ago
> with the goal to make it run StarCraft 2 so I could finally play at a
> reasonable frame rate ...
>
> With help from Joakim and advice from the wine developers, as well as
> wine's d3d9 tests, things went surprisingly smooth and my original goal
> has been achieved and surpassed, hence I thought I'd post a note here in
> case someone who doesn't yet know about it is interested in trying it out.
>
> ... Now wait, didn't we have a D3D10/11 state tracker already that we
> kicked out because it was unmaintained and not really useful ?
> Yes, but there are a couple of differences to d3d1x:
>
> - the original author has not vanished [yet] (Luca, if you can hear me:
> You cannot leave your children out to die like that !)
> - it's written in C instead of C++ and not relying on horrific multiple
> inheritance with templates hacks to make gcc generate COM-compatible
> vtables (and I'm still not sure if that actually worked)
> - gallium wasn't ready for D3D11, and still isn't (at least the pipe
> drivers aren't), but it is ready for D3D9, and all the features required
> from the pipe drivers are well tested via OpenGL
> - there are no motivating applications using Direct3D 10/11 yet (at
> least for me)
> - and most importantly, contrary to d3d1x, d3d9/st already actually
> works for real applications !
>
> So far I've tried Skyrim, Civilization 5, Anno 1404 and StarCraft 2 on
> the nvc0 and r600g drivers, which work pretty well, at up to x2 the fps
> I get with wined3d (NOTE: no thorough benchmarking done yet).
> Civilization 4 works, too, but it still has a couple of (not too severe)
> rendering issues because I didn't pay much attention to the fixed
> function pipeline and its interaction with the earlier shader versions yet.
>
> If people think it's a good idea to merge it, I'd clean up the few
> modifications I did to gallium, and, once they've been cleared, merge
> the state tracker itself.
> Unfortunately, for proper window system integration, a few modifications
> to wine are required (it used to run without them, but fully correct
> operation isn't possible like that).
>
> Here's the links to the mesa branch containing the state tracker and to
> a patched version of wine:
> https://github.com/chrisbmr/Mesa-3D/tree/gallium-nine
> https://github.com/chrisbmr/wine/tree/d3dadapter9-wip
> (The wine modifications only affect { d3d9.dll.so, gdi32.dll.so,
> user32.dll.so, wineps.drv.so and winex11.drv.so }, so you don't have to
> replace all of it).
>
> Some usage hints:
> https://github.com/chrisbmr/Mesa-3D/blob/gallium-nine/src/gallium/state_trackers/nine/README
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list