MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / main

Function main

external/dfdutils/testbidirectionalmapping.c:576–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574}
575
576int main(int argc, char** argv)
577{
578 unsigned int i;
579 for (i = 1; i <= 184; ++i) {
580 uint32_t *dfd = getmap((enum VkFormat)i);
581 VkFormat f = unmap(dfd);
582 if (i != f) printf("Input and output enums differ: %s (%d) -> %s (%d)\n",
583 formatname(i),i, formatname(f),f);
584 free((void *)dfd);
585 }
586
587
588 for (i = VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG;
589 i <= VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG; ++i) {
590 uint32_t *dfd = getmap((enum VkFormat)i);
591 VkFormat f = unmap(dfd);
592 if (i != f) printf("Input and output enums differ: %s (%d) -> %s (%d)\n",
593 formatname(i),i, formatname(f),f);
594 free((void *)dfd);
595 }
596
597 for (i = VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT;
598 i <= VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT; ++i) {
599 uint32_t *dfd = getmap((enum VkFormat)i);
600 VkFormat f = unmap(dfd);
601 if (i != f) printf("Input and output enums differ: %s (%d) -> %s (%d)\n",
602 formatname(i),i, formatname(f),f);
603 free((void *)dfd);
604 }
605
606 for (i = VK_FORMAT_ASTC_3x3x3_UNORM_BLOCK_EXT;
607 i <= VK_FORMAT_ASTC_6x6x6_SFLOAT_BLOCK_EXT; ++i) {
608 uint32_t *dfd = getmap((enum VkFormat)i);
609 VkFormat f = unmap(dfd);
610 if (i != f) printf("Input and output enums differ: %s (%d) -> %s (%d)\n",
611 formatname(i),i, formatname(f),f);
612 free((void *)dfd);
613 }
614 return 0;
615}

Callers

nothing calls this directly

Calls 4

getmapFunction · 0.85
unmapFunction · 0.85
printfFunction · 0.85
formatnameFunction · 0.85

Tested by

no test coverage detected