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

Function compareAstc

tests/ktxdiff/ktxdiff_main.cpp:323–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321}
322
323CompareResult compareAstc(const char* lhs, const char* rhs, std::size_t size, uint32_t width, uint32_t height,
324 const std::string& filepathLhs, const std::string& filepathRhs,
325 bool isFormatSRGB, uint32_t blockSizeX, uint32_t blockSizeY, uint32_t blockSizeZ,
326 float tolerance) {
327 const auto uncompressedLhs = decodeASTC(lhs, size, width, height, filepathLhs, isFormatSRGB, blockSizeX, blockSizeY, blockSizeZ);
328 const auto uncompressedRhs = decodeASTC(rhs, size, width, height, filepathRhs, isFormatSRGB, blockSizeX, blockSizeY, blockSizeZ);
329
330 return compareUnorm8(
331 reinterpret_cast<const char*>(uncompressedLhs.data.get()),
332 reinterpret_cast<const char*>(uncompressedRhs.data.get()),
333 uncompressedLhs.size,
334 tolerance);
335}
336
337bool compare(Texture& lhs, Texture& rhs, float tolerance) {
338 const auto vkFormat = static_cast<VkFormat>(lhs.header.vkFormat);

Callers 1

compareFunction · 0.85

Calls 3

decodeASTCFunction · 0.85
compareUnorm8Function · 0.85
getMethod · 0.45

Tested by

no test coverage detected