Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/tests/surface.c:
}, }, /*
* We don't match formats here because we encode our BMP headers* differently. Native encodes with the same header as* D3DFMT_X8R8G8B8, it just sets the values in the alpha channel. The* format is distinguished by checking the image. We encode a bitmap* V4 header with a dedicated alpha mask, so we'll always report* D3DFMT_A8R8G8B8, regardless of whether or not any alpha channel* values are non-zero.
* For BMP/DIB, these encode as D3DFMT_X8R8G8B8. If there's a single* pixel with a non-zero alpha channel, it reports as D3DFMT_A8R8G8B8.
Nitpick, "If there's at least one pixel..."