src/ktx/libktx/vkloader.c
/* Get appropriate memory type index for a memory allocation. */
Get appropriate memory type index for a memory allocation.
Get appropriate memory type index for a memory allocation .
static uint32_t
ktxVulkanDeviceInfo_getMemoryType(ktxVulkanDeviceInfo* This,
                                  uint32_t typeBits, VkFlags properties)
{
    for (uint32_t i = 0; i < 32; i++)
    {
        if ((typeBits & 1) == 1)
        {
            if ((This->deviceMemoryProperties.memoryTypes[i].propertyFlags & properties) == properties)
            {
                return i;
            }
        }
        typeBits >>= 1;
    }
    return 0;
}
static uint32_t ktxVulkanDeviceInfo_getMemoryType ( ktxVulkanDeviceInfo * This , uint32_t typeBits , VkFlags properties ) { for ( uint32_t i = 0 ; i < 32 ; i ++ ) { if ( ( typeBits & 1 ) == 1 ) { if ( ( This -> deviceMemoryProperties . memoryTypes [ i ] . propertyFlags & properties ) == properties ) { return i ; } } typeBits >>= 1 ; } return 0 ; }
Get appropriate memory type index for a memory allocation.
Get appropriate memory type index for a memory allocation .
// XXX : throw error