This commit is contained in:
Chuck Walbourn 2016-12-08 13:26:05 -08:00
commit 4afbb0e8e6
2 changed files with 10 additions and 0 deletions

View File

@ -632,6 +632,11 @@ namespace
} }
// No DXGI format maps to ISBITMASK(0x0f,0x00,0x00,0xf0) aka D3DFMT_A4L4 // No DXGI format maps to ISBITMASK(0x0f,0x00,0x00,0xf0) aka D3DFMT_A4L4
if (ISBITMASK(0x000000ff, 0x00000000, 0x00000000, 0x0000ff00))
{
return DXGI_FORMAT_R8G8_UNORM; // Some DDS writers assume the bitcount should be 8 instead of 16
}
} }
if (16 == ddpf.RGBBitCount) if (16 == ddpf.RGBBitCount)

View File

@ -635,6 +635,11 @@ namespace
} }
// No DXGI format maps to ISBITMASK(0x0f,0x00,0x00,0xf0) aka D3DFMT_A4L4 // No DXGI format maps to ISBITMASK(0x0f,0x00,0x00,0xf0) aka D3DFMT_A4L4
if (ISBITMASK(0x000000ff, 0x00000000, 0x00000000, 0x0000ff00))
{
return DXGI_FORMAT_R8G8_UNORM; // Some DDS writers assume the bitcount should be 8 instead of 16
}
} }
if (16 == ddpf.RGBBitCount) if (16 == ddpf.RGBBitCount)