GPUOpen-Tools / compressonator

Tool suite for Texture and 3D Model Compression, Optimization and Analysis using CPUs, GPUs and APUs
1.3k stars 198 forks source link

Output DDS file missing required flags DDSD_CAPS, DDSD_PIXELFORMAT #302

Open tamlin-mike opened 9 months ago

tamlin-mike commented 9 months ago

From documentation, a valid .DDS file must have at least the following flags set in DDS_HEADER/DDSURFACEDESC2 dwFlags:

DDSD_CAPS (0x1) DDSD_HEIGHT (0x2) DDSD_WIDTH (0x4) DDSD_PIXELFORMAT (0x1000)

A simple test (compressonatorcli.exe -fd BC7 -mipsize 1 infile.png outfile.dds) produced an invalid .DDS file, missing both DDSD_CAPS and DDSD_PIXELFORMAT.

The fix is obvious.