{"record":{"id":"0e231254b3d00cd0","repo":"MonoGame/MonoGame","slug":"unsupported-dds-header-dxt10-struct-found","errorCode":null,"errorMessage":"Unsupported DDS_HEADER_DXT10 struct found","messagePattern":"Unsupported DDS_HEADER_DXT10 struct found","errorType":"exception","errorClass":"ContentLoadException","httpStatus":null,"severity":"error","filePath":"MonoGame.Framework.Content.Pipeline/DdsLoader.cs","lineNumber":275,"sourceCode":"            header.ddspf.dwRgbBitCount = reader.ReadUInt32();\n            header.ddspf.dwRBitMask = reader.ReadUInt32();\n            header.ddspf.dwGBitMask = reader.ReadUInt32();\n            header.ddspf.dwBBitMask = reader.ReadUInt32();\n            header.ddspf.dwABitMask = reader.ReadUInt32();\n            // Continue reading DDS_HEADER\n            header.dwCaps = (DdsCaps)reader.ReadUInt32();\n            header.dwCaps2 = (DdsCaps2)reader.ReadUInt32();\n            // dwCaps3 unused\n            reader.ReadUInt32();\n            // dwCaps4 unused\n            reader.ReadUInt32();\n            // dwReserved2 unused\n            reader.ReadUInt32();\n\n            // Check for the existence of the DDS_HEADER_DXT10 struct next\n            if (header.ddspf.dwFlags == Ddpf.FourCC && header.ddspf.dwFourCC == FourCC.Dx10)\n            {\n                throw new ContentLoadException(\"Unsupported DDS_HEADER_DXT10 struct found\");\n            }\n\n            var faceCount = 1;\n            var mipMapCount = (int)(header.dwCaps.HasFlag(DdsCaps.MipMap) ? header.dwMipMapCount : 1);\n            TextureContent output;\n            if (header.dwCaps2.HasFlag(DdsCaps2.Cubemap))\n            {\n                if (!header.dwCaps2.HasFlag(DdsCaps2.CubemapAllFaces))\n                    throw new ContentLoadException(\"Incomplete cubemap in DDS file\");\n                faceCount = 6;\n                output = new TextureCubeContent() { Identity = identity };\n            }\n            else\n            {\n                output = new Texture2DContent() { Identity = identity };\n            }\n\n            var format = GetSurfaceFormat(ref header.ddspf, out bool rbSwap);","sourceCodeStart":257,"sourceCodeEnd":293,"githubUrl":"https://github.com/MonoGame/MonoGame/blob/1d71bbd0ff4071a03caa583aa3bc56b85924a819/MonoGame.Framework.Content.Pipeline/DdsLoader.cs#L257-L293","documentation":"Thrown by DdsLoader.Import when the pixel format flags indicate FourCC and the FourCC code is 'DX10' (0x30315844), signalling the presence of a DDS_HEADER_DXT10 extension struct. MonoGame's DDS importer does not support the DX10 header variant, which carries additional format metadata (e.g. BC4-BC7, array slices).","triggerScenarios":"Importing a DDS file authored with a DX10 header, commonly produced when exporting BC4, BC5, BC6H, BC7, or texture-array formats via modern texconv or DirectX tools.","commonSituations":"Using texconv defaults that emit DX10 headers; exporting BC7 (high-quality alpha) which requires the DX10 extension; artists using modern compression unaware MonoGame's importer lacks DX10 support.","solutions":["Re-export the DDS without a DX10 header using a legacy format: texconv -f DXT5 or -f DXT1 (these produce standard, non-DX10 headers).","Avoid BC4/BC5/BC6H/BC7 formats, which mandate DX10; use DXT1 or DXT5 instead.","If using texconv, ensure the output format maps to a non-DX10 FourCC."],"exampleFix":"// before: texconv -f BC3_UNORM texture.png  (may still embed DX10 in some versions)\n// after: explicitly target legacy DXT5\n//   texconv -f DXT5 texture.png","handlingStrategy":"validation","validationCode":"// Avoid DX10 headers by exporting with legacy FourCC formats:\n//   texconv -f DXT5 asset.png -o .\n// To detect a DX10 header programmatically, read the pixel format:\n// (simplified) if dwFourCC == 'DX10' (0x30315844) and DDPF.FourCC set -> reject.","typeGuard":null,"tryCatchPattern":"try\n{\n    texture = DdsLoader.Import(filename, context);\n}\ncatch (ContentLoadException ex) when (ex.Message.Contains(\"DDS_HEADER_DXT10\"))\n{\n    logger.LogMessage($\"{filename} uses a DX10 header (e.g. BC7); re-export as DXT1/DXT5.\");\n    throw;\n}","preventionTips":["Avoid BC4-BC7 and array textures that require DX10 headers.","Configure texconv to emit legacy DXT formats.","Document that DX10 DDS is unsupported for artists."],"tags":["dds","texture","content-pipeline","dx10","unsupported-format","monogame"],"backgroundTag":null,"analyzedSha":"1d71bbd0ff4071a03caa583aa3bc56b85924a819","analyzedAt":"2026-08-13T17:10:33.625Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}