C# and DirectX 11 — Yes you can!

Along with Windows 7, several beta APIs to go along with the new OS have been available. One of the biggest is Direct3D 11, and although we were dabbling with it before, what was previously available was strictly experimental. Although it is by no means stable, SlimDX now enjoys full support for Direct3D 11! Thanks to Mike Popoloski for doing an insane amount of work, again.

Right now, the proper support is only in the Subversion repository. However, our June release should be out shortly and that will have a Windows 7 companion DLL with the D3D 11 support. Remember that it’s an SDK-only component, and the runtime won’t install it. Direct2D and DirectWrite are in there as well. Now keep in mind that all of these APIs are beta, and our wrappers are unstable as a result too. You’ll also have to translate the C++ samples in the DX SDK for the time being, as we don’t have our own samples yet. We’re working on that, and hopefully we’ll have a few samples out later in the year.

There’s a lot of cool new stuff in 11. First off, it supports feature levels, just like 10.1. Although you’ll have to have Vista SP2+ to run 11 based apps, they will run on any WDDM-compatible hardware, which should include the entire gamut of Direct3D 9 and 10 hardware from all major manufacturers (and I don’t just mean the big three). It also has full multithreaded rendering support — not the faked granular locking that 9 and 10’s multithreaded devices have, but proper synchronization. This is supported even on the lower feature levels, so if you can stand to give up XP and pre-SP2 Vista as targets, you might be in line for some big performance benefits. I found a really nice blog post that goes into a lot more detail.

There are a number of new shader types, but basically the entire API has been divided into separate draw and dispatch pipelines. The heart of the dispatch pipeline is the compute shader, which serves the same purpose as OpenCL, CUDA, and so on. In other words, it provides support for general purpose GPU (GPGPU) computing. This is a big deal for high performance computing on the Windows platform, since CUDA is NVIDIA-specific and OpenCL support is mythical at best. I’m eager to see some high performance applications which are powered by managed code and then go straight to the GPU for real heavy lifting. (This will support DX 10 class hardware by final release, but support is not available yet.)

SlimDX has got you covered on all of this. These APIs are expected to be final with the launch of Windows 7, which means that our fourth quarter release will have full, non-beta support for 11. (No more separate DLL at that point.) We’d like our implementation to be as good as it can be, and for that, we need users to see how it works out and to let us know about anything we’re missing! Sorry Microsoft, but when it comes to DirectX on the .NET platform, we have every intention of being the de facto standard. And remember to check out the full features list for SlimDX!


5 thoughts on “C# and DirectX 11 — Yes you can!

  1. Silly question – why does DX11/D2D/DWrite support is in file called SlimDX.Windows7.dll ? Afaik DX11/D2D/DWrite will be available also on Windows Vista, right?

  2. We’re considering them collectively as the “Windows 7” technologies, since they’re basically coming in with the new OS. We’re using a separate DLL because these are still considered beta and so we don’t want to mix them with the regular distribution. (SlimDX.Windows7.dll is NOT included in the redistributable package.) The new DLL will go away once the APIs are all final, which we’re assuming will happen when Win7 is finally out in October.

  3. Thanks xyzzer,
    It seems Windows API Code Pack has the support needed for the new Windows 7 Direct3D 11, Direct2D and DirectWrite.
    The nice things they have a number of samples for D2D and DWrite already, so we won’t need to translate C++ samples.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s