| 1454 | #define OPT_UINT4S(structArr, memberPrefix) OPT_UINT4((structArr)[0], memberPrefix), OPT_UINT4((structArr)[1], memberPrefix) |
| 1455 | |
| 1456 | void CommandCompare::compareHeader(PrintDiff& diff, InputStreams& streams) { |
| 1457 | diff.setContext("Header\n\n"); |
| 1458 | |
| 1459 | headers = read<KTX_header2>(streams, 0, "header"); |
| 1460 | |
| 1461 | diff << DiffIdentifier("identifier", "/header/identifier", headers[0], headers[1]); |
| 1462 | |
| 1463 | if (!options.ignoreFormatHeader) { |
| 1464 | diff << DiffEnum<VkFormat>("vkFormat", "/header/vkFormat", headers[0].vkFormat, headers[1].vkFormat, |
| 1465 | [&](auto i) { return vkFormatString(VkFormat(headers[i].vkFormat)); }); |
| 1466 | diff << Diff("typeSize", "/header/typeSize", headers[0].typeSize, headers[1].typeSize); |
| 1467 | } |
| 1468 | |
| 1469 | diff << Diff("pixelWidth", "/header/pixelWidth", headers[0].pixelWidth, headers[1].pixelWidth); |
| 1470 | diff << Diff("pixelHeight", "/header/pixelHeight", headers[0].pixelHeight, headers[1].pixelHeight); |
| 1471 | diff << Diff("pixelDepth", "/header/pixelDepth", headers[0].pixelDepth, headers[1].pixelDepth); |
| 1472 | diff << Diff("layerCount", "/header/layerCount", headers[0].layerCount, headers[1].layerCount); |
| 1473 | diff << Diff("faceCount", "/header/faceCount", headers[0].faceCount, headers[1].faceCount); |
| 1474 | diff << Diff("levelCount", "/header/levelCount", headers[0].levelCount, headers[1].levelCount); |
| 1475 | |
| 1476 | if (!options.ignoreSupercomp) |
| 1477 | diff << DiffEnum<ktxSupercmpScheme>("supercompressionScheme", "/header/supercompressionScheme", |
| 1478 | headers[0].supercompressionScheme, headers[1].supercompressionScheme); |
| 1479 | |
| 1480 | if (options.ignoreIndex != IgnoreIndex::all) { |
| 1481 | diff << DiffHex("dataFormatDescriptor.byteOffset", "/index/dataFormatDescriptor/byteOffset", |
| 1482 | headers[0].dataFormatDescriptor.byteOffset, headers[1].dataFormatDescriptor.byteOffset); |
| 1483 | diff << Diff("dataFormatDescriptor.byteLength", "/index/dataFormatDescriptor/byteLength", |
| 1484 | headers[0].dataFormatDescriptor.byteLength, headers[1].dataFormatDescriptor.byteLength); |
| 1485 | |
| 1486 | diff << DiffHex("keyValueData.byteOffset", "/index/keyValueData/byteOffset", |
| 1487 | headers[0].keyValueData.byteOffset, headers[1].keyValueData.byteOffset); |
| 1488 | diff << Diff("keyValueData.byteLength", "/index/keyValueData/byteLength", |
| 1489 | headers[0].keyValueData.byteLength, headers[1].keyValueData.byteLength); |
| 1490 | |
| 1491 | diff << DiffHex("supercompressionGlobalData.byteOffset", "/index/supercompressionGlobalData/byteOffset", |
| 1492 | headers[0].supercompressionGlobalData.byteOffset, headers[1].supercompressionGlobalData.byteOffset); |
| 1493 | diff << Diff("supercompressionGlobalData.byteLength", "/index/supercompressionGlobalData/byteLength", |
| 1494 | headers[0].supercompressionGlobalData.byteLength, headers[1].supercompressionGlobalData.byteLength); |
| 1495 | } |
| 1496 | } |
| 1497 | |
| 1498 | void CommandCompare::compareLevelIndex(PrintDiff& diff, InputStreams& streams) { |
| 1499 | if (options.ignoreIndex != IgnoreIndex::none) return; |
nothing calls this directly
no test coverage detected