DDS: add DX10 BC4/BC5/BC7 support
DX10 DDS files using the BC (block compression) formats were reported as unsupported: knownDXGIFormat() only mapped the floating point DXGI formats, so getFormat() returned FormatUnknown and ensureScanned() failed, e.g. for a BC7_UNORM_SRGB (dxgi 99) image. The following changes have been made: - Added a self-contained BC7 decoder following the "BC7 Format" specification, supporting all 8 modes, for both the UNORM and the UNORM_SRGB variants (loaded as ARGB32) - Added BC4 support (single channel, loaded as Grayscale8) - Added BC5 support, reusing the existing ATI2/3Dc normal map decoder - Added DX10 mappings for BC1/BC2/BC3, which were previously handled only as the legacy DXT1/DXT3/DXT5 fourCC formats - Added read tests for BC4, BC5, BC7 and BC7_UNORM_SRGB, plus DX10 variants of the existing BC1/BC2/BC3 test images BC6H (HDR) is not supported. The test data was generated from the existing rgba.png test image, encoded with bc7enc_rdo and decoded with bcdec. BUG: 524495
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 5.3 KiB |