MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / VmaValidateMagicValue

Function VmaValidateMagicValue

include/vk_mem_alloc.h:3824–3838  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3822}
3823
3824static bool VmaValidateMagicValue(const void* pData, VkDeviceSize offset)
3825{
3826#if VMA_DEBUG_MARGIN > 0 && VMA_DEBUG_DETECT_CORRUPTION
3827 const uint32_t* pSrc = (const uint32_t*)((const char*)pData + offset);
3828 const size_t numberCount = VMA_DEBUG_MARGIN / sizeof(uint32_t);
3829 for (size_t i = 0; i < numberCount; ++i, ++pSrc)
3830 {
3831 if (*pSrc != VMA_CORRUPTION_DETECTION_MAGIC_VALUE)
3832 {
3833 return false;
3834 }
3835 }
3836#endif
3837 return true;
3838}
3839
3840/*
3841Fills structure with parameters of an example buffer to be used for transfers

Callers 2

CheckCorruptionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected