MCPcopy Create free account
hub / github.com/BinomialLLC/basis_universal / lowlevel_compression_tests

Function lowlevel_compression_tests

example/example.cpp:1824–1876  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1822}
1823
1824static bool lowlevel_compression_tests()
1825{
1826 // basisu_encoder_init() MUST have been called before this point.
1827 basisu_encoder_init();
1828
1829 if (!test_compress_etc1s())
1830 return false;
1831
1832 if (!test_compress_uastc_ldr_4x4())
1833 return false;
1834
1835 if (!test_compress_uastc_hdr_4x4())
1836 return false;
1837
1838 if (!test_compress_astc_hdr_6x6())
1839 return false;
1840
1841 if (!test_compress_uastc_hdr_6x6i())
1842 return false;
1843
1844 if (!test_compress_astc_ldr_6x6())
1845 return false;
1846
1847 if (!test_compress_xuastc_ldr_6x6())
1848 return false;
1849
1850 for (uint32_t ktx2_iter = 0; ktx2_iter < 2; ktx2_iter++)
1851 {
1852 for (uint32_t mips_iter = 0; mips_iter < 2; mips_iter++)
1853 {
1854 if (!test_compress_etc1s_texture_video(ktx2_iter != 0, mips_iter != 0))
1855 return false;
1856
1857 if (!test_compress_xuastc_ldr_texture_video(ktx2_iter != 0, mips_iter != 0))
1858 return false;
1859
1860 } // mips_iter
1861
1862 } // ktx2_iter
1863
1864 if (!test_compress_uastc_hdr_6x6i_array_custom_mipmap())
1865 return false;
1866
1867 if (!test_compress_etc1s_cubemap(false))
1868 return false;
1869
1870 if (!test_compress_etc1s_cubemap(true))
1871 return false;
1872
1873 printf("lowlevel_compression_tests: Compression OK\n");
1874
1875 return true;
1876}
1877
1878#ifdef FORCE_SAN_FAILURE
1879static void force_san_failure()

Callers 1

mainFunction · 0.85

Tested by

no test coverage detected