A progress update on the D3D engine

Well, last time I said I wanted to move to D3D11, and perhaps integrate the D3D9 and D3D10/11 codebases into a single set. After a few days of hard work, I’ve already achieved those goals, to a certain extent. I looked at the DX11 tech preview in the DX SDK, and decided to give it a go. After one evening of mostly typedef’ing the differences between D3D10 and D3D11 away, I ended up with an engine that could be compiled to either version with just a single #define D3D10 or #define D3D11.

This means that most of the hard work is already done, assuming Microsoft isn’t going to change much in the final API. It went quite smoothly, actually, and I was pleased to see that even with this beta preview, performance was pretty much equal to D3D10. However, I think I will stick to D3D10 for now. Firstly because nobody can run D3D11 stuff yet, and secondly because I’m also planning to do some Cuda code on my nVidia GeForce 8800GTS card. I don’t suppose Cuda will work with D3D11 objects.

While I was at it, I also started backporting some code to the D3D9 engine. I’ve now reached a point where the codebase is mostly identical, with a few #ifdefs handling some specific things. I’ve created a few wrapper functions to hide and abstract away some conceptual differences. It’s by no means complete, but it is good enough to run my current test code. I will just add to it as and when required. It went so smoothly that I decided to integrate the codebases entirely. This actually works now, as well. So my current 6th generation engine can compile to D3D9, D3D10 and D3D11 and run the same basic code.

Not that I’m really planning on writing more D3D9 code at this point… but somehow I found it a shame to just throw the old code away. This way it’s ‘conservated’ for future use. I may want to release something for D3D9 at some point in the future, as long as XP remains popular. And to be honest, it was probably also a bit of a distraction from the work of dealing with D3D10’s new state management system. I have worked out the basic idea, but put off the implementation of it until now.

Now that the D3D9 engine is pretty much ‘done with’, I have no more excuse, so I started a bit with the state handling tonight. Once that is done, I plan to write a custom pipeline using Cuda. Seems like a nice project to get to know Cuda better, and it will allow me flexible tesselation and things. I think that might be the future of rendering, realtime REYES rendering or such. I would actually want to use a combination of D3D10 and OpenCL, or D3D11 with Compute Shaders, but neither OpenCL nor D3D11 are officially released yet, so I’ll just play with Cuda for now. I plan to port over whatever code I have to either OpenCL or D3D11 as soon as they are released. It will probably be D3D11, because that will be a fully integrated solution, where it remains to be seen how well D3D10 and OpenCL integrate.

On another note, I’ve finally sent off my amp for repairs, so I hope to receive it back within a few weeks… Then I can pair it up with my Zoom G9.2tt again, and hopefully experience heavenly tone once more. Although, to be honest I’m not unhappy with my current tone at all.

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

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