Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/surface.c:
- TRACE("Pixel format is %#x.\n", image->format);
- if (header->caps2 & DDS_CAPS2_VOLUME)
- {
image->depth = header->depth;
image->resource_type = D3DRTYPE_VOLUMETEXTURE;
- }
- else if (header->caps2 & DDS_CAPS2_CUBEMAP)
- {
DWORD face;
faces = 0;
for (face = DDS_CAPS2_CUBEMAP_POSITIVEX; face <= DDS_CAPS2_CUBEMAP_NEGATIVEZ; face <<= 1)
{
if (header->caps2 & face)
faces++;
}
This could be replaced by a `popcount(header->caps2 & DDS_CAPS2_CUBEMAP_ALL_FACES)`, except it's probably not worth it just for this one use. We apparently can't depend on the builtin (we have multiple wrappers in Wine) and either adding one more implementation here or factoring out one of the existing ones seems overkill.