转载请注明出处为KlayGE游戏引擎,本文的永久链接为http://www.klayge.org/?p=626

In WinXP, even a GPU supports D3D10+ can only uses D3D9 API. Actually, most GPU vendors have their extensions, some D3D10+’s features are exposed to D3D9 API. For example, here’s a list of special texture formats, which are used through FOURCC. You can use CheckDeviceFormat to detect whether its available, and pass it to CreateTexture. The original source of the table below is vendors GPU document. Aras from Unity assemble them up:

Usage column: DS=DepthStencil, RT=RenderTarget; Resource column: tex=texture, surf=surface. More green means more hardware support.

Format Usage Resource Description NVIDIA GeForce ATI Radeon Intel
Shadow mapping
D3DFMT_D16 DS tex Sample depth buffer directly as shadow map. 3+ HD 2xxx+ 965+
D3DFMT_D24X8 DS tex 3+ HD 2xxx+ 965+
Depth Buffer As Texture
DF16 DS tex Read depth buffer as texture. 9500+ G45+
DF24 DS tex X1300+
INTZ DS tex 8+ HD 4xxx+ G45+
RAWZ DS tex 6 & 7
Anti-Aliasing related
RESZ RT surf Resolve MSAA’d depth stencil surface into non-MSAA’d depth texture. HD 4xxx+ G45+
ATOC 0 surf Transparency anti-aliasing. 7+
SSAA 0 surf 7+
All ATI SM2.0+ hardware 9500+
n/a Coverage Sampled Anti-Aliasing 8+
Texturing
ATI1 0 tex ATI1n & ATI2n texture compression formats. 8+ X1300+ G45+
ATI2 0 tex 6+ 9500+ G45+
DF24 DS tex Fetch 4: when sampling 1 channel texture, return four touched texel values. Check for DF24 support. X1300+
Misc
NULL RT surf Dummy render target surface that does not consume video memory. 6+ HD 4xxx+
NVDB 0 surf Depth Bounds Test. 6+
R2VB 0 surf Render into vertex buffer. 6 & 7 9500+
INST 0 surf Geometry Instancing on pre-SM3.0 hardware. 9500+

Complete GPU extensions, please see: