General API Improvements

Not all enhancements come in the ways of features – there is still quite a bit of overhead in the DirectX interfaces, especially in the ways of state changes. Currently, if you want to render a scene, everything must be split up into batches of geometry that all have the exact same textures, all reside in a contiguous block of the exact same vertex buffer, use exactly the same shaders, use the same transformation matrices, et cetera. Basically, if there’s anything at all different about a block of geometry, it has to be rendered separately. The problem with this is that every draw call incurs quite a bit of overhead, as the call has to go through the DirectX interfaces, through the driver, and eventually to the graphics processor. Some of this can only be solved via more efficient interfaces with the operating system and, apparently, Microsoft plans to do this with Longhorn.

Another way to reduce some of this overhead is to allow mesh instancing in the graphics processor. Mesh instancing is the process of taking a single mesh and creating several different instances of it with different transformations, textures, or even with different displacement maps.


Mesh Instancing

Actually, given the General I/O Model, it should be possible to put all visible textures and transformation matrices into an array, accessible by the shaders, and submit all geometry that share the same shaders as one big batch, and let the shaders decide exactly which texture and transformation matrix goes with what set of geometry. This would drastically decrease the amount of CPU work required for rendering by moving most of the state management to the graphics processor.