Collapsing caps

Originally posted to Shawn Hargreaves Blog on MSDN, Tuesday, March 2, 2010

Optional features with hundreds of caps bits do not a great developer experience make. How do I know which caps I need to check on which hardware? What do I do if they are not set?

Some of the caps we have today are just silly. How is a 3D game supposed to react if RasterCaps.SupportsDepthBufferTest comes back false? I don't know of any hardware that doesn't set this, but in theory some could, and what then?

An interesting exercise (well, interesting to me anyway :-) is to compare the caps found on actual hardware out in the wild:

Untitled

If you compare the full set of caps from many graphics cards, several things become clear:

These findings suggest how we could simplify caps management:

It could take just one line of code to check whether a machine supports Reach or HiDef, which makes it easier to understand what features are safe to use. This also helps when trying to create portable games. If you specify Reach profile, the framework could enforce that you don't accidentally use any HiDef functionality, thus avoiding unpleasant surprises of the "huh, that worked on my machine..." variety.

Blog index   -   Back to my homepage